I don't know if that subject title explains it, but I will try to explain it. So I have a quiz that I created that has over 109 questions but I don't want the quiz showing students 109 questions to attempt, what I really want is for the quiz to maybe pick only 50 questions at random instead of 109 questions. I am starring at the 109 questions I don't know what to do.
So your quiz already has 109 questions? Delete the questions from the quiz (not from the question bank) So you have a quiz but with no questions. (Or just make a new quiz and don't add any new questions.)Then go to Edit quiz > Add question and from the "Add" dropdown on the right, select "Add a random question". On the screen that comes up next, where it says Number of random questions, type 50 and save.
Moodle's quiz engine is very powerful, but that adds some complexity. If you haven't done so yet, make sure to read the Moodle Docs about the quiz engine and creating quizzes.
Yes, you can do exactly what you wish to do, but it takes a little planning and organization. For example, if you create a folder on your computer called "docs" and then put 1000 documents into it, then later realize that you need to get to your docs about "conferences," you might realize that it would have been better to initially organize or name your documents a little better. This is the same thing about quiz questions.
Yes, you can do exactly what you wish to do, but it takes a little planning and organization. For example, if you create a folder on your computer called "docs" and then put 1000 documents into it, then later realize that you need to get to your docs about "conferences," you might realize that it would have been better to initially organize or name your documents a little better. This is the same thing about quiz questions.
I am really screwed, in this situation, there are 59 questions stored inside a question bank of 1292 questions. Is there no way to just select the 59 questions and move them from the current question bank of 1292 questions to another new question bank or is there a way to select it all and tag the questions and move them to the new question bank because I don't think I can be doing this one by one 😱


I understand your situation. I had to do the same the other day. But that was finding 10 questions in a question category of 52 questions. Finding them in under 1000+ would have been near impossible.
An expert might be able to identify them through a database query and push them in to a new category. Again not easy, I imagine, and risky. Yes, as Rick said, one should have thought about it before the mess happened.
An expert might be able to identify them through a database query and push them in to a new category. Again not easy, I imagine, and risky. Yes, as Rick said, one should have thought about it before the mess happened.
I think you are going to find that you just need to, "bite-the-bullet," and go make changes one question at a time. More than once, I had a similar situation years ago, and just had a couple of trustworthy students to do the changes each day in class, until all needed changes were made. To make it possible, I would bump them up from student to teacher for just those times they were working on the changes, then immediately put them back down from teacher to student when they left the classroom.
This was possible as it was a self paced computer applications course with weekly assignments and I always had to provide "extra" projects to keep my "A" students occupied and working anyway, as they invariably were finished early. For them, this was a nice change of pace and they enjoyed getting the chance to learn a little more about Moodle. I've had more than one of those students go on to become teachers, too.
This was possible as it was a self paced computer applications course with weekly assignments and I always had to provide "extra" projects to keep my "A" students occupied and working anyway, as they invariably were finished early. For them, this was a nice change of pace and they enjoyed getting the chance to learn a little more about Moodle. I've had more than one of those students go on to become teachers, too.
Here is how I would do it.
1) Create a few more categories in your question bank. Of course, these will be blank. You will be moving questions into them.
2) Create a new quiz. Add "ALL" questions (yes, all 1000+ questions) from the question bank. Oh, maybe 10-20 questions per page (your choice). The questions will come into the quiz in the exact order that they are shown in the question bank.
3) In browser window #1, Preview the quiz. This will allow you to see the question a bit better, instead of just its one line description.
4) In browser window #2, view the questions in the original category.
5) Use browser window #2 to move questions to new categories. For example, on a page of 20 questions, you might see that #2, #8, and #10 belong in another category. Moodle allows you to move these.
6) Once moved, Moodle typically shows you the category that you moved them into. So you will find yourself going "back" frequently.
You will find your own "rhythm." For example, you might want to view 50, 100, or all questions at a time.
If you understand "tags," and think they may help you in the future, now is a good time to edit each question and add a tag. If you do this, you might want to add a letter, like "T" at the beginning of the description so that you know you have "tagged" them (just to help you keep track of what you have finished.)
1) Create a few more categories in your question bank. Of course, these will be blank. You will be moving questions into them.
2) Create a new quiz. Add "ALL" questions (yes, all 1000+ questions) from the question bank. Oh, maybe 10-20 questions per page (your choice). The questions will come into the quiz in the exact order that they are shown in the question bank.
3) In browser window #1, Preview the quiz. This will allow you to see the question a bit better, instead of just its one line description.
4) In browser window #2, view the questions in the original category.
5) Use browser window #2 to move questions to new categories. For example, on a page of 20 questions, you might see that #2, #8, and #10 belong in another category. Moodle allows you to move these.
6) Once moved, Moodle typically shows you the category that you moved them into. So you will find yourself going "back" frequently.
You will find your own "rhythm." For example, you might want to view 50, 100, or all questions at a time.
If you understand "tags," and think they may help you in the future, now is a good time to edit each question and add a tag. If you do this, you might want to add a letter, like "T" at the beginning of the description so that you know you have "tagged" them (just to help you keep track of what you have finished.)
Here is a way to do bulk tagging that might be the least tedious.
1. Export the 1000 questions from the question bank into a file in "Moodle XML format".
2. Open the file (preferably in a text editor like Notepad++ which does syntax-directed colour highlighting, but Word will do), and you will see all the questions, including the internal Moodle question ID, see the screenshot below.

