MDL-58180 lib: Role name pass format_text.
In function stats_get_report_options, the role names are returned after having been processed through format_text which lets the filters work on them. Signed-off-by: Luca Bösch <[email protected]>
This commit is contained in:
committed by
Marina Glancy
parent
3fc319c0c4
commit
9574aee37c
+2
-1
@@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user