ILIAS  release_8 Revision v8.24
class.ilQTIRenderChoice.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
31{
32 public const SHUFFLE_NO = "0";
33 public const SHUFFLE_YES = "1";
34
35 public string $shuffle = self::SHUFFLE_NO;
36 public ?string $minnumber = null;
37 public ?string $maxnumber = null;
39 public array $response_labels = [];
41 public array $material = [];
42
43 public function setShuffle(string $a_shuffle): void
44 {
45 switch (strtolower($a_shuffle)) {
46 case "0":
47 case "no":
48 $this->shuffle = self::SHUFFLE_NO;
49 break;
50 case "1":
51 case "yes":
52 $this->shuffle = self::SHUFFLE_YES;
53 break;
54 }
55 }
56
57 public function getShuffle(): string
58 {
59 return $this->shuffle;
60 }
61
62 public function setMinnumber(string $a_minnumber): void
63 {
64 $this->minnumber = $a_minnumber;
65 }
66
67 public function getMinnumber(): ?string
68 {
69 return $this->minnumber;
70 }
71
72 public function setMaxnumber(string $a_maxnumber): void
73 {
74 $this->maxnumber = $a_maxnumber;
75 }
76
77 public function getMaxnumber(): ?string
78 {
79 return $this->maxnumber;
80 }
81
82 public function addResponseLabel(ilQTIResponseLabel $a_response_label): void
83 {
84 $this->response_labels[] = $a_response_label;
85 }
86
87 public function addMaterial(ilQTIMaterial $a_material): void
88 {
89 $this->material[] = $a_material;
90 }
91}
addMaterial(ilQTIMaterial $a_material)
setMinnumber(string $a_minnumber)
addResponseLabel(ilQTIResponseLabel $a_response_label)
setMaxnumber(string $a_maxnumber)
setShuffle(string $a_shuffle)