GIFT ist das am meisten verbreitete Austauschformat, um Testfragen von Moodle in Textdateien zu exportieren oder solche aus Textdateien nach Moodle zu importieren. GIFT unterstützt die Fragetypen MultipleChoice, Wahr/Falsch, Kurzantwort, Zuordnung und numerische Fragen genauso wie das Einfügen von _____ für das Lückentext-Format. Verschiedene Fragetypen können zusammen in einer einzigen Textdatei vorkommen. GIFT erlaubt außerdem Zeilenkommentare, Fragennamen, Feedback und prozentgewichtete Bewertungen.
Optionale Erweiterungen (questiontype plugins) können das Format erweitern.
Die Textcodierung Ihrer Textdatei muss UTF-8 sein (solange Sie nicht ausschließlich ASCII-Buchstaben verwenden). Eine Textdatei mit Beispielen kann hier gefunden werden: gift/examples.txt.
Jede einzelne Frage in der GIFT-Datei ist ein kompakter Block, der keine einzige Leerzeile enthalten darf. Jede Frage wird abgegrenzt durch genau eine Leerzeile am Ende. Falls Sie eine Leerzeile innerhalb Ihrer Frage verwenden möchten, so müssen Sie als Ersatz \n verwenden. Sie dürfen Kommentare verwenden, wann immer Sie dies wünschen, aber diese müssen jeweils mit zwei vorwärtsgerichteten Slashes // am Anfang der Zeile beginnen.
MultipleChoice:
In MultipleChoice-Fragen werden falsche Antworten mit einer vorangestellten Tilde (~) markiert, richtige Antworten mit einem Gleichheitszeichen (=).
Who's buried in Grant's tomb?{~Grant ~Jefferson =no one}
Lückentext:
Das Lückentext-Format erzeugt automatisch eine Lückenlinie (etwa wie diese ______ hier) im Inneren des Satzes. Um das Lückentext-Format zu verwenden, platzieren Sie die Antworten genau an der Stelle im Satz, wo die Linie erscheinen soll.
Grant is {~buried =entombed ~living} in Grant's tomb.
Wenn die Antworten vor dem schließenden Punkt stehen, dann wird die Lückenlinie für das "Lückentext"-Format verwendet. Alle Fragetypen können in diesem Format geschrieben werden.
Fragen müssen mittels einer Leerzeile voneinander getrennt werden (zweifacher Zeilenvorschub). Zur klareren Darstellung dürfen die Antworten auch in jeweils separaten Zeilen und sogar eingerückt geschrieben werden, z.B.
The American holiday of Thanksgiving is celebrated on the { ~second ~third =fourth } Thursday of November. Japanese characters originally came from what country? { ~India =China ~Korea ~Egypt }
Kurzantwort:
Antworten bei Fragetyp Kurzantwort sind alle mit einem vorangestellten Gleichheitszeichen (=) markiert, was anzeigt, dass dies alles richtige Antworten sind. Die Antworten dürfen keine Tilde (~) enthalten.
Who's buried in Grant's tomb?{=no one =nobody} Two plus two equals {=four =4}.
Falls es nur eine einzige richtige Kurzantwort gibt, darf sie auch ohne vorangestelltes Gleichheitszeichen geschrieben werden, solange sie nicht mit dem Fragetyp Wahr-Falsch verwechselt werden kann.
Wahr/Falsch:
In diesem Fragetyp zeigt die Antwort an, ob die vorgegebene Aussage wahr oder falsch ist. Die Antwort sollte in der Form {TRUE} bzw. {FALSE} geschrieben oder aber abgekürzt als {T} bzw. {F} werden.
Grant is buried in Grant's tomb.{F} The sun rises in the east.{T}
Zuordnung:
Zuordnungspaare beginnen mit einem Gleichheitszeichen (=) und werden mit dem Pfeilsymbol (->) verbunden. Es müssen mindestens drei Zuordnungspaare vorhanden sein.
Matching Question. { =subquestion1 -> subanswer1 =subquestion2 -> subanswer2 =subquestion3 -> subanswer3 } Match the following countries with their corresponding capitals. { =Canada -> Ottawa =Italy -> Rome =Japan -> Tokyo =India -> New Delhi }
Zuordnungsfragen erlauben kein Feedback oder prozentuale Antwortgewichtungen
Numerisch:
Der Antwortbereich für numerische Fragen muss mit einem Nummernzeichen (#) beginnen. Numerische Antworten dürfen eine Fehlerbandbreite beinhalten, welche der richtigen Antwort folgend aufgeschieben wird, abgetrennt durch ein Doppelpunkt (:). Falls also beispielsweise die korrekte Antwort irgendein Wert zwischen 1.5 und 2.5 ist, so würde dies folgendermaßen aufgeschrieben werden: {#2:0.5}. Dies zeigt an, dass 2 innerhalb einer Fehlerbandbreite von 0.5 richtig ist (also der Bereich 1.5 bis 2.5). Falls keine Fehlerbandbreite angegeben ist, so wird sie automatisch als Null angenommen.
Beachten Sie bitte, dass in Moodle alle Dezimalzahlen in der amerikanischen Notation verwendet werden, nämlich mit einem Dezimalpunkt zwischen der Ganzzahl und nachfolgenden Bruchzahlwert.
When was Ulysses S. Grant born? {#1822} What is the value of pi (to 3 decimal places)? {#3.1415:0.0005}.
Optional dürfen numerische Antworten auch als Bereichangabe in folgendem Format geschrieben werden {#MinimumValue..MaximumValue}.
What is the value of pi (to 3 decimal places)? {#3.141..3.142}.
Die Browser-Oberfläche von Moodle unterstützt keine mehrfach-numerischen Antworten, aber sowohl in Moodle wie auch in GIFT lässt sich dies umsetzen. Folgendermaßen lässt sich eine numerische Antwort mit mehreren Bandbreiten festlegen und mit prozentgewichteter Bewertung kombinieren. Falls mehrere Antworten benutzt werden, müssen sie mit einem Gleichheitszeichen (=) voneinander getrennt sein, genau wie bei Kurzantwort-Fragen.
When was Ulysses S. Grant born? {# =1822:0 =%50%1822:2 }
Beachten Sie, dass wegen der fehlenden Unterstützung von Mehrfachantworten für numerische Fragen im der grafischen Browseroberfläche von Moodle keine Möglichkeit gibt, solche Antworten in Moodle anzuzeigen oder zu bearbeiten. Der einzige Weg, eine numerische Mehrfachantwort nachträglich zu ändern, liegt im Löschen der Frage und dem erneuten Import über eine GIFT-Datei (oder Sie benutzen etwas wie phpMyAdmin).
Freitext:
Eine Freitext-Frage ist einfach eine Frage mit einem leeren Antwortfeld. Zwischen den geschweiften Klammern ist keine Eingabe erlaubt.
Write a short biography of Ulysses S. Grant {}
Beschreibung:
Eine Beschreibungs-"Frage" besitzt überhaupt keinen Antwortteil.
The next set of questions will concern arithmatic.
In Ergänzung zu diesen grundlegenden Fragetypen bietet der GIFT-Filter die folgenden Optionen: Zeilenkommentare, Fragename, Feedback und prozentuale Antwortgewichtung.
Zeilenkommentare:
Kommentare, die nicht nach Moodle importiert werden, können in die Textdatei eingefügt sein. Dies kann benutzt werden, um Überschriften zu setzen oder zusätzliche Informationen zu den Fragen zu schreiben. Alle Zeilen, die mit einem doppelten Slash beginnen (ohne vorangestellte Tabulatoren oder Leerzeichen), werden beim Import durch den Filter ignoriert.
// Subheading: Numerical questions below What's 2 plus 2? {#4}
Fragename:
Der Fragename wird vor die Frage gesetzt und mit doppelten Doppelpunkten (::) vor und hinter dem Namen umrahmt.
::Kanji Origins::Japanese characters originally came from what country? {=China} ::Thanksgiving Date::The American holiday of Thanksgiving is celebrated on the {~second ~third =fourth} Thursday of November.
Falls kein Fragename angegeben ist, wird die Frage selber standardmäßig auch als Name verwendet.
Feedback:
Ein Feedback ist für jede Antwort ergänzend möglich, indem anschließend an die Antwort mit dem Nummernzeichen (# auch als Hash bekannt) das Feedback angehängt wird.
What's the answer to this multiple-choice question? { ~wrong answer#feedback comment on the wrong answer ~another wrong answer#feedback comment on this wrong answer =right answer#Very good! } Who's buried in Grant's tomb? { =no one#excellent answer! =nobody#excellent answer! } Grant is buried in Grant's tomb.{FALSE#Wrong, No one is buried in Grant's tomb.#Right, well done.}
Bei MultipleChoice-Fragen wird das Feedback nur für die von den Teilnehmer/innen ausgewählte Antwort gezeigt. Bei Kurzantworten wird das Feedback nur dann gezeigt, wenn die gegebene Antwort mit der vorgegebenen richtigen Antwort übereinstimmt. Bei Wahr/Falsch-Fragen kann es eine oder zwei Feedback-Texte geben, der erste wird bei einer falschen Beantwortung gezeigt, der zweite bei der richtigen Beantwortung.
Percentage Answer Weights:
Percentage answer weights are available for both Multiple Choice and Short Answer questions.
Percentage answer weights can be included by following the tilde (for Multiple Choice) or
equal sign (for Short Answer) with the desired percent enclosed within percent signs (e.g., %50%).
This option can be combined with feedback comments.
Difficult question.{~wrong answer ~%50%half credit answer =full credit answer} ::Jesus' hometown::Jesus Christ was from { ~Jerusalem#This was an important city, but the wrong answer. ~%25%Bethlehem#He was born here, but not raised here. ~%50%Galilee#You need to be more specific. =Nazareth#Yes! That's right! }. ::Jesus' hometown:: Jesus Christ was from { =Nazareth#Yes! That's right! =%75%Nazereth#Right, but misspelled. =%25%Bethlehem#He was born here, but not raised here. }
Note that the last two examples are essentially the same question, first as multiple choice and then as short answer.
Note that it is possible to specify percentage answer weights that are NOT available through the browser interface. The Match Grades drop-down on the import page determines how these are handled. You can either request that an error be reported or that the answer weight be adjusted to the nearest valid answer weight.
Specify text-formatting for the question
The question text (only) may have an optional text format specified. Currently the available formats are
moodle (Moodle Auto-Format), html (HTML format), plain (Plain text format) and
markdown (Markdown format). The format is specified in square brackets immediately before the
question text. More information on text formats in Moodle.
[markdown]The *American holiday of Thanksgiving* is celebrated on the { ~second ~third =fourth } Thursday of November.
Multiple Answers:
The Multiple Answers option is used for multiple choice questions when two or more answers must
be selected in order to obtain full credit. The multiple answers option is enabled by assigning
partial answer weight to multiple answers, while allowing no single answer to receive full credit.
What two people are entombed in Grant's tomb? { ~No one ~%50%Grant ~%50%Grant's wife ~Grant's father }
Note that there is no equal sign (=) in any answer and the answers should total no more than 100%, otherwise Moodle will return an error. To avoid the problem of students automatically getting 100% by simply checking all of the answers, it is best to include negative answer weights for wrong answers.
What two people are entombed in Grant's tomb? { ~%-50%No one ~%50%Grant ~%50%Grant's wife ~%-50%Grant's father }
Special Characters ~ = # { } :
These symbols ~ = # { } : control the operation of this filter and cannot be used as normal text within questions.
Since these symbols have a special role in determining the operation of this filter, they are called "control characters."
But sometimes you may want to use one of these characters, for example to show a mathematical formula in a question.
The way to get around this problem is "escaping" the control characters.
This means simply putting a backslash (\) before a control character so the filter will know that you want to use
it as a literal character instead of as a control character.
For example:
Which answer equals 5? { ~ \= 2 + 2 = \= 2 + 3 ~ \= 2 + 4 } ::GIFT Control Characters:: Which of the following is NOT a control character for the GIFT import format? { ~ \~ # \~ is a control character. ~ \= # \= is a control character. ~ \# # \# is a control character. ~ \{ # \{ is a control character. ~ \} # \} is a control character. = \ # Correct! \ (backslash) is not a control character. BUT, it is used to escape the control characters. }
When the question is processed, the backslash is removed and is not saved in Moodle.
It is possible to change the category into which the questions are added within the GIFT file. You can change the category as many times as you wish within the file. All questions after the modifier up to the next modifier or the end of the file will be added to the specified category. Up to the first category modifier the category specified on the import screen will be used. Note that for this to work the from file: box must be ticked on the import screen.
To include a category modifier include a line like this (with a blank line before and after):
$CATEGORY: tom/dick/harryor simply
$CATEGORY: mycategory...the first example specifies a path of nested categories. In this cae the questions will go into harry. The categories are created if they do not exist.
Other Options:
Short Answer questions can be made case sensitive by changing "0" to "1" in the following line:
$question->usecase = 0; // Ignore case