24 define (
"QT_UNKNOWN",
"unknown");
25 define (
"QT_KPRIM_CHOICE",
"assKprimChoice");
26 define (
"QT_LONG_MENU",
"assLongMenu");
27 define (
"QT_MULTIPLE_CHOICE_SR",
"assSingleChoice");
28 define (
"QT_MULTIPLE_CHOICE_MR",
"assMultipleChoice");
29 define (
"QT_CLOZE",
"assClozeTest");
30 define (
"QT_ERRORTEXT",
"assErrorText");
31 define (
"QT_MATCHING",
"assMatchingQuestion");
32 define (
"QT_ORDERING",
"assOrderingQuestion");
33 define (
"QT_ORDERING_HORIZONTAL",
"assOrderingHorizontal");
34 define (
"QT_IMAGEMAP",
"assImagemapQuestion");
35 define (
"QT_JAVAAPPLET",
"assJavaApplet");
36 define (
"QT_FLASHAPPLET",
"assFlashApplet");
37 define (
"QT_TEXT",
"assTextQuestion");
38 define (
"QT_FILEUPLOAD",
"assFileUpload");
39 define (
"QT_NUMERIC",
"assNumeric");
40 define (
"QT_FORMULA",
"assFormulaQuestion");
41 define (
"QT_TEXTSUBSET",
"assTextSubset");
77 $this->response =
array();
78 $this->resprocessing =
array();
79 $this->itemfeedback =
array();
80 $this->presentation = NULL;
81 $this->presentationitem =
array();
82 $this->suggested_solutions =
array();
83 $this->itemmetadata =
array();
85 $this->iliasSourceVersion = null;
86 $this->iliasSourceNic = null;
91 $this->ident = $a_ident;
101 $this->title = $a_title;
111 if (preg_match(
"/(.*?)\=(.*)/", $a_comment, $matches))
116 case "ILIAS Version":
117 $this->ilias_version = $matches[2];
121 $this->questiontype = $matches[2];
125 $this->author = $matches[2];
140 if (preg_match(
"/P(\d+)Y(\d+)M(\d+)DT(\d+)H(\d+)M(\d+)S/", $a_duration, $matches))
142 $this->duration =
array(
157 $this->questiontext = $a_questiontext;
167 array_push($this->resprocessing, $a_resprocessing);
172 array_push($this->itemfeedback, $a_itemfeedback);
177 $this->maxattempts = $a_maxattempts;
187 $this->label = $a_label;
197 $this->xmllang = $a_xmllang;
207 $this->presentation = $a_presentation;
218 if ($this->presentation != NULL)
225 $this->questiontype = $a_questiontype;
235 array_push($this->presentationitem, $a_presentationitem);
240 switch ($this->questiontype)
242 case "ORDERING QUESTION":
244 case "KPRIM CHOICE QUESTION":
246 case "LONG MENU QUESTION":
248 case "SINGLE CHOICE QUESTION":
250 case "MULTIPLE CHOICE QUESTION":
252 case "MATCHING QUESTION":
254 case "CLOZE QUESTION":
256 case "IMAGE MAP QUESTION":
258 case "JAVA APPLET QUESTION":
260 case "TEXT QUESTION":
262 case "NUMERIC QUESTION":
264 case "TEXTSUBSET QUESTION":
268 foreach ($this->presentation->order as $entry)
270 switch ($entry[
"type"])
273 $response = $this->presentation->response[$entry[
"index"]];
274 switch ($response->getResponsetype())
277 switch ($response->getRCardinality())
294 switch ($response->getRCardinality())
312 $material = $this->presentation->material[$entry[
"index"]];
317 if (strlen($this->questiontype) == 0)
329 $this->author = $a_author;
371 array_push($this->suggested_solutions,
array(
"solution" => $a_solution,
"gap_index" => $a_gap_index));
376 array_push($this->itemmetadata, $a_metadata);
386 foreach ($this->itemmetadata as $metadata)
388 if (strcmp($metadata[
"label"], $a_label) == 0)
390 return $metadata[
"entry"];
setPresentation($a_presentation)
addResprocessing($a_resprocessing)
const R_CARDINALITY_ORDERED
getMetadataEntry($a_label)
const QT_MULTIPLE_CHOICE_SR
setQuestiontext($a_questiontext)
setQuestiontype($a_questiontype)
addSuggestedSolution($a_solution, $a_gap_index)
Create styles array
The data for the language used.
setIliasSourceVersion($iliasSourceVersion)
const QT_MULTIPLE_CHOICE_MR
setIliasSourceNic($iliasSourceNic)
addItemfeedback($a_itemfeedback)
setMaxattempts($a_maxattempts)
const R_CARDINALITY_SINGLE
const R_CARDINALITY_MULTIPLE
addPresentationitem($a_presentationitem)