Moodle

When editing existing course categories, they are placed at the bottom of the category list.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9, 1.9.1, 1.9.2
  • Fix Version/s: 1.9.4
  • Component/s: Course
  • Labels:
    None
  • Environment:
    Debian Linux, Apache 2, PHP 5.2.0-8+etch11, MySQL 5.0.32
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

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

Activity

Hide
Tim Hunt added a comment -

Grabbing a bunch of related course category editing bugs that I plan to work on. Sorry for all the emails.

Show
Tim Hunt added a comment - Grabbing a bunch of related course category editing bugs that I plan to work on. Sorry for all the emails.
Hide
Helen Foster added a comment -

Matt, thanks for your report, and Tim, thanks for fixing the issue

Show
Helen Foster added a comment - Matt, thanks for your report, and Tim, thanks for fixing the issue

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: