You are here

public function CourseObjectSignup::getReport in Course 7.2

Same name and namespace in other branches
  1. 6 modules/course_signup/course_signup.classes.inc \CourseObjectSignup::getReport()
  2. 7 modules/course_signup/course_signup.classes.inc \CourseObjectSignup::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_signup/course_signup.classes.inc, line 61

Class

CourseObjectSignup

Code

public function getReport($key) {
  module_load_include('inc', 'signup', 'includes/node_output');
  switch ($key) {
    case 'attendance':
      return array(
        'title' => t('Attendance'),
        'content' => t('These are the users who have enrolled in this course object.<br/>You may administer attendance on the !signups tab.', array(
          '!signups' => l('Signups', "node/{$this->getInstanceId()}/signups"),
        )) . signup_user_list_output($this
          ->getNode()),
      );
  }
  return parent::getReport($key);
}