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