ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilQTIItem Class Reference
+ Collaboration diagram for ilQTIItem:

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

Detailed Description

Definition at line 44 of file class.ilQTIItem.php.

Member Function Documentation

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.

References $questiontype, QT_CLOZE, QT_IMAGEMAP, QT_JAVAAPPLET, QT_MATCHING, QT_MULTIPLE_CHOICE_MR, QT_MULTIPLE_CHOICE_SR, QT_NUMERIC, QT_ORDERING, QT_TEXT, QT_TEXTSUBSET, QT_UNKNOWN, R_CARDINALITY_MULTIPLE, R_CARDINALITY_ORDERED, R_CARDINALITY_SINGLE, RT_RESPONSE_GRP, RT_RESPONSE_LID, RT_RESPONSE_STR, and RT_RESPONSE_XY.

{
switch ($this->questiontype)
{
case "ORDERING QUESTION":
return QT_ORDERING;
case "SINGLE CHOICE QUESTION":
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())
{
switch ($response->getRCardinality())
{
return QT_ORDERING;
break;
break;
break;
}
break;
return QT_IMAGEMAP;
break;
switch ($response->getRCardinality())
{
return QT_TEXT;
break;
return QT_CLOZE;
break;
}
break;
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
{
}
}
ilQTIItem::getAuthor ( )

Definition at line 315 of file class.ilQTIItem.php.

References $author.

{
return $this->author;
}
ilQTIItem::getComment ( )

Definition at line 120 of file class.ilQTIItem.php.

References $comment.

{
}
ilQTIItem::getDuration ( )

Definition at line 137 of file class.ilQTIItem.php.

References $duration.

{
}
ilQTIItem::getIdent ( )

Definition at line 81 of file class.ilQTIItem.php.

References $ident.

{
return $this->ident;
}
ilQTIItem::getLabel ( )

Definition at line 177 of file class.ilQTIItem.php.

References $label.

{
return $this->label;
}
ilQTIItem::getMaxattempts ( )

Definition at line 167 of file class.ilQTIItem.php.

References $maxattempts.

{
}
ilQTIItem::getMetadata ( )

Definition at line 330 of file class.ilQTIItem.php.

References $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 null;
}
ilQTIItem::getPresentation ( )

Definition at line 197 of file class.ilQTIItem.php.

References $presentation.

{
}
ilQTIItem::getQuestiontext ( )

Definition at line 147 of file class.ilQTIItem.php.

References $questiontext.

{
}
ilQTIItem::getQuestiontype ( )

Definition at line 215 of file class.ilQTIItem.php.

References $questiontype.

{
}
ilQTIItem::getTitle ( )

Definition at line 91 of file class.ilQTIItem.php.

References $title.

{
return $this->title;
}
ilQTIItem::getXmllang ( )

Definition at line 187 of file class.ilQTIItem.php.

References $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;
}

Field Documentation

ilQTIItem::$author

Definition at line 54 of file class.ilQTIItem.php.

Referenced by getAuthor().

ilQTIItem::$comment

Definition at line 52 of file class.ilQTIItem.php.

Referenced by getComment().

ilQTIItem::$duration

Definition at line 56 of file class.ilQTIItem.php.

Referenced by getDuration().

ilQTIItem::$ident

Definition at line 46 of file class.ilQTIItem.php.

Referenced by getIdent().

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.

Referenced by getMetadata().

ilQTIItem::$label

Definition at line 49 of file class.ilQTIItem.php.

Referenced by getLabel().

ilQTIItem::$maxattempts

Definition at line 48 of file class.ilQTIItem.php.

Referenced by getMaxattempts().

ilQTIItem::$presentation

Definition at line 60 of file class.ilQTIItem.php.

Referenced by getPresentation().

ilQTIItem::$presentationitem

Definition at line 61 of file class.ilQTIItem.php.

ilQTIItem::$questiontext

Definition at line 57 of file class.ilQTIItem.php.

Referenced by getQuestiontext().

ilQTIItem::$questiontype

Definition at line 55 of file class.ilQTIItem.php.

Referenced by determineQuestionType(), and getQuestiontype().

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.

Referenced by getTitle().

ilQTIItem::$xmllang

Definition at line 50 of file class.ilQTIItem.php.

Referenced by getXmllang().


The documentation for this class was generated from the following file: