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

Deleting all course categories causes errors due to unset defaultrequestcategory

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide

      I tested using a brand new install with only the 'Miscellaneous' category

      • Open Settings -> Site administration -> Courses -> Add/edit courses
      • Delete all categories
        • Confirm no errors were shown
      • Click Continue
        • Confirm no errors were shown on the add/edit courses page
        • Confirm that the default category has been re-created
      • Click the 'Add a new course' button
        • Confirm that the page displays without error
      Show
      I tested using a brand new install with only the 'Miscellaneous' category Open Settings -> Site administration -> Courses -> Add/edit courses Delete all categories Confirm no errors were shown Click Continue Confirm no errors were shown on the add/edit courses page Confirm that the default category has been re-created Click the 'Add a new course' button Confirm that the page displays without error
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:

      Description

      When deleting the default course category, the defaultrequestcategory value should be set to the lowest category ID of the remaining categories but isn't due to a variable name bug.

      Additionally, if all categories have been deleted, and the default category is re-created, the defaultrequestcategory is not set again.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/12