Skip to content
Snippets Groups Projects
Commit 801db867 authored by Kathrin Osswald's avatar Kathrin Osswald
Browse files

Fixed bug for the profile editing button in non admin view.

parent d2288d70
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ Changes
### Unreleased
* 2018-02-08 - Fixed bug for the profile editing button in non admin view.
* 2018-02-08 - Improved SCSS search for competencies node in the nav drawer.
* 2018-02-08 - Harmonise HTML structure of the nav drawer regarding to media spans.
* 2018-02-08 - Removed backport of MDL-59425 because this code is integrated into core.
......
......@@ -192,13 +192,14 @@ class core_renderer extends \theme_boost\output\core_renderer {
has_capability('moodle/user:update', \context_system::instance())) {
$url = new moodle_url('/user/editadvanced.php', array('id' => $userid, 'course' => $COURSE->id,
'returnto' => 'profile'));
$html .= $this->single_button($url, get_string('editmyprofile', 'core'));
} else if ((has_capability('moodle/user:editprofile', \context_user::instance($userid)) &&
!is_siteadmin($USER)) || ($currentuser &&
has_capability('moodle/user:editownprofile', \context_system::instance()))) {
$url = new moodle_url('/user/edit.php', array('id' => $userid, 'course' => $COURSE->id,
'returnto' => 'profile'));
}
$html .= $this->single_button($url, get_string('editmyprofile', 'core'));
}
$html .= html_writer::end_div();
}
// Do not show the page heading buttons on the profile page at this place.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment