ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilQTIResponseLabel.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
30{
31 public const RSHUFFLE_NO = "1";
32 public const RSHUFFLE_YES = "2";
33
34 public const RAREA_ELLIPSE = "1";
35 public const RAREA_RECTANGLE = "2";
36 public const RAREA_BOUNDED = "3";
37
38 public const RRANGE_EXACT = "1";
39 public const RRANGE_RANGE = "2";
40
41 public ?string $rshuffle = null;
42 public ?string $rarea = null;
43 public ?string $rrange = null;
44 public ?string $labelrefid = null;
45 public ?string $ident = null;
46 public ?string $match_group = null;
47 public ?string $match_max = null;
49 public array $material = [];
51 public array $flow_mat = [];
52 public ?string $content = null;
53
54 public function setRshuffle(string $a_rshuffle): void
55 {
56 switch (strtolower($a_rshuffle)) {
57 case "1":
58 case "no":
59 $this->rshuffle = self::RSHUFFLE_NO;
60 break;
61 case "2":
62 case "yes":
63 $this->rshuffle = self::RSHUFFLE_YES;
64 break;
65 }
66 }
67
68 public function getRshuffle(): ?string
69 {
70 return $this->rshuffle;
71 }
72
73 public function setRarea(string $a_rarea): void
74 {
75 switch (strtolower($a_rarea)) {
76 case "1":
77 case "ellipse":
78 $this->rarea = self::RAREA_ELLIPSE;
79 break;
80 case "2":
81 case "rectangle":
82 $this->rarea = self::RAREA_RECTANGLE;
83 break;
84 case "3":
85 case "bounded":
86 $this->rarea = self::RAREA_BOUNDED;
87 break;
88 }
89 }
90
91 public function getRarea(): ?string
92 {
93 return $this->rarea;
94 }
95
96 public function setRrange(string $a_rrange): void
97 {
98 switch (strtolower($a_rrange)) {
99 case "1":
100 case "excact":
101 $this->rrange = self::RRANGE_EXACT;
102 break;
103 case "2":
104 case "range":
105 $this->rrange = self::RRANGE_RANGE;
106 break;
107 }
108 }
109
110 public function getRrange(): ?string
111 {
112 return $this->rrange;
113 }
114
115 public function setLabelrefid(string $a_labelrefid): void
116 {
117 $this->labelrefid = $a_labelrefid;
118 }
119
120 public function getLabelrefid(): ?string
121 {
122 return $this->labelrefid;
123 }
124
125 public function setIdent(string $a_ident): void
126 {
127 $this->ident = $a_ident;
128 }
129
130 public function getIdent(): ?string
131 {
132 return $this->ident;
133 }
134
135 public function setMatchGroup(string $a_match_group): void
136 {
137 $this->match_group = $a_match_group;
138 }
139
140 public function getMatchGroup(): ?string
141 {
142 return $this->match_group;
143 }
144
145 public function setMatchMax(string $a_match_max): void
146 {
147 $this->match_max = $a_match_max;
148 }
149
150 public function getMatchMax(): ?string
151 {
152 return $this->match_max;
153 }
154
155 public function addMaterial(ilQTIMaterial $a_material): void
156 {
157 $this->material[] = $a_material;
158 }
159
160 public function addFlow_mat(ilQTIFlowMat $a_flow_mat): void
161 {
162 $this->flow_mat[] = $a_flow_mat;
163 }
164
165 public function setContent(string $a_content): void
166 {
167 $this->content = $a_content;
168 }
169
170 public function getContent(): ?string
171 {
172 return $this->content;
173 }
174}
setMatchGroup(string $a_match_group)
setRshuffle(string $a_rshuffle)
addMaterial(ilQTIMaterial $a_material)
setContent(string $a_content)
setMatchMax(string $a_match_max)
addFlow_mat(ilQTIFlowMat $a_flow_mat)
setLabelrefid(string $a_labelrefid)