ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilQTIMaterial Class Reference
+ Collaboration diagram for ilQTIMaterial:

Public Member Functions

 __construct ()
 
 addMattext ($a_mattext)
 
 addMatimage ($a_matimage)
 
 addMatemtext ($a_matemtext)
 
 addMataudio ($a_mataudio)
 
 addMatvideo ($a_matvideo)
 
 addMatapplet ($a_matapplet)
 
 addMatapplication ($a_matapplication)
 
 addMatref ($a_matref)
 
 addMatbreak ($a_matbreak)
 
 addMat_extension ($a_mat_extension)
 
 addAltmaterial ($a_altmaterial)
 
 getMaterialCount ()
 
 getMaterial ($a_index)
 
 setFlow ($a_flow)
 
 getFlow ()
 
 setLabel ($a_label)
 
 getLabel ()
 
 extractText ()
 

Data Fields

 $label
 
 $flow
 
 $comment
 
 $mattext
 
 $matemtext
 
 $matimage
 
 $mataudio
 
 $matvideo
 
 $matapplet
 
 $matapplication
 
 $matref
 
 $matbreak
 
 $mat_extension
 
 $altmaterial
 
 $materials
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilQTIMaterial::__construct ( )

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

References array.

51  {
52  $this->flow = 0;
53  $this->altmaterial = array();
54  $this->materials = array();
55  }
Create styles array
The data for the language used.

Member Function Documentation

◆ addAltmaterial()

ilQTIMaterial::addAltmaterial (   $a_altmaterial)

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

References array.

108  {
109  array_push($this->materials, array("material" => $a_altmaterial, "type" => "altmaterial"));
110  }
Create styles array
The data for the language used.

◆ addMat_extension()

ilQTIMaterial::addMat_extension (   $a_mat_extension)

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

References array.

103  {
104  array_push($this->materials, array("material" => $a_mat_extension, "type" => "mat_extension"));
105  }
Create styles array
The data for the language used.

◆ addMatapplet()

ilQTIMaterial::addMatapplet (   $a_matapplet)

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

References array.

83  {
84  array_push($this->materials, array("material" => $a_matapplet, "type" => "matapplet"));
85  }
Create styles array
The data for the language used.

◆ addMatapplication()

ilQTIMaterial::addMatapplication (   $a_matapplication)

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

References array.

88  {
89  array_push($this->materials, array("material" => $a_matapplication, "type" => "matapplication"));
90  }
Create styles array
The data for the language used.

◆ addMataudio()

ilQTIMaterial::addMataudio (   $a_mataudio)

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

References array.

73  {
74  array_push($this->materials, array("material" => $a_mataudio, "type" => "mataudio"));
75  }
Create styles array
The data for the language used.

◆ addMatbreak()

ilQTIMaterial::addMatbreak (   $a_matbreak)

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

References array.

98  {
99  array_push($this->materials, array("material" => $a_matbreak, "type" => "matbreak"));
100  }
Create styles array
The data for the language used.

◆ addMatemtext()

ilQTIMaterial::addMatemtext (   $a_matemtext)

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

References array.

68  {
69  array_push($this->materials, array("material" => $a_matemtext, "type" => "matemtext"));
70  }
Create styles array
The data for the language used.

◆ addMatimage()

ilQTIMaterial::addMatimage (   $a_matimage)

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

References array.

63  {
64  array_push($this->materials, array("material" => $a_matimage, "type" => "matimage"));
65  }
Create styles array
The data for the language used.

◆ addMatref()

ilQTIMaterial::addMatref (   $a_matref)

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

References array.

93  {
94  array_push($this->materials, array("material" => $a_matref, "type" => "matref"));
95  }
Create styles array
The data for the language used.

◆ addMattext()

ilQTIMaterial::addMattext (   $a_mattext)

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

References array.

58  {
59  array_push($this->materials, array("material" => $a_mattext, "type" => "mattext"));
60  }
Create styles array
The data for the language used.

◆ addMatvideo()

ilQTIMaterial::addMatvideo (   $a_matvideo)

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

References array.

78  {
79  array_push($this->materials, array("material" => $a_matvideo, "type" => "matvideo"));
80  }
Create styles array
The data for the language used.

◆ extractText()

ilQTIMaterial::extractText ( )

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

References $text, and getMaterialCount().

150  {
151  $text = "";
152  if ($this->getMaterialCount())
153  {
154  foreach ($this->materials as $mat)
155  {
156  if (strcmp($mat["type"], "mattext") == 0)
157  {
158  $text .= $mat["material"];
159  }
160  }
161  }
162  return $text;
163  }
$text
+ Here is the call graph for this function:

◆ getFlow()

ilQTIMaterial::getFlow ( )

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

References $flow.

135  {
136  return $this->flow;
137  }

◆ getLabel()

ilQTIMaterial::getLabel ( )

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

References $label.

145  {
146  return $this->label;
147  }

◆ getMaterial()

ilQTIMaterial::getMaterial (   $a_index)

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

118  {
119  if (array_key_exists($a_index, $this->materials))
120  {
121  return $this->materials[$a_index];
122  }
123  else
124  {
125  return FALSE;
126  }
127  }

◆ getMaterialCount()

ilQTIMaterial::getMaterialCount ( )

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

Referenced by extractText().

113  {
114  return count($this->materials);
115  }
+ Here is the caller graph for this function:

◆ setFlow()

ilQTIMaterial::setFlow (   $a_flow)

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

130  {
131  $this->flow = $a_flow;
132  }

◆ setLabel()

ilQTIMaterial::setLabel (   $a_label)

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

140  {
141  $this->label = $a_label;
142  }

Field Documentation

◆ $altmaterial

ilQTIMaterial::$altmaterial

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

◆ $comment

ilQTIMaterial::$comment

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

◆ $flow

ilQTIMaterial::$flow

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

Referenced by getFlow().

◆ $label

ilQTIMaterial::$label

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

Referenced by getLabel().

◆ $mat_extension

ilQTIMaterial::$mat_extension

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

◆ $matapplet

ilQTIMaterial::$matapplet

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

◆ $matapplication

ilQTIMaterial::$matapplication

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

◆ $mataudio

ilQTIMaterial::$mataudio

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

◆ $matbreak

ilQTIMaterial::$matbreak

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

◆ $matemtext

ilQTIMaterial::$matemtext

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

◆ $materials

ilQTIMaterial::$materials

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

◆ $matimage

ilQTIMaterial::$matimage

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

◆ $matref

ilQTIMaterial::$matref

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

◆ $mattext

ilQTIMaterial::$mattext

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

◆ $matvideo

ilQTIMaterial::$matvideo

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


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