diff --git a/badges/lib.php b/badges/lib.php index 308c1430bbf49..6e1be220e8df6 100644 --- a/badges/lib.php +++ b/badges/lib.php @@ -42,8 +42,8 @@ function core_badges_myprofile_navigation(\core_user\output\myprofile\tree $tree return true; } - // Add category. - $category = new core_user\output\myprofile\category('badges', get_string('badges', 'badges'), null); + // Add category. This node should appear after 'contact' so that administration block appears towards the end. Refer MDL-49928. + $category = new core_user\output\myprofile\category('badges', get_string('badges', 'badges'), 'contact'); $tree->add_category($category); // Determine context. diff --git a/lib/myprofilelib.php b/lib/myprofilelib.php index 4ca840b307030..124a09386f400 100644 --- a/lib/myprofilelib.php +++ b/lib/myprofilelib.php @@ -43,7 +43,8 @@ function core_myprofile_navigation(core_user\output\myprofile\tree $tree, $user, $courseid = !empty($course) ? $course->id : SITEID; $contactcategory = new core_user\output\myprofile\category('contact', get_string('userdetails')); - $coursedetailscategory = new core_user\output\myprofile\category('coursedetails', get_string('coursedetails'), 'contact'); + // No after property specified intentionally. It is a hack to make administration block appear towards the end. Refer MDL-49928. + $coursedetailscategory = new core_user\output\myprofile\category('coursedetails', get_string('coursedetails')); $miscategory = new core_user\output\myprofile\category('miscellaneous', get_string('miscellaneous'), 'coursedetails'); $reportcategory = new core_user\output\myprofile\category('reports', get_string('reports'), 'miscellaneous'); $admincategory = new core_user\output\myprofile\category('administration', get_string('administration'), 'reports');