ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
SurveySingleChoiceQuestionGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for SurveySingleChoiceQuestionGUI:
+ Collaboration diagram for SurveySingleChoiceQuestionGUI:

Public Member Functions

 setQuestionTabs ()
 
 getParsedAnswers (?array $a_working_data=null, $a_only_user_anwers=false)
 
 getPrintView (int $question_title=1, bool $show_questiontext=true, ?int $survey_id=null, ?array $working_data=null)
 
 getWorkingForm (?array $working_data=null, int $question_title=1, bool $show_questiontext=true, string $error_message="", ?int $survey_id=null, bool $compress_view=false)
 
- Public Member Functions inherited from SurveyQuestionGUI
 __construct ($a_id=-1)
 
 setQuestionTabs ()
 
 executeCommand ()
 
 getQuestionType ()
 Returns the question type string. More...
 
 setBackUrl (string $a_url)
 
 setQuestionTabsForClass (string $guiclass)
 
 getPrintView (int $question_title=1, bool $show_questiontext=true, ?int $survey_id=null, ?array $working_data=null)
 
 preview ()
 
 getWorkingForm (?array $working_data=null, int $question_title=1, bool $show_questiontext=true, string $error_message="", ?int $survey_id=null, bool $compress_view=false)
 

Protected Member Functions

 initObject ()
 
 addFieldsToEditForm (ilPropertyFormGUI $a_form)
 
 importEditFormValues (ilPropertyFormGUI $a_form)
 
- Protected Member Functions inherited from SurveyQuestionGUI
 initObject ()
 
 outQuestionText (ilTemplate $template)
 
 initEditForm ()
 
 addCommandButtons (ilPropertyFormGUI $a_form)
 
 editQuestion (?ilPropertyFormGUI $a_form=null)
 
 saveSync ()
 
 saveReturn ()
 
 saveForm ()
 
 save (bool $a_return=false, bool $a_sync=false)
 
 copySyncForm ()
 
 syncCopies ()
 
 originalSyncForm ()
 
 sync ()
 
 cancelSync ()
 
 redirectAfterSaving (bool $a_return=false)
 Redirect to calling survey or to edit form. More...
 
 cancel ()
 
 validateEditForm (ilPropertyFormGUI $a_form)
 
 addFieldsToEditForm (ilPropertyFormGUI $a_form)
 
 importEditFormValues (ilPropertyFormGUI $a_form)
 
 getPrintViewQuestionTitle (int $question_title=1)
 
 getQuestionTitle (int $question_title_mode=1)
 
 renderStatisticsDetailsTable (array $a_head, array $a_rows, ?array $a_foot=null)
 

Additional Inherited Members

- Static Public Member Functions inherited from SurveyQuestionGUI
static _getQuestionGUI (?string $questiontype, int $question_id=-1)
 Creates a question gui representation. More...
 
static _getGUIClassNameForId (int $a_q_id)
 
static _getClassNameForQType (string $q_type)
 
- Data Fields inherited from SurveyQuestionGUI
SurveyQuestion $object = null
 
- Protected Attributes inherited from SurveyQuestionGUI
ILIAS Survey InternalDomainService $domain
 
ILIAS Survey InternalGUIService $gui
 
EditingGUIRequest $request
 
EditManager $edit_manager
 
ilRbacSystem $rbacsystem
 
ilObjUser $user
 
ilAccessHandler $access
 
ilTree $tree
 
ilToolbarGUI $toolbar
 
ilTabsGUI $tabs
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
array $cumulated = []
 
string $parent_url = ""
 
ilLogger $log
 
ilHtmlPurifierInterface $purifier
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning SingleChoice survey question GUI representation

The SurveySingleChoiceQuestionGUI class encapsulates the GUI representation for single choice survey question types.

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m

Definition at line 29 of file class.SurveySingleChoiceQuestionGUI.php.

Member Function Documentation

◆ addFieldsToEditForm()

SurveySingleChoiceQuestionGUI::addFieldsToEditForm ( ilPropertyFormGUI  $a_form)
protected

Reimplemented from SurveyQuestionGUI.

Definition at line 45 of file class.SurveySingleChoiceQuestionGUI.php.

