mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-49819 my: Display correct tag title on the dashboard
This commit is contained in:
parent
15699badc6
commit
26a50547f0
@ -59,12 +59,14 @@ if (isguestuser()) { // Force them to see system default, no editing allowed
|
||||
$context = context_system::instance();
|
||||
$PAGE->set_blocks_editing_capability('moodle/my:configsyspages'); // unlikely :)
|
||||
$header = "$SITE->shortname: $strmymoodle (GUEST)";
|
||||
$pagetitle = $header;
|
||||
|
||||
} else { // We are trying to view or edit our own My Moodle page
|
||||
$userid = $USER->id; // Owner of the page
|
||||
$context = context_user::instance($USER->id);
|
||||
$PAGE->set_blocks_editing_capability('moodle/my:manageblocks');
|
||||
$header = fullname($USER);
|
||||
$pagetitle = $strmymoodle;
|
||||
}
|
||||
|
||||
// Get the My Moodle page info. Should always return something unless the database is broken.
|
||||
@ -80,7 +82,7 @@ $PAGE->set_pagelayout('mydashboard');
|
||||
$PAGE->set_pagetype('my-index');
|
||||
$PAGE->blocks->add_region('content');
|
||||
$PAGE->set_subpage($currentpage->id);
|
||||
$PAGE->set_title($header);
|
||||
$PAGE->set_title($pagetitle);
|
||||
$PAGE->set_heading($header);
|
||||
|
||||
if (!isguestuser()) { // Skip default home page for guests
|
||||
|
Loading…
x
Reference in New Issue
Block a user