ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
assAnswerErrorText Class Reference

Class for error text answers. More...

+ Collaboration diagram for assAnswerErrorText:

Public Member Functions

 __construct ($text_wrong="", $text_correct="", $points=0.0)
 assAnswerErrorText constructor More...
 
 __get ($value)
 Object getter. More...
 
 __set ($key, $value)
 Object setter. More...
 

Protected Attributes

 $arrData
 

Detailed Description

Class for error text answers.

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Rework class to use members instead of $arrData + magic methods. (This needs some changes in neighbours.)

Definition at line 18 of file class.assAnswerErrorText.php.

Constructor & Destructor Documentation

◆ __construct()

assAnswerErrorText::__construct (   $text_wrong = "",
  $text_correct = "",
  $points = 0.0 
)

assAnswerErrorText constructor

Parameters
string$text_wrongWrong text
string$text_correctCorrect text
double$pointsPoints
Returns
assAnswerErrorText

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

References array.

38  {
39  $this->arrData = array(
40  'text_wrong' => $text_wrong,
41  'text_correct' => $text_correct,
42  'points' => $points
43  );
44  }
Create styles array
The data for the language used.

Member Function Documentation

◆ __get()

assAnswerErrorText::__get (   $value)

Object getter.

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

50  {
51  switch ($value) {
52  case "text_wrong":
53  case "text_correct":
54  case "points":
55  return $this->arrData[$value];
56  break;
57  default:
58  return null;
59  break;
60  }
61  }

◆ __set()

assAnswerErrorText::__set (   $key,
  $value 
)

Object setter.

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

References $key.

67  {
68  switch ($key) {
69  case "text_wrong":
70  case "text_correct":
71  case "points":
72  $this->arrData[$key] = $value;
73  break;
74  default:
75  break;
76  }
77  }
$key
Definition: croninfo.php:18

Field Documentation

◆ $arrData

assAnswerErrorText::$arrData
protected

Definition at line 26 of file class.assAnswerErrorText.php.


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