ILIAS  release_8 Revision v8.24
class.ilQTIRenderFib.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
31{
32 public const PROMPT_BOX = "1";
33 public const PROMPT_DASHLINE = "2";
34 public const PROMPT_ASTERISK = "3";
35 public const PROMPT_UNDERLINE = "4";
36
37 public const FIBTYPE_STRING = "1";
38 public const FIBTYPE_INTEGER = "2";
39 public const FIBTYPE_DECIMAL = "3";
40 public const FIBTYPE_SCIENTIFIC = "4";
41
42 public ?string $minnumber = null;
43 public ?string $maxnumber = null;
45 public array $response_labels = [];
47 public array $material = [];
48 public ?string $prompt = null;
49 public string $encoding = "UTF-8";
50 public ?string $fibtype = null;
51 public ?string $rows = null;
52 public ?string $maxchars = null;
53 public ?string $columns = null;
54 public ?string $charset = null;
55
56 public function setPrompt(string $a_prompt): void
57 {
58 switch (strtolower($a_prompt)) {
59 case "1":
60 case "box":
61 $this->prompt = self::PROMPT_BOX;
62 break;
63 case "2":
64 case "dashline":
65 $this->prompt = self::PROMPT_DASHLINE;
66 break;
67 case "3":
68 case "asterisk":
69 $this->prompt = self::PROMPT_ASTERISK;
70 break;
71 case "4":
72 case "underline":
73 $this->prompt = self::PROMPT_UNDERLINE;
74 break;
75 }
76 }
77
78 public function getPrompt(): ?string
79 {
80 return $this->prompt;
81 }
82
83 public function setFibtype(string $a_fibtype): void
84 {
85 switch (strtolower($a_fibtype)) {
86 case "1":
87 case "string":
88 $this->fibtype = self::FIBTYPE_STRING;
89 break;
90 case "2":
91 case "integer":
92 $this->fibtype = self::FIBTYPE_INTEGER;
93 break;
94 case "3":
95 case "decimal":
96 $this->fibtype = self::FIBTYPE_DECIMAL;
97 break;
98 case "4":
99 case "scientific":
100 $this->fibtype = self::FIBTYPE_SCIENTIFIC;
101 break;
102 }
103 }
104
105 public function getFibtype(): ?string
106 {
107 return $this->fibtype;
108 }
109
110 public function setMinnumber(string $a_minnumber): void
111 {
112 $this->minnumber = $a_minnumber;
113 }
114
115 public function getMinnumber(): ?string
116 {
117 return $this->minnumber;
118 }
119
120 public function setMaxnumber(string $a_maxnumber): void
121 {
122 $this->maxnumber = $a_maxnumber;
123 }
124
125 public function getMaxnumber(): ?string
126 {
127 return $this->maxnumber;
128 }
129
130 public function addResponseLabel(ilQTIResponseLabel $a_response_label): void
131 {
132 $this->response_labels[] = $a_response_label;
133 }
134
135 public function addMaterial(ilQTIMaterial $a_material): void
136 {
137 $this->material[] = $a_material;
138 }
139
140 public function setEncoding(string $a_encoding): void
141 {
142 $this->encoding = $a_encoding;
143 }
144
145 public function getEncoding(): string
146 {
147 return $this->encoding;
148 }
149
150 public function setRows(string $a_rows): void
151 {
152 $this->rows = $a_rows;
153 }
154
155 public function getRows(): ?string
156 {
157 return $this->rows;
158 }
159
160 public function setMaxchars(string $a_maxchars): void
161 {
162 $this->maxchars = $a_maxchars;
163 }
164
165 public function getMaxchars(): ?string
166 {
167 return $this->maxchars;
168 }
169
170 public function setColumns(string $a_columns): void
171 {
172 $this->columns = $a_columns;
173 }
174
175 public function getColumns(): ?string
176 {
177 return $this->columns;
178 }
179
180 public function setCharset(string $a_charset): void
181 {
182 $this->charset = $a_charset;
183 }
184
185 public function getCharset(): ?string
186 {
187 return $this->charset;
188 }
189}
setPrompt(string $a_prompt)
setEncoding(string $a_encoding)
setRows(string $a_rows)
setColumns(string $a_columns)
setMinnumber(string $a_minnumber)
setMaxnumber(string $a_maxnumber)
setCharset(string $a_charset)
setFibtype(string $a_fibtype)
addResponseLabel(ilQTIResponseLabel $a_response_label)
setMaxchars(string $a_maxchars)
addMaterial(ilQTIMaterial $a_material)