Skip to content
Browse files

Merge branch 'get_users_by_capability_fix_m25' of http://github.com/t…

…imgus/moodle into MOODLE_25_STABLE
  • Loading branch information...
2 parents f0d974f + 0bad576 commit f1293083a2f4f6970baa6a4221b5d9844b303877 @stronk7 stronk7 committed Jul 2, 2013
Showing with 8 additions and 4 deletions.
  1. +4 −2 mod/scorm/report/basic/report.php
  2. +4 −2 mod/scorm/report/interactions/report.php
View
6 mod/scorm/report/basic/report.php
@@ -83,21 +83,23 @@ function display($scorm, $cm, $course, $download) {
if (empty($currentgroup)) {
// all users who can attempt scoes
- if (!$students = get_users_by_capability($contextmodule, 'mod/scorm:savetrack', '', '', '', '', '', '', false)) {
+ if (!$students = get_users_by_capability($contextmodule, 'mod/scorm:savetrack', 'u.id', '', '', '', '', '', false)) {
echo $OUTPUT->notification(get_string('nostudentsyet'));
$nostudents = true;
$allowedlist = '';
} else {
$allowedlist = array_keys($students);
}
+ unset($students);
} else {
// all users who can attempt scoes and who are in the currently selected group
- if (!$groupstudents = get_users_by_capability($contextmodule, 'mod/scorm:savetrack', '', '', '', '', $currentgroup, '', false)) {
+ if (!$groupstudents = get_users_by_capability($contextmodule, 'mod/scorm:savetrack', 'u.id', '', '', '', $currentgroup, '', false)) {
echo $OUTPUT->notification(get_string('nostudentsingroup'));
$nostudents = true;
$groupstudents = array();
}
$allowedlist = array_keys($groupstudents);
+ unset($groupstudents);
}
if ( !$nostudents ) {
View
6 mod/scorm/report/interactions/report.php
@@ -96,21 +96,23 @@ function display($scorm, $cm, $course, $download) {
if (empty($currentgroup)) {
// all users who can attempt scoes
- if (!$students = get_users_by_capability($contextmodule, 'mod/scorm:savetrack', '', '', '', '', '', '', false)) {
+ if (!$students = get_users_by_capability($contextmodule, 'mod/scorm:savetrack', 'u.id', '', '', '', '', '', false)) {
echo $OUTPUT->notification(get_string('nostudentsyet'));
$nostudents = true;
$allowedlist = '';
} else {
$allowedlist = array_keys($students);
}
+ unset($students);
} else {
// all users who can attempt scoes and who are in the currently selected group
- if (!$groupstudents = get_users_by_capability($contextmodule, 'mod/scorm:savetrack', '', '', '', '', $currentgroup, '', false)) {
+ if (!$groupstudents = get_users_by_capability($contextmodule, 'mod/scorm:savetrack', 'u.id', '', '', '', $currentgroup, '', false)) {
echo $OUTPUT->notification(get_string('nostudentsingroup'));
$nostudents = true;
$groupstudents = array();
}
$allowedlist = array_keys($groupstudents);
+ unset($groupstudents);
}
if ( !$nostudents ) {
// Now check if asked download of data

0 comments on commit f129308

Please sign in to comment.
Something went wrong with that request. Please try again.