MDL-28522 Choice : View reports now correctly shows unanswered column - thanks to...
authorDan Marsden <dan@danmarsden.com>
Wed, 25 Jan 2012 07:03:11 +0000 (20:03 +1300)
committerAparup Banerjee <aparup@moodle.com>
Wed, 1 Feb 2012 03:24:54 +0000 (11:24 +0800)
mod/choice/report.php

index b9ef145..1497376 100644 (file)
         }
         exit;
     }
+    // Show those who haven't answered the question.
+    if (!empty($choice->showunanswered)) {
+        $choice->option[0] = get_string('notanswered', 'choice');
+        $choice->maxanswers[0] = 0;
+    }
 
     $results = prepare_choice_show_results($choice, $course, $cm, $users);
     $renderer = $PAGE->get_renderer('mod_choice');