MDL-49928 userprofile: Reorder blocks

This commit is contained in:
Ankit Agarwal 2015-04-22 10:49:32 +05:30
parent 84ea226616
commit b647db20e1
2 changed files with 4 additions and 3 deletions

View File

@ -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.

View File

@ -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');