45 : void
46 {
47 // orientation
48 $orientation = new ilRadioGroupInputGUI($this->lng->txt("orientation"), "orientation");
49 $orientation->setRequired(false);
50 $orientation->addOption(new ilRadioOption($this->lng->txt('vertical'), '0'));
51 $orientation->addOption(new ilRadioOption($this->lng->txt('horizontal'), '1'));
52 $orientation->addOption(new ilRadioOption($this->lng->txt('combobox'), '2'));
53 $a_form->addItem($orientation);
54
55 // Answers
56 $answers = new ilCategoryWizardInputGUI($this->lng->txt("answers"), "answers");
57 $answers->setRequired(false);
58 $answers->setAllowMove(true);
59 $answers->setShowWizard(true);
60 $answers->setUseOtherAnswer(true);
61 $answers->setShowNeutralCategory(true);
62 $answers->setNeutralCategoryTitle($this->lng->txt('svy_neutral_answer'));
63 $answers->setDisabledScale(false);
64 $a_form->addItem($answers);
65
66 // values
67 $orientation->setValue((string) $this->object->getOrientation());
68 if (!$this->object->getCategories()->getCategoryCount()) {
69 $this->object->getCategories()->addCategory("");
70 }
71 $answers->setValues($this->object->getCategories());
72 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a property in a property form.
This class represents an option in a radio group.

References ilPropertyFormGUI\addItem(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getParsedAnswers()

SurveySingleChoiceQuestionGUI::getParsedAnswers ( ?array  $a_working_data = null,
  $a_only_user_anwers = false 
)

Definition at line 107 of file class.SurveySingleChoiceQuestionGUI.php.

110 : array {
111 if (is_array($a_working_data)) {
112 $user_answer = $a_working_data[0] ?? null;
113 }
114
115 $options = array();
116 for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
117 $cat = $this->object->categories->getCategory($i);
118 $value = ($cat->scale) ? ($cat->scale - 1) : $i;
119
120 $checked = "unchecked";
121 $text = null;
122 if (is_array($a_working_data) &&
123 is_array($user_answer)) {
124 if ($value == $user_answer["value"]) {
125 $checked = "checked";
126 if ($user_answer["textanswer"]) {
127 $text = $user_answer["textanswer"];
128 }
129 }
130 }
131
132 // "other" options have to be last or horizontal will be screwed
133 $idx = $cat->other . "_" . $value;
134
135 if (!$a_only_user_anwers || $checked === "checked") {
136 $options[$idx] = array(
137 "value" => $value
138 ,"title" => trim((string) $cat->title)
139 ,"other" => (bool) $cat->other
140 ,"checked" => $checked
141 ,"textanswer" => $text
142 );
143 }
144
145 ksort($options);
146 }
147
148 return array_values($options);
149 }
$text
Definition: xapiexit.php:21

◆ getPrintView()

SurveySingleChoiceQuestionGUI::getPrintView ( int  $question_title = 1,
bool  $show_questiontext = true,
?int  $survey_id = null,
?array  $working_data = null 
)

Reimplemented from SurveyQuestionGUI.

Definition at line 151 of file class.SurveySingleChoiceQuestionGUI.php.

156 : string {
157 $options = $this->getParsedAnswers($working_data);
158
159 // rendering
160
161 $template = new ilTemplate("tpl.il_svy_qpl_sc_printview.html", true, true, "components/ILIAS/SurveyQuestionPool");
162 switch ($this->object->orientation) {
163 case 0:
164 // vertical orientation
165 foreach ($options as $option) {
166 if ($option["other"]) {
167 $template->setCurrentBlock("other_row");
168 $template->setVariable("IMAGE_RADIO", ilUtil::getHtmlPath(ilUtil::getImagePath("object/radiobutton_" . $option["checked"] . ".png")));
169 $template->setVariable("ALT_RADIO", $this->lng->txt($option["checked"]));
170 $template->setVariable("TITLE_RADIO", $this->lng->txt($option["checked"]));
171 $template->setVariable(
172 "OTHER_LABEL",
174 );
175 $template->setVariable("OTHER_ANSWER", $option["textanswer"]
176 ? ilLegacyFormElementsUtil::prepareFormOutput($option["textanswer"])
177 : "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
178 } else {
179 $template->setCurrentBlock("row");
180 $template->setVariable("IMAGE_RADIO", ilUtil::getHtmlPath(ilUtil::getImagePath("object/radiobutton_" . $option["checked"] . ".png")));
181 $template->setVariable("ALT_RADIO", $this->lng->txt($option["checked"]));
182 $template->setVariable("TITLE_RADIO", $this->lng->txt($option["checked"]));
183 $template->setVariable("TEXT_SC", ilLegacyFormElementsUtil::prepareFormOutput($option["title"]));
184 }
185 $template->parseCurrentBlock();
186 }
187 break;
188 case 1:
189 // horizontal orientation
190 foreach ($options as $option) {
191 $template->setCurrentBlock("radio_col");
192 $template->setVariable("IMAGE_RADIO", ilUtil::getHtmlPath(ilUtil::getImagePath("object/radiobutton_" . $option["checked"] . ".png")));
193 $template->setVariable("ALT_RADIO", $this->lng->txt($option["checked"]));
194 $template->setVariable("TITLE_RADIO", $this->lng->txt($option["checked"]));
195 $template->parseCurrentBlock();
196 }
197 foreach ($options as $option) {
198 if ($option["other"]) {
199 $template->setCurrentBlock("other_text_col");
200 $template->setVariable(
201 "OTHER_LABEL",
203 );
204 $template->setVariable("OTHER_ANSWER", $option["textanswer"]
205 ? ilLegacyFormElementsUtil::prepareFormOutput($option["textanswer"])
206 : "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
207 } else {
208 $template->setCurrentBlock("text_col");
209 $template->setVariable("TEXT_SC", ilLegacyFormElementsUtil::prepareFormOutput($option["title"]));
210 }
211 $template->parseCurrentBlock();
212 }
213 break;
214 case 2:
215 foreach ($options as $option) {
216 $template->setCurrentBlock("comborow");
217 $template->setVariable("TEXT_SC", ilLegacyFormElementsUtil::prepareFormOutput($option["title"]));
218 $template->setVariable("VALUE_SC", $option["value"]);
219 if ($option["checked"] === "checked") {
220 $template->setVariable("SELECTED_SC", ' selected="selected"');
221 }
222 $template->parseCurrentBlock();
223 }
224 $template->setCurrentBlock("combooutput");
225 $template->setVariable("QUESTION_ID", $this->object->getId());
226 $template->setVariable("SELECT_OPTION", $this->lng->txt("select_option"));
227 $template->setVariable("TEXT_SELECTION", $this->lng->txt("selection"));
228 $template->parseCurrentBlock();
229 break;
230 }
231 if ($question_title) {
232 $template->setVariable("QUESTION_TITLE", $this->getPrintViewQuestionTitle($question_title));
233 }
234 if ($show_questiontext) {
235 $this->outQuestionText($template);
236 }
237 $template->parseCurrentBlock();
238 return $template->get();
239 }
getPrintViewQuestionTitle(int $question_title=1)
outQuestionText(ilTemplate $template)
getParsedAnswers(?array $a_working_data=null, $a_only_user_anwers=false)
static prepareFormOutput($a_str, bool $a_strip=false)
special template class to simplify handling of ITX/PEAR
static getHtmlPath(string $relative_path)
get url of path
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)

◆ getWorkingForm()

SurveySingleChoiceQuestionGUI::getWorkingForm ( ?array  $working_data = null,
int  $question_title = 1,
bool  $show_questiontext = true,
string  $error_message = "",
?int  $survey_id = null,
bool  $compress_view = false 
)

Reimplemented from SurveyQuestionGUI.

Definition at line 246 of file class.SurveySingleChoiceQuestionGUI.php.

253 : string {
254 $orientation = $this->object->orientation;
255 $template_file = "tpl.il_svy_out_sc.html";
256 if ($compress_view && $orientation === 1) {
257 $template_file = "tpl.il_svy_out_sc_comp.html";
258 $orientation = 3;
259 }
260 $template = new ilTemplate($template_file, true, true, "components/ILIAS/SurveyQuestionPool");
261 switch ($orientation) {
262 case 0:
263 // vertical orientation
264 for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
265 $cat = $this->object->categories->getCategory($i);
266
267 $debug_scale = ($cat->scale) ? ($cat->scale - 1) : $i;
268 $this->log->debug("Vertical orientation - Original scale = " . $cat->scale . " If(scale) scale -1 else i. The new scale value is = " . $debug_scale);
269
270 if ($cat->other) {
271 $template->setCurrentBlock("other_row");
272 if (strlen($cat->title ?? "")) {
273 $template->setVariable("OTHER_LABEL", $cat->title);
274 }
275 $template->setVariable("VALUE_SC", ($cat->scale) ? ($cat->scale - 1) : $i);
276 $template->setVariable("QUESTION_ID", $this->object->getId());
277 if (is_array($working_data)) {
278 foreach ($working_data as $value) {
279 if (strlen((string) ($value["value"] ?? ""))) {
280 if ($value["value"] == $cat->scale - 1) {
281 if (strlen($value['textanswer'] ?? "")) {
282 $template->setVariable("OTHER_VALUE", ' value="' . ilLegacyFormElementsUtil::prepareFormOutput(
283 $value['textanswer']
284 ) . '"');
285 }
286 if (!($value['uncheck'] ?? false)) {
287 $template->setVariable("CHECKED_SC", " checked=\"checked\"");
288 }
289 }
290 }
291 }
292 }
293 } else {
294 $template->setCurrentBlock("row");
295 if ($cat->neutral) {
296 $template->setVariable('ROWCLASS', ' class="neutral"');
297 }
298 $template->setVariable("TEXT_SC", ilLegacyFormElementsUtil::prepareFormOutput($cat->title));
299 $template->setVariable("VALUE_SC", ($cat->scale) ? ($cat->scale - 1) : $i);
300 $template->setVariable("QUESTION_ID", $this->object->getId());
301 if (is_array($working_data)) {
302 foreach ($working_data as $value) {
303 if (strcmp((string) ($value["value"] ?? ""), "") !== 0) {
304 if ($value["value"] == $cat->scale - 1) {
305 if (!($value['uncheck'] ?? false)) {
306 $template->setVariable("CHECKED_SC", " checked=\"checked\"");
307 }
308 }
309 }
310 }
311 }
312 }
313 $template->parseCurrentBlock();
314 $template->touchBlock('outer_row');
315 }
316 break;
317 case 1:
318 // horizontal orientation
319 for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
320 $cat = $this->object->categories->getCategory($i);
321
322 $debug_scale = ($cat->scale) ? ($cat->scale - 1) : $i;
323 $this->log->debug("Horizontal orientation - Original NEUTRAL scale = " . $cat->scale . " If(scale) scale -1 else i. The new scale value is = " . $debug_scale);
324
325 $template->setCurrentBlock("radio_col");
326 if ($cat->neutral) {
327 $template->setVariable('COLCLASS', ' neutral');
328 }
329 $template->setVariable("VALUE_SC", ($cat->scale) ? ($cat->scale - 1) : $i);
330 $template->setVariable("QUESTION_ID", $this->object->getId());
331 if (is_array($working_data)) {
332 foreach ($working_data as $value) {
333 if (strcmp((string) ($value["value"] ?? ""), "") !== 0) {
334 if ($value["value"] == $cat->scale - 1) {
335 if (!($value['uncheck'] ?? false)) {
336 $template->setVariable("CHECKED_SC", " checked=\"checked\"");
337 }
338 }
339 }
340 }
341 }
342 $template->parseCurrentBlock();
343 }
344 for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
345 $cat = $this->object->categories->getCategory($i);
346
347 $debug_scale = ($cat->scale) ? ($cat->scale - 1) : $i;
348 $this->log->debug("Horizontal orientation - Original scale = " . $cat->scale . " If(scale) scale -1 else i. The new scale value is = " . $debug_scale);
349
350 if ($cat->other) {
351 $template->setCurrentBlock("text_other_col");
352 $template->setVariable("VALUE_SC", ($cat->scale) ? ($cat->scale - 1) : $i);
353 $template->setVariable("QUESTION_ID", $this->object->getId());
354 if (strlen($cat->title ?? "")) {
355 $template->setVariable("OTHER_LABEL", $cat->title);
356 }
357 if (is_array($working_data)) {
358 foreach ($working_data as $value) {
359 if (strlen((string) ($value["value"] ?? ""))) {
360 if ($value["value"] == $cat->scale - 1 && strlen($value['textanswer'] ?? "")) {
361 $template->setVariable("OTHER_VALUE", ' value="' . ilLegacyFormElementsUtil::prepareFormOutput(
362 $value['textanswer']
363 ) . '"');
364 }
365 }
366 }
367 }
368 } else {
369 $template->setCurrentBlock("text_col");
370 if ($cat->neutral) {
371 $template->setVariable('COLCLASS', ' neutral');
372 }
373 $template->setVariable("VALUE_SC", ($cat->scale) ? ($cat->scale - 1) : $i);
374 $template->setVariable("TEXT_SC", ilLegacyFormElementsUtil::prepareFormOutput($cat->title));
375 $template->setVariable("QUESTION_ID", $this->object->getId());
376 }
377 $template->parseCurrentBlock();
378 $template->touchBlock('text_outer_col');
379 }
380 break;
381 case 2:
382 // combobox output
383 for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
384 $cat = $this->object->categories->getCategory($i);
385
386 $debug_scale = ($cat->scale) ? ($cat->scale - 1) : $i;
387 $this->log->debug("Combobox - Original scale = " . $cat->scale . " If(scale) scale -1 else i. The new scale value is = " . $debug_scale);
388
389 $template->setCurrentBlock("comborow");
390 $template->setVariable("TEXT_SC", $cat->title);
391 $template->setVariable("VALUE_SC", ($cat->scale) ? ($cat->scale - 1) : $i);
392 if (is_array($working_data)) {
393 if (strcmp((string) ($working_data[0]["value"] ?? ""), "") !== 0) {
394 if ($working_data[0]["value"] == $cat->scale - 1) {
395 $template->setVariable("SELECTED_SC", " selected=\"selected\"");
396 }
397 }
398 }
399 $template->parseCurrentBlock();
400 }
401 $template->setCurrentBlock("combooutput");
402 $template->setVariable("QUESTION_ID", $this->object->getId());
403 $template->setVariable("SELECT_OPTION", $this->lng->txt("select_option"));
404 $template->setVariable("TEXT_SELECTION", $this->lng->txt("selection"));
405 $template->parseCurrentBlock();
406 break;
407 case 3:
408 // horizontal orientation, compressed
409 for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
410 $cat = $this->object->categories->getCategory($i);
411
412 $debug_scale = ($cat->scale) ? ($cat->scale - 1) : $i;
413 $this->log->debug("Horizontal orientation (compressed) - Original NEUTRAL scale = " . $cat->scale . " If(scale) scale -1 else i. The new scale value is = " . $debug_scale);
414
415 if ($cat->other) {
416 $template->setCurrentBlock("other");
417 $template->setVariable("VALUE_SC", ($cat->scale) ? ($cat->scale - 1) : $i);
418 $template->setVariable("OTHER_Q_ID", $this->object->getId());
419 if (is_array($working_data)) {
420 foreach ($working_data as $value) {
421 if (strlen((string) ($value["value"] ?? ""))) {
422 if ($value["value"] == $cat->scale - 1 && strlen($value['textanswer'] ?? "")) {
423 $template->setVariable("OTHER_VALUE", ' value="' . ilLegacyFormElementsUtil::prepareFormOutput(
424 $value['textanswer']
425 ) . '"');
426 }
427 }
428 }
429 }
430 $template->parseCurrentBlock();
431 }
432
433
434 $template->setCurrentBlock("radio_col");
435 if ($cat->neutral) {
436 $template->setVariable('COLCLASS', ' neutral');
437 }
438 $template->setVariable("VALUE_SC", ($cat->scale) ? ($cat->scale - 1) : $i);
439 $template->setVariable("QUESTION_ID", $this->object->getId());
440 if (is_array($working_data)) {
441 foreach ($working_data as $value) {
442 if (strcmp((string) ($value["value"] ?? ""), "") !== 0) {
443 if ($value["value"] == $cat->scale - 1) {
444 if (!($value['uncheck'] ?? false)) {
445 $template->setVariable("CHECKED_SC", " checked=\"checked\"");
446 }
447 }
448 }
449 }
450 }
451 $template->parseCurrentBlock();
452 }
453 $perc = round(70 / $this->object->categories->getCategoryCount(), 2);
454 for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
455 $cat = $this->object->categories->getCategory($i);
456
457 $debug_scale = ($cat->scale) ? ($cat->scale - 1) : $i;
458 $this->log->debug("Horizontal orientation - Original scale = " . $cat->scale . " If(scale) scale -1 else i. The new scale value is = " . $debug_scale);
459
460 $template->setCurrentBlock("text_col");
461 if ($cat->neutral) {
462 $template->setVariable('COLCLASS', ' neutral');
463 }
464 $template->setVariable("VALUE_SC", ($cat->scale) ? ($cat->scale - 1) : $i);
465 $template->setVariable("TEXT_SC", ilLegacyFormElementsUtil::prepareFormOutput($cat->title));
466 $template->setVariable("PERC", $perc);
467 $template->setVariable("QUESTION_ID", $this->object->getId());
468 $template->parseCurrentBlock();
469 }
470 break;
471 }
472 $template->setVariable("QUESTION_TITLE", $this->getQuestionTitle($question_title));
473 $template->setCurrentBlock("question_data");
474 if (strcmp($error_message, "") !== 0) {
475 $template->setVariable("ERROR_MESSAGE", "<p class=\"warning\">$error_message</p>");
476 }
477 if ($show_questiontext) {
478 $this->outQuestionText($template);
479 }
480 $template->parseCurrentBlock();
481 return $template->get();
482 }
getQuestionTitle(int $question_title_mode=1)

