mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
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 <luca.boesch@bfh.ch>
This commit is contained in:
parent
bd99cb9021
commit
9955d65e5c
1 changed files with 2 additions and 1 deletions
|
@ -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';
|
$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))) {
|
if ($roles = $DB->get_records_sql($sql, array('courseid' => $courseid))) {
|
||||||
foreach ($roles as $role) {
|
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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue