19require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
20require_once
'Modules/TestQuestionPool/interfaces/interface.ilGuiQuestionScoringAdjustable.php';
21require_once
'Modules/TestQuestionPool/interfaces/interface.ilGuiAnswerScoringAdjustable.php';
40 require_once
'Modules/TestQuestionPool/classes/class.assKprimChoice.php';
44 $this->
object->loadFromDb($qId);
53 return $this->
object->feedbackOBJ->isSpecificAnswerFeedbackAvailable($this->
object->getId());
58 return array(
'uploadImage',
'removeImage');
69 $this->tpl->setVariable(
"QUESTION_DATA", $this->
ctrl->getHTML($form));
77 $this->
object->saveToDb();
84 $position = key($_POST[
'cmd'][
'removeImage']);
85 $this->
object->removeAnswerImage($position);
87 $this->
object->saveToDb();
93 if (isset($_POST[
'cmd'][__FUNCTION__]) && count($_POST[
'cmd'][__FUNCTION__])) {
94 $this->
object->moveAnswerDown(key($_POST[
'cmd'][__FUNCTION__]));
95 $this->
object->saveToDb();
103 if (isset($_POST[
'cmd'][__FUNCTION__]) && count($_POST[
'cmd'][__FUNCTION__])) {
104 $this->
object->moveAnswerUp(key($_POST[
'cmd'][__FUNCTION__]));
105 $this->
object->saveToDb();
117 $form->setValuesByPost();
120 $answersInput = $form->getItemByPostVar(
'kprim_answers');
121 $answersInput->setIgnoreMissingUploadsEnabled(
true);
123 if (!$answersInput->checkUploads($_POST[$answersInput->getPostVar()])) {
124 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"form_input_not_valid"));
129 $answersInput->collectValidFiles();
130 } elseif (!$form->checkInput()) {
171 $shuffleAnswers =
new ilCheckboxInputGUI($this->
lng->txt(
"shuffle_answers"),
"shuffle_answers_enabled");
172 $shuffleAnswers->setChecked($this->
object->isShuffleAnswersEnabled());
173 $form->
addItem($shuffleAnswers);
175 if (!$this->
object->getSelfAssessmentEditingMode()) {
178 $answerType->setOptions($this->
object->getAnswerTypeSelectOptions($this->lng));
179 $answerType->setValue($this->
object->getAnswerType());
183 if (!$this->
object->getSelfAssessmentEditingMode() && $this->object->isSingleLineAnswerType($this->object->getAnswerType())) {
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 $this->
object->setThumbSize((
int) ($form->
getItemByPostVar(
'thumb_size')->getValue() ?? $this->object->getThumbSize()));
262 $this->
object->setOptionLabel($form->
getItemByPostVar(
'option_label')->getValue());
264 if ($this->
object->isCustomOptionLabel($this->object->getOptionLabel())) {
265 $this->
object->setCustomTrueOptionLabel(strip_tags(
268 $this->
object->setCustomFalseOptionLabel(strip_tags(
275 $this->
object->setScorePartialSolutionEnabled($form->
getItemByPostVar(
'score_partsol_enabled')->getChecked());
284 require_once
'Modules/TestQuestionPool/classes/class.ilKprimChoiceWizardInputGUI.php';
286 $kprimAnswers->setInfo($this->
lng->txt(
'kprim_answers_info'));
287 $kprimAnswers->setSize(64);
288 $kprimAnswers->setRequired(
true);
289 $kprimAnswers->setAllowMove(
true);
290 $kprimAnswers->setQuestionObject($this->
object);
291 $kprimAnswers->setSingleline($this->
object->isSingleLineAnswerType($this->object->getAnswerType()));
292 $kprimAnswers->setValues($this->
object->getAnswers());
307 $this->
object->handleFileUploads($answers, $files);
308 $this->
object->setAnswers($answers);
317 foreach ($answers as
$key => $answer) {
348 $is_postponed =
false,
349 $use_post_solutions =
false,
350 $showInlineFeedback =
false
356 $user_solution = array();
358 $solutions = $this->
object->getTestOutputSolutions($active_id, $pass);
360 foreach ($solutions as $idx => $solution_value) {
361 $user_solution[$solution_value[
"value1"]] = $solution_value[
"value2"];
366 include_once
"./Services/UICore/classes/class.ilTemplate.php";
367 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_kprim_output.html",
true,
true,
"Modules/TestQuestionPool");
369 foreach (
$keys as $answer_id) {
370 $answer = $this->
object->getAnswer($answer_id);
371 if (strlen($answer->getImageFile())) {
372 if ($this->
object->getThumbSize()) {
373 $template->setCurrentBlock(
"preview");
374 $template->setVariable(
"URL_PREVIEW", $answer->getImageWebPath());
375 $template->setVariable(
"TEXT_PREVIEW", $this->
lng->txt(
'preview'));
377 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getThumbWebPath());
378 [$width, $height,
$type, $attr] = getimagesize($answer->getImageFsPath());
379 $alt = $answer->getImageFile();
380 if (strlen($answer->getAnswertext())) {
381 $alt = $answer->getAnswertext();
383 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
386 $template->parseCurrentBlock();
388 $template->setCurrentBlock(
"answer_image");
389 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getImageWebPath());
390 [$width, $height,
$type, $attr] = getimagesize($answer->getImageFsPath());
391 $alt = $answer->getImageFile();
392 if (strlen($answer->getAnswertext())) {
393 $alt = $answer->getAnswertext();
395 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
396 $template->setVariable(
"ATTR", $attr);
399 $template->parseCurrentBlock();
403 if ($showInlineFeedback) {
407 $template->setCurrentBlock(
"answer_row");
408 $template->setVariable(
"ANSWER_ID", $answer_id);
409 $template->setVariable(
"ANSWER_TEXT", $this->
object->prepareTextareaOutput($answer->getAnswertext(),
true));
410 $template->setVariable(
'VALUE_TRUE', 1);
411 $template->setVariable(
'VALUE_FALSE', 0);
413 if (isset($user_solution[$answer->getPosition()])) {
414 $tplVar = $user_solution[$answer->getPosition()] ?
'CHECKED_ANSWER_TRUE' :
'CHECKED_ANSWER_FALSE';
415 $template->setVariable($tplVar,
" checked=\"checked\"");
418 $template->parseCurrentBlock();
420 $template->setVariable(
"QUESTIONTEXT", $this->
object->getQuestionForHTMLOutput());
421 $template->setVariable(
"INSTRUCTIONTEXT", $this->
object->getInstructionTextTranslation(
423 $this->object->getOptionLabel()
426 $template->setVariable(
"OPTION_LABEL_TRUE", $this->
object->getTrueOptionLabelTranslation(
428 $this->object->getOptionLabel()
431 $template->setVariable(
"OPTION_LABEL_FALSE", $this->
object->getFalseOptionLabelTranslation(
433 $this->object->getOptionLabel()
436 $questionoutput = $template->get();
437 $pageoutput = $this->
outQuestionPage(
"", $is_postponed, $active_id, $questionoutput, $showInlineFeedback);
445 public function getPreview($show_question_only =
false, $showInlineFeedback =
false): string
447 $user_solution = is_object($this->getPreviewSession()) ? (array) $this->getPreviewSession()->getParticipantsSolution() : array();
449 $keys = $this->getParticipantsAnswerKeySequence();
452 include_once
"./Services/UICore/classes/class.ilTemplate.php";
453 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_kprim_output.html",
true,
true,
"Modules/TestQuestionPool");
455 foreach (
$keys as $answer_id) {
456 $answer = $this->
object->getAnswer($answer_id);
457 if (strlen($answer->getImageFile())) {
458 if ($this->
object->getThumbSize()) {
459 $template->setCurrentBlock(
"preview");
460 $template->setVariable(
"URL_PREVIEW", $answer->getImageWebPath());
461 $template->setVariable(
"TEXT_PREVIEW", $this->
lng->txt(
'preview'));
463 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getThumbWebPath());
464 [$width, $height,
$type, $attr] = getimagesize($answer->getImageFsPath());
465 $alt = $answer->getImageFile();
466 if (strlen($answer->getAnswertext())) {
467 $alt = $answer->getAnswertext();
469 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
472 $template->parseCurrentBlock();
474 $template->setCurrentBlock(
"answer_image");
475 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getImageWebPath());
476 [$width, $height,
$type, $attr] = getimagesize($answer->getImageFsPath());
477 $alt = $answer->getImageFile();
478 if (strlen($answer->getAnswertext())) {
479 $alt = $answer->getAnswertext();
481 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
482 $template->setVariable(
"ATTR", $attr);
485 $template->parseCurrentBlock();
489 if ($showInlineFeedback) {
490 $this->populateSpecificFeedbackInline($user_solution, $answer_id, $template);
493 $template->setCurrentBlock(
"answer_row");
494 $template->setVariable(
"ANSWER_ID", $answer_id);
495 $template->setVariable(
"ANSWER_TEXT", $this->
object->prepareTextareaOutput((
string) $answer->getAnswertext(),
true));
496 $template->setVariable(
'VALUE_TRUE', 1);
497 $template->setVariable(
'VALUE_FALSE', 0);
499 if (isset($user_solution[$answer->getPosition()])) {
500 $tplVar = $user_solution[$answer->getPosition()] ?
'CHECKED_ANSWER_TRUE' :
'CHECKED_ANSWER_FALSE';
501 $template->setVariable($tplVar,
" checked=\"checked\"");
504 $template->parseCurrentBlock();
506 $questiontext = $this->
object->getQuestionForHTMLOutput();
507 if ($showInlineFeedback && $this->hasInlineFeedback()) {
508 $questiontext .= $this->buildFocusAnchorHtml();
510 $template->setVariable(
"QUESTIONTEXT", $this->
object->prepareTextareaOutput($questiontext,
true));
512 $template->setVariable(
"INSTRUCTIONTEXT", $this->
object->getInstructionTextTranslation(
514 $this->object->getOptionLabel()
517 $template->setVariable(
"OPTION_LABEL_TRUE", $this->
object->getTrueOptionLabelTranslation(
519 $this->object->getOptionLabel()
522 $template->setVariable(
"OPTION_LABEL_FALSE", $this->
object->getFalseOptionLabelTranslation(
524 $this->object->getOptionLabel()
527 $questionoutput = $template->get();
528 if (!$show_question_only) {
530 $questionoutput = $this->getILIASPage($questionoutput);
532 return $questionoutput;
549 $graphicalOutput =
false,
550 $result_output =
false,
551 $show_question_only =
true,
552 $show_feedback =
false,
553 $show_correct_solution =
false,
554 $show_manual_scoring =
false,
555 $show_question_text =
true
558 $keys = $this->getParticipantsAnswerKeySequence();
561 $user_solution = array();
562 if (($active_id > 0) && (!$show_correct_solution)) {
563 $solutions = $this->
object->getSolutionValues($active_id, $pass);
564 foreach ($solutions as $idx => $solution_value) {
565 $user_solution[$solution_value[
'value1']] = $solution_value[
'value2'];
569 foreach ($this->
object->getAnswers() as $answer) {
570 $user_solution[$answer->getPosition()] = $answer->getCorrectness();
575 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_kprim_output_solution.html",
true,
true,
"Modules/TestQuestionPool");
577 foreach (
$keys as $answer_id) {
578 $answer = $this->
object->getAnswer($answer_id);
580 if (($active_id > 0) &&
581 !$show_correct_solution &&
583 $correctness_icon = $this->generateCorrectnessIconsForCorrectness(self::CORRECTNESS_NOT_OK);
584 if (isset($user_solution[$answer->getPosition()]) && $user_solution[$answer->getPosition()] == $answer->getCorrectness()) {
585 $correctness_icon = $this->generateCorrectnessIconsForCorrectness(self::CORRECTNESS_OK);
587 $template->setCurrentBlock(
"icon_ok");
588 $template->setVariable(
"ICON_OK", $correctness_icon);
589 $template->parseCurrentBlock();
591 if (strlen($answer->getImageFile())) {
592 $template->setCurrentBlock(
"answer_image");
593 if ($this->
object->getThumbSize()) {
594 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getThumbWebPath());
596 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getImageWebPath());
599 $template->setVariable(
602 $answer->getImageFile()
605 $template->setVariable(
606 "ANSWER_IMAGE_TITLE",
608 $answer->getImageFile()
611 $template->parseCurrentBlock();
614 if ($show_feedback) {
615 $this->populateSpecificFeedbackInline($user_solution, $answer_id, $template);
618 $template->setCurrentBlock(
"answer_row");
619 $template->setVariable(
"ANSWER_TEXT", $this->
object->prepareTextareaOutput($answer->getAnswertext(),
true));
621 if ($this->renderPurposeSupportsFormHtml() || $this->isRenderPurposePrintPdf()) {
622 if (isset($user_solution[$answer->getPosition()])) {
623 if ($user_solution[$answer->getPosition()]) {
625 $template->setVariable(
"SOLUTION_ALT_TRUE", $this->
lng->txt(
"checked"));
627 $template->setVariable(
"SOLUTION_ALT_FALSE", $this->
lng->txt(
"unchecked"));
630 $template->setVariable(
"SOLUTION_ALT_TRUE", $this->
lng->txt(
"unchecked"));
632 $template->setVariable(
"SOLUTION_ALT_FALSE", $this->
lng->txt(
"checked"));
636 $template->setVariable(
"SOLUTION_ALT_TRUE", $this->
lng->txt(
"unchecked"));
638 $template->setVariable(
"SOLUTION_ALT_FALSE", $this->
lng->txt(
"unchecked"));
641 $template->setVariable(
'SOL_QID', $this->
object->getId());
642 $template->setVariable(
'SOL_SUFFIX', $show_correct_solution ?
'bestsolution' :
'usersolution');
643 $template->setVariable(
'SOL_POSITION', $answer->getPosition());
645 $template->setVariable(
'SOL_TRUE_VALUE', 1);
646 $template->setVariable(
'SOL_FALSE_VALUE', 0);
648 if (isset($user_solution[$answer->getPosition()])) {
649 if ($user_solution[$answer->getPosition()]) {
650 $template->setVariable(
'SOL_TRUE_CHECKED',
'checked');
652 $template->setVariable(
'SOL_FALSE_CHECKED',
'checked');
657 $template->parseCurrentBlock();
660 if ($show_question_text ==
true) {
661 $questiontext = $this->
object->getQuestionForHTMLOutput();
662 if ($show_feedback && $this->hasInlineFeedback()) {
663 $questiontext .= $this->buildFocusAnchorHtml();
665 $template->setVariable(
"QUESTIONTEXT", $this->
object->prepareTextareaOutput($questiontext,
true));
667 $template->setVariable(
"INSTRUCTIONTEXT", $this->
object->getInstructionTextTranslation(
669 $this->object->getOptionLabel()
673 $template->setVariable(
"OPTION_LABEL_TRUE", $this->
object->getTrueOptionLabelTranslation(
675 $this->object->getOptionLabel()
678 $template->setVariable(
"OPTION_LABEL_FALSE", $this->
object->getFalseOptionLabelTranslation(
680 $this->object->getOptionLabel()
684 $questionoutput = $template->get();
685 $feedback = ($show_feedback && !$this->isTestPresentationContext()) ? $this->getGenericFeedbackOutput((
int) $active_id, $pass) :
"";
687 $solutiontemplate =
new ilTemplate(
"tpl.il_as_tst_solution_output.html",
true,
true,
"Modules/TestQuestionPool");
689 if (strlen($feedback)) {
691 $this->hasCorrectSolution($active_id, $pass) ?
695 $solutiontemplate->setVariable(
"ILC_FB_CSS_CLASS", $cssClass);
696 $solutiontemplate->setVariable(
"FEEDBACK", $this->
object->prepareTextareaOutput($feedback,
true));
699 $solutiontemplate->setVariable(
"SOLUTION_OUTPUT", $questionoutput);
701 $solutionoutput = $solutiontemplate->get();
703 if (!$show_question_only) {
705 $solutionoutput = $this->getILIASPage($solutionoutput);
707 return $solutionoutput;
712 $choiceKeys = array_keys($this->
object->getAnswers());
714 if ($this->
object->isShuffleAnswersEnabled()) {
715 $choiceKeys = $this->
object->getShuffler()->transform($choiceKeys);
723 require_once
'Modules/TestQuestionPool/classes/feedback/class.ilAssConfigurableMultiOptionQuestionFeedback.php';
726 if (array_key_exists($answer_id, $user_solution)) {
727 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->
object->getId(), 0, $answer_id);
729 $template->setCurrentBlock(
"feedback");
730 $template->setVariable(
"FEEDBACK", $this->
object->prepareTextareaOutput($fb,
true));
731 $template->parseCurrentBlock();
737 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->
object->getId(), 0, $answer_id);
739 $template->setCurrentBlock(
"feedback");
740 $template->setVariable(
"FEEDBACK", $this->
object->prepareTextareaOutput($fb,
true));
741 $template->parseCurrentBlock();
746 $answer = $this->
object->getAnswer($answer_id);
748 if ($answer->getCorrectness()) {
749 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->
object->getId(), 0, $answer_id);
751 $template->setCurrentBlock(
"feedback");
752 $template->setVariable(
"FEEDBACK", $this->
object->prepareTextareaOutput($fb,
true));
753 $template->parseCurrentBlock();
795 return $this->renderAggregateView(
796 $this->aggregateAnswers($relevant_answers, $this->
object->getAnswers())
799 return '<pre>' . print_r($relevant_answers, 1) .
'</pre>';
804 $trueOptionLabel = $this->
object->getTrueOptionLabelTranslation($this->
lng, $this->
object->getOptionLabel());
805 $falseOptionLabel = $this->
object->getFalseOptionLabelTranslation($this->
lng, $this->
object->getOptionLabel());
807 $tpl =
new ilTemplate(
'tpl.il_as_aggregated_kprim_answers_table.html',
true,
true,
"Modules/TestQuestionPool");
809 foreach ($aggregate as $lineData) {
810 $tpl->setCurrentBlock(
'aggregaterow');
811 $tpl->setVariable(
'OPTION', $lineData[
'answertext']);
812 $tpl->setVariable(
'COUNT_TRUE', $lineData[
'count_true']);
813 $tpl->setVariable(
'COUNT_FALSE', $lineData[
'count_false']);
814 $tpl->parseCurrentBlock();
817 $tpl->setVariable(
'OPTION_HEAD', $this->
lng->txt(
'answers'));
818 $tpl->setVariable(
'COUNT_TRUE_HEAD', $trueOptionLabel);
819 $tpl->setVariable(
'COUNT_FALSE_HEAD', $falseOptionLabel);
826 $aggregate = array();
828 foreach ($answers as $answer) {
830 'answertext' => $answer->getAnswerText(),
'count_true' => 0,
'count_false' => 0
833 foreach ($rawSolutionData as $solutionRecord) {
834 if ($solutionRecord[
'value1'] == $answer->getPosition()) {
835 if ($solutionRecord[
'value2']) {
836 $answerAgg[
'count_true']++;
838 $answerAgg[
'count_false']++;
843 $aggregate[] = $answerAgg;
851 $agg = $this->aggregateAnswers($relevantAnswers, $this->
object->getAnswers());
855 foreach ($agg as $ans) {
857 'answer' => $ans[
'answertext'],
858 'frequency_true' => $ans[
'count_true'],
859 'frequency_false' => $ans[
'count_false']
875 require_once
'Modules/TestQuestionPool/classes/tables/class.ilKprimChoiceAnswerFreqStatTableGUI.php';
878 $table->setQuestionIndex($questionIndex);
879 $table->setData($this->getAnswersFrequency($relevantAnswers, $questionIndex));
880 $table->initColumns();
889 $points->setRequired(
true);
891 $points->allowDecimals(
true);
892 $points->setMinValue(0);
893 $points->setMinvalueShouldBeGreater(
true);
894 $points->setValue($this->
object->getPoints());
898 $scorePartialSolution =
new ilCheckboxInputGUI($this->
lng->txt(
'score_partsol_enabled'),
'score_partsol_enabled');
899 $scorePartialSolution->setInfo($this->
lng->txt(
'score_partsol_enabled_info'));
900 $scorePartialSolution->setChecked($this->
object->isScorePartialSolutionEnabled());
901 $form->
addItem($scorePartialSolution);
904 require_once
'Modules/TestQuestionPool/classes/forms/class.ilKprimChoiceCorrectionsInputGUI.php';
906 $kprimAnswers->setInfo($this->
lng->txt(
'kprim_answers_info'));
907 $kprimAnswers->setSize(64);
908 $kprimAnswers->setMaxLength(1000);
909 $kprimAnswers->setRequired(
true);
910 $kprimAnswers->setQuestionObject($this->
object);
911 $kprimAnswers->setValues($this->
object->getAnswers());
920 $this->
object->setPoints(
921 (
float) str_replace(
',',
'.', $form->
getInput(
'points'))
924 $this->
object->setScorePartialSolutionEnabled(
925 (
bool) $form->
getInput(
'score_partsol_enabled')
928 $this->
object->setAnswers(
populateSpecificFeedbackInline($user_solution, $answer_id, $template)
getAnswerFrequencyTableGUI($parentGui, $parentCmd, $relevantAnswers, $questionIndex)
renderAggregateView($aggregate)
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...
populateCorrectionsFormProperties(ilPropertyFormGUI $form)
getAggregatedAnswersView(array $relevant_answers)
Returns an html string containing a question specific representation of the answers so far given in t...
getAnswersFrequency($relevantAnswers, $questionIndex)
writeQuestionSpecificPostData(ilPropertyFormGUI $form)
editQuestion(ilPropertyFormGUI $form=null)
getSpecificFeedbackOutput(array $userSolution)
aggregateAnswers($rawSolutionData, $answers)
handleAnswerTextsSubmit($answers)
getPreview($show_question_only=false, $showInlineFeedback=false)
getTestOutput( $active_id, $pass, $is_postponed=false, $use_post_solutions=false, $showInlineFeedback=false)
populateAnswerSpecificFormPart(ilPropertyFormGUI $form)
getAdditionalEditQuestionCommands()
populateQuestionSpecificFormPart(ilPropertyFormGUI $form)
getSolutionOutput( $active_id, $pass=null, $graphicalOutput=false, $result_output=false, $show_question_only=true, $show_feedback=false, $show_correct_solution=false, $show_manual_scoring=false, $show_question_text=true)
saveCorrectionsFormProperties(ilPropertyFormGUI $form)
const ANSWER_TYPE_MULTI_LINE
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
populateTaxonomyFormSection(ilPropertyFormGUI $form)
writeQuestionGenericPostData()
addBasicQuestionFormProperties(ilPropertyFormGUI $form)
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="", $inlineFeedbackEnabled=false)
saveTaxonomyAssignments()
buildBasicEditFormObject()
addQuestionFormCommandButtons(ilPropertyFormGUI $form)
const FEEDBACK_SETTING_CHECKED
const FEEDBACK_SETTING_ALL
const FEEDBACK_SETTING_CORRECT
const CSS_CLASS_FEEDBACK_WRONG
const CSS_CLASS_FEEDBACK_CORRECT
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 class represents a text property in a property form.
static getHtmlPath(string $relative_path)
get url of path
static getImagePath(string $img, 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...
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc