4require_once
'./Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
5require_once
'./Modules/TestQuestionPool/interfaces/interface.ilGuiQuestionScoringAdjustable.php';
6require_once
'./Modules/TestQuestionPool/interfaces/interface.ilGuiAnswerScoringAdjustable.php';
7include_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
8require_once
'Services/WebAccessChecker/classes/class.ilWACSignedPath.php';
39 parent::__construct();
40 include_once
'./Modules/TestQuestionPool/classes/class.assImagemapQuestion.php';
44 $this->
object->loadFromDb($id);
46 $assessmentSetting =
new ilSetting(
"assessment");
47 $this->linecolor = (strlen($assessmentSetting->get(
"imap_line_color"))) ?
"#" . $assessmentSetting->get(
"imap_line_color") :
"#FF0000";
52 if (isset(
$_POST[
"imagemap"]) ||
53 isset(
$_POST[
"imagemap_x"]) ||
54 isset(
$_POST[
"imagemap_y"]))
56 $this->ctrl->setCmd(
"getCoords");
65 $this->
object->deleteImage();
66 $this->
object->saveToDb();
68 $this->ctrl->redirect($this,
'editQuestion');
77 $form->setValuesByPost();
79 if(!$always && !$form->checkInput())
95 if ($this->ctrl->getCmd() !=
'deleteImage')
97 $this->
object->flushAnswers();
98 if (is_array(
$_POST[
'image'][
'coords'][
'name'] ))
100 foreach (
$_POST[
'image'][
'coords'][
'name'] as $idx => $name)
102 if( $this->object->getIsMultipleChoice() && isset(
$_POST[
'image'][
'coords'][
'points_unchecked']) )
104 $pointsUnchecked =
$_POST[
'image'][
'coords'][
'points_unchecked'][$idx];
108 $pointsUnchecked = 0.0;
111 $this->
object->addAnswer(
113 $_POST[
'image'][
'coords'][
'points'][$idx],
115 $_POST[
'image'][
'coords'][
'coords'][$idx],
116 $_POST[
'image'][
'coords'][
'shape'][$idx],
122 if(strlen($_FILES[
'imagemapfile'][
'tmp_name']))
124 if($this->object->getSelfAssessmentEditingMode() && $this->object->getId() < 1)
126 $this->
object->createNewQuestion();
129 $this->
object->uploadImagemap($form->
getItemByPostVar(
'imagemapfile')->getShapes());
136 if ($this->ctrl->getCmd() !=
'deleteImage')
138 if (strlen( $_FILES[
'image'][
'tmp_name'] ) == 0)
140 $this->
object->setImageFilename(
$_POST[
"image_name"] );
143 if (strlen( $_FILES[
'image'][
'tmp_name'] ))
145 if ($this->object->getSelfAssessmentEditingMode() && $this->object->getId() < 1)
146 $this->
object->createNewQuestion();
147 $this->
object->setImageFilename( $_FILES[
'image'][
'name'], $_FILES[
'image'][
'tmp_name'] );
180 $this->tpl->addCss(
'Modules/Test/templates/default/ta.css');
182 $this->tpl->setVariable(
'QUESTION_DATA', $this->ctrl->getHTML($form));
194 $radioGroup =
new ilRadioGroupInputGUI($this->lng->txt(
'tst_imap_qst_mode' ),
'is_multiple_choice');
195 $radioGroup->setValue( $this->object->getIsMultipleChoice() );
196 $modeSingleChoice =
new ilRadioOption($this->lng->txt(
'tst_imap_qst_mode_sc'),
198 $modeMultipleChoice =
new ilRadioOption($this->lng->txt(
'tst_imap_qst_mode_mc'),
200 $radioGroup->addOption( $modeSingleChoice );
201 $radioGroup->addOption( $modeMultipleChoice );
204 require_once
'Modules/TestQuestionPool/classes/forms/class.ilImagemapFileInputGUI.php';
206 $image->setPointsUncheckedFieldEnabled( $this->object->getIsMultipleChoice() );
207 $image->setRequired(
true );
209 if (strlen( $this->object->getImageFilename() ))
211 $image->setImage( $this->object->getImagePathWeb() . $this->object->getImageFilename() );
212 $image->setValue( $this->object->getImageFilename() );
213 $image->setAreas( $this->object->getAnswers() );
214 $assessmentSetting =
new ilSetting(
"assessment");
215 $linecolor = (strlen( $assessmentSetting->get(
"imap_line_color" )
216 )) ?
"\"#" . $assessmentSetting->get(
"imap_line_color" ) .
"\"" :
"\"#FF0000\"";
218 $image->setImagePath( $this->object->getImagePath() );
219 $image->setImagePathWeb( $this->object->getImagePathWeb() );
223 require_once
'Modules/TestQuestionPool/classes/forms/class.ilHtmlImageMapFileInputGUI.php';
225 $imagemapfile->setRequired(
false);
258 if (preg_match(
"/(\d+)\s*,\s*(\d+)\s+(\d+)\s*,\s*(\d+)/",
$_POST[
'image'][
'mapcoords'][0] .
" " .
$_POST[
'image'][
'mapcoords'][1], $matches))
260 $coords =
"$matches[1],$matches[2]," . (int)sqrt((($matches[3]-$matches[1])*($matches[3]-$matches[1]))+(($matches[4]-$matches[2])*($matches[4]-$matches[2])));
269 $this->
object->addAnswer(
$_POST[
"shapetitle"], 0, count($this->object->getAnswers()),
$coords,
$_POST[
"shape"]);
270 $this->
object->saveToDb();
271 $this->ctrl->redirect($this,
'editQuestion');
276 $shape = (strlen($shape)) ? $shape :
$_POST[
'shape'];
277 include_once
"./Modules/TestQuestionPool/classes/class.ilImagemapPreview.php";
279 $this->tpl->addBlockFile(
"QUESTION_DATA",
"question_data",
"tpl.il_as_qpl_imagemap_question.html",
"Modules/TestQuestionPool");
281 if (is_array(
$_POST[
'image'][
'mapcoords']))
283 foreach (
$_POST[
'image'][
'mapcoords'] as $value)
288 if (is_array(
$_POST[
'cmd'][
'areaEditor'][
'image']))
290 array_push(
$coords,
$_POST[
'cmd'][
'areaEditor'][
'image'][0] .
"," .
$_POST[
'cmd'][
'areaEditor'][
'image'][1]);
294 $this->tpl->setCurrentBlock(
"hidden");
295 $this->tpl->setVariable(
"HIDDEN_NAME",
'image[mapcoords][]');
296 $this->tpl->setVariable(
"HIDDEN_VALUE", $value);
297 $this->tpl->parseCurrentBlock();
300 $this->tpl->setCurrentBlock(
"hidden");
301 $this->tpl->setVariable(
"HIDDEN_NAME",
'shape');
302 $this->tpl->setVariable(
"HIDDEN_VALUE", $shape);
303 $this->tpl->parseCurrentBlock();
306 foreach ($this->object->answers as $index => $answer)
308 $preview->addArea($index, $answer->getArea(), $answer->getCoords(), $answer->getAnswertext(),
"",
"",
true, $this->linecolor);
311 $disabled_save =
" disabled=\"disabled\"";
344 if (preg_match(
"/(\d+)\s*,\s*(\d+)\s+(\d+)\s*,\s*(\d+)/",
$coords[0] .
" " .
$coords[1], $matches))
346 $c =
"$matches[1],$matches[2]," . (int)sqrt((($matches[3]-$matches[1])*($matches[3]-$matches[1]))+(($matches[4]-$matches[2])*($matches[4]-$matches[2])));
375 $imagepath = $this->
object->getImagePathWeb() .
$preview->getPreviewFilename($this->object->getImagePath(), $this->object->getImageFilename()) .
"?img=" . time();
378 $this->tpl->setCurrentBlock(
"maparea");
379 $this->tpl->setVariable(
"IMAGE_SOURCE",
"$imagepath");
380 $this->tpl->setVariable(
"IMAGEMAP_NAME",
"image");
381 $this->tpl->parseCurrentBlock();
385 $this->tpl->setCurrentBlock(
"imagearea");
386 $this->tpl->setVariable(
"IMAGE_SOURCE",
"$imagepath");
387 $this->tpl->setVariable(
"ALT_IMAGE", $this->lng->txt(
"imagemap"));
388 $this->tpl->parseCurrentBlock();
391 if (strlen(
$_POST[
'shapetitle']))
393 $this->tpl->setCurrentBlock(
"shapetitle");
394 $this->tpl->setVariable(
"VALUE_SHAPETITLE",
$_POST[
"shapetitle"]);
395 $this->tpl->parseCurrentBlock();
398 $this->tpl->setVariable(
"TEXT_IMAGEMAP", $this->lng->txt(
"imagemap"));
399 $this->tpl->setVariable(
"TEXT_SHAPETITLE", $this->lng->txt(
"ass_imap_hint"));
400 $this->tpl->setVariable(
"CANCEL", $this->lng->txt(
"cancel"));
401 $this->tpl->setVariable(
"SAVE", $this->lng->txt(
"save"));
402 $this->tpl->setVariable(
"DISABLED_SAVE", $disabled_save);
406 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this,
'addRect'));
409 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this,
'addCircle'));
412 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this,
'addPoly'));
420 $this->ctrl->redirect($this,
'editQuestion');
427 #require_once './Modules/Test/classes/class.ilObjTest.php';
428 #if (!ilObjTest::_getUsePreviousAnswers($active_id, true))
430 # $pass = ilObjTest::_getPass($active_id);
431 # $info = $this->object->getUserSolutionPreferingIntermediate($active_id, $pass);
435 # $info = $this->object->getUserSolutionPreferingIntermediate($active_id, NULL);
438 $info = $this->
object->getTestOutputSolutions($active_id,
$pass);
442 if (strcmp(
$info[0][
"value1"],
"") != 0)
444 $formAction .=
"&selImage=" .
$info[0][
"value1"];
469 $graphicalOutput = FALSE,
470 $result_output = FALSE,
471 $show_question_only = TRUE,
472 $show_feedback = FALSE,
473 $show_correct_solution = FALSE,
474 $show_manual_scoring = FALSE,
475 $show_question_text = TRUE
478 $imagepath = $this->
object->getImagePathWeb() . $this->
object->getImageFilename();
479 $solutions = array();
480 if (($active_id > 0) && (!$show_correct_solution))
482 include_once
"./Modules/Test/classes/class.ilObjTest.php";
487 $solutions =& $this->
object->getSolutionValues($active_id,
$pass);
491 if(!$this->object->getIsMultipleChoice())
495 foreach ($this->object->answers as $index => $answer)
497 if ($answer->getPoints() > $max_points)
499 $max_points = $answer->getPoints();
500 $found_index = $index;
503 array_push($solutions, array(
"value1" => $found_index));
508 foreach($this->object->answers as $index => $answer)
510 $points_checked = $answer->getPoints();
511 $points_unchecked = $answer->getPointsUnchecked();
512 if($points_checked > $points_unchecked)
514 if($points_checked > 0)
516 array_push($solutions, array(
"value1" => $index));
523 if (is_array($solutions))
525 include_once
"./Modules/TestQuestionPool/classes/class.ilImagemapPreview.php";
527 foreach ($solutions as $idx => $solution_value)
529 if (strcmp($solution_value[
"value1"],
"") != 0)
531 $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);
532 $solution_id = $solution_value[
"value1"];
536 $imagepath = $this->
object->getImagePathWeb() .
$preview->getPreviewFilename($this->object->getImagePath(), $this->object->getImageFilename());
540 include_once
"./Services/UICore/classes/class.ilTemplate.php";
541 $template =
new ilTemplate(
"tpl.il_as_qpl_imagemap_question_output_solution.html", TRUE, TRUE,
"Modules/TestQuestionPool");
542 $solutiontemplate =
new ilTemplate(
"tpl.il_as_tst_solution_output.html",TRUE, TRUE,
"Modules/TestQuestionPool");
543 $questiontext = $this->
object->getQuestion();
544 if ($show_question_text==
true)
546 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
550 $template->setVariable(
"IMG_ALT", $this->lng->txt(
"imagemap"));
551 $template->setVariable(
"IMG_TITLE", $this->lng->txt(
"imagemap"));
552 if (($active_id > 0) && (!$show_correct_solution))
554 if ($graphicalOutput)
557 $reached_points = $this->
object->getReachedPoints($active_id,
$pass);
558 if ($reached_points == $this->object->getMaximumPoints())
560 $template->setCurrentBlock(
"icon_ok");
562 $template->setVariable(
"TEXT_OK", $this->lng->txt(
"answer_is_right"));
563 $template->parseCurrentBlock();
567 $template->setCurrentBlock(
"icon_ok");
568 if ($reached_points > 0)
571 $template->setVariable(
"TEXT_NOT_OK", $this->lng->txt(
"answer_is_not_correct_but_positive"));
576 $template->setVariable(
"TEXT_NOT_OK", $this->lng->txt(
"answer_is_wrong"));
578 $template->parseCurrentBlock();
585 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
586 $this->object->getId(), $solution_id
591 $template->setCurrentBlock(
"feedback");
592 $template->setVariable(
"FEEDBACK", $fb);
593 $template->parseCurrentBlock();
597 $questionoutput = $template->get();
599 if (strlen($feedback))
605 $solutiontemplate->setVariable(
"ILC_FB_CSS_CLASS", $cssClass);
606 $solutiontemplate->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput( $feedback,
true ));
608 $solutiontemplate->setVariable(
"SOLUTION_OUTPUT", $questionoutput);
610 $solutionoutput = $solutiontemplate->get();
611 if (!$show_question_only)
616 return $solutionoutput;
619 function getPreview($show_question_only = FALSE, $showInlineFeedback =
false)
623 $user_solution = array();
627 $user_solution = array_values($this->
getPreviewSession()->getParticipantsSolution());
630 include_once
"./Modules/TestQuestionPool/classes/class.ilImagemapPreview.php";
632 foreach ($user_solution as $idx => $solution_value)
634 if (strcmp($solution_value,
"") != 0)
636 $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);
640 $imagepath = $this->
object->getImagePathWeb() .
$preview->getPreviewFilename($this->object->getImagePath(), $this->object->getImageFilename());
644 $user_solution = array();
645 $imagepath = $this->
object->getImagePathWeb() . $this->
object->getImageFilename();
649 include_once
"./Services/UICore/classes/class.ilTemplate.php";
650 $template =
new ilTemplate(
"tpl.il_as_qpl_imagemap_question_output.html", TRUE, TRUE,
"Modules/TestQuestionPool");
661 foreach ($this->object->answers as $answer_id => $answer)
663 $parameter =
"&selImage=$answer_id";
664 if(is_array($user_solution) && in_array($answer_id, $user_solution))
666 $parameter =
"&remImage=$answer_id";
671 $template->setCurrentBlock(
"imagemap_area_href");
672 $template->setVariable(
"HREF_AREA", $hrefArea . $parameter);
673 $template->parseCurrentBlock();
676 $template->setCurrentBlock(
"imagemap_area");
677 $template->setVariable(
"SHAPE", $answer->getArea());
678 $template->setVariable(
"COORDS", $answer->getCoords());
681 $template->parseCurrentBlock();
683 $questiontext = $this->
object->getQuestion();
684 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
686 $template->setVariable(
"IMG_ALT", $this->lng->txt(
"imagemap"));
687 $template->setVariable(
"IMG_TITLE", $this->lng->txt(
"imagemap"));
688 $questionoutput = $template->get();
689 if (!$show_question_only)
694 return $questionoutput;
698 function getTestOutput($active_id,
$pass, $is_postponed = FALSE, $use_post_solutions = FALSE, $show_feedback = FALSE)
705 #include_once "./Modules/Test/classes/class.ilObjTest.php";
706 #if (!ilObjTest::_getUsePreviousAnswers($active_id, true))
708 # if (is_null($pass)) $pass = ilObjTest::_getPass($active_id);
710 $solutions = $this->
object->getTestOutputSolutions($active_id,
$pass);
713 $userSelection = array();
716 include_once
"./Modules/TestQuestionPool/classes/class.ilImagemapPreview.php";
719 foreach( $solutions as $idx => $solution_value )
721 if( strlen($solution_value[
"value1"]) )
723 $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);
724 $userSelection[$selectionIndex] = $solution_value[
"value1"];
726 $selectionIndex = $this->
object->getIsMultipleChoice() ? ++$selectionIndex : $selectionIndex;
732 $imagepath = $this->
object->getImagePathWeb().$preview->getPreviewFilename($this->object->getImagePath(), $this->object->getImageFilename());
736 $imagepath = $this->
object->getImagePathWeb().$this->object->getImageFilename();
740 include_once
"./Services/UICore/classes/class.ilTemplate.php";
741 $template =
new ilTemplate(
"tpl.il_as_qpl_imagemap_question_output.html", TRUE, TRUE,
"Modules/TestQuestionPool");
742 $this->ctrl->setParameterByClass($this->
getTargetGuiClass(),
"formtimestamp", time());
744 foreach ($this->object->answers as $answer_id => $answer)
746 $template->setCurrentBlock(
"imagemap_area");
747 $template->setVariable(
"HREF_AREA", $this->
buildAreaLinkTarget($userSelection, $answer_id));
748 $template->setVariable(
"SHAPE", $answer->getArea());
749 $template->setVariable(
"COORDS", $answer->getCoords());
752 $template->parseCurrentBlock();
755 if(!$this->object->getIsMultipleChoice() && count($userSelection) && current($userSelection) == $answer_id)
757 $feedback = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
758 $this->object->getId(), $answer_id
760 if (strlen($feedback))
762 $template->setCurrentBlock(
"feedback");
763 $template->setVariable(
"FEEDBACK", $feedback);
764 $template->parseCurrentBlock();
769 $questiontext = $this->
object->getQuestion();
770 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
772 $template->setVariable(
"IMG_ALT", $this->lng->txt(
"imagemap"));
773 $template->setVariable(
"IMG_TITLE", $this->lng->txt(
"imagemap"));
774 $questionoutput = $template->get();
775 $pageoutput = $this->
outQuestionPage(
"", $is_postponed, $active_id, $questionoutput);
782 $href = $this->ctrl->getLinkTargetByClass(
795 if( $this->object->getTestPresentationConfig()->isSolutionInitiallyPrefilled() )
797 $reuseSelection = array();
799 if( $areaIndex ===
null )
801 $reuseSelection = $currentSelection;
803 elseif( $this->object->getIsMultipleChoice() )
805 if( !in_array($areaIndex, $currentSelection) )
807 $reuseSelection[] = $areaIndex;
810 foreach(array_diff($currentSelection, array($areaIndex)) as $otherSelectedArea)
812 $reuseSelection[] = $otherSelectedArea;
817 $reuseSelection[] = $areaIndex;
821 $action =
'reuseSelection';
823 elseif( $areaIndex !==
null )
825 if( !$this->object->getIsMultipleChoice() || !in_array($areaIndex, $currentSelection) )
827 $areaAction =
'selImage';
831 $areaAction =
'remImage';
834 $selection = $areaIndex;
835 $action = $areaAction;
842 return "{$action}={$selection}";
855 global $rbacsystem, $ilTabs;
857 $ilTabs->clearTargets();
859 $this->ctrl->setParameterByClass(
"ilAssQuestionPageGUI",
"q_id",
$_GET[
"q_id"]);
860 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
861 $q_type = $this->
object->getQuestionType();
865 $classname = $q_type .
"GUI";
866 $this->ctrl->setParameterByClass(strtolower($classname),
"sel_question_types", $q_type);
867 $this->ctrl->setParameterByClass(strtolower($classname),
"q_id",
$_GET[
"q_id"]);
872 if ($rbacsystem->checkAccess(
'write',
$_GET[
"ref_id"]))
875 $ilTabs->addTarget(
"edit_page",
876 $this->ctrl->getLinkTargetByClass(
"ilAssQuestionPageGUI",
"edit"),
877 array(
"edit",
"insert",
"exec_pg"),
878 "",
"", $force_active);
884 $force_active =
false;
885 if ($rbacsystem->checkAccess(
'write',
$_GET[
"ref_id"]))
888 if ($classname)
$url = $this->ctrl->getLinkTargetByClass($classname,
"editQuestion");
889 if (array_key_exists(
"imagemap_x",
$_POST))
891 $force_active =
true;
894 $ilTabs->addTarget(
"edit_question",
896 array(
"editQuestion",
"save",
"addArea",
"addRect",
"addCircle",
"addPoly",
897 "uploadingImage",
"uploadingImagemap",
"areaEditor",
898 "saveShape",
"saveEdit",
"originalSyncForm"),
899 $classname,
"", $force_active);
914 $ilTabs->addTarget(
"statistics",
915 $this->ctrl->getLinkTargetByClass($classname,
"assessment"),
925 if( !$this->object->feedbackOBJ->specificAnswerFeedbackExists(array_values($this->object->getAnswers())) )
930 $output =
'<table class="test_specific_feedback"><tbody>';
932 foreach($this->object->getAnswers() as $idx => $answer)
934 $feedback = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
935 $this->object->getId(), $idx
938 $output .=
"<tr><td>{$answer->getAnswerText()}</td><td>{$feedback}</td></tr>";
943 return $this->
object->prepareTextareaOutput(
$output, TRUE);
976 $tpl =
new ilTemplate(
'tpl.il_as_aggregated_answers_table.html',
true,
true,
"Modules/TestQuestionPool");
978 $tpl->setCurrentBlock(
'headercell');
979 $tpl->setVariable(
'HEADER', $this->lng->txt(
'tst_answer_aggr_answer_header'));
980 $tpl->parseCurrentBlock();
982 $tpl->setCurrentBlock(
'headercell');
983 $tpl->setVariable(
'HEADER', $this->lng->txt(
'tst_answer_aggr_frequency_header'));
984 $tpl->parseCurrentBlock();
986 foreach($answeringFequencies as $answerIndex => $answeringFrequency)
988 $tpl->setCurrentBlock(
'aggregaterow');
989 $tpl->setVariable(
'OPTION', $this->object->getAnswer($answerIndex)->getAnswerText());
990 $tpl->setVariable(
'COUNT', $answeringFrequency);
991 $tpl->parseCurrentBlock();
999 $answeringFequencies = array();
1001 foreach($existingAnswerOptions as $answerIndex => $answerOption)
1003 $answeringFequencies[$answerIndex] = 0;
1006 foreach($givenSolutionRows as $solutionRow)
1008 $answeringFequencies[$solutionRow[
'value1']]++;
1011 return $answeringFequencies;
1031 if( !count($this->object->currentSolution) )
1037 $button->setCaption(
'use_previous_solution');
1040 $this->ctrl->getLinkTargetByClass($this->getTargetGuiClass(), $this->getQuestionActionCmd()),
1041 $this->buildSelectionParameter($this->object->currentSolution,
null)
1044 $tpl =
new ilTemplate(
'tpl.tst_question_additional_behaviour_checkbox.html',
true,
true,
'Modules/TestQuestionPool');
1045 $tpl->setVariable(
'BUTTON', $button->render());
An exception for terminatinating execution or to throw for unit testing.
Image map question GUI representation.
getTestOutput($active_id, $pass, $is_postponed=FALSE, $use_post_solutions=FALSE, $show_feedback=FALSE)
editQuestion(ilPropertyFormGUI $form=null)
populateQuestionSpecificFormPart(\ilPropertyFormGUI $form)
getSpecificFeedbackOutput($active_id, $pass)
Returns the answer specific feedback for the question.
getPreviousSolutionConfirmationCheckboxHtml()
saveShape()
Saves a shape of the area editor.
getAfterParticipationSuppressionAnswerPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
aggregateAnswers($givenSolutionRows, $existingAnswerOptions)
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.
buildSelectionParameter($currentSelection, $areaIndex=null)
populateAnswerSpecificFormPart(\ilPropertyFormGUI $form)
writeAnswerSpecificPostData(ilPropertyFormGUI $form)
Extracts the answer specific values from $_POST and applies them to the data object.
setQuestionTabs()
Sets the ILIAS tabs for this question type.
buildAreaLinkTarget($currentSelection, $areaIndex)
renderAggregateView($answeringFequencies)
__construct($id=-1)
assImagemapQuestionGUI constructor
writePostData($always=false)
{Evaluates a posted edit form and writes the form data in the question object.integer A positive valu...
getAfterParticipationSuppressionQuestionPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
completeTestOutputFormAction($formAction, $active_id, $pass)
getPreview($show_question_only=FALSE, $showInlineFeedback=false)
getAggregatedAnswersView($relevant_answers)
Returns an html string containing a question specific representation of the answers so far given in t...
writeQuestionSpecificPostData(ilPropertyFormGUI $form)
Extracts the question specific values from $_POST and applies them to the data object.
Class for image map questions.
const MODE_MULTIPLE_CHOICE
Basic GUI class for assessment questions.
populateTaxonomyFormSection(ilPropertyFormGUI $form)
addTab_QuestionHints(ilTabsGUI $tabs)
adds the hints tab to ilTabsGUI
writeQuestionGenericPostData()
addQuestionFormCommandButtons($form)
Add the command buttons of a question properties form.
getILIASPage($html="")
Returns the ILIAS Page around a question.
getQuestionTemplate()
get question template
addTab_SuggestedSolution(ilTabsGUI $tabs, $classname)
saveTaxonomyAssignments()
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="")
output question page
buildBasicEditFormObject()
addBackTab(ilTabsGUI $ilTabs)
isTestPresentationContext()
hasCorrectSolution($activeId, $passIndex)
addTab_QuestionFeedback(ilTabsGUI $tabs)
adds the feedback tab to ilTabsGUI
addBasicQuestionFormProperties($form)
Add basic question form properties: assessment: title, author, description, question,...
addTab_QuestionPreview(ilTabsGUI $tabsGUI)
getAnswerFeedbackOutput($active_id, $pass)
Returns the answer generic feedback depending on the results of the question.
static implodeKeyValues($keyValues)
const CSS_CLASS_FEEDBACK_WRONG
const CSS_CLASS_FEEDBACK_CORRECT
Image map image preview creator.
static _getUsePreviousAnswers($active_id, $user_active_user_setting=false)
Returns if the previous results should be hidden for a learner.
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
This class represents an option in a radio group.
special template class to simplify handling of ITX/PEAR
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
static signFile($path_to_file)
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output
Interface ilGuiAnswerScoringAdjustable.
Interface ilGuiQuestionScoringAdjustable.