4 require_once
'./Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
5 require_once
'./Modules/TestQuestionPool/interfaces/interface.ilGuiQuestionScoringAdjustable.php';
6 require_once
'./Modules/TestQuestionPool/interfaces/interface.ilGuiAnswerScoringAdjustable.php';
7 include_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
8 require_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");
66 $this->
object->saveToDb();
67 $this->ctrl->redirect($this,
'editQuestion');
79 $hasErrors = (!$always) ? $this->
editQuestion(
true) :
false;
82 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
94 if ($this->ctrl->getCmd() !=
'deleteImage')
96 $this->
object->flushAnswers();
97 if (is_array(
$_POST[
'image'][
'coords'][
'name'] ))
99 foreach (
$_POST[
'image'][
'coords'][
'name'] as $idx => $name)
101 if( $this->object->getIsMultipleChoice() && isset(
$_POST[
'image'][
'coords'][
'points_unchecked']) )
103 $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],
120 if (strlen( $_FILES[
'imagemapfile'][
'tmp_name'] ))
122 if ($this->object->getSelfAssessmentEditingMode() && $this->
object->getId() < 1)
123 $this->object->createNewQuestion();
124 $this->
object->uploadImagemap( $_FILES[
'imagemapfile'][
'tmp_name'] );
131 if ($this->ctrl->getCmd() ==
'deleteImage')
133 $this->
object->deleteImage();
137 if (strlen( $_FILES[
'image'][
'tmp_name'] ) == 0)
139 $this->
object->setImageFilename(
$_POST[
"image_name"] );
142 if (strlen( $_FILES[
'image'][
'tmp_name'] ))
144 if ($this->object->getSelfAssessmentEditingMode() && $this->
object->getId() < 1)
145 $this->object->createNewQuestion();
146 $this->
object->setImageFilename( $_FILES[
'image'][
'name'], $_FILES[
'image'][
'tmp_name'] );
157 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
159 $form->setFormAction($this->ctrl->getFormAction($this));
161 $form->setMultipart(TRUE);
162 $form->setTableWidth(
"100%");
163 $form->setId(
"assimagemap");
175 $form->setValuesByPost();
176 $errors = !$form->checkInput();
177 $form->setValuesByPost();
179 if (
$errors) $checkonly =
false;
182 if (!$checkonly) $this->tpl->setVariable(
"QUESTION_DATA", $form->getHTML());
196 $radioGroup =
new ilRadioGroupInputGUI($this->lng->txt(
'tst_imap_qst_mode' ),
'is_multiple_choice');
197 $radioGroup->
setValue( $this->object->getIsMultipleChoice() );
198 $modeSingleChoice =
new ilRadioOption($this->lng->txt(
'tst_imap_qst_mode_sc'),
200 $modeMultipleChoice =
new ilRadioOption($this->lng->txt(
'tst_imap_qst_mode_mc'),
202 $radioGroup->addOption( $modeSingleChoice );
203 $radioGroup->addOption( $modeMultipleChoice );
207 include_once
"./Modules/TestQuestionPool/classes/class.ilImagemapFileInputGUI.php";
210 $image->setRequired(
true );
212 if (strlen( $this->object->getImageFilename() ))
214 $image->setImage( $this->object->getImagePathWeb() . $this->
object->getImageFilename() );
215 $image->setValue( $this->object->getImageFilename() );
216 $image->setAreas( $this->object->getAnswers() );
217 $assessmentSetting =
new ilSetting(
"assessment");
218 $linecolor = (strlen( $assessmentSetting->get(
"imap_line_color" )
219 )) ?
"\"#" . $assessmentSetting->get(
"imap_line_color" ) .
"\"" :
"\"#FF0000\"";
221 $image->setImagePath( $this->object->getImagePath() );
222 $image->setImagePathWeb( $this->object->getImagePathWeb() );
227 $imagemapfile =
new ilFileInputGUI($this->lng->txt(
'add_imagemap' ),
'imagemapfile');
229 $form->
addItem( $imagemapfile );
261 if (preg_match(
"/(\d+)\s*,\s*(\d+)\s+(\d+)\s*,\s*(\d+)/",
$_POST[
'image'][
'mapcoords'][0] .
" " .
$_POST[
'image'][
'mapcoords'][1], $matches))
263 $coords =
"$matches[1],$matches[2]," . (int)sqrt((($matches[3]-$matches[1])*($matches[3]-$matches[1]))+(($matches[4]-$matches[2])*($matches[4]-$matches[2])));
268 $coords = join($_POST[
'image'][
'mapcoords'],
",");
272 $this->
object->addAnswer(
$_POST[
"shapetitle"], 0, count($this->object->getAnswers()),
$coords,
$_POST[
"shape"]);
273 $this->
object->saveToDb();
274 $this->ctrl->redirect($this,
'editQuestion');
279 $shape = (strlen($shape)) ? $shape :
$_POST[
'shape'];
280 include_once
"./Modules/TestQuestionPool/classes/class.ilImagemapPreview.php";
282 $this->tpl->addBlockFile(
"QUESTION_DATA",
"question_data",
"tpl.il_as_qpl_imagemap_question.html",
"Modules/TestQuestionPool");
284 if (is_array(
$_POST[
'image'][
'mapcoords']))
286 foreach (
$_POST[
'image'][
'mapcoords'] as $value)
291 if (is_array(
$_POST[
'cmd'][
'areaEditor'][
'image']))
293 array_push(
$coords,
$_POST[
'cmd'][
'areaEditor'][
'image'][0] .
"," .
$_POST[
'cmd'][
'areaEditor'][
'image'][1]);
297 $this->tpl->setCurrentBlock(
"hidden");
298 $this->tpl->setVariable(
"HIDDEN_NAME",
'image[mapcoords][]');
299 $this->tpl->setVariable(
"HIDDEN_VALUE", $value);
300 $this->tpl->parseCurrentBlock();
303 $this->tpl->setCurrentBlock(
"hidden");
304 $this->tpl->setVariable(
"HIDDEN_NAME",
'shape');
305 $this->tpl->setVariable(
"HIDDEN_VALUE", $shape);
306 $this->tpl->parseCurrentBlock();
309 foreach ($this->object->answers as $index => $answer)
311 $preview->addArea($index, $answer->getArea(), $answer->getCoords(), $answer->getAnswertext(),
"",
"",
true,
$this->linecolor);
314 $disabled_save =
" disabled=\"disabled\"";
347 if (preg_match(
"/(\d+)\s*,\s*(\d+)\s+(\d+)\s*,\s*(\d+)/",
$coords[0] .
" " .
$coords[1], $matches))
349 $c =
"$matches[1],$matches[2]," . (int)sqrt((($matches[3]-$matches[1])*($matches[3]-$matches[1]))+(($matches[4]-$matches[2])*($matches[4]-$matches[2])));
378 $imagepath = $this->
object->getImagePathWeb() .
$preview->getPreviewFilename($this->object->getImagePath(), $this->
object->getImageFilename()) .
"?img=" . time();
381 $this->tpl->setCurrentBlock(
"maparea");
382 $this->tpl->setVariable(
"IMAGE_SOURCE",
"$imagepath");
383 $this->tpl->setVariable(
"IMAGEMAP_NAME",
"image");
384 $this->tpl->parseCurrentBlock();
388 $this->tpl->setCurrentBlock(
"imagearea");
389 $this->tpl->setVariable(
"IMAGE_SOURCE",
"$imagepath");
390 $this->tpl->setVariable(
"ALT_IMAGE", $this->lng->txt(
"imagemap"));
391 $this->tpl->parseCurrentBlock();
394 if (strlen(
$_POST[
'shapetitle']))
396 $this->tpl->setCurrentBlock(
"shapetitle");
397 $this->tpl->setVariable(
"VALUE_SHAPETITLE",
$_POST[
"shapetitle"]);
398 $this->tpl->parseCurrentBlock();
401 $this->tpl->setVariable(
"TEXT_IMAGEMAP", $this->lng->txt(
"imagemap"));
402 $this->tpl->setVariable(
"TEXT_SHAPETITLE", $this->lng->txt(
"ass_imap_hint"));
403 $this->tpl->setVariable(
"CANCEL", $this->lng->txt(
"cancel"));
404 $this->tpl->setVariable(
"SAVE", $this->lng->txt(
"save"));
405 $this->tpl->setVariable(
"DISABLED_SAVE", $disabled_save);
409 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this,
'addRect'));
412 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this,
'addCircle'));
415 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this,
'addPoly'));
423 $position = key(
$_POST[
'cmd'][
'removeArea'][
'image']);
424 $this->
object->deleteArea($position);
431 $this->ctrl->redirect($this,
'editQuestion');
438 #require_once './Modules/Test/classes/class.ilObjTest.php'; 439 #if (!ilObjTest::_getUsePreviousAnswers($active_id, true)) 441 # $pass = ilObjTest::_getPass($active_id); 442 # $info = $this->object->getUserSolutionPreferingIntermediate($active_id, $pass); 446 # $info = $this->object->getUserSolutionPreferingIntermediate($active_id, NULL); 453 if (strcmp(
$info[0][
"value1"],
"") != 0)
455 $formAction .=
"&selImage=" .
$info[0][
"value1"];
480 $graphicalOutput = FALSE,
481 $result_output = FALSE,
482 $show_question_only = TRUE,
483 $show_feedback = FALSE,
484 $show_correct_solution = FALSE,
485 $show_manual_scoring = FALSE,
486 $show_question_text = TRUE
489 $imagepath = $this->
object->getImagePathWeb() . $this->
object->getImageFilename();
490 $solutions = array();
491 if (($active_id > 0) && (!$show_correct_solution))
493 include_once
"./Modules/Test/classes/class.ilObjTest.php";
498 $solutions =& $this->
object->getSolutionValues($active_id,
$pass);
502 if(!$this->object->getIsMultipleChoice())
506 foreach ($this->object->answers as $index => $answer)
508 if ($answer->getPoints() > $max_points)
510 $max_points = $answer->getPoints();
511 $found_index = $index;
514 array_push($solutions, array(
"value1" => $found_index));
519 foreach($this->object->answers as $index => $answer)
521 $points_checked = $answer->getPoints();
522 $points_unchecked = $answer->getPointsUnchecked();
523 if($points_checked > $points_unchecked)
525 if($points_checked > 0)
527 array_push($solutions, array(
"value1" => $index));
534 if (is_array($solutions))
536 include_once
"./Modules/TestQuestionPool/classes/class.ilImagemapPreview.php";
538 foreach ($solutions as $idx => $solution_value)
540 if (strcmp($solution_value[
"value1"],
"") != 0)
542 $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);
543 $solution_id = $solution_value[
"value1"];
547 $imagepath = $this->
object->getImagePathWeb() .
$preview->getPreviewFilename($this->object->getImagePath(), $this->
object->getImageFilename());
551 include_once
"./Services/UICore/classes/class.ilTemplate.php";
552 $template =
new ilTemplate(
"tpl.il_as_qpl_imagemap_question_output_solution.html", TRUE, TRUE,
"Modules/TestQuestionPool");
553 $solutiontemplate =
new ilTemplate(
"tpl.il_as_tst_solution_output.html",TRUE, TRUE,
"Modules/TestQuestionPool");
554 $questiontext = $this->
object->getQuestion();
555 if ($show_question_text==
true)
557 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
561 $template->setVariable(
"IMG_ALT", $this->lng->txt(
"imagemap"));
562 $template->setVariable(
"IMG_TITLE", $this->lng->txt(
"imagemap"));
563 if (($active_id > 0) && (!$show_correct_solution))
565 if ($graphicalOutput)
568 $reached_points = $this->
object->getReachedPoints($active_id,
$pass);
569 if ($reached_points == $this->object->getMaximumPoints())
571 $template->setCurrentBlock(
"icon_ok");
573 $template->setVariable(
"TEXT_OK", $this->lng->txt(
"answer_is_right"));
574 $template->parseCurrentBlock();
578 $template->setCurrentBlock(
"icon_ok");
579 if ($reached_points > 0)
582 $template->setVariable(
"TEXT_NOT_OK", $this->lng->txt(
"answer_is_not_correct_but_positive"));
587 $template->setVariable(
"TEXT_NOT_OK", $this->lng->txt(
"answer_is_wrong"));
589 $template->parseCurrentBlock();
596 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
597 $this->object->getId(), $solution_id
602 $template->setCurrentBlock(
"feedback");
603 $template->setVariable(
"FEEDBACK", $fb);
604 $template->parseCurrentBlock();
608 $questionoutput = $template->get();
610 if (strlen($feedback))
616 $solutiontemplate->setVariable(
"ILC_FB_CSS_CLASS", $cssClass);
617 $solutiontemplate->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput( $feedback,
true ));
619 $solutiontemplate->setVariable(
"SOLUTION_OUTPUT", $questionoutput);
621 $solutionoutput = $solutiontemplate->get();
622 if (!$show_question_only)
627 return $solutionoutput;
630 function getPreview($show_question_only = FALSE, $showInlineFeedback =
false)
634 $user_solution = array();
638 $user_solution = array_values($this->
getPreviewSession()->getParticipantsSolution());
641 include_once
"./Modules/TestQuestionPool/classes/class.ilImagemapPreview.php";
643 foreach ($user_solution as $idx => $solution_value)
645 if (strcmp($solution_value,
"") != 0)
647 $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);
651 $imagepath = $this->
object->getImagePathWeb() .
$preview->getPreviewFilename($this->object->getImagePath(), $this->
object->getImageFilename());
655 $user_solution = array();
656 $imagepath = $this->
object->getImagePathWeb() . $this->
object->getImageFilename();
660 include_once
"./Services/UICore/classes/class.ilTemplate.php";
661 $template =
new ilTemplate(
"tpl.il_as_qpl_imagemap_question_output.html", TRUE, TRUE,
"Modules/TestQuestionPool");
672 foreach ($this->object->answers as $answer_id => $answer)
674 $parameter =
"&selImage=$answer_id";
675 if(is_array($user_solution) && in_array($answer_id, $user_solution))
677 $parameter =
"&remImage=$answer_id";
682 $template->setCurrentBlock(
"imagemap_area_href");
683 $template->setVariable(
"HREF_AREA", $hrefArea . $parameter);
684 $template->parseCurrentBlock();
687 $template->setCurrentBlock(
"imagemap_area");
688 $template->setVariable(
"SHAPE", $answer->getArea());
689 $template->setVariable(
"COORDS", $answer->getCoords());
692 $template->parseCurrentBlock();
694 $questiontext = $this->
object->getQuestion();
695 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
697 $template->setVariable(
"IMG_ALT", $this->lng->txt(
"imagemap"));
698 $template->setVariable(
"IMG_TITLE", $this->lng->txt(
"imagemap"));
699 $questionoutput = $template->get();
700 if (!$show_question_only)
705 return $questionoutput;
709 function getTestOutput($active_id,
$pass, $is_postponed = FALSE, $use_post_solutions = FALSE, $show_feedback = FALSE)
714 if($this->object->getIsMultipleChoice())
716 $user_solution = array();
722 #include_once "./Modules/Test/classes/class.ilObjTest.php"; 723 #if (!ilObjTest::_getUsePreviousAnswers($active_id, true)) 725 # if (is_null($pass)) $pass = ilObjTest::_getPass($active_id); 729 foreach ($solutions as $idx => $solution_value)
731 if($this->object->getIsMultipleChoice())
733 $user_solution[] = $solution_value[
"value1"];
737 $user_solution = $solution_value[
"value1"];
742 $imagepath = $this->
object->getImagePathWeb() . $this->
object->getImageFilename();
746 include_once
"./Modules/Test/classes/class.ilObjTest.php";
751 $solutions = $this->
object->getUserSolutionPreferingIntermediate($active_id,
$pass);
752 include_once
"./Modules/TestQuestionPool/classes/class.ilImagemapPreview.php";
754 foreach ($solutions as $idx => $solution_value)
756 if (strcmp($solution_value[
"value1"],
"") != 0)
758 $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);
762 $imagepath = $this->
object->getImagePathWeb() .
$preview->getPreviewFilename($this->object->getImagePath(), $this->
object->getImageFilename());
766 include_once
"./Services/UICore/classes/class.ilTemplate.php";
767 $template =
new ilTemplate(
"tpl.il_as_qpl_imagemap_question_output.html", TRUE, TRUE,
"Modules/TestQuestionPool");
768 $this->ctrl->setParameterByClass($this->
getTargetGuiClass(),
"formtimestamp", time());
770 foreach ($this->object->answers as $answer_id => $answer)
772 $template->setCurrentBlock(
"imagemap_area");
773 $parameter =
"&selImage=$answer_id";
774 if(is_array($user_solution) && in_array($answer_id, $user_solution))
776 $parameter =
"&remImage=$answer_id";
778 $template->setVariable(
"HREF_AREA", $hrefArea . $parameter);
779 $template->setVariable(
"SHAPE", $answer->getArea());
780 $template->setVariable(
"COORDS", $answer->getCoords());
783 $template->parseCurrentBlock();
786 if(!$this->object->getIsMultipleChoice() && strlen($user_solution) && $user_solution == $answer_id)
788 $feedback = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
789 $this->object->getId(), $answer_id
791 if (strlen($feedback))
793 $template->setCurrentBlock(
"feedback");
794 $template->setVariable(
"FEEDBACK", $feedback);
795 $template->parseCurrentBlock();
800 $questiontext = $this->
object->getQuestion();
801 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
803 $template->setVariable(
"IMG_ALT", $this->lng->txt(
"imagemap"));
804 $template->setVariable(
"IMG_TITLE", $this->lng->txt(
"imagemap"));
805 $questionoutput = $template->get();
806 $pageoutput = $this->
outQuestionPage(
"", $is_postponed, $active_id, $questionoutput);
819 global $rbacsystem, $ilTabs;
821 $ilTabs->clearTargets();
823 $this->ctrl->setParameterByClass(
"ilAssQuestionPageGUI",
"q_id",
$_GET[
"q_id"]);
824 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
825 $q_type = $this->
object->getQuestionType();
829 $classname = $q_type .
"GUI";
830 $this->ctrl->setParameterByClass(strtolower($classname),
"sel_question_types", $q_type);
831 $this->ctrl->setParameterByClass(strtolower($classname),
"q_id",
$_GET[
"q_id"]);
836 if ($rbacsystem->checkAccess(
'write',
$_GET[
"ref_id"]))
839 $ilTabs->addTarget(
"edit_page",
840 $this->ctrl->getLinkTargetByClass(
"ilAssQuestionPageGUI",
"edit"),
841 array(
"edit",
"insert",
"exec_pg"),
842 "",
"", $force_active);
848 $force_active =
false;
849 if ($rbacsystem->checkAccess(
'write',
$_GET[
"ref_id"]))
852 if ($classname)
$url = $this->ctrl->getLinkTargetByClass($classname,
"editQuestion");
853 if (array_key_exists(
"imagemap_x",
$_POST))
855 $force_active =
true;
858 $ilTabs->addTarget(
"edit_question",
860 array(
"editQuestion",
"save",
"addArea",
"addRect",
"addCircle",
"addPoly",
861 "uploadingImage",
"uploadingImagemap",
"areaEditor",
862 "removeArea",
"saveShape",
"saveEdit",
"originalSyncForm"),
863 $classname,
"", $force_active);
878 $ilTabs->addTarget(
"statistics",
879 $this->ctrl->getLinkTargetByClass($classname,
"assessment"),
889 if( !$this->object->feedbackOBJ->specificAnswerFeedbackExists(array_values($this->object->getAnswers())) )
894 $output =
'<table class="test_specific_feedback"><tbody>';
896 foreach($this->object->getAnswers() as $idx => $answer)
898 $feedback = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
899 $this->object->getId(), $idx
902 $output .=
"<tr><td>{$answer->getAnswerText()}</td><td>{$feedback}</td></tr>";
905 $output .=
'</tbody></table>';
907 return $this->
object->prepareTextareaOutput($output, TRUE);
940 $tpl =
new ilTemplate(
'tpl.il_as_aggregated_answers_table.html',
true,
true,
"Modules/TestQuestionPool");
942 $tpl->setCurrentBlock(
'headercell');
943 $tpl->setVariable(
'HEADER', $this->lng->txt(
'tst_answer_aggr_answer_header'));
944 $tpl->parseCurrentBlock();
946 $tpl->setCurrentBlock(
'headercell');
947 $tpl->setVariable(
'HEADER', $this->lng->txt(
'tst_answer_aggr_frequency_header'));
948 $tpl->parseCurrentBlock();
950 foreach($answeringFequencies as $answerIndex => $answeringFrequency)
952 $tpl->setCurrentBlock(
'aggregaterow');
953 $tpl->setVariable(
'OPTION', $this->object->getAnswer($answerIndex)->getAnswerText());
954 $tpl->setVariable(
'COUNT', $answeringFrequency);
955 $tpl->parseCurrentBlock();
963 $answeringFequencies = array();
965 foreach($existingAnswerOptions as $answerIndex => $answerOption)
967 $answeringFequencies[$answerIndex] = 0;
970 foreach($givenSolutionRows as $solutionRow)
972 $answeringFequencies[$solutionRow[
'value1']]++;
975 return $answeringFequencies;
isTestPresentationContext()
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
hasCorrectSolution($activeId, $passIndex)
addTab_QuestionPreview(ilTabsGUI $tabsGUI)
This class represents an option in a radio group.
renderAggregateView($answeringFequencies)
completeTestOutputFormAction($formAction, $active_id, $pass)
populateQuestionSpecificFormPart(\ilPropertyFormGUI $form)
writePostData()
Evaluates a posted edit form and writes the form data in the question object.
addBasicQuestionFormProperties($form)
Add basic question form properties: assessment: title, author, description, question, working time.
addTab_QuestionHints(ilTabsGUI $tabs)
adds the hints tab to ilTabsGUI
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.
saveShape()
Saves a shape of the area editor.
_getPass($active_id)
Retrieves the actual pass of a given user for a given test.
getTestOutput($active_id, $pass, $is_postponed=FALSE, $use_post_solutions=FALSE, $show_feedback=FALSE)
getTestOutputSolutions($activeId, $pass)
populateAnswerSpecificFormPart(\ilPropertyFormGUI $form)
getQuestionTemplate()
get question template
const CSS_CLASS_FEEDBACK_CORRECT
populateTaxonomyFormSection(ilPropertyFormGUI $form)
Image map image preview creator.
getSpecificFeedbackOutput($active_id, $pass)
setQuestionTabs()
Sets the ILIAS tabs for this question type.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
getAggregatedAnswersView($relevant_answers)
Returns an html string containing a question specific representation of the answers so far given in t...
writeQuestionGenericPostData()
aggregateAnswers($givenSolutionRows, $existingAnswerOptions)
writeAnswerSpecificPostData(ilPropertyFormGUI $form)
Extracts the answer specific values from $_POST and applies them to the data object.
getILIASPage($html="")
Returns the ILIAS Page around a question.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
writeQuestionSpecificPostData(ilPropertyFormGUI $form)
Extracts the question specific values from $_POST and applies them to the data object.
const MODE_MULTIPLE_CHOICE
Class for image map questions.
addTab_QuestionFeedback(ilTabsGUI $tabs)
adds the feedback tab to ilTabsGUI
const CSS_CLASS_FEEDBACK_WRONG
static signFile($path_to_file)
getPreview($show_question_only=FALSE, $showInlineFeedback=false)
Basic GUI class for assessment questions.
_getUsePreviousAnswers($active_id, $user_active_user_setting=false)
Returns if the previous results should be hidden for a learner.
getAnswerFeedbackOutput($active_id, $pass)
Returns the answer generic feedback depending on the results of the question.
writePostData($always=false)
Evaluates a posted edit form and writes the form data in the question object.
saveTaxonomyAssignments()
Image map question GUI representation.
addBackTab(ilTabsGUI $ilTabs)
Interface ilGuiAnswerScoringAdjustable.
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="")
output question page
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
Interface ilGuiQuestionScoringAdjustable.
addTab_SuggestedSolution(ilTabsGUI $tabs, $classname)
addQuestionFormCommandButtons($form)
Add the command buttons of a question properties form.
editQuestion($checkonly=FALSE)