ILIAS  release_8 Revision v8.24
ilQTIResponse Class Reference
+ Collaboration diagram for ilQTIResponse:

Public Member Functions

 __construct ($a_response_type=0)
 
 setResponsetype ($a_responsetype)
 
 getResponsetype ()
 
 setIdent (string $a_ident)
 
 getIdent ()
 
 setRCardinality (string $a_rcardinality)
 
 getRCardinality ()
 
 setRTiming (string $a_rtiming)
 
 getRTiming ()
 
 setNumtype (string $a_numtype)
 
 getNumtype ()
 
 setRenderType ($a_render_type)
 
 getRenderType ()
 
 setFlow (int $a_flow)
 
 getFlow ()
 
 setMaterial1 (ilQTIMaterial $a_material)
 
 getMaterial1 ()
 
 setMaterial2 (ilQTIMaterial $a_material)
 
 getMaterial2 ()
 
 hasRendering ()
 

Data Fields

const RT_RESPONSE_LID = "1"
 
const RT_RESPONSE_XY = "2"
 
const RT_RESPONSE_STR = "3"
 
const RT_RESPONSE_NUM = "4"
 
const RT_RESPONSE_GRP = "5"
 
const R_CARDINALITY_SINGLE = "1"
 
const R_CARDINALITY_MULTIPLE = "2"
 
const R_CARDINALITY_ORDERED = "3"
 
const RTIMING_NO = "1"
 
const RTIMING_YES = "2"
 
const NUMTYPE_INTEGER = "1"
 
const NUMTYPE_DECIMAL = "2"
 
const NUMTYPE_SCIENTIFIC = "3"
 
int $flow = 0
 
 $response_type
 
string $ident = null
 
string $rcardinality = ''
 
 $render_type = null
 
ilQTIMaterial $material1 = null
 
ilQTIMaterial $material2 = null
 
string $rtiming = null
 
string $numtype = null
 

Detailed Description

Definition at line 30 of file class.ilQTIResponse.php.

Constructor & Destructor Documentation

◆ __construct()

ilQTIResponse::__construct (   $a_response_type = 0)
Parameters
string | int$a_response_type

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

68 {
69 $this->response_type = $a_response_type;
70 }

Member Function Documentation

◆ getFlow()

ilQTIResponse::getFlow ( )

Definition at line 184 of file class.ilQTIResponse.php.

184 : int
185 {
186 return $this->flow;
187 }

References $flow.

◆ getIdent()

ilQTIResponse::getIdent ( )

Definition at line 93 of file class.ilQTIResponse.php.

93 : ?string
94 {
95 return $this->ident;
96 }

References $ident.

◆ getMaterial1()

ilQTIResponse::getMaterial1 ( )

Definition at line 194 of file class.ilQTIResponse.php.

195 {
196 return $this->material1;
197 }
ilQTIMaterial $material1

References $material1.

◆ getMaterial2()

ilQTIResponse::getMaterial2 ( )

Definition at line 204 of file class.ilQTIResponse.php.

205 {
206 return $this->material2;
207 }
ilQTIMaterial $material2

References $material2.

◆ getNumtype()

ilQTIResponse::getNumtype ( )

Definition at line 158 of file class.ilQTIResponse.php.

158 : ?string
159 {
160 return $this->numtype;
161 }

References $numtype.

◆ getRCardinality()

ilQTIResponse::getRCardinality ( )

Definition at line 116 of file class.ilQTIResponse.php.

116 : string
117 {
118 return $this->rcardinality;
119 }

References $rcardinality.

◆ getRenderType()

ilQTIResponse::getRenderType ( )
Returns
ilQTIRenderChoice|ilQTIRenderHotspot|ilQTIRenderFib|null

Definition at line 174 of file class.ilQTIResponse.php.

175 {
176 return $this->render_type;
177 }

References $render_type.

◆ getResponsetype()

ilQTIResponse::getResponsetype ( )
Returns
int|string

Definition at line 83 of file class.ilQTIResponse.php.

84 {
86 }

References $response_type.

◆ getRTiming()

ilQTIResponse::getRTiming ( )

Definition at line 135 of file class.ilQTIResponse.php.

135 : ?string
136 {
137 return $this->rtiming;
138 }

References $rtiming.

◆ hasRendering()

ilQTIResponse::hasRendering ( )

Definition at line 209 of file class.ilQTIResponse.php.

209 : bool
210 {
211 return $this->render_type != null;
212 }

◆ setFlow()

ilQTIResponse::setFlow ( int  $a_flow)

Definition at line 179 of file class.ilQTIResponse.php.

179 : void
180 {
181 $this->flow = $a_flow;
182 }

◆ setIdent()

ilQTIResponse::setIdent ( string  $a_ident)

Definition at line 88 of file class.ilQTIResponse.php.

88 : void
89 {
90 $this->ident = $a_ident;
91 }

◆ setMaterial1()

ilQTIResponse::setMaterial1 ( ilQTIMaterial  $a_material)

Definition at line 189 of file class.ilQTIResponse.php.

189 : void
190 {
191 $this->material1 = $a_material;
192 }

◆ setMaterial2()

ilQTIResponse::setMaterial2 ( ilQTIMaterial  $a_material)

Definition at line 199 of file class.ilQTIResponse.php.

199 : void
200 {
201 $this->material2 = $a_material;
202 }

◆ setNumtype()

ilQTIResponse::setNumtype ( string  $a_numtype)

Definition at line 140 of file class.ilQTIResponse.php.

