Importing test questions from EZ Test

Re: How to Import Missing text!

by Marc Grober -
Number of replies: 1
Well, M-H is of no help (referred me to Moodle, believe it or not) but having spent a good deal of time thrashing about I do have a solution, albeit one I am not altogether pleased with. At some point I suppose I should put this in the docs, but am starting this here (partly in the hope someone else might help out ;=} )

The problems are that while you can use a media URL to adequately embed the images, unless you are going to place the images in Site FIles there seem to be some issues in exactly where the images are located (i.e. it looks like the images have to be located be reference in the folder in which they were unzipped.... I am still trying to figure out why that seems to matter) AND, no matter what you do, the image browsers will ONLY located images in Site FIles.) Additionally, since the URLs are absolute if you use the media URL as described below and point it to course files, then if you try to use the course again by doing a backup and restore to a new course, this would change the course ID of the course, but I don't know if that wold change the course ID in the image references (somehow I doubt this) which would render your images unavailable!

The arguable solution to this mess is to put the images in site files, which requires a good deal of juggling AND makes the images available to your students at all times, probably NOT what you wanted in a test bank solution.

If one of the folks who deal with quiz internals can address whether a backup and restore would in fact render the image URL useless and perhaps some other way to do the URL reference that would be grand, as that way you could essentially build the sae kind of structure in the course, remembering that it seems to be that the images have to be inside the folder with the txt file!

  • From EZTestonline (and I am guessing this will work as well with the desk top version) first from the drop down menu on the upper left select "Export to Print/CMS formats.
  • In the lower left hand corner of the screen you will now see a button that says WebCT; click there.
  • This will bring up a dialog window, a copy of which you should see below.
  • IN the dialog window where it asks for the Media Directory URL provide the URL for your images, as noted above, as in http://www.yourmoodle.net/file.php/1/your_text_images/Chapter1/ Of course, if you relabel all the images so you can put them ALL in one directory you would change your URL (i.e. you could name your images 1-001.png to indicate it was image 1 in chapter 1 and put them all in the same directory instead of building a complex directory structure by chapter.)
  • Click on the button that says, " Generate WebCT", NOT ON THE BUTTON THAT SAYS Generate WebCT CE6, and download the zip file.
  • Now open the target course, Add whatever category you may need and import questions.
  • Select WebCT as the import and go down to the very bottom where it says: Import from file already in course files... click choose or upload a file, upload your file, then unzip while still in the file manager and then go into the folder created by unzipping the file and Choose the txt file for the question bank and then click "import from this file"
  • This should parse the file and you questions are now installed.
  • Now, if you have been unzipping on your local machine and creating a directory structure with all your image files as I am sure you had already decided to do, you will have to zip that up and upload it to "site Files"
  • If you have been a good boy or girl then when you now go to preview one of the questions you will see the image file for each question.


Yes, you will likely need to have separate directories for each Chapter (depending on the bank) as in at least some texts the images are all labeled starting from image001.png for each Chapter, and, bless their heart, you will have to manually identify the relationship between the images and the figure or table reference in the question. For this I would recommend using EZTest as you can use the media options to rename the

Some notes:
If you get this to work with course files before I do, please note what you did.
Remember that penalties for adptive questions are assigned by question.... so change your default or you will have to change default by going through each question one at a time....

Attachment WebCT_Options.png
In reply to Marc Grober

Docs reference on quiz image links on copy

by Marc Grober -
The following link suggests that if you follow the prior directions to create images directories in the course files instead of in site files that with 1.9 and since
  • from the course or activity context to a course category or the core system context, you will be asked if you would like to move any linked files in the course files area to the site files area.
  • from a course category or the core system context to the course or activity context, you will be asked if you would like to move / copy any linked files in the site files area to the course files area.
That did not seem to work for me, and the info here is a bit confusing... i.e. as admin if I want to copy a course and thereby create a new course and the linked files are in the files for the initial course a) will I be prompted, b) what exactly will I be prompted to do, and c) will the system ALSO change the URLs besides copying or moving (doesn't say that.....) ? And will I then end up with referenced files in both the original course files and site files, but not the new course files?

http://docs.moodle.org/en/Questions_linking_to_files