ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 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 }
62
66 public function __set($key, $value)
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 }
78}
An exception for terminatinating execution or to throw for unit testing.
Class for error text answers.
__get($value)
Object getter.
__construct($text_wrong="", $text_correct="", $points=0.0)
assAnswerErrorText constructor
__set($key, $value)
Object setter.