Manhattan College Knowledge Base

Importing Questions into a Moodle Quiz using VLE Tools

Updated on

Another article describes how to import questions into a quiz using a simple text file in the Aiken format.  This simplicity comes with some disadvantages:

  • Only multiple-choice questions can be imported
  • The questions may not import into the quiz in the desired order.  Or if they do, you may need to edit the question text after import

This article will cover another method of using a text file to import questions into a quiz. There's only one more step involved, but this added effort makes for a much more flexible method that allows several question types and improves question ordering.

A simple case: all multiple-choice questions

To begin, create your questions in a plain text file formatted as shown below:

  1. A question number, followed by a period.  For your first nine questions, add a leading zero; i.e., 01, 02, 03 rather than 1, 2, 3.  Note that this number will be stripped out of the question text that the students see when they take the quiz.  So in this example, the students will see "What is the correct answer to this question?" and not "01. What is the correct answer to this question?" Adding this number makes it easier to order the questions as you want.
  2. The question text, all on one line.  Note that the line can be long and end up wrapping around, but the question line cannot contain line breaks.
  3. The answer choices, with each line preceded by a capital letter followed by a period.
  4. The correct answer indicated with a line that reads "ANSWER: " followed by the letter of the correct answer.

 

Advanced use: multiple question types and feedback

For full details on how to use multiple question types and feedback, see the documentation on the VLE Tools website.

Unlike the Aiken format, this format allows you import several question types:

  • Multiple-choice
  • Essay
  • Short answer
  • True/false
  • Cloze
  • Numerical
  • Matching

To import multiple question types, include keywords in your file to indicate a question's type:

Question Type Keyword
Multiple Choice multichoice
Short Answer shortanswer
Essay essay
Embedded Answers (Cloze) cloze
True/False truefalse
Numerical numerical
Matching matching

For example:

multichoice
01. What is the correct answer to this question?
A. Not this one
B. Not this one, either
C. Must be this one!
ANSWER: C

truefalse
02. Manhattan College was founded in 1937.
ANSWER: False

essay
03. Write a paragraph on why you love Moodle.
Click to copy

Keywords also allow you to define general feedback and feedback for each of the answer options.  See the documentation linked above for more information.

Converting the text file to XML

After creating your text file, you'll convert it into an XML file using VLEtools.com, and that XML file will be imported into Moodle.

  1. Go go VLE Tools' Moodle XML Quiz Converter page
  2. Settings in the "Parser options" and "XML options" sections can be left at their default values
  3. Either upload your file or copy and paste it into the text box
  4. Click the Preview button to review the content, check that the correct answers were imported correctly, etc.
  5. Click the Download button to download the XML file you'll import into Moodle.  This file will be called "quiz.xml" or something similar.

Import questions into Moodle

Getting your questions into a quiz is a two-step process.  First, they need to be imported into the quiz's question bank, then added to the quiz itself that the students see.  After creating your quiz, click on its name to go to its landing page.  Then:

  1. Click the Question bank tab
  2. Choose Import from the drop-down menu

On the screen that appears:

  1. In the File format section, choose Moodle XML
  2. In the General section, click the Import category drop-down menu and you'll see a category named "Default for <Quiz_Name>" where <Quiz_Name> is replaced with the name you gave your quiz.  Choose that category.  Because my quiz is named "Quiz 1," my category is named "Default for Quiz 1."
  3. Uncheck the box for Get category from file

Finally, use the Choose a file... button to choose your XML file, or drag your file into the box.

When finished, click Import.  You'll see a list of the questions imported, which should match the number of questions you'd included in your file.  Click Continue

Remember to upload the XML file you downloaded from the VLE Tools site, not the text file you created at the beginning of this process.

Add questions to quiz

Go to your quiz's landing page.  Then:

  1. Click the Questions tab
  2. On the right side of the screen that comes up, click the Add link.  From the menu that appears, choose from question bank

On the next screen, you'll choose which questions you want to import.

  1. Open the drop-down menu and you'll see a category named "Default for <Quiz_Name>" where <Quiz_Name> is replaced with the name you gave your quiz.   This is the same category you imported the questions into. Choose that category.
  2. Click Apply filters.
  3. After you select a category, the questions you imported will appear.  Choose which you want to import with the checkboxes.  Click the topmost checkbox to select all the questions.
  4. Click Add selected questions to the quiz when finished

Once the questions have been added, you can order the questions, add page breaks, shuffling, etc., as with any other quiz.

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Previous Article How to Import Multiple Choice Questions into Moodle Using the Aiken Format
Next Article Creating Quizzes with Questions Randomly Selected from a Pool of Questions