Importing multiple-choice and true/false questions into a question bank using a text file
The Moodle system allows you to import a large number of multiple-choice and/or true/false questions into the course question database using a text file.
The file must contain only text (images/formulas, etc. can be added to questions that have been uploaded to moodle), the structure of the questions and distractors must follow the format described below, and the text file must be in UTF-8 format.
Step 1 - Creating the text file for import
Create the file in Notepad or another text editor at your convenience.
Each question must start on a new line, and there must be a line space between the last distractor of the previous question and the next question.
There is no numbering of questions and distractors.
Multiple-choice questions: The format for entering these questions into the file is:
- Line 1: The content of the question itself.
- Line 2: The correct answer preceded by the symbol {=
- Lines 3 and onwards: The distractors, with the symbol ~ appearing at the beginning of each line
- The symbol } should appear at the end of the line of the last distractor. Between the distractors, you have to move a line with shift-enter
Example:
--------------------------------
What day is it today?
{= Sunday
~ Monday
~Tuesday
~Wednesday}
--------------------------------
True/False Questions: The format for entering these questions into the file is:
- Line 1: The content of the question itself.
- Line 2: The correct answer (TRUE or FALSE) in curly brackets.
Example:
--------------------------------
Moses did not enter the Land of Israel.
{TRUE}
--------------------------------
The file must be saved as a text file (txt) in UTF-8 format.
Importing the file into the question bank
It is recommended to create a new question category for the questions - please see instructions here.
On the main page of the course, click on "More" and then select "Question bank".
On the next page select "Import"
On the import settings page that opens, select "Gift format":
Further down the page, select the category you wish to import the questions into:
And drag the text file you created to the arrow area and click "Import" at the bottom of the page:
If everything went well, you will receive a message that the questions were imported successfully and you will be able to see them in the question database under the category you selected.