You are here

public function CourseObjectQuiz::getReport in Course 6

Same name and namespace in other branches
  1. 7.2 modules/course_quiz/course_quiz.classes.inc \CourseObjectQuiz::getReport()
  2. 7 modules/course_quiz/course_quiz.classes.inc \CourseObjectQuiz::getReport()

Let the course object provide its own reports.

Return value

array An array containing:

  • title: The title of this report as show on the page
  • content: Content to be displayed.
  • url: URL to be loaded in an iframe.

Reports should return either 'content' or 'url'.

Overrides CourseObject::getReport

See also

CourseObjectQuiz::getReports()

File

modules/course_quiz/course_quiz.classes.inc, line 103

Class

CourseObjectQuiz

Code

public function getReport($key) {
  module_load_include('inc', 'quiz', 'quiz.admin');
  switch ($key) {
    case 'results':
      return array(
        'title' => t('Quiz results'),
        'content' => drupal_get_form('quiz_results_manage_results_form', $this->node),
      );
  }
}