You are here

public function CourseObjectAccessGrade::getObjectOptions in Course 7

Same name and namespace in other branches
  1. 7.2 plugins/course_object_access/grade.inc \CourseObjectAccessGrade::getObjectOptions()

Helper method to get possible graded objects.

Overrides CourseObjectAccess::getObjectOptions

1 call to CourseObjectAccessGrade::getObjectOptions()
CourseObjectAccessGrade::optionsForm in plugins/course_object_access/grade.inc

File

plugins/course_object_access/grade.inc, line 137

Class

CourseObjectAccessGrade

Code

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