19 require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
52 $this->
object->loadFromDb(
$id);
54 $this->linecolor =
'#' . (
new ilSetting(
'assessment'))->
get(
'imap_line_color') ??
'FF0000';
59 if (isset($_POST[
"imagemap"]) ||
60 isset($_POST[
"imagemap_x"]) ||
61 isset($_POST[
"imagemap_y"])) {
62 $this->
ctrl->setCmd(
"getCoords");
71 $this->
object->deleteImage();
72 $this->
object->saveToDb();
73 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'saved_successfully'),
true);
74 $this->
ctrl->redirect($this,
'editQuestion');
83 $form->setValuesByPost();
85 if (!$always && !$form->checkInput()) {
100 if ($this->
ctrl->getCmd() !=
'deleteImage') {
101 $this->
object->flushAnswers();
102 if (isset($_POST[
'image']) && is_array($_POST[
'image']) && is_array($_POST[
'image'][
'coords'][
'name'])) {
103 foreach ($_POST[
'image'][
'coords'][
'name'] as $idx => $name) {
104 if ($this->
object->getIsMultipleChoice() && isset($_POST[
'image'][
'coords'][
'points_unchecked'])) {
105 $pointsUnchecked = $_POST[
'image'][
'coords'][
'points_unchecked'][$idx];
107 $pointsUnchecked = 0.0;
110 $this->
object->addAnswer(
112 $_POST[
'image'][
'coords'][
'points'][$idx],
114 $_POST[
'image'][
'coords'][
'coords'][$idx],
115 $_POST[
'image'][
'coords'][
'shape'][$idx],
121 if (strlen($_FILES[
'imagemapfile'][
'tmp_name'])) {
122 if ($this->
object->getSelfAssessmentEditingMode() && $this->
object->getId() < 1) {
123 $this->
object->createNewQuestion();
126 $this->
object->uploadImagemap($form->
getItemByPostVar(
'imagemapfile')->getShapes());
133 if ($this->
ctrl->getCmd() !=
'deleteImage') {
134 if (strlen($_FILES[
'image'][
'tmp_name']) == 0) {
135 $this->
object->setImageFilename($_POST[
"image_name"]);
138 if (strlen($_FILES[
'image'][
'tmp_name'])) {
139 if ($this->
object->getSelfAssessmentEditingMode() && $this->
object->getId() < 1) {
140 $this->
object->createNewQuestion();
142 $this->
object->setImageFilename($_FILES[
'image'][
'name'], $_FILES[
'image'][
'tmp_name']);
168 if (null === $form) {
174 $this->tpl->setVariable(
'QUESTION_DATA', $this->
ctrl->getHTML($form));
187 $radioGroup->
setValue((
string) ((
int) ($this->
object->getIsMultipleChoice())));
189 $this->
lng->txt(
'tst_imap_qst_mode_sc'),
193 $this->
lng->txt(
'tst_imap_qst_mode_mc'),
196 $radioGroup->addOption($modeSingleChoice);
197 $radioGroup->addOption($modeMultipleChoice);
202 $image->setRequired(
true);
204 if (strlen($this->
object->getImageFilename())) {
205 $image->setImage($this->
object->getImagePathWeb() . $this->
object->getImageFilename());
206 $image->setValue($this->
object->getImageFilename());
207 $image->setAreas($this->
object->getAnswers());
208 $assessmentSetting =
new ilSetting(
"assessment");
210 $assessmentSetting->get(
"imap_line_color")
211 )) ?
"\"#" . $assessmentSetting->get(
"imap_line_color") .
"\"" :
"\"#FF0000\"";
213 $image->setImagePath($this->
object->getImagePath());
214 $image->setImagePathWeb($this->
object->getImagePathWeb());
245 switch ($_POST[
"shape"]) {
247 $coords = join(
",", $_POST[
'image'][
'mapcoords']);
248 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_rect_added'),
true);
251 if (preg_match(
"/(\d+)\s*,\s*(\d+)\s+(\d+)\s*,\s*(\d+)/", $_POST[
'image'][
'mapcoords'][0] .
" " . $_POST[
'image'][
'mapcoords'][1], $matches)) {
252 $coords =
"$matches[1],$matches[2]," . (
int) sqrt((($matches[3] - $matches[1]) * ($matches[3] - $matches[1])) + (($matches[4] - $matches[2]) * ($matches[4] - $matches[2])));
254 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_circle_added'),
true);
257 $coords = join(
",", $_POST[
'image'][
'mapcoords']);
258 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_poly_added'),
true);
261 $this->
object->addAnswer($_POST[
"shapetitle"], 0, count($this->
object->getAnswers()), $coords, $_POST[
"shape"]);
262 $this->
object->saveToDb();
263 $this->
ctrl->redirect($this,
'editQuestion');
268 $shape = (strlen($shape)) ? $shape : $_POST[
'shape'];
272 $editorTpl =
new ilTemplate(
'tpl.il_as_qpl_imagemap_question.html',
true,
true,
'Modules/TestQuestionPool');
275 $mapcoords = $this->request->raw(
'image');
276 if ($mapcoords != null && isset($mapcoords[
'mapcoords']) && is_array($mapcoords[
'mapcoords'])) {
277 foreach ($mapcoords[
'mapcoords'] as $value) {
278 array_push($coords, $value);
281 $cmd = $this->request->raw(
'cmd');
282 if ($cmd != null && array_key_exists(
'areaEditor', $cmd) && is_array($cmd[
'areaEditor'][
'image'])) {
283 array_push($coords, $cmd[
'areaEditor'][
'image'][0] .
"," . $cmd[
'areaEditor'][
'image'][1]);
285 foreach ($coords as $value) {
286 $editorTpl->setCurrentBlock(
"hidden");
287 $editorTpl->setVariable(
"HIDDEN_NAME",
'image[mapcoords][]');
288 $editorTpl->setVariable(
"HIDDEN_VALUE", $value);
289 $editorTpl->parseCurrentBlock();
292 $editorTpl->setCurrentBlock(
"hidden");
293 $editorTpl->setVariable(
"HIDDEN_NAME",
'shape');
294 $editorTpl->setVariable(
"HIDDEN_VALUE", $shape);
295 $editorTpl->parseCurrentBlock();
298 foreach ($this->
object->answers as $index => $answer) {
299 $preview->
addArea($index, $answer->getArea(), $answer->getCoords(), $answer->getAnswertext(),
"",
"",
true,
$this->linecolor);
302 $disabled_save =
" disabled=\"disabled\"";
306 if (count($coords) == 0) {
307 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"rectangle_click_tl_corner"));
308 } elseif (count($coords) == 1) {
309 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"rectangle_click_br_corner"));
310 $preview->addPoint($preview->getAreaCount(), join(
",", $coords),
true,
"blue");
311 } elseif (count($coords) == 2) {
312 $c = join(
",", $coords);
318 if (count($coords) == 0) {
319 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"circle_click_center"));
320 } elseif (count($coords) == 1) {
321 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"circle_click_circle"));
322 $preview->addPoint($preview->getAreaCount(), join(
",", $coords),
true,
"blue");
323 } elseif (count($coords) == 2) {
324 if (preg_match(
"/(\d+)\s*,\s*(\d+)\s+(\d+)\s*,\s*(\d+)/", $coords[0] .
" " . $coords[1], $matches)) {
325 $c =
"$matches[1],$matches[2]," . (
int) sqrt((($matches[3] - $matches[1]) * ($matches[3] - $matches[1])) + (($matches[4] - $matches[2]) * ($matches[4] - $matches[2])));
332 if (count($coords) == 0) {
333 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"polygon_click_starting_point"));
334 } elseif (count($coords) == 1) {
335 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"polygon_click_next_point"));
336 $preview->addPoint($preview->getAreaCount(), implode(
",", $coords),
true,
"blue");
337 } elseif (count($coords) > 1) {
338 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"polygon_click_next_or_save"));
340 $c = implode(
",", $coords);
345 $preview->addArea($preview->getAreaCount(), $shape,
$c, $_POST[
"shapetitle"] ??
'',
"",
"",
true,
"blue");
347 $preview->createPreview();
348 $imagepath = $this->
object->getImagePathWeb() . $preview->getPreviewFilename($this->
object->getImagePath(), $this->
object->getImageFilename()) .
"?img=" . time();
350 $editorTpl->setCurrentBlock(
"maparea");
351 $editorTpl->setVariable(
"IMAGE_SOURCE",
"$imagepath");
352 $editorTpl->setVariable(
"IMAGEMAP_NAME",
"image");
353 $editorTpl->parseCurrentBlock();
355 $editorTpl->setCurrentBlock(
"imagearea");
356 $editorTpl->setVariable(
"IMAGE_SOURCE",
"$imagepath");
357 $editorTpl->setVariable(
"ALT_IMAGE", $this->
lng->txt(
"imagemap"));
358 $editorTpl->parseCurrentBlock();
361 if (isset($_POST[
'shapetitle']) && $_POST[
'shapetitle'] !=
'') {
362 $editorTpl->setCurrentBlock(
"shapetitle");
363 $editorTpl->setVariable(
"VALUE_SHAPETITLE", $_POST[
"shapetitle"]);
364 $editorTpl->parseCurrentBlock();
367 $editorTpl->setVariable(
"TEXT_IMAGEMAP", $this->
lng->txt(
"imagemap"));
368 $editorTpl->setVariable(
"TEXT_SHAPETITLE", $this->
lng->txt(
"ass_imap_hint"));
369 $editorTpl->setVariable(
"CANCEL", $this->
lng->txt(
"cancel"));
370 $editorTpl->setVariable(
"SAVE", $this->
lng->txt(
"save"));
371 $editorTpl->setVariable(
"DISABLED_SAVE", $disabled_save);
374 $editorTpl->setVariable(
"FORMACTION", $this->
ctrl->getFormaction($this,
'addRect'));
377 $editorTpl->setVariable(
"FORMACTION", $this->
ctrl->getFormaction($this,
'addCircle'));
380 $editorTpl->setVariable(
"FORMACTION", $this->
ctrl->getFormaction($this,
'addPoly'));
384 $this->tpl->setVariable(
'QUESTION_DATA', $editorTpl->get());
389 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_cancel'),
true);
390 $this->
ctrl->redirect($this,
'editQuestion');
397 $info = $this->
object->getTestOutputSolutions($active_id, $pass);
400 if ($info[0][
'value1'] !==
"") {
401 $formAction .=
"&selImage=" . $info[0][
'value1'];
425 $graphicalOutput =
false,
426 $result_output =
false,
427 $show_question_only =
true,
428 $show_feedback =
false,
429 $show_correct_solution =
false,
430 $show_manual_scoring =
false,
431 $show_question_text =
true 433 $user_solutions = array();
436 if (($active_id > 0) && (!$show_correct_solution)) {
437 $user_solutions = $this->
object->getSolutionValues($active_id, $pass);
439 if (!$this->
object->getIsMultipleChoice()) {
442 foreach ($this->
object->answers as $index => $answer) {
443 if ($answer->getPoints() > $max_points) {
444 $max_points = $answer->getPoints();
445 $found_index = $index;
448 array_push($user_solutions, array(
"value1" => $found_index));
451 foreach ($this->
object->answers as $index => $answer) {
452 $points_checked = $answer->getPoints();
453 $points_unchecked = $answer->getPointsUnchecked();
454 if ($points_checked > $points_unchecked) {
455 if ($points_checked > 0) {
456 array_push($user_solutions, array(
"value1" => $index));
463 $show_inline_feedback =
false;
472 $show_correct_solution,
473 $show_manual_scoring,
476 $show_inline_feedback,
481 mixed $user_solutions,
484 bool $graphical_output =
false,
485 bool $result_output =
false,
486 bool $show_question_only =
true,
487 bool $show_feedback =
false,
488 bool $show_correct_solution =
false,
489 bool $show_manual_scoring =
false,
490 bool $show_question_text =
true,
491 bool $show_autosave_title =
false,
492 bool $show_inline_feedback =
false,
494 $imagepath = $this->
object->getImagePathWeb() . $this->
object->getImageFilename();
496 if (is_array($user_solutions)) {
498 foreach ($user_solutions as $idx => $solution_value) {
499 $value1 = $solution_value[
'value1'];
502 !isset($this->
object->answers[$value1])
508 $shape = $this->
object->answers[$value1];
513 $shape->getAnswertext(),
520 $solution_id = $value1;
522 $preview->createPreview();
523 $imagepath = implode(
'', [
524 $this->
object->getImagePathWeb(),
525 $preview->getPreviewFilename(
526 $this->
object->getImagePath(),
527 $this->
object->getImageFilename()
533 $template =
new ilTemplate(
"tpl.il_as_qpl_imagemap_question_output_solution.html",
true,
true,
"Modules/TestQuestionPool");
534 $solutiontemplate =
new ilTemplate(
"tpl.il_as_tst_solution_output.html",
true,
true,
"Modules/TestQuestionPool");
535 if ($show_question_text ==
true) {
536 $template->setVariable(
"QUESTIONTEXT", $this->
object->getQuestionForHTMLOutput());
540 $template->setVariable(
"IMG_ALT", $this->
lng->txt(
"imagemap"));
541 $template->setVariable(
"IMG_TITLE", $this->
lng->txt(
"imagemap"));
542 if (($active_id > 0) && (!$show_correct_solution)) {
543 if ($graphical_output) {
545 $reached_points = $this->
object->getReachedPoints($active_id, $pass);
546 if ($reached_points == $this->
object->getMaximumPoints()) {
550 if ($reached_points > 0) {
553 $template->setCurrentBlock(
"icon_ok");
554 $template->setVariable(
"ICON_OK", $correctness_icon);
555 $template->parseCurrentBlock();
559 if ($show_feedback) {
560 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
567 $template->setCurrentBlock(
"feedback");
568 $template->setVariable(
"FEEDBACK", $fb);
569 $template->parseCurrentBlock();
573 $questionoutput = $template->get();
575 if (strlen($feedback)) {
581 $solutiontemplate->setVariable(
"ILC_FB_CSS_CLASS", $cssClass);
584 $solutiontemplate->setVariable(
"SOLUTION_OUTPUT", $questionoutput);
586 $solutionoutput = $solutiontemplate->get();
587 if (!$show_question_only) {
591 return $solutionoutput;
594 public function getPreview($show_question_only =
false, $showInlineFeedback =
false): string
597 $user_solution = array();
600 $user_solution = array_values($this->
getPreviewSession()->getParticipantsSolution());
604 foreach ($user_solution as $idx => $solution_value) {
605 if ($solution_value !==
'') {
606 $preview->
addArea($solution_value, $this->
object->answers[$solution_value]->getArea(), $this->
object->answers[$solution_value]->getCoords(), $this->
object->answers[$solution_value]->getAnswertext(),
"",
"",
true,
$this->linecolor);
609 $preview->createPreview();
610 $imagepath = $this->
object->getImagePathWeb() . $preview->getPreviewFilename($this->
object->getImagePath(), $this->
object->getImageFilename());
612 $user_solution = array();
613 $imagepath = $this->
object->getImagePathWeb() . $this->
object->getImageFilename();
617 $template =
new ilTemplate(
"tpl.il_as_qpl_imagemap_question_output.html",
true,
true,
"Modules/TestQuestionPool");
625 foreach ($this->
object->answers as $answer_id => $answer) {
626 $parameter =
"&selImage=$answer_id";
627 if (is_array($user_solution) && in_array($answer_id, $user_solution)) {
628 $parameter =
"&remImage=$answer_id";
632 $template->setCurrentBlock(
"imagemap_area_href");
633 $template->setVariable(
"HREF_AREA", $hrefArea . $parameter);
634 $template->parseCurrentBlock();
637 $template->setCurrentBlock(
"imagemap_area");
638 $template->setVariable(
"SHAPE", $answer->getArea());
639 $template->setVariable(
"COORDS", $answer->getCoords());
642 $template->parseCurrentBlock();
644 $template->setVariable(
"QUESTIONTEXT", $this->
object->getQuestionForHTMLOutput());
646 $template->setVariable(
"IMG_ALT", $this->
lng->txt(
"imagemap"));
647 $template->setVariable(
"IMG_TITLE", $this->
lng->txt(
"imagemap"));
648 $questionoutput = $template->get();
649 if (!$show_question_only) {
653 return $questionoutput;
657 public function getTestOutput($active_id, $pass, $is_postponed =
false, $use_post_solutions =
false, $show_feedback =
false): string
661 $solutions = $this->
object->getTestOutputSolutions($active_id, $pass);
664 $userSelection = array();
669 foreach ($solutions as $idx => $solution_value) {
670 if ($solution_value[
'value1'] !== null) {
671 $preview->
addArea($solution_value[
'value1'], $this->
object->answers[$solution_value[
'value1']]->getArea(), $this->
object->answers[$solution_value[
'value1']]->getCoords(), $this->
object->answers[$solution_value[
'value1']]->getAnswertext(),
"",
"",
true,
$this->linecolor);
672 $userSelection[$selectionIndex] = $solution_value[
'value1'];
674 $selectionIndex = $this->
object->getIsMultipleChoice() ? ++$selectionIndex : $selectionIndex;
678 $preview->createPreview();
680 $imagepath = $this->
object->getImagePathWeb() . $preview->getPreviewFilename($this->
object->getImagePath(), $this->
object->getImageFilename());
682 $imagepath = $this->
object->getImagePathWeb() . $this->
object->getImageFilename();
686 $template =
new ilTemplate(
"tpl.il_as_qpl_imagemap_question_output.html",
true,
true,
"Modules/TestQuestionPool");
688 foreach ($this->
object->answers as $answer_id => $answer) {
689 $template->setCurrentBlock(
"imagemap_area");
690 $template->setVariable(
"HREF_AREA", $this->
buildAreaLinkTarget($userSelection, $answer_id));
691 $template->setVariable(
"SHAPE", $answer->getArea());
692 $template->setVariable(
"COORDS", $answer->getCoords());
695 $template->parseCurrentBlock();
696 if ($show_feedback) {
697 if (!$this->
object->getIsMultipleChoice() && count($userSelection) && current($userSelection) == $answer_id) {
698 $feedback = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
703 if ($feedback !==
'') {
704 $template->setCurrentBlock(
"feedback");
705 $template->setVariable(
"FEEDBACK", $feedback);
706 $template->parseCurrentBlock();
711 $template->setVariable(
"QUESTIONTEXT", $this->
object->getQuestionForHTMLOutput());
713 $template->setVariable(
"IMG_ALT", $this->
lng->txt(
"imagemap"));
714 $template->setVariable(
"IMG_TITLE", $this->
lng->txt(
"imagemap"));
715 $questionoutput = $template->get();
716 $pageoutput = $this->
outQuestionPage(
"", $is_postponed, $active_id, $questionoutput);
723 $href = $this->
ctrl->getLinkTargetByClass(
738 if ($this->
object->getTestPresentationConfig()->isSolutionInitiallyPrefilled()) {
739 $reuseSelection = array();
741 if ($areaIndex === null) {
742 $reuseSelection = $currentSelection;
743 } elseif ($this->
object->getIsMultipleChoice()) {
744 if (!in_array($areaIndex, $currentSelection)) {
745 $reuseSelection[] = $areaIndex;
748 foreach (array_diff($currentSelection, array($areaIndex)) as $otherSelectedArea) {
749 $reuseSelection[] = $otherSelectedArea;
752 $reuseSelection[] = $areaIndex;
756 $action =
'reuseSelection';
757 } elseif ($areaIndex !== null) {
758 if (!$this->
object->getIsMultipleChoice() || !in_array($areaIndex, $currentSelection)) {
759 $areaAction =
'selImage';
761 $areaAction =
'remImage';
764 $selection = $areaIndex;
765 $action = $areaAction;
770 return "{$action}={$selection}";
775 if (!$this->
object->feedbackOBJ->specificAnswerFeedbackExists()) {
779 $output =
'<table class="test_specific_feedback"><tbody>';
781 foreach ($this->
object->getAnswers() as $idx => $answer) {
782 $feedback = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
788 $output .=
"<tr><td>{$answer->getAnswerText()}</td><td>{$feedback}</td></tr>";
791 $output .=
'</tbody></table>';
826 $tpl =
new ilTemplate(
'tpl.il_as_aggregated_answers_table.html',
true,
true,
"Modules/TestQuestionPool");
836 foreach ($answeringFequencies as $answerIndex => $answeringFrequency) {
848 $answeringFequencies = array();
850 foreach ($existingAnswerOptions as $answerIndex => $answerOption) {
851 $answeringFequencies[$answerIndex] = 0;
854 foreach ($givenSolutionRows as $solutionRow) {
855 $answeringFequencies[$solutionRow[
'value1']]++;
858 return $answeringFequencies;
876 if (!count($this->
object->currentSolution)) {
881 $button = $DIC->ui()->factory()->link()->standard(
882 $this->
lng->txt(
'use_previous_solution'),
889 $tpl =
new ilTemplate(
'tpl.tst_question_additional_behaviour_checkbox.html',
true,
true,
'Modules/TestQuestionPool');
901 foreach ($this->
object->getAnswers() as $answerIndex => $ans) {
903 'answer' => $ans->getAnswerText(),
904 'frequency' => $agg[$answerIndex]
915 $image->setRequired(
true);
917 if (strlen($this->
object->getImageFilename())) {
918 $image->setImage($this->
object->getImagePathWeb() . $this->
object->getImageFilename());
919 $image->setValue($this->
object->getImageFilename());
920 $image->setAreas($this->
object->getAnswers());
921 $assessmentSetting =
new ilSetting(
"assessment");
923 $assessmentSetting->get(
"imap_line_color")
924 )) ?
"\"#" . $assessmentSetting->get(
"imap_line_color") .
"\"" :
"\"#FF0000\"";
926 $image->setImagePath($this->
object->getImagePath());
927 $image->setImagePathWeb($this->
object->getImagePathWeb());
939 foreach ($this->
object->getAnswers() as $index => $answer) {
940 if ($this->
object->getIsMultipleChoice()) {
941 $answer->setPointsUnchecked((
float) $areas[$index]->getPointsUnchecked());
944 $answer->setPoints((
float) $areas[$index]->getPoints());
isTestPresentationContext()
getTestOutput($active_id, $pass, $is_postponed=false, $use_post_solutions=false, $show_feedback=false)
getPreviousSolutionConfirmationCheckboxHtml()
hasCorrectSolution($activeId, $passIndex)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
saveCorrectionsFormProperties(ilPropertyFormGUI $form)
renderAggregateView($answeringFequencies)
completeTestOutputFormAction($formAction, $active_id, $pass)
populateQuestionSpecificFormPart(\ilPropertyFormGUI $form)
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
generateCorrectnessIconsForCorrectness(int $correctness)
setCurrentBlock(string $blockname=self::DEFAULT_BLOCK)
Sets the template to the given block.
saveShape()
Saves a shape of the area editor.
getAnswersFrequency($relevantAnswers, $questionIndex)
buildBasicEditFormObject()
addBasicQuestionFormProperties(ilPropertyFormGUI $form)
getAggregatedAnswersView(array $relevant_answers)
Returns an html string containing a question specific representation of the answers so far given in t...
parseCurrentBlock(string $blockname=self::DEFAULT_BLOCK)
Parses the given block.
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,)
populateAnswerSpecificFormPart(\ilPropertyFormGUI $form)
writePostData(bool $always=false)
{}
const CSS_CLASS_FEEDBACK_CORRECT
ilGlobalPageTemplate $tpl
getPreview($show_question_only=false, $showInlineFeedback=false)
buildAreaLinkTarget($currentSelection, $areaIndex)
populateTaxonomyFormSection(ilPropertyFormGUI $form)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static implodeKeyValues(array $keyValues)
addQuestionFormCommandButtons(ilPropertyFormGUI $form)
buildSelectionParameter($currentSelection, $areaIndex=null)
writeQuestionGenericPostData()
aggregateAnswers($givenSolutionRows, $existingAnswerOptions)
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
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)
Get the question solution output.
writeAnswerSpecificPostData(ilPropertyFormGUI $form)
Extracts the answer specific values from $_POST and applies them to the data object.
writeQuestionSpecificPostData(ilPropertyFormGUI $form)
Extracts the question specific values from $_POST and applies them to the data object.
const MODE_MULTIPLE_CHOICE
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const CSS_CLASS_FEEDBACK_WRONG
Basic GUI class for assessment questions.
getSpecificFeedbackOutput(array $userSolution)
saveTaxonomyAssignments()
getILIASPage(string $html="")
Returns the ILIAS Page around a question.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="", $inlineFeedbackEnabled=false)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static signFile(string $path_to_file)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAfterParticipationSuppressionQuestionPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
getAfterParticipationSuppressionAnswerPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
__construct($id=-1)
assImagemapQuestionGUI constructor
addArea( $index, $shape, $coords, $title="", $href="", $target="", $visible=true, $linecolor="red", $bordercolor="white", $fillcolor="#FFFFFFA0")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
populateCorrectionsFormProperties(ilPropertyFormGUI $form)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
editQuestion(ilPropertyFormGUI $form=null)
getGenericFeedbackOutput(int $active_id, ?int $pass)