ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilQTIMaterial Class Reference
+ Collaboration diagram for ilQTIMaterial:

Public Member Functions

 addMattext (ilQTIMattext $a_mattext)
 
 addMatimage (ilQTIMatimage $a_matimage)
 
 addMatapplet (ilQTIMatapplet $a_matapplet)
 
 getMaterialCount ()
 
 getMaterial (int $a_index)
 
 setFlow (int $a_flow)
 
 getFlow ()
 
 setLabel (string $a_label)
 
 getLabel ()
 

Data Fields

string $label = null
 
int $flow = 0
 
array $materials = []
 

Detailed Description

Definition at line 29 of file class.ilQTIMaterial.php.

Member Function Documentation

◆ addMatapplet()

ilQTIMaterial::addMatapplet ( ilQTIMatapplet  $a_matapplet)

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

49 : void
50 {
51 $this->materials[] = ["material" => $a_matapplet, "type" => "matapplet"];
52 }

◆ addMatimage()

ilQTIMaterial::addMatimage ( ilQTIMatimage  $a_matimage)

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

44 : void
45 {
46 $this->materials[] = ["material" => $a_matimage, "type" => "matimage"];
47 }

◆ addMattext()

ilQTIMaterial::addMattext ( ilQTIMattext  $a_mattext)

Definition at line 39 of file class.ilQTIMaterial.php.

39 : void
40 {
41 $this->materials[] = ["material" => $a_mattext, "type" => "mattext"];
42 }

◆ getFlow()

ilQTIMaterial::getFlow ( )

Definition at line 76 of file class.ilQTIMaterial.php.

76 : int
77 {
78 return $this->flow;
79 }

References $flow.

◆ getLabel()

ilQTIMaterial::getLabel ( )

Definition at line 86 of file class.ilQTIMaterial.php.

86 : ?string
87 {
88 return $this->label;
89 }

References $label.

◆ getMaterial()

ilQTIMaterial::getMaterial ( int  $a_index)
Returns
false|array{material: ilQTIMattext|ilQTIMatimage|ilQTIMatapplet, type: string}

Definition at line 62 of file class.ilQTIMaterial.php.

63 {
64 if (array_key_exists($a_index, $this->materials)) {
65 return $this->materials[$a_index];
66 }
67
68 return false;
69 }

Referenced by SurveyQuestion\QTIMaterialToString(), and assQuestionImport\QTIMaterialToString().

+ Here is the caller graph for this function:

◆ getMaterialCount()

ilQTIMaterial::getMaterialCount ( )

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

54 : int
55 {
56 return count($this->materials);
57 }

Referenced by SurveyQuestion\QTIMaterialToString(), and assQuestionImport\QTIMaterialToString().

+ Here is the caller graph for this function:

◆ setFlow()

ilQTIMaterial::setFlow ( int  $a_flow)

Definition at line 71 of file class.ilQTIMaterial.php.

71 : void
72 {
73 $this->flow = $a_flow;
74 }

◆ setLabel()

ilQTIMaterial::setLabel ( string  $a_label)

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

81 : void
82 {
83 $this->label = $a_label;
84 }

Field Documentation

◆ $flow

int ilQTIMaterial::$flow = 0

Definition at line 32 of file class.ilQTIMaterial.php.

Referenced by getFlow().

◆ $label

string ilQTIMaterial::$label = null

Definition at line 31 of file class.ilQTIMaterial.php.

Referenced by getLabel().

◆ $materials

array ilQTIMaterial::$materials = []

Definition at line 37 of file class.ilQTIMaterial.php.


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