mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-49928 userprofile: Reorder blocks
This commit is contained in:
parent
84ea226616
commit
b647db20e1
@ -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.
|
||||
|
@ -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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user