ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 29 of file class.ilQTIResponse.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

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

Member Function Documentation

◆ getFlow()

ilQTIResponse::getFlow ( )

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

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

References $flow.

◆ getIdent()

ilQTIResponse::getIdent ( )

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

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

References $ident.

◆ getMaterial1()

ilQTIResponse::getMaterial1 ( )

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

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

References $material1.

◆ getMaterial2()

ilQTIResponse::getMaterial2 ( )

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

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

References $material2.

◆ getNumtype()

ilQTIResponse::getNumtype ( )

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

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

References $numtype.

◆ getRCardinality()

ilQTIResponse::getRCardinality ( )

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

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

References $rcardinality.

◆ getRenderType()

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

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

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

References $render_type.

◆ getResponsetype()

ilQTIResponse::getResponsetype ( )
Returns
int|string

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

83 {
85 }

References $response_type.

◆ getRTiming()

ilQTIResponse::getRTiming ( )

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

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

References $rtiming.

◆ hasRendering()

ilQTIResponse::hasRendering ( )

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

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

◆ setFlow()

ilQTIResponse::setFlow ( int  $a_flow)

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

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

◆ setIdent()

ilQTIResponse::setIdent ( string  $a_ident)

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

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

◆ setMaterial1()

ilQTIResponse::setMaterial1 ( ilQTIMaterial  $a_material)

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

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

◆ setMaterial2()

ilQTIResponse::setMaterial2 ( ilQTIMaterial  $a_material)

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

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

◆ setNumtype()

ilQTIResponse::setNumtype ( string  $a_numtype)

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

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

References NUMTYPE_DECIMAL, NUMTYPE_INTEGER, and NUMTYPE_SCIENTIFIC.

◆ setRCardinality()

ilQTIResponse::setRCardinality ( string  $a_rcardinality)

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

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

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 165 of file class.ilQTIResponse.php.

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

◆ setResponsetype()

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

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

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

◆ setRTiming()

ilQTIResponse::setRTiming ( string  $a_rtiming)

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

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

References RTIMING_NO, and RTIMING_YES.

Field Documentation

◆ $flow

int ilQTIResponse::$flow = 0

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

Referenced by getFlow().

◆ $ident

string ilQTIResponse::$ident = null

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

Referenced by getIdent().

◆ $material1

ilQTIMaterial ilQTIResponse::$material1 = null

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

Referenced by getMaterial1().

◆ $material2

ilQTIMaterial ilQTIResponse::$material2 = null

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

Referenced by getMaterial2().

◆ $numtype

string ilQTIResponse::$numtype = null

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

Referenced by getNumtype().

◆ $rcardinality

string ilQTIResponse::$rcardinality = ''

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

Referenced by getRCardinality().

◆ $render_type

ilQTIResponse::$render_type = null

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

Referenced by getRenderType().

◆ $response_type

ilQTIResponse::$response_type

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

Referenced by getResponsetype().

◆ $rtiming

string ilQTIResponse::$rtiming = null

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

Referenced by getRTiming().

◆ NUMTYPE_DECIMAL

const ilQTIResponse::NUMTYPE_DECIMAL = "2"

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

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

◆ NUMTYPE_INTEGER

const ilQTIResponse::NUMTYPE_INTEGER = "1"

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

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

◆ NUMTYPE_SCIENTIFIC

const ilQTIResponse::NUMTYPE_SCIENTIFIC = "3"

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

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

◆ R_CARDINALITY_MULTIPLE

const ilQTIResponse::R_CARDINALITY_MULTIPLE = "2"

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

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

◆ R_CARDINALITY_ORDERED

const ilQTIResponse::R_CARDINALITY_ORDERED = "3"

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

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

◆ R_CARDINALITY_SINGLE

const ilQTIResponse::R_CARDINALITY_SINGLE = "1"

Definition at line 37 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 34 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 41 of file class.ilQTIResponse.php.

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

◆ RTIMING_YES

const ilQTIResponse::RTIMING_YES = "2"

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

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


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