Merge branch 'MDL-27009' of git://github.com/aolley/moodle into MOODLE_20_STABLE
This commit is contained in:
+1
-1
@@ -1333,7 +1333,7 @@ function stats_get_report_options($courseid,$mode) {
|
||||
case STATS_MODE_GENERAL:
|
||||
$reportoptions[STATS_REPORT_ACTIVITY] = get_string('statsreport'.STATS_REPORT_ACTIVITY);
|
||||
if ($courseid != SITEID && $context = get_context_instance(CONTEXT_COURSE, $courseid)) {
|
||||
$sql = 'SELECT r.id, r.name FROM {role} r JOIN {stats_daily} s ON s.roleid = r.id WHERE s.courseid = :courseid GROUP BY s.roleid';
|
||||
$sql = 'SELECT r.id, r.name FROM {role} r JOIN {stats_daily} s ON s.roleid = r.id WHERE s.courseid = :courseid GROUP BY r.id, r.name';
|
||||
if ($roles = $DB->get_records_sql($sql, array('courseid' => $courseid))) {
|
||||
foreach ($roles as $role) {
|
||||
$reportoptions[STATS_REPORT_ACTIVITYBYROLE.$role->id] = get_string('statsreport'.STATS_REPORT_ACTIVITYBYROLE). ' '.$role->name;
|
||||
|
||||
Reference in New Issue
Block a user