Merge branch 'wip-MDL-58180-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE

This commit is contained in:
Andrew Nicols
2017-04-10 13:41:33 +08:00
+2 -1
View File
@@ -1399,7 +1399,8 @@ function stats_get_report_options($courseid,$mode) {
$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;
$reportoptions[STATS_REPORT_ACTIVITYBYROLE.$role->id] = get_string('statsreport'.STATS_REPORT_ACTIVITYBYROLE).
' ' . format_string($role->name, true, ['context' => $context]);
}
}
}