◆ importEditFormValues()

SurveySingleChoiceQuestionGUI::importEditFormValues ( ilPropertyFormGUI  $a_form)
protected

Reimplemented from SurveyQuestionGUI.

Definition at line 74 of file class.SurveySingleChoiceQuestionGUI.php.

74 : void
75 {
76 $this->log->debug("importing edit values");
77
78 $this->object->setOrientation((int) $a_form->getInput("orientation"));
79
80 $this->object->categories->flushCategories();
81 $answers = $this->request->getAnswers();
82 foreach ($answers['answer'] as $key => $value) {
83 if (strlen((string) ($value ?? ""))) {
84 $this->object->getCategories()->addCategory(
85 (string) $value,
86 (int) ($answers['other'][$key] ?? 0),
87 0,
88 null,
89 isset($answers['scale'][$key]) && $answers['scale'][$key] !== ''
90 ? (int) $answers['scale'][$key]
91 : null
92 );
93 }
94 }
95 if ($this->request->getNeutral() !== "") {
96 $neutral_scale = $this->request->getNeutralScale();
97 $this->object->getCategories()->addCategory(
98 $this->request->getNeutral(),
99 0,
100 1,
101 null,
102 $neutral_scale !== '' ? (int) $neutral_scale : null
103 );
104 }
105 }
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...

References ilPropertyFormGUI\getInput().

+ Here is the call graph for this function:

◆ initObject()

SurveySingleChoiceQuestionGUI::initObject ( )
protected

Reimplemented from SurveyQuestionGUI.

Definition at line 31 of file class.SurveySingleChoiceQuestionGUI.php.

31 : void
32 {
33 $this->object = new SurveySingleChoiceQuestion();
34 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ setQuestionTabs()

SurveySingleChoiceQuestionGUI::setQuestionTabs ( )

Reimplemented from SurveyQuestionGUI.

Definition at line 40 of file class.SurveySingleChoiceQuestionGUI.php.

40 : void
41 {
42 $this->setQuestionTabsForClass("surveysinglechoicequestiongui");
43 }
setQuestionTabsForClass(string $guiclass)

References SurveyQuestionGUI\setQuestionTabsForClass().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: