Importing Multiple Question Banks at Once in Moodle 2.7 ?

Importing Multiple Question Banks at Once in Moodle 2.7 ?

by Brett Pfingston -
Number of replies: 6
Hi.  I need to import 225 separate question banks into a Moodle 2.7 instance.  They are in Blackboard format and import just fine, but I'm hoping there's some way I could batch import them all at once instead of doing them one at a time, which will be very tedious and take a while.

Any ideas?

Thanks!

-Brett


Average of ratings: -
In reply to Brett Pfingston

Re: Importing Multiple Question Banks at Once in Moodle 2.7 ?

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

Moving to Quiz forum...

In reply to Brett Pfingston

Re: Importing Multiple Question Banks at Once in Moodle 2.7 ?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Brett,

This is one of those bad news, good news, situation.

I just tried to import by dragging and dropping two question banks at one time, into the import area of one of my test sites, and it didn't complain, but didn't really work either. It imported the questions from the second bank I selected to drag and drop. It ignored, or dumped the first bank I selected. So that's the bad news...no way to do it in Moodle. Tried multiple times with the same result.

Now the goods news, is only for someone who is not faint of heart. I opened those two .xml files for editing. I used MS Wordpad. I copied everything between the tags <quiz> and </quiz> and pasted into the other file just before it's </quiz> tag. I saved the combined file with a new name, combined.xml, in plain text mode. When I imported this into my Moodle 3.0.X+ test site, it worked perfectly. Since one of the first things in each of the files was the question category, they were all automatically imported into the correct categories.

So it can be done, but will take some CAREFUL work, that might be just enough time consuming to not make it worthwhile...unless you might need to import them more than one time.  thoughtful

Average of ratings: Useful (1)
In reply to AL Rachels

Re: Importing Multiple Question Banks at Once in Moodle 2.7 ?

by Sally Hanford -
Picture of Testers

I've just done the same (manually merge the two exported xml files) and it appears to work a treat - however I would recommend using a good xml editor (like Notepad ++) rather than wordpad to be sure that you're working with the raw text and are not inadvertently introducing anything else into the file.

Average of ratings: Useful (1)
In reply to Brett Pfingston

Re: Importing Multiple Question Banks at Once in Moodle 2.7 ?

by Brett Pfingston -

Thanks for your responses Marcus and Al! 

Al:  Good idea, but I'm working with Blackboard format question banks and they have xml and dat files zipped up together, and I'm not sure there's a way to combine them in the way you did.  The questions.dat IS xml  and does contain all the questions, but I'm not sure what I'd lose if I only used that one file, and it might change the import format.  Although, after taking a peek at the xml and other dat files, it appears that the questions.dat is the only one with important content.

Maybe if I just use the questions.dat and combine them all together and then change the import format (and change file extension to xml)?

I'll play around with it some more.  If I get it to work, I'll update this topic.  smile

-Brett

In reply to Brett Pfingston

Re: Importing Multiple Question Banks at Once in Moodle 2.7 ?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I do not envy you trying to move that many questions. smile I once imported into Moodle a bunch of BB formatted questions for a History teacher. Wound up just biting the bullet, converted the question banks one at time to Moodle format, and imported them. Took most of a l-o-n-g day. sad Gave the teacher a few lessons on using Moodle, and set up her first couple of quizzes. <start SAD> Then the teacher never used any of it for the whole year! Never even logged in to our Moodle site.</end SAD> angry