Skip to content

Commit

Permalink
MDL-49928 userprofile: Reorder blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitagarwal committed Apr 29, 2015
1 parent 84ea226 commit b647db2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions badges/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion lib/myprofilelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit b647db2

Please sign in to comment.