ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.assAnswerErrorText.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once './Modules/Test/classes/inc.AssessmentConstants.php';
5
19{
26 protected $arrData;
27
37 public function __construct( $text_wrong = "", $text_correct = "", $points = 0.0 )
38 {
39 $this->arrData = array(
40 'text_wrong' => $text_wrong,
41 'text_correct' => $text_correct,
42 'points' => $points
43 );
44 }
45
49 public function __get($value)
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 }
63
67 public function __set($key, $value)
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 }
80}
Class for error text answers.
__get($value)
Object getter.
__construct( $text_wrong="", $text_correct="", $points=0.0)
assAnswerErrorText constructor
__set($key, $value)
Object setter.