ILIAS  release_4-4 Revision
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.

38  {
39  $this->arrData = array(
40  'text_wrong' => $text_wrong,
41  'text_correct' => $text_correct,
42  'points' => $points
43  );
44  }

Member Function Documentation

◆ __get()

assAnswerErrorText::__get (   $value)

Object getter.

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

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

◆ __set()

assAnswerErrorText::__set (   $key,
  $value 
)

Object setter.

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

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

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: