MDL-71416 report_log: user context header should show users name.

Co-Authored-By: Luca Bösch <luca.boesch@bfh.ch>
This commit is contained in:
Paul Holden 2021-04-23 12:47:55 +01:00
parent 3018a35249
commit adcd50bea0

View file

@ -92,7 +92,7 @@ if ($mode === 'today') {
$PAGE->add_report_nodes($user->id, $navigationnode); $PAGE->add_report_nodes($user->id, $navigationnode);
if ($courseid == SITEID) { if ($courseid == SITEID) {
$PAGE->set_heading(fullname($user)); $PAGE->set_heading(fullname($user, has_capability('moodle/site:viewfullnames', $PAGE->context)));
} else { } else {
$PAGE->set_heading($course->fullname); $PAGE->set_heading($course->fullname);
} }
@ -105,6 +105,7 @@ $event->trigger();
echo $OUTPUT->header(); echo $OUTPUT->header();
if ($courseid != SITEID) { if ($courseid != SITEID) {
$userheading = array( $userheading = array(
'heading' => fullname($user, has_capability('moodle/site:viewfullnames', $PAGE->context)),
'user' => $user, 'user' => $user,
'usercontext' => $personalcontext, 'usercontext' => $personalcontext,
); );