public function CourseObjectPoll::getReport in Course 8.3
Same name and namespace in other branches
- 8.2 modules/course_poll/src/Course/Object/CourseObjectPoll.php \Drupal\course_poll\Course\Object\CourseObjectPoll::getReport()
File
- modules/
course_poll/ src/ Course/ Object/ CourseObjectPoll.php, line 64
Class
- CourseObjectPoll
- Parent class for poll tracking.
Namespace
Drupal\course_poll\Course\ObjectCode
public function getReport($key) {
module_load_include('inc', 'poll', 'poll.pages');
switch ($key) {
case 'results':
return array(
'title' => $this
->getNode()->title,
'content' => poll_view_results($this
->getNode(), NULL, NULL, NULL),
);
case 'all':
$out = poll_votes($this
->getNode());
return array(
'title' => 'All votes',
'content' => drupal_render($out),
);
}
return parent::getReport($key);
}