Skip to content

Commit

Permalink
MDL-49819 my: Display correct tag title on the dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart authored and abgreeve committed Apr 13, 2015
1 parent 15699ba commit 26a5054
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion my/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@
$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.
Expand All @@ -80,7 +82,7 @@
$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
Expand Down

0 comments on commit 26a5054

Please sign in to comment.