Batch Exporting Quiz Questions

Batch Exporting Quiz Questions

by P Bowers -
Number of replies: 13

Moodle 3.1.2

Is there a way to export all a quiz's questions all at once, rather than opening up each Category?

Each of my quizzes has many Categories, so being able to export the Quiz itself (or even better, the Question bank itself) would save a lot of time.

Attached sketch tries to explain my question further.

Regards.




Attachment moodle_export_categories.jpg
Average of ratings: -
In reply to P Bowers

Re: Batch Exporting Quiz Questions

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Use backup and restore rather than export if you want to export/import complete quizzes.

Average of ratings: Useful (1)
In reply to Howard Miller

Re: Batch Exporting Quiz Questions

by P Bowers -

Thank you.

I just upgraded from 2.8.3, so will restoring a backup from that Moodle version into Moodle 3.1 cause a problem?

I'd think not, but I can't risk it.

In reply to P Bowers

Re: Batch Exporting Quiz Questions

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It'll be fine. Backup and restore is always supported forwards in versions (but not back). 

Average of ratings: Useful (1)
In reply to Howard Miller

Re: Batch Exporting Quiz Questions

by P Bowers -

Meh, getting errors try to recover.

In reply to P Bowers

Re: Batch Exporting Quiz Questions

by P Bowers -

Figured I might as well post a screencap. Would I be correct to assume that the backups referred to in the attachment here are / were located at the previous hosting company and that's why they can't be found any more?

I do have the original zipped file from the old server - would I be able to recover them from there?

Attachment moodle_backup_fail.jpg
In reply to P Bowers

Re: Batch Exporting Quiz Questions

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That's not "backups don't work".  That's the file cannot be downloaded. Moreover, it's not even a Moodle error message (it's from the web server). Something has gone wrong on your host. The error message isn't terribly helpful - I would start by looking at the web server's error log to see if more information was logged. 

Average of ratings: Useful (1)
In reply to Howard Miller

Re: Batch Exporting Quiz Questions

by P Bowers -

The purpose of this exercise was to create a small mini-quiz of maybe 10 items from the normal quiz of 100+ randomized questions so that those interested could test drive and see what the testing process is like, types of questions, etc.

Importing some of the category questions manually into a newly-created mini-quiz (since the restore backup failed) didn't really work either, because the questions are not being brought in with the accompanying images (I tried Moodle XML, GIFT, XHTML). I can see the images in the original quiz, but they won't export.

Does it really matter which of these I use for import, since I can only export to the first two formats  and XHTML anyway?

- Moodle XML format
- Gift format
- Aiken format
- Blackboard
- Embedded answers (Cloze)
- Examview
- Missing word format
- WebCT format

Based on some searches here and Google I'm not finding a relatively simple solution that won't send me down another rabbit hole.

In reply to P Bowers

Re: Batch Exporting Quiz Questions

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Yes the format, it matters. Use Moodle XML it will support all features including images. If you Move your categories under a master category you can export them all in one export. I was addressing this issue only testerday as I want to export about 150 odd questions. Here is a screen shot of the icon you click to move categories around. 

Attachment qcat.png
Average of ratings: Useful (1)
In reply to Marcus Green

Re: Batch Exporting Quiz Questions

by P Bowers -

Thank you, Marcus.

What worries me there is the word, "move".

If I move the Categories, they will no longer exist in their current Course, will they? We currently have four Courses (actually, they're quizzes / exams).

That doesn't sound like it would be a good thing to me. There's no way to copy the Categories to a master Category, is there?

In reply to P Bowers

Re: Batch Exporting Quiz Questions

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

No, so long as the containing category is in your course it will still be available within the course. Try moving a category and checking. 


In reply to Marcus Green

Re: Batch Exporting Quiz Questions

by P Bowers -

Perhaps I did something wrong, but images are not visible after being exported via Moodle XML export as suggested.

It appears that Moodle cannot find the image even though that particular graphic exists and is visible in the quiz / exam itself.

I don't know much about Moodle but my understanding is that there is no folder anywhere that contains all the images used in the software.

Since there are over a hundred images like this and they are crucial to understanding and answering the questions I am unsure what to do next. There's little chance that these can all be manually corrected by manually editing text files.

Attachment moodle_question_import_no_image.jpg
In reply to P Bowers

Re: Batch Exporting Quiz Questions

by Daniel Phillips -

You can use the third party quiz application Respondus to export and import quizzes as necessary.  It works very well and I have been using it for a few years now.

See: https://www.respondus.com/ for more information.