How do I delete a question bank category?

How do I delete a question bank category?

by cyber sec -
Number of replies: 6

According to Moodle Docs, this can be done.

"Categories can also be created or deleted at will. However, if you try to delete a category containing questions, then you will be asked to specify another category to move them to. You cannot delete or move the last category in any context, there must always be one category in a context"

https://docs.moodle.org/39/en/Question_categories#Deleting_Categories

The category has no questions in it.

I think I may have more than one top-level category, and this causing real problems. When I try to restore a course I get: "The backup file contains more than one top-level question categories for context 396."



Average of ratings: -
In reply to cyber sec

Re: How do I delete a question bank category?

by Melanie Scott -
Picture of Particularly helpful Moodlers
Delete a category by going to the quiz bank and click categories tab. (or just click on the Question Bank Categories link. Click the trash icon to delete. If no icon exists and you have more than one top level bank in the course, edit the category you want to remove. Move it to be a child of the other top level bank. Save. The delete icon should appear. Delete.
Average of ratings: Useful (2)
In reply to Melanie Scott

Re: How do I delete a question bank category?

by cyber sec -
I do not have any questions in the course question bank. The questions are all in the StudentQuiz question bank.
The course question bank is created automatically. All of the categories, that I use, were created automatically. None of those categories can be deleted, or moved.
StudentQuiz creates a new question bank for each quiz. I am guessing that this is what's tripping up the backup/restore.
In reply to Melanie Scott

Re: How do I delete a question bank category?

by Doug Dreistadt -

I  also have a Top level category that I want to delete. There is no trash icon, so I attempted to move it to a child position. However, Moodle doesn't seem to allow moving of (Top level?) categories. Any other ideas for a workaround?

In reply to Doug Dreistadt

Re: How do I delete a question bank category?

by Roberto Catanuto -
Similar problem here. I do have the Trash icon, I click on it, and then Moodle asks me to move all the questions to another Category.
I assume Moodle doesn't allow me to delete a category containing questions already used in one or more Quizzes ?
Thank you very much for your attention.
Have a nice evening.
In reply to Roberto Catanuto

Re: How do I delete a question bank category?

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
You cannot delete a category with questions in it. Either delete or move the questions and then delete the category. It would be a nice addition if there was an option to delete the questions in the category at the same time.
In reply to Emma Richardson

Re: How do I delete a question bank category?

by Roberto Catanuto -
Thanks. Also, it would be nice to be able to delete only the questions of a specific user X in category Y. I have around 200 questions of X and I want to delete only those ones and not the others.