ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilAssKprimChoiceAnswer.php
Go to the documentation of this file.
1 <?php
2 
26 {
27  private $position;
28 
29  private $answertext;
30 
31  private $imageFile;
32 
33  private $imageFsDir;
34 
35  private $imageWebDir;
36 
37  private $thumbPrefix;
38 
39  private $correctness;
40 
41  public function setPosition($position): void
42  {
43  $this->position = $position;
44  }
45 
46  public function getPosition()
47  {
48  return $this->position;
49  }
50 
51  public function setAnswertext($answertext): void
52  {
53  $this->answertext = $answertext;
54  }
55 
56  public function getAnswertext()
57  {
58  return $this->answertext;
59  }
60 
61  public function setImageFile(?string $imageFile): void
62  {
63  $this->imageFile = $imageFile;
64  }
65 
66  public function getImageFile(): ?string
67  {
68  return $this->imageFile;
69  }
70 
71  // sk 2023-12-01: These are proxy functions to make things work like the other answertypes for Choice Questions
72  public function setImage(?string $image): void
73  {
74  $this->setImageFile($image);
75  }
76 
77  public function getImage(): ?string
78  {
79  return $this->getImageFile();
80  }
81  // End proxy functions
82 
83  public function setImageFsDir($imageFsDir): void
84  {
85  $this->imageFsDir = $imageFsDir;
86  }
87 
88  public function getImageFsDir()
89  {
90  return $this->imageFsDir;
91  }
92 
93  public function setImageWebDir($imageWebDir): void
94  {
95  $this->imageWebDir = $imageWebDir;
96  }
97 
98  public function getImageWebDir()
99  {
100  return $this->imageWebDir;
101  }
102 
106  public function setThumbPrefix($thumbPrefix): void
107  {
108  $this->thumbPrefix = $thumbPrefix;
109  }
110 
114  public function getThumbPrefix()
115  {
116  return $this->thumbPrefix;
117  }
118 
119  public function setCorrectness($correctness): void
120  {
121  $this->correctness = $correctness;
122  }
123 
124  public function getCorrectness()
125  {
126  return $this->correctness;
127  }
128 
129  public function getImageFsPath(): string
130  {
131  return $this->getImageFsDir() . $this->getImageFile();
132  }
133 
134  public function getThumbFsPath(): string
135  {
136  return $this->getImageFsDir() . $this->getThumbPrefix() . $this->getImageFile();
137  }
138 
139  public function getImageWebPath(): string
140  {
141  return $this->getImageWebDir() . $this->getImageFile();
142  }
143 
144  public function getThumbWebPath(): string
145  {
146  return $this->getImageWebDir() . $this->getThumbPrefix() . $this->getImageFile();
147  }
148 }