Issue Details (XML | Word | Printable)

Key: MDL-17078
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Tim Hunt
Reporter: Paul Vaughan
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

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

Created: 31/Oct/08 12:20 AM   Updated: 27/Nov/08 04:30 PM
Return to search
Component/s: Questions, Quiz
Affects Version/s: 1.9.3
Fix Version/s: 1.9.4

File Attachments: None
Image Attachments:

1. categories.png
(53 kB)
Environment: Unsure of all details however: Apache, MySQL 4.x, PHP 4.x

Participants: Paul Vaughan and Tim Hunt
Security Level: None
Resolved date: 27/Nov/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
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.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
tjhunt committed 2 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 27/Nov/08 04:30 PM
question bank: MDL-17078 Error after deleting a question category.
MODIFY question/category.php   Rev. 1.24.2.4    (+7 -6 lines)
MODIFY question/category_class.php   Rev. 1.32.2.8    (+3 -6 lines)
tjhunt committed 2 files to 'Moodle CVS' - 27/Nov/08 04:30 PM
question bank: MDL-17078 Error after deleting a question category.
MODIFY question/category_class.php   Rev. 1.49    (+4 -6 lines)
MODIFY question/category.php   Rev. 1.31    (+7 -8 lines)