You are here

public function CourseObject::getOptions in Course 6

Same name and namespace in other branches
  1. 7.2 includes/CourseObject.inc \CourseObject::getOptions()
  2. 7 includes/CourseObject.inc \CourseObject::getOptions()

Get options, with session options having precedence.

Overrides CourseHandler::getOptions

8 calls to CourseObject::getOptions()
CourseObject::getOptionsSummary in includes/course_object.core.inc
Get core options summary.
CourseObject::optionsForm in includes/course_object.core.inc
Default options form for all course objects.
CourseObject::optionsSubmit in includes/course_object.core.inc
Save object configs to cache.
CourseObjectCertificate::optionsForm in modules/course_certificate/course_certificate.classes.inc
Default options form for all course objects.
CourseObjectManual::getStatus in modules/course_object_manual/course_object_manual.classes.inc
Return a message about the user's status in this object, for when this object is hidden.

... See full list

File

includes/course_object.core.inc, line 511

Class

CourseObject
Parent abstract base class of all course objects.

Code

public function getOptions() {
  $options = parent::getOptions();
  $sessionDefaults = array();
  if (isset($options['nid']) && isset($options['coid']) && isset($_SESSION['course'][$options['nid']]['editing'][$options['coid']])) {
    $sessionDefaults += array_filter((array) $_SESSION['course'][$options['nid']]['editing'][$options['coid']], array(
      $this,
      'optionFilter',
    ));
  }
  return array_merge($options, (array) $sessionDefaults);
}