Public Member Functions | |
| ilQTIItem () | |
| setIdent ($a_ident) | |
| getIdent () | |
| setTitle ($a_title) | |
| getTitle () | |
| setComment ($a_comment) | |
| getComment () | |
| setDuration ($a_duration) | |
| getDuration () | |
| setQuestiontext ($a_questiontext) | |
| getQuestiontext () | |
| addResprocessing ($a_resprocessing) | |
| addItemfeedback ($a_itemfeedback) | |
| setMaxattempts ($a_maxattempts) | |
| getMaxattempts () | |
| setLabel ($a_label) | |
| getLabel () | |
| setXmllang ($a_xmllang) | |
| getXmllang () | |
| setPresentation ($a_presentation) | |
| getPresentation () | |
| collectResponses () | |
| setQuestiontype ($a_questiontype) | |
| getQuestiontype () | |
| addPresentationitem ($a_presentationitem) | |
| determineQuestionType () | |
| setAuthor ($a_author) | |
| getAuthor () | |
| addSuggestedSolution ($a_solution, $a_gap_index) | |
Data Fields | |
| $ident | |
| $title | |
| $maxattempts | |
| $label | |
| $xmllang | |
| $comment | |
| $ilias_version | |
| $author | |
| $questiontype | |
| $duration | |
| $questiontext | |
| $resprocessing | |
| $itemfeedback | |
| $presentation | |
| $presentationitem | |
| $suggested_solutions | |
Definition at line 44 of file class.ilQTIItem.php.
| ilQTIItem::addItemfeedback | ( | $ | a_itemfeedback | ) |
Definition at line 155 of file class.ilQTIItem.php.
{
array_push($this->itemfeedback, $a_itemfeedback);
}
| ilQTIItem::addPresentationitem | ( | $ | a_presentationitem | ) |
Definition at line 218 of file class.ilQTIItem.php.
{
array_push($this->presentationitem, $a_presentationitem);
}
| ilQTIItem::addResprocessing | ( | $ | a_resprocessing | ) |
Definition at line 150 of file class.ilQTIItem.php.
{
array_push($this->resprocessing, $a_resprocessing);
}
| ilQTIItem::addSuggestedSolution | ( | $ | a_solution, | |
| $ | a_gap_index | |||
| ) |
Definition at line 305 of file class.ilQTIItem.php.
{
array_push($this->suggested_solutions, array("solution" => $a_solution, "gap_index" => $a_gap_index));
}
| ilQTIItem::collectResponses | ( | ) |
Definition at line 200 of file class.ilQTIItem.php.
References $result.
{
$result = array();
if ($this->presentation != NULL)
{
}
}
| ilQTIItem::determineQuestionType | ( | ) |
Definition at line 223 of file class.ilQTIItem.php.
{
switch ($this->questiontype)
{
case "ORDERING QUESTION":
return QT_ORDERING;
case "MULTIPLE CHOICE QUESTION":
break;
case "MATCHING QUESTION":
return QT_MATCHING;
case "CLOZE QUESTION":
return QT_CLOZE;
case "IMAGE MAP QUESTION":
return QT_IMAGEMAP;
case "JAVA APPLET QUESTION":
return QT_JAVAAPPLET;
case "TEXT QUESTION":
return QT_TEXT;
}
if (!$this->presentation) return QT_UNKNOWN;
foreach ($this->presentation->order as $entry)
{
switch ($entry["type"])
{
case "response":
$response = $this->presentation->response[$entry["index"]];
switch ($response->getResponsetype())
{
case RT_RESPONSE_LID:
switch ($response->getRCardinality())
{
case R_CARDINALITY_ORDERED:
return QT_ORDERING;
break;
case R_CARDINALITY_SINGLE:
return QT_MULTIPLE_CHOICE_SR;
break;
case R_CARDINALITY_MULTIPLE:
return QT_MULTIPLE_CHOICE_MR;
break;
}
break;
case RT_RESPONSE_XY:
return QT_IMAGEMAP;
break;
case RT_RESPONSE_STR:
switch ($response->getRCardinality())
{
case R_CARDINALITY_ORDERED:
return QT_TEXT;
break;
case R_CARDINALITY_SINGLE:
return QT_CLOZE;
break;
}
break;
case RT_RESPONSE_GRP:
return QT_MATCHING;
break;
default:
break;
}
break;
case "material":
$material = $this->presentation->material[$entry["index"]];
if (count($material->matapplet) > 0) return QT_JAVAAPPLET;
break;
}
}
return QT_UNKNOWN;
}
| ilQTIItem::getAuthor | ( | ) |
Definition at line 300 of file class.ilQTIItem.php.
{
return $this->author;
}
| ilQTIItem::getComment | ( | ) |
Definition at line 118 of file class.ilQTIItem.php.
{
return $this->comment;
}
| ilQTIItem::getDuration | ( | ) |
Definition at line 135 of file class.ilQTIItem.php.
{
return $this->duration;
}
| ilQTIItem::getIdent | ( | ) |
Definition at line 79 of file class.ilQTIItem.php.
{
return $this->ident;
}
| ilQTIItem::getLabel | ( | ) |
Definition at line 175 of file class.ilQTIItem.php.
{
return $this->label;
}
| ilQTIItem::getMaxattempts | ( | ) |
Definition at line 165 of file class.ilQTIItem.php.
{
return $this->maxattempts;
}
| ilQTIItem::getPresentation | ( | ) |
Definition at line 195 of file class.ilQTIItem.php.
{
return $this->presentation;
}
| ilQTIItem::getQuestiontext | ( | ) |
Definition at line 145 of file class.ilQTIItem.php.
{
return $this->questiontext;
}
| ilQTIItem::getQuestiontype | ( | ) |
Definition at line 213 of file class.ilQTIItem.php.
{
return $this->questiontype;
}
| ilQTIItem::getTitle | ( | ) |
Definition at line 89 of file class.ilQTIItem.php.
{
return $this->title;
}
| ilQTIItem::getXmllang | ( | ) |
Definition at line 185 of file class.ilQTIItem.php.
{
return $this->xmllang;
}
| ilQTIItem::ilQTIItem | ( | ) |
Definition at line 64 of file class.ilQTIItem.php.
{
$this->response = array();
$this->resprocessing = array();
$this->itemfeedback = array();
$this->presentation = NULL;
$this->presentationitem = array();
$this->suggested_solutions = array();
}
| ilQTIItem::setAuthor | ( | $ | a_author | ) |
Definition at line 295 of file class.ilQTIItem.php.
{
$this->author = $a_author;
}
| ilQTIItem::setComment | ( | $ | a_comment | ) |
Definition at line 94 of file class.ilQTIItem.php.
{
if (preg_match("/(.*?)\=(.*)/", $a_comment, $matches))
{
// special comments written by ILIAS
switch ($matches[1])
{
case "ILIAS Version":
$this->ilias_version = $matches[2];
return;
break;
case "Questiontype":
$this->questiontype = $matches[2];
return;
break;
case "Author":
$this->author = $matches[2];
return;
break;
}
}
$this->comment = $a_comment;
}
| ilQTIItem::setDuration | ( | $ | a_duration | ) |
Definition at line 123 of file class.ilQTIItem.php.
{
if (preg_match("/P(\d+)Y(\d+)M(\d+)DT(\d+)H(\d+)M(\d+)S/", $a_duration, $matches))
{
$this->duration = array(
"h" => $matches[4],
"m" => $matches[5],
"s" => $matches[6]
);
}
}
| ilQTIItem::setIdent | ( | $ | a_ident | ) |
Definition at line 74 of file class.ilQTIItem.php.
{
$this->ident = $a_ident;
}
| ilQTIItem::setLabel | ( | $ | a_label | ) |
Definition at line 170 of file class.ilQTIItem.php.
{
$this->label = $a_label;
}
| ilQTIItem::setMaxattempts | ( | $ | a_maxattempts | ) |
Definition at line 160 of file class.ilQTIItem.php.
{
$this->maxattempts = $a_maxattempts;
}
| ilQTIItem::setPresentation | ( | $ | a_presentation | ) |
Definition at line 190 of file class.ilQTIItem.php.
{
$this->presentation = $a_presentation;
}
| ilQTIItem::setQuestiontext | ( | $ | a_questiontext | ) |
Definition at line 140 of file class.ilQTIItem.php.
{
$this->questiontext = $a_questiontext;
}
| ilQTIItem::setQuestiontype | ( | $ | a_questiontype | ) |
Definition at line 208 of file class.ilQTIItem.php.
{
$this->questiontype = $a_questiontype;
}
| ilQTIItem::setTitle | ( | $ | a_title | ) |
Definition at line 84 of file class.ilQTIItem.php.
{
$this->title = $a_title;
}
| ilQTIItem::setXmllang | ( | $ | a_xmllang | ) |
Definition at line 180 of file class.ilQTIItem.php.
{
$this->xmllang = $a_xmllang;
}
| ilQTIItem::$author |
Definition at line 54 of file class.ilQTIItem.php.
| ilQTIItem::$comment |
Definition at line 52 of file class.ilQTIItem.php.
| ilQTIItem::$duration |
Definition at line 56 of file class.ilQTIItem.php.
| ilQTIItem::$ident |
Definition at line 46 of file class.ilQTIItem.php.
| ilQTIItem::$ilias_version |
Definition at line 53 of file class.ilQTIItem.php.
| ilQTIItem::$itemfeedback |
Definition at line 59 of file class.ilQTIItem.php.
| ilQTIItem::$label |
Definition at line 49 of file class.ilQTIItem.php.
| ilQTIItem::$maxattempts |
Definition at line 48 of file class.ilQTIItem.php.
| ilQTIItem::$presentation |
Definition at line 60 of file class.ilQTIItem.php.
| ilQTIItem::$presentationitem |
Definition at line 61 of file class.ilQTIItem.php.
| ilQTIItem::$questiontext |
Definition at line 57 of file class.ilQTIItem.php.
| ilQTIItem::$questiontype |
Definition at line 55 of file class.ilQTIItem.php.
| ilQTIItem::$resprocessing |
Definition at line 58 of file class.ilQTIItem.php.
| ilQTIItem::$suggested_solutions |
Definition at line 62 of file class.ilQTIItem.php.
| ilQTIItem::$title |
Definition at line 47 of file class.ilQTIItem.php.
| ilQTIItem::$xmllang |
Definition at line 50 of file class.ilQTIItem.php.
1.7.1