public function CourseObjectWebform::getReport in Course 6
Same name and namespace in other branches
- 7.2 modules/course_webform/course_webform.classes.inc \CourseObjectWebform::getReport()
- 7 modules/course_webform/course_webform.classes.inc \CourseObjectWebform::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_webform/ course_webform.classes.inc, line 43
Class
- CourseObjectWebform
- Parent class for webform course tracking.
Code
public function getReport($key) {
module_load_include('inc', 'webform', 'includes/webform.report');
switch ($key) {
case 'submissions':
return array(
'title' => t('Webform results'),
'content' => webform_results_submissions($this->node, FALSE, 50),
);
case 'analysis':
return array(
'title' => t('Webform results'),
'content' => webform_results_analysis($this->node),
);
case 'download':
return array(
'title' => t('Webform results'),
'content' => drupal_get_form('webform_results_download_form', $this->node),
);
}
}