User Reference
Structure of a question database
Each spreadsheet document must at least have three sheets:
One sheet named
settings
which stores project specific settings for this question database:In this sheet in the first column the tags below need to be written and in the second column the specific values for each tag.
It must specify
categoriesSheet
with the name of the sheet, which lists the Categories.It must specify
imgFolder
which is the directory name for the pictures, relativ to the path of the spreadsheet itself.It may specify any of the tags listet in Settings tag definitions Tags are listed in the first, their values in the second column.
One sheet which stores the information about the different categories of questions.
The name of this sheet must be as specified by
categoriesSheet
in the settings.It may/must have at least those columns:
category
mandatoryin this column all the different category identifiers are listet. Those identifiers must be coherent to the names of the sheets, which store the questions of for this category.
description
mandatorystring | intA short description of the category. This is later shown as the description for the category in moodle and in excel2moodle
points
optionalfloatThe total points for each question of this category. If omitted, the Fallback points as specified in
settings
sheet is used.
At least one category sheet, which stores all the questions in for that category.
The name of this sheet(s) must be as specified by
category
sheetThe first column of this sheet list all the tags (refer to: Question Tag Definitions) in each of the folowing columns the values for each of the questions are provided.
Settings tag definitions
Below is a list of all supported settings which can be set in the settings
sheet.
None except categoriesSheet
has to be set, if the defaults are to your liking.
The settings can either be set project wide in the settings
sheet,
or you can set them in the categoriesSheet
per category, or only for a question,
by specifying a setting in addition to the question tags. (see Question Tag Definitions)
The most specific setting definition will always be used.
This means when you set the Image Width=500
inside the settings
and set Image Width=900
for category05
and set Image Width=600
for question 0501 (inside category05, see Question ID convention)
All questions will have a picture with a width of 500px,
except those in category will have a width of 900px.
But the question 0501 will use the width of 600px.
Note
All tags are not case-sensitive even if they are written here in camelCase. The even may contain spaces and still will be valid.
For example you can write Img Width
and it will be recognised as the settings tag imgWidth
below.
categoriesSheet
mandatorystrdefault=KategorienThe name of the sheet where the categories are specified. Can not be set category wide
imgFolder
strdefault=imgsFolder where the images are stored, relative to the folder of the spreadsheet. Inside this Folder for each category a folder needs to be created with the same name as the category sheet. Can not be set category wide
points
floatdefault=1.0The number of points for each correctly answered question.
tolerance
intdefault=1Tolerance for the
NF
orNFM
orCLOZE
questions. See also tolerance for details of how this value is treated.imgWidth
intdefault=500Width of the picture in the questions
answerImgWidth
intdefault=120Width of the pictures set as answers for tho
MC
questions.wrongSignCount
intdefault=0The percentage of points that are given for results with the wrong sign. A value of
50
will give \(50\%\) of the total points. Currently only supported for the Cloze question Type
importModule
strdefault=NoneA custom python module can be imported to be used in the
NFM
orCLOZE
questions equation. This module must be in the same folder as the spreadsheet. For example, ifimportModule = my_module
(my_module.py) defines a functiondef myFunc(variableA=1, variableB=1)-> float:
You can call this function in theresult
field of the question via:my_module.myFunc(variableA=a, variableB=b)
assuming you are defining the variablesa
andb
in thebulletPoint
, the return Value ofmyFunc()
will be used as the result.
Question ID convention
Each Question gets an unique 4 digit identifier consisting of two parts.
part is the two digit category number
part is the two digit question number.
Beispiel: 0613
ist die Frage 13 aus der Kategorie 6
Supported Question Types
MC
Multiple ChoiceThis is the multiple choice question Type. It supports a main text and two list of answers. One with correct and one with incorrect answers. Optionally a picture can be shown below the main text. See Question Tag Definitions for an overview what needs to be specified. Examples for this are given here: Multiple Choice Fragen.
NF
NumericEinfach BerechnetThis is a question which expects an numeric answer. It consist of the main text, optionally a bullet Point list, where variables may be presented in a structured way. Optionally a picture can be included. See Question Tag Definitions for an overview what needs to be specified.
NFM
Numeric (multiple Variants)Einfach Berechnet (mehrfache Variation):This is an easy way to serialize numerical Questions based on a set of Variables on which a result is calculated by excel2moodle When imported into moodle it is the same as the
NF
Question. When creating this question mostly the same rules apply as for theNF
type. But instead of specifying the numeric answer, a formula is given, which will evaluated by excel2moodle Inside the formula variables need to be used. For each of these variables another tag is created in the spreadsheet to which a list of numbers need to be passed. Examples for this are given here: Numerische Fragen.CLOZE
LückentextThis Question Type lets you ask more than one
MC
orNFM
question fields in one moodle question. For theNFM
question, you define the variables as you are used to. But then you can define multipleresult:i
formulas, where i is the number of the answer part. The corresponding question toresult:2
must be asked in the tagpart:2
The first Result for this formula has to be defined infirstResult:2
tag.If you want to ask
MC
questions in the answer Parts, you definetrue:2
andfalse:2
for each of the answer options for the second question part. Examples for this are given here: Example of CLOZE questions.
Question Tag Definitions
When writing questions several important things must be considered, as the program still is quite buggy and likely to crash, when unexpected input is reached.
Important
The following list shows all tags that need or may be declared in the spreadsheet. It has the following structure
tag
classifierQuestionTypeDescription of what this tags does
The first classifier shows weather this tag is optional or mandatory. Each tag may have slightly different meanings for each question type.
For example: the bulletPoints
tag is mandatory for NFM
questions,
but for NF
questions it is optional.