Merge branch 'MDL-30592' of git://github.com/timhunt/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 14 Dec 2011 21:03:26 +0000 (22:03 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 14 Dec 2011 21:03:26 +0000 (22:03 +0100)
1  2 
lib/moodlelib.php
lib/questionlib.php
mod/quiz/report/statistics/report.php

Simple merge
Simple merge
@@@ -91,13 -92,9 +91,13 @@@ class quiz_statistics_report extends qu
              $currentgroup = 0;
              $groupstudents = array();
  
 +        } else if ($currentgroup == self::NO_GROUPS_ALLOWED) {
 +            $groupstudents = array();
 +            $nostudentsingroup = true;
 +
          } else {
              // All users who can attempt quizzes and who are in the currently selected group
-             $groupstudents = get_users_by_capability($context,
+             $groupstudents = get_users_by_capability($this->context,
                      array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),
                      '', '', '', '', $currentgroup, '', false);
              if (!$groupstudents) {