ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 30 of file class.ilQTIMaterial.php.

Member Function Documentation

◆ addMatapplet()

ilQTIMaterial::addMatapplet ( ilQTIMatapplet  $a_matapplet)

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

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

◆ addMatimage()

ilQTIMaterial::addMatimage ( ilQTIMatimage  $a_matimage)

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

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

◆ addMattext()

ilQTIMaterial::addMattext ( ilQTIMattext  $a_mattext)

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

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

◆ getFlow()

ilQTIMaterial::getFlow ( )

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

References $flow.

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

◆ getLabel()

ilQTIMaterial::getLabel ( )

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

References $label.

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

◆ getMaterial()

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

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

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

64  {
65  if (array_key_exists($a_index, $this->materials)) {
66  return $this->materials[$a_index];
67  }
68 
69  return false;
70  }
+ Here is the caller graph for this function:

◆ getMaterialCount()

ilQTIMaterial::getMaterialCount ( )

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

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

55  : int
56  {
57  return count($this->materials);
58  }
+ Here is the caller graph for this function:

◆ setFlow()

ilQTIMaterial::setFlow ( int  $a_flow)

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

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

◆ setLabel()

ilQTIMaterial::setLabel ( string  $a_label)

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

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

Field Documentation

◆ $flow

int ilQTIMaterial::$flow = 0

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

Referenced by getFlow().

◆ $label

string ilQTIMaterial::$label = null

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

Referenced by getLabel().

◆ $materials

array ilQTIMaterial::$materials = []

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


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