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) | |
addMetadata ($a_metadata) | |
getMetadata () | |
getMetadataEntry ($a_label) | |
Data Fields | |
$ident | |
$title | |
$maxattempts | |
$label | |
$xmllang | |
$comment | |
$ilias_version | |
$author | |
$questiontype | |
$duration | |
$questiontext | |
$resprocessing | |
$itemfeedback | |
$presentation | |
$presentationitem | |
$suggested_solutions | |
$itemmetadata |
Definition at line 44 of file class.ilQTIItem.php.
ilQTIItem::addItemfeedback | ( | $ | a_itemfeedback | ) |
Definition at line 157 of file class.ilQTIItem.php.
{ array_push($this->itemfeedback, $a_itemfeedback); }
ilQTIItem::addMetadata | ( | $ | a_metadata | ) |
Definition at line 325 of file class.ilQTIItem.php.
{ array_push($this->itemmetadata, $a_metadata); }
ilQTIItem::addPresentationitem | ( | $ | a_presentationitem | ) |
Definition at line 220 of file class.ilQTIItem.php.
{ array_push($this->presentationitem, $a_presentationitem); }
ilQTIItem::addResprocessing | ( | $ | a_resprocessing | ) |
Definition at line 152 of file class.ilQTIItem.php.
{ array_push($this->resprocessing, $a_resprocessing); }
ilQTIItem::addSuggestedSolution | ( | $ | a_solution, | |
$ | a_gap_index | |||
) |
Definition at line 320 of file class.ilQTIItem.php.
{ array_push($this->suggested_solutions, array("solution" => $a_solution, "gap_index" => $a_gap_index)); }
ilQTIItem::collectResponses | ( | ) |
Definition at line 202 of file class.ilQTIItem.php.
References $result.
{ $result = array(); if ($this->presentation != NULL) { } }
ilQTIItem::determineQuestionType | ( | ) |
Definition at line 225 of file class.ilQTIItem.php.
{ switch ($this->questiontype) { case "ORDERING QUESTION": return QT_ORDERING; case "SINGLE CHOICE QUESTION": return QT_MULTIPLE_CHOICE_SR; 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; case "NUMERIC QUESTION": return QT_NUMERIC; case "TEXTSUBSET QUESTION": return QT_TEXTSUBSET; } 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; } } if (strlen($this->questiontype) == 0) { return QT_UNKNOWN; } else { return $this->questiontype; } }
ilQTIItem::getAuthor | ( | ) |
Definition at line 315 of file class.ilQTIItem.php.
{
return $this->author;
}
ilQTIItem::getComment | ( | ) |
Definition at line 120 of file class.ilQTIItem.php.
{
return $this->comment;
}
ilQTIItem::getDuration | ( | ) |
Definition at line 137 of file class.ilQTIItem.php.
{
return $this->duration;
}
ilQTIItem::getIdent | ( | ) |
Definition at line 81 of file class.ilQTIItem.php.
{
return $this->ident;
}
ilQTIItem::getLabel | ( | ) |
Definition at line 177 of file class.ilQTIItem.php.
{
return $this->label;
}
ilQTIItem::getMaxattempts | ( | ) |
Definition at line 167 of file class.ilQTIItem.php.
{
return $this->maxattempts;
}
ilQTIItem::getMetadata | ( | ) |
Definition at line 330 of file class.ilQTIItem.php.
{
return $this->itemmetadata;
}
ilQTIItem::getMetadataEntry | ( | $ | a_label | ) |
Definition at line 335 of file class.ilQTIItem.php.
{ foreach ($this->itemmetadata as $metadata) { if (strcmp($metadata["label"], $a_label) == 0) { return $metadata["entry"]; } } return ""; }
ilQTIItem::getPresentation | ( | ) |
Definition at line 197 of file class.ilQTIItem.php.
{
return $this->presentation;
}
ilQTIItem::getQuestiontext | ( | ) |
Definition at line 147 of file class.ilQTIItem.php.
{
return $this->questiontext;
}
ilQTIItem::getQuestiontype | ( | ) |
Definition at line 215 of file class.ilQTIItem.php.
{
return $this->questiontype;
}
ilQTIItem::getTitle | ( | ) |
Definition at line 91 of file class.ilQTIItem.php.
{
return $this->title;
}
ilQTIItem::getXmllang | ( | ) |
Definition at line 187 of file class.ilQTIItem.php.
{
return $this->xmllang;
}
ilQTIItem::ilQTIItem | ( | ) |
Definition at line 65 of file class.ilQTIItem.php.
{ $this->response = array(); $this->resprocessing = array(); $this->itemfeedback = array(); $this->presentation = NULL; $this->presentationitem = array(); $this->suggested_solutions = array(); $this->itemmetadata = array(); }
ilQTIItem::setAuthor | ( | $ | a_author | ) |
Definition at line 310 of file class.ilQTIItem.php.
{ $this->author = $a_author; }
ilQTIItem::setComment | ( | $ | a_comment | ) |
Definition at line 96 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 125 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 76 of file class.ilQTIItem.php.
{ $this->ident = $a_ident; }
ilQTIItem::setLabel | ( | $ | a_label | ) |
Definition at line 172 of file class.ilQTIItem.php.
{ $this->label = $a_label; }
ilQTIItem::setMaxattempts | ( | $ | a_maxattempts | ) |
Definition at line 162 of file class.ilQTIItem.php.
{ $this->maxattempts = $a_maxattempts; }
ilQTIItem::setPresentation | ( | $ | a_presentation | ) |
Definition at line 192 of file class.ilQTIItem.php.
{ $this->presentation = $a_presentation; }
ilQTIItem::setQuestiontext | ( | $ | a_questiontext | ) |
Definition at line 142 of file class.ilQTIItem.php.
{ $this->questiontext = $a_questiontext; }
ilQTIItem::setQuestiontype | ( | $ | a_questiontype | ) |
Definition at line 210 of file class.ilQTIItem.php.
{ $this->questiontype = $a_questiontype; }
ilQTIItem::setTitle | ( | $ | a_title | ) |
Definition at line 86 of file class.ilQTIItem.php.
{ $this->title = $a_title; }
ilQTIItem::setXmllang | ( | $ | a_xmllang | ) |
Definition at line 182 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::$itemmetadata |
Definition at line 63 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.