Moodle
  1. Moodle
  2. MDL-17078

Cannot delete empty category after deleting questions: category ID is invalid

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.3
    • Fix Version/s: 1.9.4
    • Component/s: Questions, Quiz
    • Labels:
      None
    • Environment:
      Unsure of all details however: Apache, MySQL 4.x, PHP 4.x
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      26333

      Description

      Problem arises after deleting questions and when trying to delete categories:

      Course Administration block, click Questions.
      Chose the main category with a large number of sub-categories containing over 550 questions.
      Ensure "Display questions from sub-categories too" is checked.
      Click "Show all 550 questions" at the bottom of page.
      Click Select All, then Delete.
      Click "Yes" to confirm deletion.

      Click on Categories tab, See all categories, sub-categories and sub-sub-categories.
      Click on 'X' (delete button) next to any category
      Get error: "Category ID is invalid"
      Clicking back on Browser, and then clicking on Questions tab, Import tab or Export tab all result in "Category ID is invalid" error.

      Going back to course (clicking on course name in breadcrumb navigation) and clicking Questions in Admin block to get back to the same location, I am now able to delete categories without problems.

        Activity

        Hide
        Paul Vaughan added a comment -

        In addition to the above, when I edit (rename) a category which is the only category left in Question Categories for 'Course: Coursename', I get the error:

        "Cannot move the category 'Default for Coursename'. It is the last in this context."

        Show
        Paul Vaughan added a comment - In addition to the above, when I edit (rename) a category which is the only category left in Question Categories for 'Course: Coursename', I get the error: "Cannot move the category 'Default for Coursename'. It is the last in this context."
        Hide
        Tim Hunt added a comment -

        The
        "Cannot move the category 'Default for Coursename'. It is the last in this context." problem is MDL-14434.

        Show
        Tim Hunt added a comment - The "Cannot move the category 'Default for Coursename'. It is the last in this context." problem is MDL-14434 .

          People

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

            Dates

            • Created:
              Updated:
              Resolved: