Creating a quiz file is very simple! Every question contains some common mandatory fields and other additional fields as per the question type which are also important in a question definition. Let us see the common fields first:
QUESTION: This field describes the question type. It can take the following parameters:
singlecorrect
setcorrect
numeric
fillblanks
paper
module
We'll discuss about each question type in detail further.
MARKS: Marks field contains the marks associated to a question. It accepts any valid number. For example
1 or 1.5 or 1.25
are considered as valid marks whereas
2.3.4 or 1.e
etc. will encounter errors.
PER QUESTION NEGATIVE MARKS(NEG): This field is used to specify negative marks to only one question. It accepts any valid negative number.
CATEGORY: Category field in a question is optional. It depends on the user if he wants to give any tags related to question.
ANSDESC: This field contains the Answer Description or explanation about the answer of a specific question. After writing ANSDESC= , the description should be mentioned in the next line.
REMARKS: Remarks are also optional and can be added as unordered list in the question. They are ignored for the purpose of SAFE quiz.
Equals to line: The multiple equals to(=) line marks the end of a question. This works as a separator between two questions. Usually MORE THAN 5 equals to(=) suffice.
Now we can look at each question in detail:
NOTE: The examples can be copied to ODT and DOCS only.
Single Correct Answer Question : These questions are multiple choice questions with only one correct answer. All text between “QUESTION=” line and “OPTIONS=” line is part of the question text/description. Related fields are:
OPTIONS: Options of a question are specified as ordered list. Any list type is allowed, but it should remain same for all the options in a question. For example
1. Option1 2. Option2 3. Option3
or
A. Option1 B. Option2 C. Option3
or any other type are allowed but combination of types like
A. Option1 B. Option2 3. Option3
are not allowed.
ANSWER: Answer field contain the option which is correct. “ANSWER” can be specified as option number (starting with 1), or specific alphabet.
Set Correct Answer Question : Multiple choice questions with multiple correct answers. All text between “QUESTION=” line and “OPTIONS=” line is part of the question text/description. Related fields are:
OPTIONS: Options of a question are specified as ordered list. Any list type is allowed, but it should remain same for all the options in a question. For example
1. Option1 2. Option2 3. Option3
or
A. Option1 B. Option2 C. Option3
or any other type are allowed but combination of types like
A. Option1 B. Option2 3. Option3
are not allowed.
ANSWER: Answer field contains multiple options which are correct. “ANSWER” can be specified as option number (starting with 1), or specific alphabet. Different answer values are separated using comma(,) ; for example
Numeric Answer Question : The answers to these questions are entered by students on the SAFE app and it accepts valid numeric values as answers. All text between “QUESTION=” line and “ANSWER=” line is part of the question text/description. Related fields are:
ANSWER: It supports three answer formats.
Answer format 1: Range of possible values for correct answer, specified within square parentheses []. For example
[3.14, 3.15]
.
Answer format 2: A single number denoting answer. For example
3.14
.
Answer format 3: List of ranges of correct answers,i.e. if a question has multiple correct answer ranges it can be specified as list within list. For example
[[2,3],[4,6]]
.
Numeric Question Example
QUESTION=numeric, MARKS=1.5, CATEGORY=math
Give the value of PI correct to two decimal places.
Paper Answer Question : The answers to these questions are written by students on paper and a snap is captured from the SAFE app to submit the answer. All text between “QUESTION=” line and “REMARKS=” line, if remarks are mentioned else the "Equals to line" is part of the question text/description
Paper Question Example
QUESTION=paper, MARKS=2, CATEGORY=math
In a group of 100 students, 60 students are enrolled in an drawing class and 70 students are enrolled in a dance class. Draw a Venn diagram to represent this. Click a picture to submit your answer.
Fill Blanks Question : These questions are fill in the blank type questions where the students type the answer in the SAFE app. It accepts both numeric or words as answers. All text between “QUESTION=” line and “BLANK=” line is part of the question text/description. Related fields are:
BLANKS: It specifies the number of blanks the question contain or the number of values student has to answer.
There is no Marks specification here, since it specified per-blank, below.
line. It is written for every blank in the question, after question description, to mention what values a particular blank can accept, what is the correct answer and how many marks are associated with it. The field are:
BLANK: It specifies the type of values a blank can contain. It takes two values:
'numeric' or 'text'
.
MARKS: It takes any valid numeric value and denotes the marks related to a specific blank.
ANSWER: Answer field contains the correct answer of that blank. In a list of possible answers, each answer is separated from the next using a comma.
A question module represents a collection of questions which appear together in the quiz, i.e. questions within the module are not reordered with respect to one another or away from one another.
There CANNOT be a "Marks" specification as part of a module. Marks for each question of module is specified in that question definition.
The "CATEGORY" field applies to ALL questions within a module
COUNT field is a mandatory field in module questions and it specifies the number of questions included in a module.
After "QUESTION= module" line till any subquestion, everthing is included in module description.
A module can contain any of the above specified questions, with all the required fields, except CATEGORY.
The quiz can be downloaded in three file formats : .odt, .docx, .html. After downloading the quiz can be opened in LibreOffice or Google Docs. (MS Word is not supported currently.)
CSV UPLOAD
Quiz files can be uploaded using CSV files.A CSV file will have 12 rows, containing
Note: In SAFE, the options can be reordered depending on the quiz setting, so it is best to NOT to refer to option number within the option text. For the same reason use "None of the other options" instead of "None of the above", if you have such an answer option. Note: The remarks column itself is ignored and not considered as part of the question/quiz. The following question types are supported in CSV quiz upload:
Single Correct Questions :
The question type is mentioned as : singlecorrect.
Answer Format : Single number giving the correct option
Option Format : Max 5 options; empty option(s) toward the end are ignored
Category: any string describing the question category
An example describing fields for single correct question :
Answer format: List of correct answers. Optional: list can be giving within square parentheses []. List should have at least one correct answer (otherwise consider giving "None of the other options" as one of the options)
Option Format : Max 5 options; empty option(s) toward the end are ignored
An example describing fields for set correct question :
Answer format 1: Range of possible values for correct answer, specified within square parentheses []. For example
[3.14, 3.15]
.
Answer format 2: A single number denoting answer. For example
3.14
.
Answer format 3: List of ranges of correct answers,i.e. if a question has multiple correct answer ranges it can be specified as list within list. For example
[[2,3],[4,6]]
.
An example describing fields for numeric question :
NOTE: Fill Blank and Module questions are not supported in CSV quiz upload. If you want to add these type of questions try using ODT, DOCS or HTML upload.
HTML UPLOAD
For uploading an HTML file, the file must be created or updated in Notepad.
Adding Equations: Equations in the HTML file can be added using the class : "math-tex". The equations are to be written in plain TeX format with MathJax delimiters, \( and \) as shown in the example below. For example :
Adding Images: Images in the HTML file can be added using the Base64 string of that image. A few online sites to create a Base64 string corresponding to an image can be found here and here.
Note: The Base64 string in the example corresponds to an 1*1 pixel image.
PARAMETRIZED RANDOM QUESTION SELECTION
In parametrized random questions, the question and answer can contain 'variables' and the values a particular variable can take can be specified. It helps in creating various replicas of a same question, with different values and same category. These questions can be created using .odt or .docx file.
Additional fields:
QUESTION : This field will describe the question type in similar manner as it does for a normal question, but with additional keyword ( ':var'), specifying it is a variable question. The various question types now become:
singlecorrect:var
setcorrect:var
numeric:var
fillblanks:var
paper:var
module:var
The variables when used in a question must be enclosed within '$$' sign, i.e. within two dollars. Format is
$$var1$$
For example,
What is the speed when distance is $$distance$$ and time is $$time$$?
ANSWER = $$speed$$
VARIABLES : This field describes all the variables and the values which they can take. The format is as follows:
The first line specifies all the variable names used in the question. They must be seperated using a semi-colon(;). The further next lines will specify the values which the variables can take, again seperated using semicolon. For example:
distance;time;speed
21;3;7
20;5;4
Here, the variables used in the question are distance, time and speed. Now, the variable distance can take value 21, for that time will be 3 and speed will be 7. Using these values, two questions will be created and saved.
What is the speed when distance is 21 and time is 3?
ANSWER = 7
What is the speed when distance is 20 and time is 5?
ANSWER = 4
The module question can be a variable, but the subquestions of a module cannot contain variable questions.
If the variable takes string as its value, then the string must be enclosed within single quotes. If single quote has to be used within the string, write it as \'.
In a group of $$n$$ students, $$n1$$ students are enrolled in an drawing class and $$n2$$ students are enrolled in a dance class. Draw a Venn diagram to represent this. Click a picture to submit your answer.
EQUATIONS AND RANDOM VALUES IN PARAMETRIZED NUMERIC QUESTION
NOTE : Please refer Sample ODT/ Sample Docs for examples.
Equations
In parameterized numeric questions, answers to the questions can be given in form of equations. The intermediate question text can also contain equations. The equation must be enclosed within two curly braces. If a question contains equation and the variables used in the equation are not resolved or defined, then the question will throw an error. In case of multiple equations make sure that the variables used in any equation are already resolved by either defining them, or by solving them in previous equations. Lets consider an example :
Lets say for this question the time taken is twice of distance in hours, so we can give variables like this : As the speed variable needs time variable to resolve, so value of time variable should be calculated first, and hence it should be mentioned first.
Mentioning time after speed like below : will throw an error, as while resolving variable speed, the value of variable time is not defined.
Randomisation of Values
Variables can take random values. Quiz creator has to specify the starting value and the ending value of a range from which the values must be taken. The type of value i.e. integer or float must also be specified. when random values are used, one must specify the number of rows i.e. how many variants of a question they want to create using random values from that range.
Example: this will create three questions where distance can take values from 1 to 5 in float and time can take values from 2 to 6 in integer.
Format : rand(starting range value, ending range value, type:int/float) The number of rows must be specified at the end of line i.e. at the last of the line.
Relative And Absolute Errors
When answers are specified as equations, one can give range of answers by using relative and absolute errors. If rand() function is used for random values, relative error and absolute error can be given after the number of rows.
Relative Error : Relative error of 'x' will give a range of answer as [ans - x * ans, ans + x * ans]. It can be mentioned by using 're' keyword. Format : re = value
Example: Here, say distance = 6 and time = 2 so speed = 3 and range of answer using relative error = [2.97, 3.03]. Answers within this range are acceptable.
Absolute Error : Absolute error of 'x' will give a range of answer as [ans - x , ans + x]. It can be mentioned by using 'ae' keyword. Format : ae = value
Example: Here, say distance = 6 and time = 2 so speed = 3 and range of answer using relative error = [2.98, 3.02]. Answers within this range are acceptable.
ERRORS
When a file is uploaded, if the file contains errors, user is notified with the number of questions uploaded successfully and the number of questions which contain errors. The error code and the error is displayed along with a section of lines from uploaded file to depict where the error lies, with the line containing error underlined red.
Error List with their codes
Error Code
Error Description
201
Question doesn't match
202
Question type doesn't match, Expected : QUESTION = [singlecorrect, setcorrect, numeric, paper, fillblanks, module]. For Variable questions add :var after question type.Variable questions are not allowed within Module.
203
Marks not found after QUESTION = singlecorrect, Expected: MARKS = 'valid marks'
204
Options not found
205
Answer not found
207
Marks invalid
208
Answer value incorrect
209
Answer value invalid
210
Options list tag mismatch
211
Options and Answer missing
212
Answer value missing
213
Answer list not correct. Expected : ANSWER = OPTION1 , OPTION2 (Expected a comma seperated list)
214
Range invalid in NUMERIC answer type question
215
Value invalid of NUMERIC answer
216
Syntax Error. Expected : ANSWER = number OR [min1, max2] OR [[min1,max1], [min2,max2]]
217
Blanks value missing in Fill Blanks Type Question
218
BLANK, ANSWER and MARKS missing
219
COUNT value missing in MODULE type question
220
COUNT value and number of subquestions in module do not match.
Fill in the blank answer could not be parsed correctly.
225
Marks cannot be zero.
226
CSV file can contain only one fill blank question in module.
227
Variables not found in the question containing variable parameters($$var$$)
228
Some variables missing in the Variable question. Please check if you've entered values for all variables.
229
Number of variables and values of variables do not match.
230
Strings in variables must be enclosed within single quotes. If you're using equations please use double curly braces({).
300
Number of rows in random question not found. Please add how many random questions you want to generate. Refer Help Page or sample file for examples.
301
Values of variables not found. Please add the variable names and their values. Refer Help Page or sample file for examples.
302
Data type in random question doesn't match. Please use \"int\" or \"float\". Refer Help Page or sample file for examples.
303
Parameters of Random question not valid. Format : rand(start value, end value, type(either int or float). Refer Help Page or sample file for examples.
304
Cannot generate random values as Start value is greater than end value.
305
Please use proper integer or floating point numbers in start and end value of rand(). Refer Help Page or sample file for examples.
306
Please check if you've provided values for all variables in the equation. If there are two or more equations, write the equations for resolving values of variables which are to be used in further equations first.
307
Cannot generate question, please make sure you've provided values to all variables and separated them using semicolon(;).