24 include_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
25 include_once
"./Modules/Test/classes/inc.AssessmentConstants.php";
53 include_once
"./Modules/TestQuestionPool/classes/class.assMultipleChoice.php";
57 $this->
object->loadFromDb($id);
74 $hasErrors = (!$always) ? $this->
editQuestion(
true) :
false;
77 $this->
object->setTitle(
$_POST[
"title"]);
78 $this->
object->setAuthor(
$_POST[
"author"]);
79 $this->
object->setComment(
$_POST[
"comment"]);
80 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
81 $questiontext =
$_POST[
"question"];
82 $this->
object->setQuestion($questiontext);
83 $this->
object->setShuffle(
$_POST[
"shuffle"]);
84 $this->
object->setEstimatedWorkingTime(
90 $this->
object->setFeedbackSetting(
$_POST[
'feedback_setting']);
93 $this->
object->setNrOfTries(
$_POST[
'nr_of_tries']);
95 $this->
object->setMultilineAnswerSetting(
$_POST[
"types"]);
96 if (is_array(
$_POST[
'choice'][
'imagename']) &&
$_POST[
"types"] == 1)
98 $this->
object->isSingleline =
true;
103 $this->
object->isSingleline = (
$_POST[
"types"] == 0) ?
true :
false;
105 $this->
object->setThumbSize((strlen(
$_POST[
"thumb_size"])) ?
$_POST[
"thumb_size"] :
"");
108 $this->
object->flushAnswers();
109 if ($this->object->isSingleline)
111 foreach ($_POST[
'choice'][
'answer'] as $index => $answertext)
113 $picturefile = $_POST[
'choice'][
'imagename'][$index];
114 $file_org_name = $_FILES[
'choice'][
'name'][
'image'][$index];
115 $file_temp_name = $_FILES[
'choice'][
'tmp_name'][
'image'][$index];
117 if (strlen($file_temp_name))
120 $suffix = strtolower(array_pop(explode(
".", $file_org_name)));
121 if(in_array($suffix, array(
"jpg",
"jpeg",
"png",
"gif")))
124 $filename = $this->
object->createNewImageFileName($file_org_name);
125 if ($this->object->setImageFile(
$filename, $file_temp_name) == 0)
131 $this->
object->addAnswer($answertext, $_POST[
'choice'][
'points'][$index], $_POST[
'choice'][
'points_unchecked'][$index], $index, $picturefile);
136 foreach ($_POST[
'choice'][
'answer'] as $index => $answer)
138 $answertext = $answer;
139 $this->
object->addAnswer($answertext, $_POST[
'choice'][
'points'][$index], $_POST[
'choice'][
'points_unchecked'][$index], $index);
160 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
162 $form->setFormAction($this->ctrl->getFormAction($this));
164 $isSingleline = ($this->
object->lastChange == 0 && !array_key_exists(
'types',
$_POST)) ? (($this->object->getMultilineAnswerSetting()) ?
false :
true) : $this->
object->isSingleline;
165 if ($checkonly) $isSingleline = (
$_POST[
'types'] == 0) ?
true :
false;
168 $form->setMultipart(TRUE);
172 $form->setMultipart(FALSE);
174 $form->setTableWidth(
"100%");
175 $form->setId(
"assmultiplechoice");
183 $shuffle->setChecked($this->object->getShuffle());
184 $shuffle->setRequired(FALSE);
185 $form->addItem($shuffle);
187 if ($this->object->getId())
190 $hidden->setValue($this->object->getId());
191 $form->addItem($hidden);
199 $types->setValue(($isSingleline) ? 0 : 1);
200 $types->setOptions(array(
201 0 => $this->lng->txt(
'answers_singleline'),
202 1 => $this->lng->txt(
'answers_multiline'),
204 $form->addItem($types);
210 $thumb_size =
new ilNumberInputGUI($this->lng->txt(
"thumb_size"),
"thumb_size");
211 $thumb_size->
setSuffix($this->lng->txt(
"thumb_size_unit_pixel"));
212 $thumb_size->setMinValue(20);
213 $thumb_size->setDecimals(0);
214 $thumb_size->setSize(6);
215 $thumb_size->setInfo($this->lng->txt(
'thumb_size_info'));
216 $thumb_size->setValue($this->object->getThumbSize());
217 $thumb_size->setRequired(
false);
218 $form->addItem($thumb_size);
222 include_once
"./Modules/TestQuestionPool/classes/class.ilMultipleChoiceWizardInputGUI.php";
225 $choices->setQuestionObject($this->
object);
226 $choices->setSingleline($isSingleline);
227 $choices->setAllowMove(
false);
230 $choices->setSize(40);
231 $choices->setMaxLength(800);
233 if ($this->object->getAnswerCount() == 0) $this->object->addAnswer(
"", 0, 0, 0);
234 $choices->setValues($this->object->getAnswers());
235 $form->addItem($choices);
244 $form->setValuesByPost();
245 $errors = !$form->checkInput();
246 $form->setValuesByPost();
247 if (
$errors) $checkonly =
false;
250 if (!$checkonly) $this->tpl->setVariable(
"QUESTION_DATA", $form->getHTML());
260 $position = key(
$_POST[
'cmd'][
'uploadchoice']);
270 $position = key(
$_POST[
'cmd'][
'removeimagechoice']);
272 $this->
object->removeAnswerImage($position);
282 $position = key(
$_POST[
'cmd'][
'addchoice']);
283 $this->
object->addAnswer(
"", 0, 0, $position+1);
293 $position = key(
$_POST[
'cmd'][
'removechoice']);
294 $this->
object->deleteAnswer($position);
299 $user_post_solutions = FALSE, $show_specific_inline_feedback = FALSE)
304 $is_question_postponed,
305 $user_post_solutions,
306 $show_specific_inline_feedback
309 $this->tpl->setVariable(
"QUESTION_OUTPUT", $test_output);
310 $this->tpl->setVariable(
"FORMACTION", $formaction);
329 $graphicalOutput = FALSE,
330 $result_output = FALSE,
331 $show_question_only = TRUE,
332 $show_feedback = FALSE,
333 $show_correct_solution = FALSE,
334 $show_manual_scoring = FALSE,
335 $show_question_text = TRUE
342 $user_solution = array();
343 if (($active_id > 0) && (!$show_correct_solution))
345 $solutions =& $this->
object->getSolutionValues($active_id,
$pass);
346 foreach ($solutions as $idx => $solution_value)
348 array_push($user_solution, $solution_value[
"value1"]);
354 foreach ($this->object->answers as $index => $answer)
356 $points_checked = $answer->getPointsChecked();
357 $points_unchecked = $answer->getPointsUnchecked();
358 if ($points_checked > $points_unchecked)
360 if ($points_checked > 0)
362 array_push($user_solution, $index);
369 include_once
"./Services/UICore/classes/class.ilTemplate.php";
370 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_mr_output_solution.html", TRUE, TRUE,
"Modules/TestQuestionPool");
371 $solutiontemplate =
new ilTemplate(
"tpl.il_as_tst_solution_output.html",TRUE, TRUE,
"Modules/TestQuestionPool");
372 foreach ($keys as $answer_id)
374 $answer = $this->
object->answers[$answer_id];
375 if (($active_id > 0) && (!$show_correct_solution))
377 if ($graphicalOutput)
382 foreach ($user_solution as $mc_solution)
384 if (strcmp($mc_solution, $answer_id) == 0)
391 if ($answer->getPointsChecked() > $answer->getPointsUnchecked())
402 if ($answer->getPointsChecked() > $answer->getPointsUnchecked())
413 $template->setCurrentBlock(
"icon_ok");
415 $template->setVariable(
"TEXT_OK", $this->lng->txt(
"answer_is_right"));
416 $template->parseCurrentBlock();
420 $template->setCurrentBlock(
"icon_ok");
422 $template->setVariable(
"TEXT_NOT_OK", $this->lng->txt(
"answer_is_wrong"));
423 $template->parseCurrentBlock();
427 if (strlen($answer->getImage()))
429 $template->setCurrentBlock(
"answer_image");
430 if ($this->object->getThumbSize())
432 $template->setVariable(
"ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $this->
object->getThumbPrefix() . $answer->getImage());
436 $template->setVariable(
"ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $answer->getImage());
438 $alt = $answer->getImage();
439 if (strlen($answer->getAnswertext()))
441 $alt = $answer->getAnswertext();
443 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
446 $template->parseCurrentBlock();
452 if ($this->object->getFeedbackSetting() == 2)
454 foreach ($user_solution as $mc_solution)
456 if (strcmp($mc_solution, $answer_id) == 0)
458 $fb = $this->
object->getFeedbackSingleAnswer($answer_id);
461 $template->setCurrentBlock(
"feedback");
462 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput($fb,
true));
463 $template->parseCurrentBlock();
469 if ($this->object->getFeedbackSetting() == 1)
471 $fb = $this->
object->getFeedbackSingleAnswer($answer_id);
474 $template->setCurrentBlock(
"feedback");
475 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput($fb,
true));
476 $template->parseCurrentBlock();
480 if ($this->object->getFeedbackSetting() == 3)
482 $answer = $this->
object->getAnswer($answer_id);
484 if ($answer->getPoints() > 0)
486 $fb = $this->
object->getFeedbackSingleAnswer($answer_id);
489 $template->setCurrentBlock(
"feedback");
490 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput($fb,
true));
491 $template->parseCurrentBlock();
497 $template->setCurrentBlock(
"answer_row");
498 $template->setVariable(
"ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(), TRUE));
502 $pointschecked = $this->
object->answers[$answer_id]->getPointsChecked();
503 $pointsunchecked = $this->
object->answers[$answer_id]->getPointsUnchecked();
504 $resulttextchecked = ($pointschecked == 1) || ($pointschecked == -1) ?
"%s " . $this->lng->txt(
"point") :
"%s " . $this->lng->txt(
"points");
505 $resulttextunchecked = ($pointsunchecked == 1) || ($pointsunchecked == -1) ?
"%s " . $this->lng->txt(
"point") :
"%s " . $this->lng->txt(
"points");
506 $template->setVariable(
"RESULT_OUTPUT", sprintf(
"(" . $this->lng->txt(
"checkbox_checked") .
" = $resulttextchecked, " . $this->lng->txt(
"checkbox_unchecked") .
" = $resulttextunchecked)", $pointschecked, $pointsunchecked));
508 foreach ($user_solution as $mc_solution)
510 if (strcmp($mc_solution, $answer_id) == 0)
513 $template->setVariable(
"SOLUTION_ALT", $this->lng->txt(
"checked"));
520 $template->setVariable(
"SOLUTION_ALT", $this->lng->txt(
"unchecked"));
522 $template->parseCurrentBlock();
524 $questiontext = $this->
object->getQuestion();
525 if ($show_question_text==
true)
527 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
529 $questionoutput = $template->get();
530 #$feedback = ($show_feedback) ? $this->getAnswerFeedbackOutput($active_id, $pass) : "";
531 #if (strlen($feedback)) $solutiontemplate->setVariable("FEEDBACK", $feedback);
532 $solutiontemplate->setVariable(
"SOLUTION_OUTPUT", $questionoutput);
534 $solutionoutput = $solutiontemplate->get();
535 if (!$show_question_only)
538 $solutionoutput =
'<div class="ilc_question_Standard">'.$solutionoutput.
"</div>";
540 return $solutionoutput;
549 include_once
"./Services/UICore/classes/class.ilTemplate.php";
550 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_mr_output.html", TRUE, TRUE,
"Modules/TestQuestionPool");
551 foreach ($keys as $answer_id)
553 $answer = $this->
object->answers[$answer_id];
554 if (strlen($answer->getImage()))
556 if ($this->object->getThumbSize())
558 $template->setCurrentBlock(
"preview");
559 $template->setVariable(
"URL_PREVIEW", $this->object->getImagePathWeb() . $answer->getImage());
560 $template->setVariable(
"TEXT_PREVIEW", $this->lng->txt(
'preview'));
562 $template->setVariable(
"ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $this->
object->getThumbPrefix() . $answer->getImage());
563 list($width, $height, $type, $attr) = getimagesize($this->object->getImagePath() . $answer->getImage());
564 $alt = $answer->getImage();
565 if (strlen($answer->getAnswertext()))
567 $alt = $answer->getAnswertext();
569 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
572 $template->parseCurrentBlock();
576 $template->setCurrentBlock(
"answer_image");
577 $template->setVariable(
"ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $answer->getImage());
578 list($width, $height, $type, $attr) = getimagesize($this->object->getImagePath() . $answer->getImage());
579 $alt = $answer->getImage();
580 if (strlen($answer->getAnswertext()))
582 $alt = $answer->getAnswertext();
584 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
585 $template->setVariable(
"ATTR", $attr);
588 $template->parseCurrentBlock();
591 $template->setCurrentBlock(
"answer_row");
592 $template->setVariable(
"ANSWER_ID", $answer_id);
593 $template->setVariable(
"ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(), TRUE));
594 $template->parseCurrentBlock();
596 $questiontext = $this->
object->getQuestion();
597 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
598 $questionoutput = $template->get();
599 if (!$show_question_only)
604 return $questionoutput;
607 function getTestOutput($active_id,
$pass = NULL, $is_postponed = FALSE, $use_post_solutions = FALSE, $show_feedback = FALSE)
613 $user_solution = array();
617 include_once
"./Modules/Test/classes/class.ilObjTest.php";
622 $solutions =& $this->
object->getSolutionValues($active_id,
$pass);
623 foreach ($solutions as $idx => $solution_value)
625 array_push($user_solution, $solution_value[
"value1"]);
629 include_once
"./Services/UICore/classes/class.ilTemplate.php";
630 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_mr_output.html", TRUE, TRUE,
"Modules/TestQuestionPool");
631 foreach ($keys as $answer_id)
633 $answer = $this->
object->answers[$answer_id];
634 if (strlen($answer->getImage()))
636 if ($this->object->getThumbSize())
638 $template->setCurrentBlock(
"preview");
639 $template->setVariable(
"URL_PREVIEW", $this->object->getImagePathWeb() . $answer->getImage());
640 $template->setVariable(
"TEXT_PREVIEW", $this->lng->txt(
'preview'));
642 $template->setVariable(
"ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $this->
object->getThumbPrefix() . $answer->getImage());
643 list($width, $height, $type, $attr) = getimagesize($this->object->getImagePath() . $answer->getImage());
644 $alt = $answer->getImage();
645 if (strlen($answer->getAnswertext()))
647 $alt = $answer->getAnswertext();
649 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
652 $template->parseCurrentBlock();
656 $template->setCurrentBlock(
"answer_image");
657 $template->setVariable(
"ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $answer->getImage());
658 list($width, $height, $type, $attr) = getimagesize($this->object->getImagePath() . $answer->getImage());
659 $alt = $answer->getImage();
660 if (strlen($answer->getAnswertext()))
662 $alt = $answer->getAnswertext();
664 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
665 $template->setVariable(
"ATTR", $attr);
668 $template->parseCurrentBlock();
671 if ($show_feedback && $this->object->getFeedbackSetting() == 2)
673 foreach ($user_solution as $mc_solution)
675 if (strcmp($mc_solution, $answer_id) == 0)
677 $fb = $this->
object->getFeedbackSingleAnswer($answer_id);
680 $template->setCurrentBlock(
"feedback");
681 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput($fb,
true));
682 $template->parseCurrentBlock();
688 if ($show_feedback && $this->object->getFeedbackSetting() == 1)
690 $fb = $this->
object->getFeedbackSingleAnswer($answer_id);
693 $template->setCurrentBlock(
"feedback");
694 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput($fb,
true));
695 $template->parseCurrentBlock();
699 if ($show_feedback && $this->object->getFeedbackSetting() == 3)
701 $answer = $this->
object->getAnswer($answer_id);
703 if ($answer->getPoints() > 0)
705 $fb = $this->
object->getFeedbackSingleAnswer($answer_id);
708 $template->setCurrentBlock(
"feedback");
709 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput( $fb,
true));
710 $template->parseCurrentBlock();
717 $template->setCurrentBlock(
"answer_row");
718 $template->setVariable(
"ANSWER_ID", $answer_id);
719 $template->setVariable(
"ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(), TRUE));
720 foreach ($user_solution as $mc_solution)
722 if (strcmp($mc_solution, $answer_id) == 0)
724 $template->setVariable(
"CHECKED_ANSWER",
" checked=\"checked\"");
727 $template->parseCurrentBlock();
729 $questiontext = $this->
object->getQuestion();
730 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
731 $questionoutput = $template->get();
732 $pageoutput = $this->
outQuestionPage(
"", $is_postponed, $active_id, $questionoutput);
743 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
745 $this->
object->saveFeedbackGeneric(0,
$_POST[
"feedback_incomplete"]);
746 $this->
object->saveFeedbackGeneric(1,
$_POST[
"feedback_complete"]);
747 $this->
object->saveFeedbackSetting(
$_POST[
'feedback_setting']);
748 foreach ($this->object->answers as $index => $answer)
750 $this->
object->saveFeedbackSingleAnswer($index,
$_POST[
"feedback_answer_$index"]);
752 $this->
object->cleanupMediaObjectUsage();
763 $save = (strcmp($this->ctrl->getCmd(),
"saveFeedback") == 0) ? TRUE : FALSE;
764 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
766 $form->setFormAction($this->ctrl->getFormAction($this));
767 $form->setTitle($this->lng->txt(
'feedback_answers'));
768 $form->setTableWidth(
"100%");
769 $form->setId(
"feedback");
771 $complete =
new ilTextAreaInputGUI($this->lng->txt(
"feedback_complete_solution"),
"feedback_complete");
772 $complete->
setValue($this->object->prepareTextareaOutput($this->object->getFeedbackGeneric(1)));
773 $complete->setRequired(
false);
774 $complete->setRows(10);
775 $complete->setCols(80);
778 $complete->setUseRte(
true);
780 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
782 $complete->addPlugin(
"latex");
783 $complete->addButton(
"latex");
784 $complete->addButton(
"pastelatex");
785 $complete->setRTESupport($this->object->getId(),
"qpl",
"assessment", null,
false,
'3.4.7');
786 $form->addItem($complete);
788 $incomplete =
new ilTextAreaInputGUI($this->lng->txt(
"feedback_incomplete_solution"),
"feedback_incomplete");
789 $incomplete->
setValue($this->object->prepareTextareaOutput($this->object->getFeedbackGeneric(0)));
790 $incomplete->setRequired(
false);
791 $incomplete->setRows(10);
792 $incomplete->setCols(80);
795 $incomplete->setUseRte(
true);
797 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
799 $incomplete->addPlugin(
"latex");
800 $incomplete->addButton(
"latex");
801 $incomplete->addButton(
"pastelatex");
802 $incomplete->setRTESupport($this->object->getId(),
"qpl",
"assessment", null,
false,
'3.4.7');
803 $form->addItem($incomplete);
805 require_once
'./Services/Form/classes/class.ilRadioGroupInputGUI.php';
806 require_once
'./Services/Form/classes/class.ilRadioOption.php';
810 $feedback->addOption(
new ilRadioOption($this->lng->txt(
'feedback_checked'), 2));
811 $feedback->addOption(
new ilRadioOption($this->lng->txt(
'feedback_correct'), 3));
812 $feedback->setValue($this->object->getFeedbackSetting());
813 $form->addItem($feedback);
817 foreach ($this->object->answers as $index => $answer)
819 $answerobj =
new ilTextAreaInputGUI($this->object->prepareTextareaOutput($answer->getAnswertext(),
true),
"feedback_answer_$index");
820 $answerobj->setValue($this->object->prepareTextareaOutput($this->object->getFeedbackSingleAnswer($index)));
821 $answerobj->setRequired(
false);
822 $answerobj->setRows(10);
823 $answerobj->setCols(80);
824 $answerobj->setUseRte(
true);
825 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
827 $answerobj->addPlugin(
"latex");
828 $answerobj->addButton(
"latex");
829 $answerobj->addButton(
"pastelatex");
830 $answerobj->setRTESupport($this->object->getId(),
"qpl",
"assessment", null,
false,
'3.4.7');
831 $form->addItem($answerobj);
838 $form->addCommandButton(
"saveFeedback", $this->lng->txt(
"save"));
842 $form->setValuesByPost();
843 $errors = !$form->checkInput();
844 $form->setValuesByPost();
846 if (!$checkonly) $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
859 global $rbacsystem, $ilTabs;
861 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"q_id",
$_GET[
"q_id"]);
862 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
863 $q_type = $this->
object->getQuestionType();
867 $classname = $q_type .
"GUI";
868 $this->ctrl->setParameterByClass(strtolower($classname),
"sel_question_types", $q_type);
869 $this->ctrl->setParameterByClass(strtolower($classname),
"q_id",
$_GET[
"q_id"]);
874 if ($rbacsystem->checkAccess(
'write',
$_GET[
"ref_id"]))
877 $ilTabs->addTarget(
"edit_page",
878 $this->ctrl->getLinkTargetByClass(
"ilPageObjectGUI",
"edit"),
879 array(
"edit",
"insert",
"exec_pg"),
880 "",
"", $force_active);
884 $ilTabs->addTarget(
"preview",
885 $this->ctrl->getLinkTargetByClass(
"ilPageObjectGUI",
"preview"),
887 "ilPageObjectGUI",
"", $force_active);
889 $force_active =
false;
890 if ($rbacsystem->checkAccess(
'write',
$_GET[
"ref_id"]))
893 if ($classname) $url = $this->ctrl->getLinkTargetByClass($classname,
"editQuestion");
894 $force_active =
false;
896 $ilTabs->addTarget(
"edit_question",
898 array(
"editQuestion",
"save",
"saveEdit",
"addchoice",
"removechoice",
"removeimagechoice",
"uploadchoice",
"originalSyncForm"),
899 $classname,
"", $force_active);
904 $ilTabs->addTarget(
"feedback",
905 $this->ctrl->getLinkTargetByClass($classname,
"feedback"),
906 array(
"feedback",
"saveFeedback"),
915 $ilTabs->addTarget(
"solution_hint",
916 $this->ctrl->getLinkTargetByClass($classname,
"suggestedsolution"),
917 array(
"suggestedsolution",
"saveSuggestedSolution",
"outSolutionExplorer",
"cancel",
918 "addSuggestedSolution",
"cancelExplorer",
"linkChilds",
"removeSuggestedSolution"
928 $ilTabs->addTarget(
"statistics",
929 $this->ctrl->getLinkTargetByClass($classname,
"assessment"),
934 if ((
$_GET[
"calling_test"] > 0) || (
$_GET[
"test_ref_id"] > 0))
939 global $___test_express_mode;
941 if (!
$_GET[
'test_express_mode'] && !$___test_express_mode) {
942 $ilTabs->setBackTarget($this->lng->txt(
"backtocallingtest"),
"ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=$ref_id");
946 $ilTabs->setBackTarget($this->lng->txt(
"backtocallingtest"), $link);
951 $ilTabs->setBackTarget($this->lng->txt(
"qpl"), $this->ctrl->getLinkTargetByClass(
"ilobjquestionpoolgui",
"questions"));
962 if (strcmp(
$_GET[
"activecommand"],
"directfeedback") == 0)
966 if (!is_array($this->choiceKeys))
968 $this->choiceKeys = array_keys($this->object->answers);
969 if ($this->object->getShuffle())
971 $this->choiceKeys = $this->
object->pcArrayShuffle($this->choiceKeys);
982 return $this->
object->prepareTextareaOutput($output, TRUE);