Moodle test creator

This script allows incorporating to the Moodle question bank test quizzes written in any word processor. When managing a large number of questions, this script provides a quick way of bulk loading them.

This program transforms five types of test questions to the gift format: single answer, multiple answers, short answer, numerical and essay questions.

In single answer mode only one alternative could be marked. Erroneous responses can be scored negative.

In multiple-choice mode questions have at least one correct answer, and multiple alternatives could be checked. The rating of each question will be proportional to the number of correct answers pointed out: if, for example, guesses are only one of two correct answers, the score will be 50%, 33.3% if they were three, etc. By default, a wrong answer makes the score will be zero,but this can be modified in the options.

In short answer mode answer must be typed and it will be 100% credited if it matches exactly any of the correct responses, or zero otherwise.

A numerical question is like a short answer question in which the answer is a number. Numerical answers can include an error margin, which is written following the correct answer, separated by a colon.

An essay question allows a response of a file upload and/or online text. This must then be graded manually.

The question formats that Moodle and gift format allow are much wider than the ones presented by this script. You can explore the possibilities offered by Moodle in this link

Instructions for creating a test in gift format

You can create the questions in any word processor, for example MS Word, with the following scheme: Each question should be expressed in a paragraph followed by the alternatives in each of the adjacent paragraphs. The next question is separated from the previous one by a carriage return (a blank line) and so on. That is to say, the question delimiter is a blank line.

The right choices in each question must be indicated by an asterisk (*) as the first character of the paragraph. Dont number questions or answers since Moodle does it automatically and numeration will be duplicated. (See this image and examples at the end of this page.)

Once you have configured the questions, copy them to the clipboard and paste them into the text area. Make sure you do not spare any blank line at the beginning or at the end of the text. Select question type and press "send". If you wish, you can put an identifier common to the questions to be translated, it is useful to classify and sort them in the Moodle Question Bank.

Save the output file to your hard drive and then import it into the Moodle Question Bank. The text generated by the program is UTF-8 coded and should not cause problems for its incorporation into Moodle. Nevertheless, if text contains some uncommon or exotic characters, is convenient to check them editing the output file and correcting them manually if necessary.

To import the questions log into Moodle--> Question Bank-->Import--> check gift format, select the file you have just saved and follow instructions. (More information about importing questions into Moodle).


Please, help to maintain this site

Transform your questions

Paste the questions in the text area; the first paragraph should be the first question

Type of questions:

Single Answer     Multiple-Choice     Wise selection Each question shall be considered "Single Answer" type if it only has one valid answer, "Multiple-Choice" if it has two or more correct answers, "Short-Answer" if all answers are correct, "Numeric" if there is only one numeric correct answer, or "Essay" if an asterisk is the only answer.     Others Short-Answer; Single-Answer, but correct answers>1


Wrong answer handling:

  Percentage that will subtract each erroneous answer in "Single Answer mode".

Weigh erroneous responses in "Multiple Answer". Each wrong answer will subtract its proportion to the total incorrect in the question. (Valid only for questions with less than 10 wrong alternatives).

Exam Identifier This code will appear -only for teacher eyes- in the query name. This code makes easier to identify and order queries in the Moodle Question Bank.

Name of the file to be generated (no extension)

ID or email (only donors):

Do not UTF-8 encode. If some characters are not displayed correctly, you can try to improve the result by checking this box. You will get a text file, which must be UTF-8 encoded using a suitable program. For this you can use the free text editor Notepad++: encoding -> convert to UTF-8 without BOM.


Examples of questions as they should be pasted in the text area

Do not forget to indicate with an asterisk the correct answers
Comment is optional

What values can assume the square root of 4?-com-Remember that the square root always has two values: one positive, one negative. [general feedback]
SixYou should check "Weigh erroneous responses..." to make that each incorrect answer scores -½ and not an automatic zero in this question.

Who is buried in Grant's tomb in New York City?
*Grant-com-OK. Grant's remains were buried in the tomb in 1897 [answer feedback]
No one-com-Was true for 12 years, but Grant's remains were buried in the tomb in 1897
Napoleon-com-He was buried in France
Churchill-com-He was buried in England
Mother Teresa-com-She was buried in IndiaYou could feedback the answers by entering at the end of each one the expression: -com- (including hyphens) and the comment next.

To make a general feedback enter -com- followed by the general comment in the same paragraph after the question like the previous example. Also you can enter the general feedback as an answer preceded by -com- as shown in next question.

The demand function for good X is: <br> $$Q_{x}^{d}=40-2P_x$$ <br> Mark the correct answers:
$$\frac{dQ_{x}^{d}}{dP}= -2$$ is the slope of the curve
X is an inferior good
*Demand for X is price-elastic for Px > 10
*Price-elasticity is 1 for Px = 10.
-com-Remember a lineal demand curve elasticity properties [General feedback].You could use the html tags <br> or <p> to separate lines in questions and/or answers.

*fourYou should check "Others" or "Wise selection" for this question, with all alternatives right, to be a "short answer" question type.

When was Ulysses S. Grant born?
*1822:5You should check "Single answer" or "Wise selection" to make this question to be a "Numerical question", in this example with an error range of five years.

Comment the effects on bonds price of a rise in interest rates
*You should check "Single answer" or "Wise selection" to make this question, with only an asterisk as answer, to be an "Essay question"

Number of questions converted until now: 1791239

Author: Manuel Vilas. Comments and suggestions are welcome