Details
Description
When editing an existing course category, it is moved to the bottom of the category list and has a sort order of 999. Expected behavior would be for the category to retain it's position and sort order in the category listing.
Looking at /course/editcategory.php, line 61, I see:
$newcategory->sortorder = 999;
Making the following change allows for new categories to be added to the bottom of the list, but keeps existing categories in the proper order:
if (!empty($category->sortorder)) { $newcategory->sortorder = $category->sortorder; } else { $newcategory->sortorder = 999; }
Issue Links
| This issue is duplicated by: | ||||
| MDL-15910 | When a course category is edited, it is given a sortorder of 999 which moves it to the bottom of its group if the group had previously been sorted. |
|
|
|
Grabbing a bunch of related course category editing bugs that I plan to work on. Sorry for all the emails.