public function CourseObjectAccessGrade::getObjectOptions in Course 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/course/CourseObjectAccess/CourseObjectAccessGrade.php \Drupal\course\Plugin\course\CourseObjectAccess\CourseObjectAccessGrade::getObjectOptions()
- 3.x src/Plugin/course/CourseObjectAccess/CourseObjectAccessGrade.php \Drupal\course\Plugin\course\CourseObjectAccess\CourseObjectAccessGrade::getObjectOptions()
Helper method to get possible graded objects.
Overrides CourseObjectAccessPluginBase::getObjectOptions
1 call to CourseObjectAccessGrade::getObjectOptions()
- CourseObjectAccessGrade::optionsForm in src/
Plugin/ course/ CourseObjectAccess/ CourseObjectAccessGrade.php
File
- src/
Plugin/ course/ CourseObjectAccess/ CourseObjectAccessGrade.php, line 140
Class
- CourseObjectAccessGrade
- Plugin annotation @CourseObjectAccess( id = "grade", label = @Translation("Grade"), )
Namespace
Drupal\course\Plugin\course\CourseObjectAccessCode
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;
}