You are here

public function CourseObject::getOptions in Course 7

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

Get options, with session options, except weight, having precedence.

Overrides CourseHandler::getOptions

9 calls to CourseObject::getOptions()
CourseObject::getOptionsSummary in includes/CourseObject.inc
Get core options summary.
CourseObject::optionsForm in includes/CourseObject.inc
Default options form for all course objects.
CourseObject::optionsSubmit in includes/CourseObject.inc
Save object configs to cache.
CourseObjectBook::optionsForm in modules/course_book/course_book.classes.inc
Default options form for all course objects.
CourseObjectCertificate::optionsForm in modules/course_certificate/course_certificate.classes.inc
Default options form for all course objects.

... See full list

File

includes/CourseObject.inc, line 538

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',
    ));
    unset($sessionDefaults['weight']);
  }
  return array_merge($options, (array) $sessionDefaults);
}