How to create test tasks for ELF in bulk

One of the general recommendations for working with online tests is to create a large enough bank of test tasks from which you can then select questions randomly. This will ensure that each student completes a different version of the test, making copying difficult. In addition, tests generated randomly from a large enough task bank reduce the negative effects of sharing already used tasks. However, creating a sufficient number of task items requires a lot of time, not only to come up with the questions and their variants, but also to upload them into the system.

ELF allows you to write your questions ahead of time in a specific format (GIFT), save them as a text file (.txt), and then import them into the task bank in your course. You can thus create a large number of questions much faster than if you were to create them one by one directly in ELF.

To create test questions in bulk in this way, you can either familiarize yourself with the GIFT format rules and then use them to write your questions, or use our pre-made template, where you just select the desired question type and fill in the necessary values in the right places.

What is the GIFT format?

GIFT is a simple but robust format for writing test questions in Moodle. You can export existing questions in this format to a text file, or you can import new questions from a text file into a task bank. Both options are available in the question bank under the respective “export” and “import” options.

The basic question types that can currently be written in GIFT format are:

  • A formed short answer,
  • A formed long answer,
  • A selection of missing words,
  • A multiple choice question,
  • A Matching exercise,
  • True/false questions,
  • Numerical tasks.

The questions are written as plain text and their individual parts follow a predetermined order and are marked with special characters:

  • :: delimits the title of the question,
  • {} delimits the array field for possible answers and distractors (incorrect answers),
  • = indicates the correct answer,
  • ~ indicates an incorrect answer,
  • # indicates a comment that will be displayed as feedback when the answer is selected,
  • % delimits the percentage of the answer to the final grade,
  • // indicates a comment (not processed as part of the question).

 

A sample formed short answer task would look like this:

::basic calculus - task 1::
Two plus two equals
{
    =four
    =4
}

A sample multiple choice task goes as follows:

::basic arithmetic - task 2::
What is two plus two?
{
    =4
    ~6
    ~8
}

For multiple choice questions, a percentage of the final mark must be given for each correct answer. For wrong answers, it’s a good idea to give a negative mark:

::basic calculus - problem 3::
The square of which number is equal to 4?
{
    ~%50%2
    ~%50%-2
    ~%-100%4
    ~%-100%-4
}

For more detailed information about importing GIFT tasks, including writing other types of tasks and specific examples, see the ELF user documentation, or the official LMS Moodle documentation.

If you have any additional questions or encounter problems with importing tasks, please do not hesitate to contact the CIT E-learning Office.

How to use a pre-formed template

1
Download a pre-formed template.

2
Open the file in a text editor.

TIP: We recommend using a text editor (e.g. Notepad) instead of a word processor (e.g. MS Word).

3
Select the question type, copy the relevant text, and replace the required values with your own.

Repeat the procedure for each additional question.

Make sure that each question is followed by at least one free line.

4
Remove unnecessary sample questions and save the document. Save the document with a .txt extension and UTF-8 encoding.

If you’re editing the file in MS Word, choose Save as > Save as type: Plain text (.txt) and in the following dialogue box, choose a different encoding and select UTF-8 from the menu.

5
In your course, go to the task bank, select import in the left administration block, select GIFT in the file format section, and drag the task file into the file upload box.

6
The tasks are imported into your task bank.

Task Gallery

In this section you can see how the sample task entries from the pre-formed template will appear in ELF tests.

You can also go through all the basic types of tasks from the student’s perspective in the sample tests of the Showcase course directly in ELF.

Formed short answer
::Question title (not displayed to students)::
Question.
{
   =Correct answer
   =Another variant of the correct answer
}
Selection of missing words
::Question title (not displayed to students)::
Question. Write the possible answers {=right answer ~wrong answer ~other wrong answer} directly into the task for students to choose from.
True False
::Question title (not displayed to students)::
Question.
{
    TRUE
}
Multiple choice question (one correct answer)
::Question title (not displayed to students)::
Question.
{
    =Correct answer
    ~Wrong answer
    ~Wrong answer
    ~Wrong answer
}
A selection of possible answers with one correct answer, partially correct answers, and feedback
::Question title (not displayed to students)::
Question.
{
    =Correct answer # Comment for correct answer
    ~%75%Partially correct answer for 75% of the mark # Comment for partially correct answer
    ~%25%Partially correct answer for 25% of the mark # Comment for partially correct answer
    ~Wrong answer # Comment for wrong answer
}
A selection of possible answers (multiple correct answers)
::Question title (not displayed to students)::
Question.
{
    ~%50%Correct answer
    ~%50%Next correct answer
    ~%-50%Wrong answer
    ~%-50%Wrong answer
}
Matching exercise
::Question title (not displayed to students)::
Question.
{
    =First task -> Answer to the first task
    =Second task -> Answer to the second task
    =Third task -> Answer to the third task
    =Fourth task -> Answer to the fourth task
}
Formed long task (open-ended question)
::Question title (not displayed to students)::
Question.
{}
Popisek
::Question title (not displayed to students)::
Caption text.

You are running an old browser version. We recommend updating your browser to its latest version.

More info