140 : void
141 {
142 switch (strtolower($a_numtype)) {
143 case "integer":
144 case "1":
145 $this->numtype = self::NUMTYPE_INTEGER;
146 break;
147 case "decimal":
148 case "2":
149 $this->numtype = self::NUMTYPE_DECIMAL;
150 break;
151 case "scientific":
152 case "3":
153 $this->numtype = self::NUMTYPE_SCIENTIFIC;
154 break;
155 }
156 }

References NUMTYPE_DECIMAL, NUMTYPE_INTEGER, and NUMTYPE_SCIENTIFIC.

◆ setRCardinality()

ilQTIResponse::setRCardinality ( string  $a_rcardinality)

Definition at line 98 of file class.ilQTIResponse.php.

98 : void
99 {
100 switch (strtolower($a_rcardinality)) {
101 case "single":
102 case "1":
103 $this->rcardinality = self::R_CARDINALITY_SINGLE;
104 break;
105 case "multiple":
106 case "2":
107 $this->rcardinality = self::R_CARDINALITY_MULTIPLE;
108 break;
109 case "ordered":
110 case "3":
111 $this->rcardinality = self::R_CARDINALITY_ORDERED;
112 break;
113 }
114 }

References R_CARDINALITY_MULTIPLE, R_CARDINALITY_ORDERED, and R_CARDINALITY_SINGLE.

◆ setRenderType()

ilQTIResponse::setRenderType (   $a_render_type)
Parameters
ilQTIRenderChoice | ilQTIRenderHotspot | ilQTIRenderFib$a_render_type

Definition at line 166 of file class.ilQTIResponse.php.

166 : void
167 {
168 $this->render_type = $a_render_type;
169 }

◆ setResponsetype()

ilQTIResponse::setResponsetype (   $a_responsetype)
Parameters
string | int$a_responsetype

Definition at line 75 of file class.ilQTIResponse.php.

75 : void
76 {
77 $this->response_type = $a_responsetype;
78 }

◆ setRTiming()

ilQTIResponse::setRTiming ( string  $a_rtiming)

Definition at line 121 of file class.ilQTIResponse.php.

121 : void
122 {
123 switch (strtolower($a_rtiming)) {
124 case "no":
125 case "1":
126 $this->rtiming = self::RTIMING_NO;
127 break;
128 case "yes":
129 case "2":
130 $this->rtiming = self::RTIMING_YES;
131 break;
132 }
133 }

References RTIMING_NO, and RTIMING_YES.

Field Documentation

◆ $flow

int ilQTIResponse::$flow = 0

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

Referenced by getFlow().

◆ $ident

string ilQTIResponse::$ident = null

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

Referenced by getIdent().

◆ $material1

ilQTIMaterial ilQTIResponse::$material1 = null

Definition at line 59 of file class.ilQTIResponse.php.

Referenced by getMaterial1().

◆ $material2

ilQTIMaterial ilQTIResponse::$material2 = null

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

Referenced by getMaterial2().

◆ $numtype

string ilQTIResponse::$numtype = null

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

Referenced by getNumtype().

◆ $rcardinality

string ilQTIResponse::$rcardinality = ''

Definition at line 53 of file class.ilQTIResponse.php.

Referenced by getRCardinality().

◆ $render_type

ilQTIResponse::$render_type = null

Definition at line 58 of file class.ilQTIResponse.php.

Referenced by getRenderType().

◆ $response_type

ilQTIResponse::$response_type

Definition at line 51 of file class.ilQTIResponse.php.

Referenced by getResponsetype().

◆ $rtiming

string ilQTIResponse::$rtiming = null

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

Referenced by getRTiming().

◆ NUMTYPE_DECIMAL

const ilQTIResponse::NUMTYPE_DECIMAL = "2"

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

Referenced by ilQTIResponseTest\numtypes(), and setNumtype().

◆ NUMTYPE_INTEGER

const ilQTIResponse::NUMTYPE_INTEGER = "1"

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

Referenced by ilQTIResponseTest\numtypes(), and setNumtype().

◆ NUMTYPE_SCIENTIFIC

const ilQTIResponse::NUMTYPE_SCIENTIFIC = "3"

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

Referenced by ilQTIResponseTest\numtypes(), and setNumtype().

◆ R_CARDINALITY_MULTIPLE

const ilQTIResponse::R_CARDINALITY_MULTIPLE = "2"

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

Referenced by setRCardinality(), and ilQTIItem\typeFromResponse().

◆ R_CARDINALITY_ORDERED

const ilQTIResponse::R_CARDINALITY_ORDERED = "3"

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

Referenced by setRCardinality(), and ilQTIItem\typeFromResponse().

◆ R_CARDINALITY_SINGLE

const ilQTIResponse::R_CARDINALITY_SINGLE = "1"

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

Referenced by setRCardinality(), and ilQTIItem\typeFromResponse().

◆ RT_RESPONSE_GRP

const ilQTIResponse::RT_RESPONSE_GRP = "5"

◆ RT_RESPONSE_LID

const ilQTIResponse::RT_RESPONSE_LID = "1"

◆ RT_RESPONSE_NUM

const ilQTIResponse::RT_RESPONSE_NUM = "4"

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

Referenced by ilQTIParser\termsAndDefinitionsBeginTag().

◆ RT_RESPONSE_STR

const ilQTIResponse::RT_RESPONSE_STR = "3"

◆ RT_RESPONSE_XY

const ilQTIResponse::RT_RESPONSE_XY = "2"

◆ RTIMING_NO

const ilQTIResponse::RTIMING_NO = "1"

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

Referenced by ilQTIResponseTest\rtimings(), and setRTiming().

◆ RTIMING_YES

const ilQTIResponse::RTIMING_YES = "2"

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

Referenced by ilQTIResponseTest\rtimings(), and setRTiming().


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