Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-15658

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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; }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              mcampbell Matt Campbell
              Tester:
              Helen Foster Helen Foster
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                28/Jan/09