3. Open the quiz "Edit quiz" page, which displays all the questions, and move your mouse over the gear icon for the first question. Your browser will display the full URL in the status bar at the bottom of the window, and the last part of the URL shows the Moodle internal ID number of the question (e.g. "&id=12345", see the screenshot below.

4. Search for the ID number of each question in the Moodle Question XML file. When you find it, the question follows the ID.
5. Tag that question as belonging to the quiz, by adding tag markup, which is as follows: "<tags><tag><text>MyQuiz</text></tag></tags>". You can use any indicator you prefer instead of "MyQuiz". You need to add this text just inside the closing tag of the question, i.e. "</question>" should become
6. Repeat steps 4 and 5 for all questions
7. When you've identified all of the questions, import the entire file back into Moodle. You should probably change the category name at the top of the file before importing, so that the questions are in a different category, e.g.
1. Export the 1000 questions from the question bank into a file in "Moodle XML format".
2. Open the file (preferably in a text editor like Notepad++ which does syntax-directed colour highlighting, but Word will do), and you will see all the questions, including the internal Moodle question ID, see the screenshot below.

3. Open the quiz "Edit quiz" page, which displays all the questions, and move your mouse over the gear icon for the first question. Your browser will display the full URL in the status bar at the bottom of the window, and the last part of the URL shows the Moodle internal ID number of the question (e.g. "&id=12345", see the screenshot below.

4. Search for the ID number of each question in the Moodle Question XML file. When you find it, the question follows the ID.
5. Tag that question as belonging to the quiz, by adding tag markup, which is as follows: "<tags><tag><text>MyQuiz</text></tag></tags>". You can use any indicator you prefer instead of "MyQuiz". You need to add this text just inside the closing tag of the question, i.e. "</question>" should become
"<tags><tag><text>MyQuiz</text></tag></tags>
</question>"
</question>"
6. Repeat steps 4 and 5 for all questions
7. When you've identified all of the questions, import the entire file back into Moodle. You should probably change the category name at the top of the file before importing, so that the questions are in a different category, e.g.
<question type="category">
<category> <text>Working Questions</text> </category>
</question>
8. In Moodle, go to the questions page and select the new category you created, still with 1000 questions.
9. Filter the questions by the tag you have used, and only the 109 questions you want will be listed.
10. Select all these questions and use the "Move to" button to move them all to a separate category.
11. Once in a separate category, you can go back to the original quiz, delete all the questions, and then use the "Insert random question" facility to include some of the questions in that category in your quiz.
I like your suggestion, Eoin. Yep, this is another way to do it. However, you have to be careful when making changes to the XML file, and you have to know what you are doing. But this could be faster than I suggested and more flexible. (Doing things in computer code is often faster than using a GUI, but you need to know what you are doing!)
Agreed, the smallest error in the XML file will prevent it from being imported correctly. An alternative is to export the questions to a Word file using the Microsoft Word File Import/Export (Question Format) plugin. However, this file doesn't include question ID numbers, so you would have to search for each question name, or even the question text, instead. In my experience, question names are often not unique, which makes hunting them down much more difficult.
Using the Word table format would make adding the tags and re-importing the file much safer, but require more time.
Using the Word table format would make adding the tags and re-importing the file much safer, but require more time.
I want to use this medium to appreciate everyone that has tried to help me in resolving my issues, i have decided to take the bull my the horns even if it will take mw some couple of weeks to resolve i really appreciate 🙏... It will be better if moodle can improve on bulk selection, making things a lot easier instead of having to do somethings one by one
You have seen several ways to make your task easier.
However, if you think there is a better way, perhaps consider creating a feature request in the Tracker system. In your request, make sure to explain how you think it should work. The more specific logic that you can provide, the better. Give an example.
However, if you think there is a better way, perhaps consider creating a feature request in the Tracker system. In your request, make sure to explain how you think it should work. The more specific logic that you can provide, the better. Give an example.
Mr Rick the solution that Mr eion provided is a bit techy for me i am not really a technical person and i dont want to tamper with what i have little experience about.. the other alternative that Mrs Mary suggested too is very good but i have 100 of such quiz with that issue so it is not just for a particular quiz , so to tag lets say 50 questions of a particular quiz, finding it in the question bank and moving it to a new question bank. So that is resolving 1 out of 100, i still have 99 to go .. so if i could hv just bulk tag it in the list of questions it could have easily solved my problem
I asked about that feature in this post: Bulk add/remove question tags...
It might be that "tagging" questions is not required for what you want to do. As a first step, you might achieve what you desire by creating question categories and then moving questions into the appropriate category. Both Mary and I have offered techniques to move questions into categories.