42 $this->
object->loadFromDb($qId);
51 return $this->
object->feedbackOBJ->isSpecificAnswerFeedbackAvailable($this->
object->getId());
56 return [
'uploadImage',
'removeImage'];
60 bool $checkonly =
false,
61 ?
bool $is_save_cmd =
null
63 $form = $this->edit_form;
74 $this->setAdditionalContentEditingModeFromPost();
75 if ($this->writePostData(
true) === 0) {
76 $this->
object->saveToDb();
77 $this->editQuestion();
83 $this->
object->removeAnswerImage($this->request_data_collector->getCmdIndex(
'removeImage'));
84 $this->
object->saveToDb();
85 $this->editQuestion();
90 $index = $this->request_data_collector->getCmdIndex(__FUNCTION__);
92 $this->
object->moveAnswerDown($index);
93 $this->
object->saveToDb();
96 $this->editQuestion();
101 $index = $this->request_data_collector->getCmdIndex(__FUNCTION__);
102 if (!empty($index)) {
103 $this->
object->moveAnswerUp($index);
104 $this->
object->saveToDb();
107 $this->editQuestion();
115 $form = $this->buildEditForm();
116 $form->setValuesByPost();
117 $answers_input = $form->getItemByPostVar(
'kprimanswers');
120 $answers_input->setIgnoreMissingUploadsEnabled(
true);
121 $answer_input_postvar = $this->request_data_collector->strArray($answers_input->getPostVar(), 2);
123 if (!$answers_input->checkUploads($answer_input_postvar)) {
124 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
125 $this->edit_form = $form;
126 $this->editQuestion();
130 $answers_input->collectValidFiles();
131 } elseif (!$form->checkInput()) {
132 $this->edit_form = $form;
133 $this->editQuestion();
137 $this->writeQuestionGenericPostData();
139 $this->writeQuestionSpecificPostData($form);
140 $this->writeAnswerSpecificPostData($form);
142 $this->saveTaxonomyAssignments();
152 $form = $this->buildBasicEditFormObject();
154 $this->addQuestionFormCommandButtons($form);
156 $this->addBasicQuestionFormProperties($form);
158 $answer_type = $this->request_data_collector->string(
'answer_type') ?:
null;
159 $this->populateQuestionSpecificFormPart($form, $answer_type);
160 $this->populateAnswerSpecificFormPart($form, $answer_type);
162 $this->populateTaxonomyFormSection($form);
170 $shuffleAnswers =
new ilCheckboxInputGUI($this->
lng->txt(
"shuffle_answers"),
"shuffle_answers_enabled");
171 $shuffleAnswers->setChecked($this->
object->isShuffleAnswersEnabled());
172 $form->
addItem($shuffleAnswers);
174 $answer_type ??= $this->
object->getAnswerType();
175 if (!$this->
object->getSelfAssessmentEditingMode()) {
178 $answerType->setOptions($this->
object->getAnswerTypeSelectOptions($this->lng));
179 $answerType->setValue($answer_type);
183 if (!$this->
object->getSelfAssessmentEditingMode() && $this->object->isSingleLineAnswerType($answer_type)) {
186 $thumb_size->setSuffix($this->
lng->txt(
'thumb_size_unit_pixel'));
187 $thumb_size->setInfo($this->
lng->txt(
'thumb_size_info'));
188 $thumb_size->setDecimals(
false);
189 $thumb_size->setMinValue($this->
object->getMinimumThumbSize());
190 $thumb_size->setMaxValue($this->
object->getMaximumThumbSize());
191 $thumb_size->setSize(6);
192 $thumb_size->setValue($this->
object->getThumbSize());
195 $thumb_size->setValue($this->
object->getThumbSize());
201 $optionLabel->setInfo($this->
lng->txt(
'option_label_info'));
202 $optionLabel->setRequired(
true);
203 $optionLabel->setValue($this->
object->getOptionLabel());
204 foreach ($this->
object->getValidOptionLabelsTranslated($this->lng) as $labelValue => $labelText) {
206 $optionLabel->addOption($option);
208 if ($this->
object->isCustomOptionLabel($labelValue)) {
210 $this->
lng->txt(
'option_label_custom_true'),
211 'option_label_custom_true'
213 $customLabelTrue->setValue($this->
object->getCustomTrueOptionLabel());
214 $option->addSubItem($customLabelTrue);
217 $this->
lng->txt(
'option_label_custom_false'),
218 'option_label_custom_false'
220 $customLabelFalse->setValue($this->
object->getCustomFalseOptionLabel());
221 $option->addSubItem($customLabelFalse);
228 $points->setRequired(
true);
230 $points->allowDecimals(
true);
231 $points->setMinValue(0);
232 $points->setMinvalueShouldBeGreater(
true);
233 $points->setValue($this->
object->getPoints());
237 $scorePartialSolution =
new ilCheckboxInputGUI($this->
lng->txt(
'score_partsol_enabled'),
'score_partsol_enabled');
238 $scorePartialSolution->setInfo($this->
lng->txt(
'score_partsol_enabled_info'));
239 $scorePartialSolution->setChecked($this->
object->isScorePartialSolutionEnabled());
240 $form->
addItem($scorePartialSolution);
250 $old_answer_type = $this->
object->getAnswerType();
252 $this->
object->setShuffleAnswersEnabled($form->
getItemByPostVar(
'shuffle_answers_enabled')->getChecked());
254 if (!$this->
object->getSelfAssessmentEditingMode()) {
255 $this->
object->setAnswerType($form->
getItemByPostVar(
'answer_type')->getValue());
258 if (!$this->
object->getSelfAssessmentEditingMode() && $this->object->isSingleLineAnswerType($old_answer_type)) {
259 $thumbsize = (
int) ($form->
getItemByPostVar(
'thumb_size')->getValue() ?? $this->
object->getThumbSize());
260 if ($thumbsize !== $this->
object->getThumbSize()) {
261 $this->
object->setThumbSize($thumbsize);
262 $this->rebuild_thumbnails =
true;
266 $this->
object->setOptionLabel($form->
getItemByPostVar(
'option_label')->getValue());
268 if ($this->
object->isCustomOptionLabel($this->object->getOptionLabel())) {
269 $this->
object->setCustomTrueOptionLabel(strip_tags(
272 $this->
object->setCustomFalseOptionLabel(strip_tags(
279 $this->
object->setScorePartialSolutionEnabled($form->
getItemByPostVar(
'score_partsol_enabled')->getChecked());
284 $answer_type ??= $this->
object->getAnswerType();
287 $answers->setInfo($this->
lng->txt(
'kprim_answers_info') .
' ' . $this->lng->txt(
'latex_edit_info'));
288 $answers->setSize(64);
289 $answers->setRequired(
true);
290 $answers->setAllowMove(
true);
291 $answers->setQuestionObject($this->
object);
292 $answers->setSingleline($this->
object->isSingleLineAnswerType($answer_type));
293 $answers->setValues($this->
object->getAnswers());
304 $answers = $this->handleAnswerTextsSubmit(
309 $this->
object->handleFileUploads($answers, $files);
311 if ($this->rebuild_thumbnails) {
312 $answers = $this->
object->rebuildThumbnails(
313 $this->
object->getAnswerType(),
314 $this->object->getThumbSize(),
315 $this->object->getImagePath(),
320 $this->
object->setAnswers($answers);
329 foreach ($answers as $key => $answer) {
358 bool $is_question_postponed =
false,
359 array|
bool $user_post_solutions =
false,
360 bool $show_specific_inline_feedback =
false
363 $keys = $this->getParticipantsAnswerKeySequence();
368 $solutions = $this->
object->getTestOutputSolutions($active_id, $pass);
370 foreach ($solutions as $idx => $solution_value) {
371 $user_solution[$solution_value[
"value1"]] = $solution_value[
"value2"];
375 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_kprim_output.html",
true,
true,
"components/ILIAS/TestQuestionPool");
377 foreach ($keys as $answer_id) {
378 $answer = $this->
object->getAnswer($answer_id);
379 if ($answer->getImageFile() !==
null
380 && $answer->getImageFile() !==
'') {
381 if ($this->
object->getThumbSize()) {
382 $template->setCurrentBlock(
"preview");
383 $template->setVariable(
"URL_PREVIEW", $answer->getImageWebPath());
384 $template->setVariable(
"TEXT_PREVIEW", $this->
lng->txt(
'preview'));
386 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getThumbWebPath());
387 [$width, $height, $type, $attr] = getimagesize($answer->getImageFsPath());
388 $alt = $answer->getImageFile();
389 if (strlen($answer->getAnswertext())) {
390 $alt = $answer->getAnswertext();
392 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
395 $template->parseCurrentBlock();
397 $template->setCurrentBlock(
"answer_image");
398 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getImageWebPath());
399 [$width, $height, $type, $attr] = getimagesize($answer->getImageFsPath());
400 $alt = $answer->getImageFile();
401 if (strlen($answer->getAnswertext())) {
402 $alt = $answer->getAnswertext();
404 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
405 $template->setVariable(
"ATTR", $attr);
408 $template->parseCurrentBlock();
412 if ($show_specific_inline_feedback) {
413 $this->populateSpecificFeedbackInline($user_solution, $answer_id, $template);
416 $template->setCurrentBlock(
"answer_row");
417 $template->setVariable(
"ANSWER_ID", $answer_id);
418 $template->setVariable(
"ANSWER_TEXT", $this->renderLatex(
421 $template->setVariable(
'VALUE_TRUE', 1);
422 $template->setVariable(
'VALUE_FALSE', 0);
424 if (isset($user_solution[$answer->getPosition()])) {
425 $tplVar = $user_solution[$answer->getPosition()] ?
'CHECKED_ANSWER_TRUE' :
'CHECKED_ANSWER_FALSE';
426 $template->setVariable($tplVar,
" checked=\"checked\"");
429 $template->parseCurrentBlock();
432 $template->setVariable(
"QUESTIONTEXT", $this->renderLatex($this->
object->getQuestionForHTMLOutput()));
433 $template->setVariable(
"INSTRUCTIONTEXT", $this->
object->getInstructionTextTranslation(
435 $this->object->getOptionLabel()
438 $template->setVariable(
"OPTION_LABEL_TRUE", $this->
object->getTrueOptionLabelTranslation(
440 $this->object->getOptionLabel()
443 $template->setVariable(
"OPTION_LABEL_FALSE", $this->
object->getFalseOptionLabelTranslation(
445 $this->object->getOptionLabel()
448 $questionoutput = $template->get();
449 $pageoutput = $this->outQuestionPage(
"", $is_question_postponed, $active_id, $questionoutput, $show_specific_inline_feedback);
454 bool $show_question_only =
false,
455 bool $show_inline_feedback =
false
457 $user_solution = is_object($this->getPreviewSession()) ? (array) $this->getPreviewSession()->getParticipantsSolution() : [];
459 $keys = $this->getParticipantsAnswerKeySequence();
461 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_kprim_output.html",
true,
true,
"components/ILIAS/TestQuestionPool");
463 foreach ($keys as $answer_id) {
464 $answer = $this->
object->getAnswer($answer_id);
465 if ($answer->getImageFile() !==
null
466 && $answer->getImageFile() !==
'') {
467 if ($this->
object->getThumbSize()) {
468 $template->setCurrentBlock(
"preview");
469 $template->setVariable(
"URL_PREVIEW", $answer->getImageWebPath());
470 $template->setVariable(
"TEXT_PREVIEW", $this->
lng->txt(
'preview'));
472 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getThumbWebPath());
473 [$width, $height, $type, $attr] = getimagesize($answer->getImageFsPath());
474 $alt = $answer->getImageFile();
475 if (strlen($answer->getAnswertext())) {
476 $alt = $answer->getAnswertext();
478 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
481 $template->parseCurrentBlock();
483 $template->setCurrentBlock(
"answer_image");
484 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getImageWebPath());
485 [$width, $height, $type, $attr] = getimagesize($answer->getImageFsPath());
486 $alt = $answer->getImageFile();
487 if (strlen($answer->getAnswertext())) {
488 $alt = $answer->getAnswertext();
490 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
491 $template->setVariable(
"ATTR", $attr);
494 $template->parseCurrentBlock();
498 if ($show_inline_feedback) {
499 $this->populateSpecificFeedbackInline($user_solution, $answer_id, $template);
502 $template->setCurrentBlock(
"answer_row");
503 $template->setVariable(
"ANSWER_ID", $answer_id);
504 $template->setVariable(
"ANSWER_TEXT", $this->renderLatex(
507 $template->setVariable(
'VALUE_TRUE', 1);
508 $template->setVariable(
'VALUE_FALSE', 0);
510 if (isset($user_solution[$answer->getPosition()])) {
511 $tplVar = $user_solution[$answer->getPosition()] ?
'CHECKED_ANSWER_TRUE' :
'CHECKED_ANSWER_FALSE';
512 $template->setVariable($tplVar,
" checked=\"checked\"");
515 $template->parseCurrentBlock();
517 $questiontext = $this->
object->getQuestionForHTMLOutput();
518 if ($show_inline_feedback && $this->hasInlineFeedback()) {
519 $questiontext .= $this->buildFocusAnchorHtml();
521 $template->setVariable(
"QUESTIONTEXT", $this->renderLatex(
525 $template->setVariable(
"INSTRUCTIONTEXT", $this->
object->getInstructionTextTranslation(
527 $this->object->getOptionLabel()
530 $template->setVariable(
"OPTION_LABEL_TRUE", $this->
object->getTrueOptionLabelTranslation(
532 $this->object->getOptionLabel()
535 $template->setVariable(
"OPTION_LABEL_FALSE", $this->
object->getFalseOptionLabelTranslation(
537 $this->object->getOptionLabel()
540 $questionoutput = $template->get();
541 if (!$show_question_only) {
543 $questionoutput = $this->getILIASPage($questionoutput);
545 return $questionoutput;
551 bool $graphical_output =
false,
552 bool $result_output =
false,
553 bool $show_question_only =
true,
554 bool $show_feedback =
false,
555 bool $show_correct_solution =
false,
556 bool $show_manual_scoring =
false,
557 bool $show_question_text =
true,
558 bool $show_inline_feedback =
true
562 if (($active_id > 0) && (!$show_correct_solution)) {
563 $solutions = $this->
object->getSolutionValues($active_id, $pass);
564 foreach ($solutions as $idx => $solution_value) {
567 'value1' => $solution_value[
'value1'],
568 'value2' => $solution_value[
'value2']
573 foreach ($this->
object->getAnswers() as $answer) {
576 'value1' => $answer->getPosition(),
577 'value2' => $answer->getCorrectness()
582 return $this->renderSolutionOutput(
590 $show_correct_solution,
591 $show_manual_scoring,
594 $show_inline_feedback
599 mixed $user_solutions,
602 bool $graphical_output =
false,
603 bool $result_output =
false,
604 bool $show_question_only =
true,
605 bool $show_feedback =
false,
606 bool $show_correct_solution =
false,
607 bool $show_manual_scoring =
false,
608 bool $show_question_text =
true,
609 bool $show_autosave_title =
false,
610 bool $show_inline_feedback =
false,
614 foreach ($user_solutions as $idx => $solution_value) {
615 $user_solution[$solution_value[
'value1']] = $solution_value[
'value2'];
617 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_kprim_output_solution.html",
true,
true,
"components/ILIAS/TestQuestionPool");
618 $keys = $this->getParticipantsAnswerKeySequence();
619 foreach ($keys as $answer_id) {
620 $answer = $this->
object->getAnswer($answer_id);
622 if (($active_id > 0) &&
623 !$show_correct_solution &&
625 $correctness_icon = $this->generateCorrectnessIconsForCorrectness(self::CORRECTNESS_NOT_OK);
626 if (isset($user_solution[$answer->getPosition()]) && $user_solution[$answer->getPosition()] == $answer->getCorrectness()) {
627 $correctness_icon = $this->generateCorrectnessIconsForCorrectness(self::CORRECTNESS_OK);
629 $template->setCurrentBlock(
"icon_ok");
630 $template->setVariable(
"ICON_OK", $correctness_icon);
631 $template->parseCurrentBlock();
633 if ($answer->getImageFile() !==
null
634 && $answer->getImageFile() !==
'') {
635 $template->setCurrentBlock(
"answer_image");
636 if ($this->
object->getThumbSize()) {
637 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getThumbWebPath());
639 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getImageWebPath());
642 $template->setVariable(
645 $answer->getImageFile()
648 $template->setVariable(
649 "ANSWER_IMAGE_TITLE",
651 $answer->getImageFile()
654 $template->parseCurrentBlock();
657 if ($show_feedback) {
658 $this->populateSpecificFeedbackInline($user_solution, $answer_id, $template);
661 $template->setCurrentBlock(
"answer_row");
662 $template->setVariable(
"ANSWER_TEXT", $this->renderLatex(
666 if ($this->renderPurposeSupportsFormHtml() || $this->isRenderPurposePrintPdf()) {
667 if (isset($user_solution[$answer->getPosition()])) {
668 if ($user_solution[$answer->getPosition()]) {
670 $template->setVariable(
"SOLUTION_ALT_TRUE", $this->
lng->txt(
"checked"));
672 $template->setVariable(
"SOLUTION_ALT_FALSE", $this->
lng->txt(
"unchecked"));
675 $template->setVariable(
"SOLUTION_ALT_TRUE", $this->
lng->txt(
"unchecked"));
677 $template->setVariable(
"SOLUTION_ALT_FALSE", $this->
lng->txt(
"checked"));
681 $template->setVariable(
"SOLUTION_ALT_TRUE", $this->
lng->txt(
"unchecked"));
683 $template->setVariable(
"SOLUTION_ALT_FALSE", $this->
lng->txt(
"unchecked"));
686 $template->setVariable(
'SOL_QID', $this->
object->getId());
687 $template->setVariable(
'SOL_SUFFIX', $show_correct_solution ?
'bestsolution' :
'usersolution');
688 $template->setVariable(
'SOL_POSITION', $answer->getPosition());
690 $template->setVariable(
'SOL_TRUE_VALUE', 1);
691 $template->setVariable(
'SOL_FALSE_VALUE', 0);
693 if (isset($user_solution[$answer->getPosition()])) {
694 if ($user_solution[$answer->getPosition()]) {
695 $template->setVariable(
'SOL_TRUE_CHECKED',
'checked');
697 $template->setVariable(
'SOL_FALSE_CHECKED',
'checked');
702 $template->parseCurrentBlock();
705 if ($show_question_text ==
true) {
706 $questiontext = $this->
object->getQuestionForHTMLOutput();
707 if ($show_feedback && $this->hasInlineFeedback()) {
708 $questiontext .= $this->buildFocusAnchorHtml();
712 $template->setVariable(
"INSTRUCTIONTEXT", $this->
object->getInstructionTextTranslation(
714 $this->object->getOptionLabel()
718 $template->setVariable(
"OPTION_LABEL_TRUE", $this->
object->getTrueOptionLabelTranslation(
720 $this->object->getOptionLabel()
723 $template->setVariable(
"OPTION_LABEL_FALSE", $this->
object->getFalseOptionLabelTranslation(
725 $this->object->getOptionLabel()
729 $questionoutput = $template->get();
730 $feedback = ($show_feedback && !$this->isTestPresentationContext()) ? $this->getGenericFeedbackOutput((
int) $active_id, $pass) :
"";
732 $solutiontemplate =
new ilTemplate(
"tpl.il_as_tst_solution_output.html",
true,
true,
"components/ILIAS/TestQuestionPool");
734 if (strlen($feedback)) {
736 $this->hasCorrectSolution($active_id, $pass) ?
740 $solutiontemplate->setVariable(
"ILC_FB_CSS_CLASS", $cssClass);
744 $solutiontemplate->setVariable(
"SOLUTION_OUTPUT", $questionoutput);
746 $solutionoutput = $solutiontemplate->get();
748 if (!$show_question_only) {
750 $solutionoutput = $this->getILIASPage($solutionoutput);
752 return $solutionoutput;
757 $choice_keys = array_keys($this->
object->getAnswers());
759 if ($this->
object->isShuffleAnswersEnabled()) {
760 $choice_keys = $this->
object->getShuffler()->transform($choice_keys);
769 if (isset($user_solution[$answer_id])) {
770 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->
object->getId(), 0, $answer_id);
772 $template->setCurrentBlock(
"feedback");
773 $template->setVariable(
"FEEDBACK", $this->renderLatex(
776 $template->parseCurrentBlock();
782 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->
object->getId(), 0, $answer_id);
784 $template->setCurrentBlock(
"feedback");
785 $template->setVariable(
"FEEDBACK", $this->renderLatex(
788 $template->parseCurrentBlock();
793 $answer = $this->
object->getAnswer($answer_id);
795 if ($answer->getCorrectness()) {
796 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->
object->getId(), 0, $answer_id);
798 $template->setCurrentBlock(
"feedback");
799 $template->setVariable(
"FEEDBACK", $this->renderLatex(
802 $template->parseCurrentBlock();
840 foreach ($answers as $answer) {
842 'answertext' => $answer->getAnswerText(),
'count_true' => 0,
'count_false' => 0
845 foreach ($rawSolutionData as $solutionRecord) {
846 if ($solutionRecord[
'value1'] == $answer->getPosition()) {
847 if ($solutionRecord[
'value2']) {
848 $answerAgg[
'count_true']++;
850 $answerAgg[
'count_false']++;
855 $aggregate[] = $answerAgg;
863 $agg = $this->aggregateAnswers($relevantAnswers, $this->
object->getAnswers());
867 foreach ($agg as $ans) {
869 'answer' => $ans[
'answertext'],
870 'frequency_true' => $ans[
'count_true'],
871 'frequency_false' => $ans[
'count_false']
888 $table->setQuestionIndex($questionIndex);
889 $table->setData($this->getAnswersFrequency($relevantAnswers, $questionIndex));
890 $table->initColumns();
899 $points->setRequired(
true);
901 $points->allowDecimals(
true);
902 $points->setMinValue(0);
903 $points->setMinvalueShouldBeGreater(
true);
904 $points->setValue($this->
object->getPoints());
908 $scorePartialSolution =
new ilCheckboxInputGUI($this->
lng->txt(
'score_partsol_enabled'),
'score_partsol_enabled');
909 $scorePartialSolution->setInfo($this->
lng->txt(
'score_partsol_enabled_info'));
910 $scorePartialSolution->setChecked($this->
object->isScorePartialSolutionEnabled());
911 $form->
addItem($scorePartialSolution);
915 $kprimAnswers->setInfo($this->
lng->txt(
'kprim_answers_info'));
916 $kprimAnswers->setSize(64);
917 $kprimAnswers->setMaxLength(1000);
918 $kprimAnswers->setRequired(
true);
919 $kprimAnswers->setQuestionObject($this->
object);
920 $kprimAnswers->setValues($this->
object->getAnswers());
929 $this->
object->setPoints(
930 (
float) str_replace(
',',
'.', $form->
getInput(
'points'))
933 $this->
object->setScorePartialSolutionEnabled(
934 (
bool) $form->
getInput(
'score_partsol_enabled')
937 $this->
object->setAnswers(
populateSpecificFeedbackInline($user_solution, $answer_id, $template)
getAnswerFrequencyTableGUI($parentGui, $parentCmd, $relevantAnswers, $questionIndex)
populateAnswerSpecificFormPart(ilPropertyFormGUI $form, ?string $answer_type=null)
getAfterParticipationSuppressionQuestionPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
writeAnswerSpecificPostData(ilPropertyFormGUI $form)
getParticipantsAnswerKeySequence()
getAfterParticipationSuppressionAnswerPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
writePostData(bool $always=false)
{Evaluates a posted edit form and writes the form data in the question object.integer A positive valu...
ilPropertyFormGUI $edit_form
populateCorrectionsFormProperties(ilPropertyFormGUI $form)
getAnswersFrequency($relevantAnswers, $questionIndex)
writeQuestionSpecificPostData(ilPropertyFormGUI $form)
getTestOutput(int $active_id, int $pass, bool $is_question_postponed=false, array|bool $user_post_solutions=false, bool $show_specific_inline_feedback=false)
getSpecificFeedbackOutput(array $userSolution)
aggregateAnswers($rawSolutionData, $answers)
handleAnswerTextsSubmit($answers)
editQuestion(bool $checkonly=false, ?bool $is_save_cmd=null)
getPreview(bool $show_question_only=false, bool $show_inline_feedback=false)
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,)
getAdditionalEditQuestionCommands()
populateQuestionSpecificFormPart(ilPropertyFormGUI $form, ?string $answer_type=null)
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)
const ANSWER_TYPE_MULTI_LINE
renderEditForm(ilPropertyFormGUI $form)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const FEEDBACK_SETTING_CHECKED
const FEEDBACK_SETTING_ALL
const FEEDBACK_SETTING_CORRECT
const CSS_CLASS_FEEDBACK_WRONG
const CSS_CLASS_FEEDBACK_CORRECT
This class represents an option in a radio group.
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
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)
static secureString(string $a_str, bool $a_strip_html=true, string $a_allow="")
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...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc