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.
$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');