ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
class.assOrderingQuestionGUI.php
Go to the documentation of this file.
1<?php
2
35{
36 public const CMD_EDIT_NESTING = 'editNesting';
37 public const CMD_SAVE_NESTING = 'saveNesting';
38 public const CMD_SWITCH_TO_TERMS = 'changeToText';
39 public const CMD_SWITCH_TO_PICTURESS = 'changeToPictures';
40
41 public const TAB_EDIT_QUESTION = 'edit_question';
42 public const TAB_EDIT_NESTING = 'edit_nesting';
43
44 public const F_USE_NESTED = 'nested_answers';
45 public const F_NESTED_ORDER = 'order_elems';
46 public const F_NESTED_ORDER_ORDER = 'content';
47 public const F_NESTED_ORDER_INDENT = 'indentation';
49
51
53 public $leveled_ordering = [];
54
62 public function __construct($id = -1)
63 {
65 $this->object = new assOrderingQuestion();
66 if ($id >= 0) {
67 $this->object->loadFromDb($id);
68 }
69 }
70
71 public function changeToPictures(): void
72 {
73 $this->object->setContentType($this->object::OQ_CT_PICTURES);
74 $this->object->saveToDb();
75
76 $values = $this->request_data_collector->getParsedBody();
77 $values['thumb_geometry'] = $this->object->getThumbSize();
78 $this->buildEditFormAfterTypeChange($values);
79 }
80
81 public function changeToText(): void
82 {
83 $ordering_element_list = $this->object->getOrderingElementList();
84 foreach ($ordering_element_list as $element) {
85 $this->object->dropImageFile($element->getContent());
86 }
87
88 $this->object->setContentType($this->object::OQ_CT_TERMS);
89 $this->object->saveToDb();
90
91 $this->buildEditFormAfterTypeChange($this->request_data_collector->getParsedBody());
92 }
93
94 private function buildEditFormAfterTypeChange(array $values): void
95 {
96 $form = $this->buildEditForm();
97
98 $ordering_element_list = $this->object->getOrderingElementList();
99 $ordering_element_list->resetElements();
100
102 $form->setValuesByArray($values);
103 $form->getItemByPostVar(assOrderingQuestion::ORDERING_ELEMENT_FORM_FIELD_POSTVAR)->setElementList($ordering_element_list);
104 $this->renderEditForm($form);
105 $this->addEditSubtabs();
106 }
107
108 public function saveNesting()
109 {
110 $form = $this->buildNestingForm();
111 $form->setValuesByPost();
112 if ($form->checkInput()) {
113 $post = $this->request_data_collector->raw(self::F_NESTED_ORDER);
114 $list = $this->object->getOrderingElementList();
115
116 $ordered = [];
117 foreach (array_keys($post[self::F_NESTED_ORDER_ORDER]) as $idx => $identifier) {
118 $element_identifier = str_replace(self::F_NESTED_IDENTIFIER_PREFIX, '', $identifier);
119 $element = $list->getElementByRandomIdentifier($element_identifier);
120
121 $ordered[] = $element
122 ->withPosition($idx)
123 ->withIndentation($post[self::F_NESTED_ORDER_INDENT][$identifier]);
124 }
125
126 $list = $list->withElements($ordered);
127 $this->object->setOrderingElementList($list);
128 $this->tpl->setOnScreenMessage('success', $this->lng->txt('saved_successfully'), true);
129 } else {
130 $this->tpl->setOnScreenMessage('error', $this->lng->txt('form_input_not_valid'), true);
131 }
132
133 $this->editNesting();
134 }
135
136
137 public function removeElementImage()
138 {
139 $this->uploadElementImage();
140 }
141
142 public function uploadElementImage(): void
143 {
144 $form = $this->buildEditForm();
145 $form->setValuesByPost();
146
147 $submitted_list = $this->fetchSolutionListFromSubmittedForm($form);
148
149 $elements = [];
150 foreach ($submitted_list->getElements() as $submitted_element) {
151 if ($submitted_element->isImageUploadAvailable()) {
152 $filename = $this->object->storeImageFile(
153 $submitted_element->getUploadImageFile(),
154 $submitted_element->getUploadImageName()
155 );
156
157 if (is_null($filename)) {
158 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('file_no_valid_file_type'));
159 } else {
160 $submitted_element = $submitted_element->withContent($filename);
161 }
162 }
163
164 if ($submitted_element->isImageRemovalRequest()) {
165 $this->object->dropImageFile($submitted_element->getContent());
166 $submitted_element = $submitted_element->withContent('');
167 }
168
169 $elements[] = $submitted_element;
170 }
171
172 $list = $this->object->getOrderingElementList()->withElements($elements);
173 $this->object->setOrderingElementList($list);
174
176 $this->writeQuestionSpecificPostData($form);
177
178 $this->editQuestion();
179 }
180
182 {
183 $thumb_size = $this->request_data_collector->int('thumb_geometry');
184 if ($thumb_size !== 0
185 && $thumb_size !== $this->object->getThumbSize()) {
186 $this->object->setThumbSize($thumb_size);
187 $this->updateImageFiles();
188 }
189
190 $this->object->setPoints($this->request_data_collector->float('points'));
191
192 $use_nested = $this->request_data_collector->int(self::F_USE_NESTED) === 1;
193 $this->object->setNestingType($use_nested);
194 }
195
196
198 {
200 ->getElementList($this->object->getId());
201
202 $use_nested = $this->request_data_collector->int(self::F_USE_NESTED) === 1;
203
204 if ($use_nested) {
205 $existing_list = $this->object->getOrderingElementList();
206
207 $nu = [];
208 $parent_indent = -1;
209 foreach ($list->getElements() as $element) {
210 $element = $list->ensureValidIdentifiers($element);
211
212 if ($existing = $existing_list->getElementByRandomIdentifier($element->getRandomIdentifier())) {
213 if ($existing->getIndentation() == $parent_indent + 1) {
214 $element = $element
215 ->withIndentation($existing->getIndentation());
216 }
217 }
218 $parent_indent = $element->getIndentation();
219 $nu[] = $element;
220 }
221 $list = $list->withElements($nu);
222 }
223
224 return $list;
225 }
226
227 protected function updateImageFiles(): void
228 {
229 $element_list = $this->object->getOrderingElementList();
230 $elements = [];
231 foreach ($element_list->getElements() as $element) {
232 if ($element->getContent() === '') {
233 continue;
234 }
235 $filename = $this->object->updateImageFile(
236 $element->getContent()
237 );
238
239 $elements[] = $element->withContent($filename);
240 }
241
242 $list = $this->object->getOrderingElementList()->withElements($elements);
243 $this->object->setOrderingElementList($list);
244 }
245
247 {
248 $this->object->setOrderingElementList(
250 );
251 }
252
254 {
255 $header = new ilFormSectionHeaderGUI();
256 $header->setTitle($this->lng->txt('oq_header_ordering_elements'));
257 $form->addItem($header);
258
259 $orderingElementInput = $this->object->buildOrderingElementInputGui();
260 $this->object->initOrderingElementAuthoringProperties($orderingElementInput);
261
262 $list = $this->object->getOrderingElementList();
263 $orderingElementInput->setElementList($list);
264 $form->addItem($orderingElementInput);
265
266 return $form;
267 }
268
270 {
271 if ($this->object->isImageOrderingType()) {
272 $thumb_size = new ilNumberInputGUI($this->lng->txt('thumb_size'), 'thumb_geometry');
273 $thumb_size->setValue($this->object->getThumbSize());
274 $thumb_size->setRequired(true);
275 $thumb_size->setMaxLength(6);
276 $thumb_size->setMinValue($this->object->getMinimumThumbSize());
277 $thumb_size->setMaxValue($this->object->getMaximumThumbSize());
278 $thumb_size->setSize(6);
279 $thumb_size->setInfo($this->lng->txt('thumb_size_info'));
280 $form->addItem($thumb_size);
281 }
282
283 // points
284 $points = new ilNumberInputGUI($this->lng->txt("points"), "points");
285 $points->allowDecimals(true);
286 $points->setValue($this->object->getPoints());
287 $points->setRequired(true);
288 $points->setSize(3);
289 $points->setMinValue(0);
290 $points->setMinvalueShouldBeGreater(true);
291 $form->addItem($points);
292
293 if (!$this->isInLearningModuleContext()) {
294 $nested_answers = new ilSelectInputGUI(
295 $this->lng->txt('qst_use_nested_answers'),
296 self::F_USE_NESTED
297 );
298 $nested_answers_options = [
299 0 => $this->lng->txt('qst_nested_nested_answers_off'),
300 1 => $this->lng->txt('qst_nested_nested_answers_on')
301 ];
302 $nested_answers->setOptions($nested_answers_options);
303 $nested_answers->setValue($this->object->isOrderingTypeNested());
304 $form->addItem($nested_answers);
305 }
306
307 return $form;
308 }
309
310 protected function writePostData(bool $always = false): int
311 {
312 $form = $this->buildEditForm();
313 $form->setValuesByPost();
314
315 if (!$form->checkInput()) {
316 $this->renderEditForm($form);
317 $this->addEditSubtabs(self::TAB_EDIT_QUESTION);
318 return 1; // return 1 = something went wrong, no saving happened
319 }
320
323 $this->writeAnswerSpecificPostData($form);
324 $this->writeQuestionSpecificPostData($form);
325
327
328 return 0; // return 0 = all fine, was saved either forced or validated
329 }
330
331 protected function addEditSubtabs($active = self::TAB_EDIT_QUESTION)
332 {
333 $tabs = $this->getTabs();
334 $tabs->addSubTab(
335 self::TAB_EDIT_QUESTION,
336 $this->lng->txt('edit_question'),
337 $this->ctrl->getLinkTarget($this, 'editQuestion')
338 );
339 if ($this->object->isOrderingTypeNested() && !$this->isInLearningModuleContext()) {
340 $tabs->addSubTab(
341 self::TAB_EDIT_NESTING,
342 $this->lng->txt('tab_nest_answers'),
343 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_NESTING)
344 );
345 }
346 $tabs->setTabActive('edit_question');
347 $tabs->setSubTabActive($active);
348 }
349
350 public function editQuestion(
351 bool $checkonly = false,
352 ?bool $is_save_cmd = null
353 ): bool {
354 $this->renderEditForm($this->buildEditForm());
355 $this->addEditSubtabs(self::TAB_EDIT_QUESTION);
356 return false;
357 }
358
359 public function editNesting()
360 {
361 $this->renderEditForm($this->buildNestingForm());
362 $this->addEditSubtabs(self::TAB_EDIT_NESTING);
363 $this->tpl->addCss(ilObjStyleSheet::getContentStylePath(0));
364 $this->tpl->addCss(ilObjStyleSheet::getSyntaxStylePath());
365 }
366
368 {
370 $form->setFormAction($this->ctrl->getFormAction($this));
371 $form->setTitle($this->outQuestionType());
372 $form->setMultipart($this->object->isImageOrderingType());
373 $form->setTableWidth("100%");
374 $form->setId("ordering");
375
376 $this->addBasicQuestionFormProperties($form);
377 $this->populateQuestionSpecificFormPart($form);
378 $this->populateAnswerSpecificFormPart($form);
379 $this->populateTaxonomyFormSection($form);
380
381 $form->addSpecificOrderingQuestionCommandButtons($this->object);
382 $form->addGenericAssessmentQuestionCommandButtons($this->object);
383
384 return $form;
385 }
386
387 protected function buildNestingForm()
388 {
390 $form->setFormAction($this->ctrl->getFormAction($this));
391 $form->setTitle($this->outQuestionType());
392 $form->setTableWidth("100%");
393
394 $header = new ilFormSectionHeaderGUI();
395 $header->setTitle($this->lng->txt('oq_header_ordering_elements'));
396 $form->addItem($header);
397
398 $orderingElementInput = $this->object->buildNestedOrderingElementInputGui();
399
400 $this->object->initOrderingElementAuthoringProperties($orderingElementInput);
401
402 $list = $this->object->getOrderingElementList();
403 foreach ($list->getElements() as $element) {
404 $element = $list->ensureValidIdentifiers($element);
405 }
406
407 $orderingElementInput->setElementList($list);
408
409 $form->addItem($orderingElementInput);
410 $form->addCommandButton(self::CMD_SAVE_NESTING, $this->lng->txt("save"));
411 return $form;
412 }
413
415 {
416 return true;
417 }
418
419 public function getSolutionOutput(
420 int $active_id,
421 ?int $pass = null,
422 bool $graphical_output = false,
423 bool $result_output = false,
424 bool $show_question_only = true,
425 bool $show_feedback = false,
426 bool $show_correct_solution = false,
427 bool $show_manual_scoring = false,
428 bool $show_question_text = true,
429 bool $show_inline_feedback = true
430 ): string {
431 $solution_ordering_list = $this->object->getOrderingElementListForSolutionOutput(
432 $show_correct_solution,
433 $active_id,
434 $pass
435 );
436
437 $show_inline_feedback = false;
438 return $this->renderSolutionOutput(
439 $solution_ordering_list,
440 $active_id,
441 $pass,
442 $graphical_output,
443 $result_output,
444 $show_question_only,
445 $show_feedback,
446 $show_correct_solution,
447 $show_manual_scoring,
448 $show_question_text,
449 false,
450 $show_inline_feedback,
451 );
452 }
453
454 public function renderSolutionOutput(
455 mixed $user_solutions,
456 int $active_id,
457 ?int $pass,
458 bool $graphical_output = false,
459 bool $result_output = false,
460 bool $show_question_only = true,
461 bool $show_feedback = false,
462 bool $show_correct_solution = false,
463 bool $show_manual_scoring = false,
464 bool $show_question_text = true,
465 bool $show_autosave_title = false,
466 bool $show_inline_feedback = false,
467 ): ?string {
468 $solution_ordering_list = ($user_solutions instanceof ilAssOrderingElementList) ?
469 $user_solutions : $this->object->getSolutionOrderingElementList(
470 $this->object->fetchIndexedValuesFromValuePairs($user_solutions)
471 );
472 $answers_gui = $this->object->buildNestedOrderingElementInputGui();
473
474 if ($show_correct_solution) {
476 } else {
478 }
479
480 $answers_gui->setInteractionEnabled(false);
481 $answers_gui->setElementList($solution_ordering_list);
482
483 if ($graphical_output) {
484 $answers_gui->setShowCorrectnessIconsEnabled(true);
485 }
486 $answers_gui->setCorrectnessTrueElementList(
487 $solution_ordering_list->getParityTrueElementList($this->object->getOrderingElementList())
488 );
489 $solution_html = $answers_gui->getHTML();
490
491 $template = new ilTemplate('tpl.il_as_qpl_nested_ordering_output_solution.html', true, true, 'components/ILIAS/TestQuestionPool');
492 $template->setVariable('SOLUTION_OUTPUT', $this->renderLatex($solution_html));
493 if ($show_question_text == true) {
494 $template->setVariable('QUESTIONTEXT', $this->renderLatex($this->object->getQuestionForHTMLOutput()));
495 }
496 $questionoutput = $template->get();
497
498 $solutiontemplate = new ilTemplate('tpl.il_as_tst_solution_output.html', true, true, 'components/ILIAS/TestQuestionPool');
499 $solutiontemplate->setVariable('SOLUTION_OUTPUT', $questionoutput);
500
501 if ($show_feedback) {
502 $feedback = '';
503
504 if (!$this->isTestPresentationContext()) {
505 $fb = $this->getGenericFeedbackOutput((int) $active_id, $pass);
506 $feedback .= strlen($fb) ? $fb : '';
507 }
508
509 if ($feedback !== '') {
510 $cssClass = (
511 $this->hasCorrectSolution($active_id, $pass) ?
513 );
514
515 $solutiontemplate->setVariable('ILC_FB_CSS_CLASS', $cssClass);
516 $solutiontemplate->setVariable('FEEDBACK', ilLegacyFormElementsUtil::prepareTextareaOutput($feedback, true));
517 }
518 }
519
520 if ($show_question_only) {
521 return $solutiontemplate->get();
522 }
523
524 return $this->getILIASPage($solutiontemplate->get());
525
526 // is this template still in use? it is not used at this point any longer!
527 // $template = new ilTemplate("tpl.il_as_qpl_ordering_output_solution.html", TRUE, TRUE, "components/ILIAS/TestQuestionPool");
528 }
529
530 public function getPreview(
531 bool $show_question_only = false,
532 bool $show_inline_feedback = false
533 ): string {
534 if ($this->getPreviewSession() && $this->getPreviewSession()->hasParticipantSolution()) {
535 $solutionOrderingElementList = unserialize(
536 $this->getPreviewSession()->getParticipantsSolution(),
537 ['allowed_classes' => true]
538 );
539 } else {
540 $solutionOrderingElementList = $this->object->getShuffledOrderingElementList();
541 }
542
543 $answers = $this->object->buildNestedOrderingElementInputGui();
544 $answers->setNestingEnabled($this->object->isOrderingTypeNested());
546 $answers->setInteractionEnabled($this->isInteractivePresentation());
547 $answers->setElementList($solutionOrderingElementList);
548
549 $template = new ilTemplate('tpl.il_as_qpl_ordering_output.html', true, true, 'components/ILIAS/TestQuestionPool');
550
551 $template->setCurrentBlock('nested_ordering_output');
552 $template->setVariable('NESTED_ORDERING', $this->renderLatex($answers->getHTML()));
553 $template->parseCurrentBlock();
554 $template->setVariable('QUESTIONTEXT', $this->renderLatex($this->object->getQuestionForHTMLOutput()));
555
556 if ($show_question_only) {
557 return $template->get();
558 }
559
560 return $this->getILIASPage($template->get());
561 }
562
563 public function getTestOutput(
564 int $active_id,
565 int $pass,
566 bool $is_question_postponed = false,
567 array|bool $user_post_solutions = false,
568 bool $show_specific_inline_feedback = false
569 ): string {
570 $user_post_solutions = is_array($user_post_solutions) ? $user_post_solutions : [];
571
572 $ordering_gui = $this->object->buildNestedOrderingElementInputGui();
573 $ordering_gui->setNestingEnabled($this->object->isOrderingTypeNested());
574
575 $solutionOrderingElementList = $this->object->getSolutionOrderingElementListForTestOutput(
576 $ordering_gui,
577 $user_post_solutions,
578 $active_id,
579 $pass
580 );
581
582 $template = new ilTemplate('tpl.il_as_qpl_ordering_output.html', true, true, 'components/ILIAS/TestQuestionPool');
583
585 $ordering_gui->setElementList($solutionOrderingElementList);
586
587 $template->setCurrentBlock('nested_ordering_output');
588 $template->setVariable('NESTED_ORDERING', $this->renderLatex($ordering_gui->getHTML()));
589 $template->parseCurrentBlock();
590
591 $template->setVariable('QUESTIONTEXT', $this->renderLatex($this->object->getQuestionForHTMLOutput()));
592
593 $pageoutput = $this->outQuestionPage('', $is_question_postponed, $active_id, $template->get());
594
595 return $pageoutput;
596 }
597
598 protected function isInteractivePresentation(): bool
599 {
600 if ($this->isRenderPurposePlayback()) {
601 return true;
602 }
603
604 if ($this->isRenderPurposeDemoplay()) {
605 return true;
606 }
607
608 return false;
609 }
610
611 protected function getTabs(): ilTabsGUI
612 {
613 global $DIC;
614 return $DIC['ilTabs'];
615 }
616
617 public function getSpecificFeedbackOutput(array $userSolution): string
618 {
619 return '';
620 }
621
632 {
633 return [];
634 }
635
646 {
647 return [];
648 }
649
651 {
652 if ($this->object->isImageOrderingType()) {
653 $element->setImageThumbnailPrefix($this->object->getThumbPrefix());
654 $element->setImagePathWeb($this->object->getImagePathWeb());
655 $element->setImagePathFs($this->object->getImagePath());
656
657 $src = $element->getPresentationImageUrl();
658 $alt = $element->getContent();
659 $content = "<img src='{$src}' alt='{$alt}' title='{$alt}'/>";
660 } else {
661 $content = $element->getContent();
662 }
663
664 return $content;
665 }
666
668 {
669 $list = array_map(
670 fn(ilAssOrderingElement $elem): string => htmlspecialchars(
671 $this->getAnswerStatisticOrderingElementHtml($elem) ?? '',
672 ENT_QUOTES | ENT_SUBSTITUTE,
673 'utf-8'
674 ),
675 $list->getElements()
676 );
677
678 return $this->ui->renderer()->render($this->ui->factory()->listing()->unordered($list));
679 }
680
681 public function getAnswersFrequency($relevantAnswers, $questionIndex): array
682 {
683 $answersByActiveAndPass = [];
684
685 foreach ($relevantAnswers as $row) {
686 $key = $row['active_fi'] . ':' . $row['pass'];
687
688 if (!isset($answersByActiveAndPass[$key])) {
689 $answersByActiveAndPass[$key] = [];
690 }
691
692 $answersByActiveAndPass[$key][$row['value1']] = $row['value2'];
693 }
694
695 $solutionLists = [];
696
697 foreach ($answersByActiveAndPass as $indexedSolutions) {
698 $solutionLists[] = $this->object->getSolutionOrderingElementList($indexedSolutions);
699 }
700
701 /* @var ilAssOrderingElementList[] $answers */
702 $answers = [];
703
704 foreach ($solutionLists as $orderingElementList) {
705 $hash = $orderingElementList->getHash();
706
707 if (!isset($answers[$hash])) {
708 $variantHtml = $this->getAnswerStatisticOrderingVariantHtml(
709 $orderingElementList
710 );
711
712 $answers[$hash] = [
713 'answer' => $variantHtml,
714 'frequency' => 0,
715 'sanitized' => true
716 ];
717 }
718
719 $answers[$hash]['frequency']++;
720 }
721
722 return array_values($answers);
723 }
724
729 {
731 $orderingInput->prepareReprintable($this->object);
732 }
733
738 {
739 $points = new ilNumberInputGUI($this->lng->txt("points"), "points");
740 $points->allowDecimals(true);
741 $points->setValue($this->object->getPoints());
742 $points->setRequired(true);
743 $points->setSize(3);
744 $points->setMinValue(0);
745 $points->setMinvalueShouldBeGreater(true);
746 $form->addItem($points);
747
748 $header = new ilFormSectionHeaderGUI();
749 $header->setTitle($this->lng->txt('oq_header_ordering_elements'));
750 $form->addItem($header);
751
752 $orderingElementInput = $this->object->buildNestedOrderingElementInputGui();
753
754 $this->object->initOrderingElementAuthoringProperties($orderingElementInput);
755
756 $orderingElementInput->setElementList($this->object->getOrderingElementList());
757
758 $form->addItem($orderingElementInput);
759 }
760
765 {
766 $this->object->setPoints((float) str_replace(',', '.', $form->getInput('points')));
767
768 $submittedElementList = $this->fetchSolutionListFromSubmittedForm($form);
769
770 $curElementList = $this->object->getOrderingElementList();
771
772 $newElementList = new ilAssOrderingElementList();
773 $newElementList->setQuestionId($this->object->getId());
774
775 foreach ($submittedElementList as $submittedElement) {
776 if (!$curElementList->elementExistByRandomIdentifier($submittedElement->getRandomIdentifier())) {
777 continue;
778 }
779
780 $curElement = $curElementList->getElementByRandomIdentifier($submittedElement->getRandomIdentifier());
781
782 $curElement->setPosition($submittedElement->getPosition());
783
784 if ($this->object->isOrderingTypeNested()) {
785 $curElement->setIndentation($submittedElement->getIndentation());
786 }
787
788 $newElementList->addElement($curElement);
789 }
790
791 $this->object->setOrderingElementList($newElementList);
792 }
793}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
$filename
Definition: buildRTE.php:78
return true
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
prepareReprintableCorrectionsForm(ilPropertyFormGUI $form)
addEditSubtabs($active=self::TAB_EDIT_QUESTION)
fetchSolutionListFromSubmittedForm(ilPropertyFormGUI $form)
getAnswersFrequency($relevantAnswers, $questionIndex)
__construct($id=-1)
assOrderingQuestionGUI constructor
writeQuestionSpecificPostData(ilPropertyFormGUI $form)
Extracts the question specific values from the request and applies them to the data object.
populateAnswerSpecificFormPart(ilPropertyFormGUI $form)
Adds the answer specific form parts to a question property form gui.
writePostData(bool $always=false)
Evaluates a posted edit form and writes the form data in the question object.
getPreview(bool $show_question_only=false, bool $show_inline_feedback=false)
getAnswerStatisticOrderingElementHtml(ilAssOrderingElement $element)
getAfterParticipationSuppressionAnswerPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
getTestOutput(int $active_id, int $pass, bool $is_question_postponed=false, array|bool $user_post_solutions=false, bool $show_specific_inline_feedback=false)
writeAnswerSpecificPostData(ilPropertyFormGUI $form)
Extracts the answer specific values from the request and applies them to the data object.
populateQuestionSpecificFormPart(\ilPropertyFormGUI $form)
populateCorrectionsFormProperties(ilPropertyFormGUI $form)
getSolutionOutput(int $active_id, ?int $pass=null, bool $graphical_output=false, bool $result_output=false, bool $show_question_only=true, bool $show_feedback=false, bool $show_correct_solution=false, bool $show_manual_scoring=false, bool $show_question_text=true, bool $show_inline_feedback=true)
saveCorrectionsFormProperties(ilPropertyFormGUI $form)
getAfterParticipationSuppressionQuestionPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
renderSolutionOutput(mixed $user_solutions, int $active_id, ?int $pass, bool $graphical_output=false, bool $result_output=false, bool $show_question_only=true, bool $show_feedback=false, bool $show_correct_solution=false, bool $show_manual_scoring=false, bool $show_question_text=true, bool $show_autosave_title=false, bool $show_inline_feedback=false,)
getAnswerStatisticOrderingVariantHtml(ilAssOrderingElementList $list)
getSpecificFeedbackOutput(array $userSolution)
Returns the answer specific feedback for the question.
editQuestion(bool $checkonly=false, ?bool $is_save_cmd=null)
Class for ordering questions.
renderEditForm(ilPropertyFormGUI $form)
setImagePathFs(string $image_path_fs)
setImageThumbnailPrefix($imageThumbnailPrefix)
This class represents a section header in a property form.
static prepareTextareaOutput(string $txt_output, bool $prepare_for_latex_output=false, bool $omitNl2BrWhenTextArea=false)
Prepares a string for a text area output where latex code may be in it If the text is HTML-free,...
This class represents a number property in a property form.
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
This class represents a property form user interface.
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-...
getItemByPostVar(string $a_post_var)
This class represents a selection list property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$post
Definition: ltitoken.php:46
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
if(!file_exists('../ilias.ini.php'))
global $DIC
Definition: shib_login.php:26