public function CourseObjectQuiz::getReports in Course 8.2
Same name and namespace in other branches
- 8.3 modules/course_quiz/src/Plugin/course/CourseObject/CourseObjectQuiz.php \Drupal\course_quiz\Plugin\course\CourseObject\CourseObjectQuiz::getReports()
- 3.x modules/course_quiz/src/Plugin/course/CourseObject/CourseObjectQuiz.php \Drupal\course_quiz\Plugin\course\CourseObject\CourseObjectQuiz::getReports()
Let the course object provide its own reports.
Return value
array An array indexed by report key, containing 'title' which is the menu link in the course object reports.
Overrides CourseObject::getReports
File
- modules/
course_quiz/ src/ Plugin/ course/ CourseObject/ CourseObjectQuiz.php, line 128
Class
- CourseObjectQuiz
- Plugin annotation @CourseObject( id = "quiz", label = "Quiz", handlers = { "fulfillment" = "\Drupal\course_quiz\Plugin\course\CourseObject\CourseObjectQuizFulfillment" } )
Namespace
Drupal\course_quiz\Plugin\course\CourseObjectCode
public function getReports() {
$reports = parent::getReports();
$reports['results'] = array(
'title' => t('Results'),
);
if (Drupal::moduleHandler()
->moduleExists('quiz_stats')) {
$reports['statistics'] = array(
'title' => t('Statistics'),
);
}
return $reports;
}