You are here

public function CourseObjectAccess::getObjectOptions in Course 7

Same name and namespace in other branches
  1. 7.2 includes/CourseObjectAccess.inc \CourseObjectAccess::getObjectOptions()

Helper method to get possible objects.

1 call to CourseObjectAccess::getObjectOptions()
CourseObjectAccessConditional::optionsForm in plugins/course_object_access/conditional.inc
1 method overrides CourseObjectAccess::getObjectOptions()
CourseObjectAccessGrade::getObjectOptions in plugins/course_object_access/grade.inc
Helper method to get possible graded objects.

File

includes/CourseObjectAccess.inc, line 20

Class

CourseObjectAccess
Access handler for CourseObjects.

Code

public function getObjectOptions() {
  $options = array(
    '',
  );
  foreach ($this
    ->getCourseObject()
    ->getCourse()
    ->getObjects() as $courseObject) {
    if ($courseObject
      ->getId() != $this
      ->getCourseObject()
      ->getId()) {
      $options[$courseObject
        ->getId()] = $courseObject
        ->getTitle();
    }
  }
  return $options;
}