diff --git a/mod/quiz/report/overview/report.php b/mod/quiz/report/overview/report.php index f91c360acd7..c106747be7d 100644 --- a/mod/quiz/report/overview/report.php +++ b/mod/quiz/report/overview/report.php @@ -34,7 +34,7 @@ class quiz_overview_report extends quiz_default_report { /// find out current groups mode $currentgroup = groups_get_activity_group($cm, true); - if (!$students = get_users_by_capability($this->context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'','','','','','',false)){ + if (!$students = get_users_by_capability($this->context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'id,1','','','','','',false)){ $students = array(); } else { $students = array_keys($students); @@ -46,7 +46,7 @@ class quiz_overview_report extends quiz_default_report { $groupstudents = array(); } else { // all users who can attempt quizzes and who are in the currently selected group - if (!$groupstudents = get_users_by_capability($this->context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'','','','',$currentgroup,'',false)){ + if (!$groupstudents = get_users_by_capability($this->context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'id,1','','','',$currentgroup,'',false)){ $groupstudents = array(); } else { $groupstudents = array_keys($groupstudents); diff --git a/mod/quiz/report/responses/report.php b/mod/quiz/report/responses/report.php index 7ca786dae8a..1b46a6f4d1e 100644 --- a/mod/quiz/report/responses/report.php +++ b/mod/quiz/report/responses/report.php @@ -90,7 +90,7 @@ class quiz_responses_report extends quiz_default_report { $displayoptions['qmfilter'] = $qmfilter; //work out the sql for this table. - if (!$students = get_users_by_capability($context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'','','','','','',false)){ + if (!$students = get_users_by_capability($context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'id,1','','','','','',false)){ $students = array(); } else { $students = array_keys($students); @@ -102,7 +102,7 @@ class quiz_responses_report extends quiz_default_report { $groupstudents = array(); } else { // all users who can attempt quizzes and who are in the currently selected group - if (!$groupstudents = get_users_by_capability($context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'','','','',$currentgroup,'',false)){ + if (!$groupstudents = get_users_by_capability($context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'id,1','','','',$currentgroup,'',false)){ $groupstudents = array(); } else { $groupstudents = array_keys($groupstudents);