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 require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
37 parent::__construct();
38 include_once
"./Modules/TestQuestionPool/classes/class.assMultipleChoice.php";
42 $this->
object->loadFromDb($id);
55 $hasErrors = (!$always) ? $this->
editQuestion(
true) :
false;
58 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
80 return (
$_POST[
'types'] == 0) ? true :
false;
83 $lastChange = $this->
object->getLastChange();
84 if (empty($lastChange) && !isset(
$_POST[
'types']))
87 return $this->
object->getMultilineAnswerSetting() ? false :
true;
92 return $this->
object->isSingleline;
108 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
110 $form->setFormAction($this->ctrl->getFormAction($this));
115 $form->setMultipart(TRUE);
119 $form->setMultipart(FALSE);
121 $form->setTableWidth(
"100%");
122 $form->setId(
"assmultiplechoice");
135 $form->setValuesByPost();
136 $errors = !$form->checkInput();
137 $form->setValuesByPost();
138 if (
$errors) $checkonly =
false;
141 if (!$checkonly) $this->tpl->setVariable(
"QUESTION_DATA", $form->getHTML());
147 parent::addBasicQuestionFormProperties($form);
148 $form->getItemByPostVar(
'question')->setInitialRteWidth(
'100');
157 $position = key(
$_POST[
'cmd'][
'uploadchoice']);
167 $position = key(
$_POST[
'cmd'][
'removeimagechoice']);
169 $this->
object->removeAnswerImage($position);
179 $position = key(
$_POST[
'cmd'][
'addchoice']);
180 $this->
object->addAnswer(
"", 0, 0, $position+1);
190 $position = key(
$_POST[
'cmd'][
'removechoice']);
191 $this->
object->deleteAnswer($position);
213 $graphicalOutput = FALSE,
214 $result_output = FALSE,
215 $show_question_only = TRUE,
216 $show_feedback = FALSE,
217 $show_correct_solution = FALSE,
218 $show_manual_scoring = FALSE,
219 $show_question_text = TRUE
226 $user_solution = array();
227 if (($active_id > 0) && (!$show_correct_solution))
229 $solutions =& $this->
object->getSolutionValues($active_id,
$pass);
230 foreach ($solutions as $idx => $solution_value)
232 array_push($user_solution, $solution_value[
"value1"]);
238 foreach ($this->object->answers as $index => $answer)
240 $points_checked = $answer->getPointsChecked();
241 $points_unchecked = $answer->getPointsUnchecked();
242 if ($points_checked > $points_unchecked)
244 if ($points_checked > 0)
246 array_push($user_solution, $index);
253 include_once
"./Services/UICore/classes/class.ilTemplate.php";
254 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_mr_output_solution.html", TRUE, TRUE,
"Modules/TestQuestionPool");
255 $solutiontemplate =
new ilTemplate(
"tpl.il_as_tst_solution_output.html",TRUE, TRUE,
"Modules/TestQuestionPool");
256 foreach ($keys as $answer_id)
258 $answer = $this->
object->answers[$answer_id];
259 if (($active_id > 0) && (!$show_correct_solution))
261 if ($graphicalOutput)
266 foreach ($user_solution as $mc_solution)
268 if (strcmp($mc_solution, $answer_id) == 0)
275 if ($answer->getPointsChecked() > $answer->getPointsUnchecked())
286 if ($answer->getPointsChecked() > $answer->getPointsUnchecked())
297 $template->setCurrentBlock(
"icon_ok");
299 $template->setVariable(
"TEXT_OK", $this->lng->txt(
"answer_is_right"));
300 $template->parseCurrentBlock();
304 $template->setCurrentBlock(
"icon_ok");
306 $template->setVariable(
"TEXT_NOT_OK", $this->lng->txt(
"answer_is_wrong"));
307 $template->parseCurrentBlock();
311 if (strlen($answer->getImage()))
313 $template->setCurrentBlock(
"answer_image");
314 if ($this->object->getThumbSize())
316 $template->setVariable(
"ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $this->
object->getThumbPrefix() . $answer->getImage());
320 $template->setVariable(
"ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $answer->getImage());
322 $alt = $answer->getImage();
323 if (strlen($answer->getAnswertext()))
325 $alt = $answer->getAnswertext();
327 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
330 $template->parseCurrentBlock();
336 if ($this->object->getSpecificFeedbackSetting() == 2)
338 foreach ($user_solution as $mc_solution)
340 if (strcmp($mc_solution, $answer_id) == 0)
342 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
343 $this->object->getId(), $answer_id
347 $template->setCurrentBlock(
"feedback");
348 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput( $fb,
true ));
349 $template->parseCurrentBlock();
355 if ($this->object->getSpecificFeedbackSetting() == 1)
357 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
358 $this->object->getId(), $answer_id
362 $template->setCurrentBlock(
"feedback");
363 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput( $fb,
true ));
364 $template->parseCurrentBlock();
368 if ($this->object->getSpecificFeedbackSetting() == 3)
370 $answer = $this->
object->getAnswer($answer_id);
372 if ($answer->getPoints() > 0)
374 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
375 $this->object->getId(), $answer_id
379 $template->setCurrentBlock(
"feedback");
380 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput( $fb,
true ));
381 $template->parseCurrentBlock();
387 $template->setCurrentBlock(
"answer_row");
388 $template->setVariable(
"ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(), TRUE));
392 $pointschecked = $this->
object->answers[$answer_id]->getPointsChecked();
393 $pointsunchecked = $this->
object->answers[$answer_id]->getPointsUnchecked();
394 $resulttextchecked = ($pointschecked == 1) || ($pointschecked == -1) ?
"%s " . $this->lng->txt(
"point") :
"%s " . $this->lng->txt(
"points");
395 $resulttextunchecked = ($pointsunchecked == 1) || ($pointsunchecked == -1) ?
"%s " . $this->lng->txt(
"point") :
"%s " . $this->lng->txt(
"points");
396 $template->setVariable(
"RESULT_OUTPUT", sprintf(
"(" . $this->lng->txt(
"checkbox_checked") .
" = $resulttextchecked, " . $this->lng->txt(
"checkbox_unchecked") .
" = $resulttextunchecked)", $pointschecked, $pointsunchecked));
398 foreach ($user_solution as $mc_solution)
400 if (strcmp($mc_solution, $answer_id) == 0)
405 $template->setVariable(
"SOLUTION_ALT", $this->lng->txt(
"checked"));
409 $template->setVariable(
'QID', $this->object->getId());
410 $template->setVariable(
'SUFFIX', $show_correct_solution ?
'bestsolution' :
'usersolution');
411 $template->setVariable(
'SOLUTION_VALUE', $answer_id);
412 $template->setVariable(
'SOLUTION_CHECKED',
'checked');
422 $template->setVariable(
"SOLUTION_ALT", $this->lng->txt(
"unchecked"));
426 $template->setVariable(
'QID', $this->object->getId());
427 $template->setVariable(
'SUFFIX', $show_correct_solution ?
'bestsolution' :
'usersolution');
428 $template->setVariable(
'SOLUTION_VALUE', $answer_id);
431 $template->parseCurrentBlock();
433 $questiontext = $this->
object->getQuestion();
434 if ($show_question_text==
true)
436 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
438 $questionoutput = $template->get();
441 if (strlen($feedback))
447 $solutiontemplate->setVariable(
"ILC_FB_CSS_CLASS", $cssClass);
448 $solutiontemplate->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput( $feedback ,
true ));
450 $solutiontemplate->setVariable(
"SOLUTION_OUTPUT", $questionoutput);
452 $solutionoutput = $solutiontemplate->get();
453 if (!$show_question_only)
458 return $solutionoutput;
461 function getPreview($show_question_only = FALSE, $showInlineFeedback =
false)
468 include_once
"./Services/UICore/classes/class.ilTemplate.php";
469 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_mr_output.html", TRUE, TRUE,
"Modules/TestQuestionPool");
470 foreach ($keys as $answer_id)
472 $answer = $this->
object->answers[$answer_id];
473 if (strlen($answer->getImage()))
475 if ($this->object->getThumbSize())
477 $template->setCurrentBlock(
"preview");
478 $template->setVariable(
"URL_PREVIEW", $this->object->getImagePathWeb() . $answer->getImage());
479 $template->setVariable(
"TEXT_PREVIEW", $this->lng->txt(
'preview'));
481 $template->setVariable(
"ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $this->
object->getThumbPrefix() . $answer->getImage());
482 list($width, $height, $type, $attr) = getimagesize($this->object->getImagePath() . $answer->getImage());
483 $alt = $answer->getImage();
484 if (strlen($answer->getAnswertext()))
486 $alt = $answer->getAnswertext();
488 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
491 $template->parseCurrentBlock();
495 $template->setCurrentBlock(
"answer_image");
496 $template->setVariable(
"ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $answer->getImage());
497 list($width, $height, $type, $attr) = getimagesize($this->object->getImagePath() . $answer->getImage());
498 $alt = $answer->getImage();
499 if (strlen($answer->getAnswertext()))
501 $alt = $answer->getAnswertext();
503 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
504 $template->setVariable(
"ATTR", $attr);
507 $template->parseCurrentBlock();
511 if( $showInlineFeedback )
516 $template->setCurrentBlock(
"answer_row");
517 $template->setVariable(
"ANSWER_ID", $answer_id);
518 $template->setVariable(
"ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(), TRUE));
519 foreach ($user_solution as $mc_solution)
521 if (strcmp($mc_solution, $answer_id) == 0)
523 $template->setVariable(
"CHECKED_ANSWER",
" checked=\"checked\"");
526 $template->parseCurrentBlock();
528 $questiontext = $this->
object->getQuestion();
529 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
530 $questionoutput = $template->get();
531 if (!$show_question_only)
536 return $questionoutput;
553 $is_postponed = FALSE,
554 $use_post_solutions = FALSE,
555 $show_feedback = FALSE
562 $user_solution = array();
567 #include_once "./Modules/Test/classes/class.ilObjTest.php"; 568 #if (!ilObjTest::_getUsePreviousAnswers($active_id, true)) 570 # if (is_null($pass)) $pass = ilObjTest::_getPass($active_id); 574 foreach ($solutions as $idx => $solution_value)
576 array_push($user_solution, $solution_value[
"value1"]);
580 include_once
"./Services/UICore/classes/class.ilTemplate.php";
581 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_mr_output.html", TRUE, TRUE,
"Modules/TestQuestionPool");
582 foreach ($keys as $answer_id)
584 $answer = $this->
object->answers[$answer_id];
585 if (strlen($answer->getImage()))
587 if ($this->object->getThumbSize())
589 $template->setCurrentBlock(
"preview");
590 $template->setVariable(
"URL_PREVIEW", $this->object->getImagePathWeb() . $answer->getImage());
591 $template->setVariable(
"TEXT_PREVIEW", $this->lng->txt(
'preview'));
593 $template->setVariable(
"ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $this->
object->getThumbPrefix() . $answer->getImage());
594 list($width, $height, $type, $attr) = getimagesize($this->object->getImagePath() . $answer->getImage());
595 $alt = $answer->getImage();
596 if (strlen($answer->getAnswertext()))
598 $alt = $answer->getAnswertext();
600 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
603 $template->parseCurrentBlock();
607 $template->setCurrentBlock(
"answer_image");
608 $template->setVariable(
"ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $answer->getImage());
609 list($width, $height, $type, $attr) = getimagesize($this->object->getImagePath() . $answer->getImage());
610 $alt = $answer->getImage();
611 if (strlen($answer->getAnswertext()))
613 $alt = $answer->getAnswertext();
615 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
616 $template->setVariable(
"ATTR", $attr);
619 $template->parseCurrentBlock();
628 $template->setCurrentBlock(
"answer_row");
629 $template->setVariable(
"ANSWER_ID", $answer_id);
630 $template->setVariable(
"ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(), TRUE));
631 foreach ($user_solution as $mc_solution)
633 if (strcmp($mc_solution, $answer_id) == 0)
635 $template->setVariable(
"CHECKED_ANSWER",
" checked=\"checked\"");
638 $template->parseCurrentBlock();
640 $questiontext = $this->
object->getQuestion();
641 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
642 $questionoutput = $template->get();
643 $pageoutput = $this->
outQuestionPage(
"", $is_postponed, $active_id, $questionoutput);
654 global $rbacsystem, $ilTabs;
656 $ilTabs->clearTargets();
658 $this->ctrl->setParameterByClass(
"ilAssQuestionPageGUI",
"q_id",
$_GET[
"q_id"]);
659 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
660 $q_type = $this->
object->getQuestionType();
664 $classname = $q_type .
"GUI";
665 $this->ctrl->setParameterByClass(strtolower($classname),
"sel_question_types", $q_type);
666 $this->ctrl->setParameterByClass(strtolower($classname),
"q_id",
$_GET[
"q_id"]);
671 if ($rbacsystem->checkAccess(
'write',
$_GET[
"ref_id"]))
674 $ilTabs->addTarget(
"edit_page",
675 $this->ctrl->getLinkTargetByClass(
"ilAssQuestionPageGUI",
"edit"),
676 array(
"edit",
"insert",
"exec_pg"),
677 "",
"", $force_active);
682 $force_active =
false;
683 if ($rbacsystem->checkAccess(
'write',
$_GET[
"ref_id"]))
686 if ($classname)
$url = $this->ctrl->getLinkTargetByClass($classname,
"editQuestion");
687 $force_active =
false;
689 $ilTabs->addTarget(
"edit_question",
691 array(
"editQuestion",
"save",
"saveEdit",
"addchoice",
"removechoice",
"removeimagechoice",
"uploadchoice",
"originalSyncForm"),
692 $classname,
"", $force_active);
707 $ilTabs->addTarget(
"statistics",
708 $this->ctrl->getLinkTargetByClass($classname,
"assessment"),
723 $choiceKeys = array_keys($this->object->answers);
725 if( $this->object->getShuffle() )
727 $choiceKeys = $this->
object->getShuffler()->shuffle($choiceKeys);
737 return $this->
object->prepareTextareaOutput($output, TRUE);
742 $this->
object->setShuffle(
$_POST[
"shuffle"] );
744 $this->
object->setSpecificFeedbackSetting(
$_POST[
'feedback_setting'] );
746 $this->
object->setMultilineAnswerSetting(
$_POST[
"types"] );
747 if (is_array(
$_POST[
'choice'][
'imagename'] ) &&
$_POST[
"types"] == 1)
749 $this->
object->isSingleline =
true;
754 $this->
object->isSingleline = (
$_POST[
"types"] == 0) ?
true :
false;
756 $this->
object->setThumbSize( (strlen(
$_POST[
"thumb_size"] )) ?
$_POST[
"thumb_size"] :
"" );
762 $this->
object->flushAnswers();
763 if ($this->object->isSingleline)
765 foreach (
$_POST[
'choice'][
'answer'] as $index => $answertext)
769 $picturefile =
$_POST[
'choice'][
'imagename'][$index];
770 $file_org_name = $_FILES[
'choice'][
'name'][
'image'][$index];
771 $file_temp_name = $_FILES[
'choice'][
'tmp_name'][
'image'][$index];
773 if (strlen( $file_temp_name ))
776 $suffix = strtolower( array_pop( explode(
".", $file_org_name ) ) );
777 if (in_array( $suffix, array(
"jpg",
"jpeg",
"png",
"gif" ) ))
780 $filename = $this->
object->createNewImageFileName( $file_org_name );
781 if ($this->object->setImageFile(
$filename, $file_temp_name ) == 0)
787 $this->
object->addAnswer( $answertext,
788 $_POST[
'choice'][
'points'][$index],
789 $_POST[
'choice'][
'points_unchecked'][$index],
797 foreach (
$_POST[
'choice'][
'answer'] as $index => $answer)
799 $answertext = $answer;
800 $this->
object->addAnswer( $answertext,
801 $_POST[
'choice'][
'points'][$index],
802 $_POST[
'choice'][
'points_unchecked'][$index],
814 $shuffle->setChecked( $this->object->getShuffle() );
815 $shuffle->setRequired( FALSE );
818 if ($this->object->getId())
821 $hidden->setValue( $this->object->getId() );
827 if (!$this->object->getSelfAssessmentEditingMode())
832 $types->setValue( ($isSingleline) ? 0 : 1 );
833 $types->setOptions( array(
834 0 => $this->lng->txt(
'answers_singleline' ),
835 1 => $this->lng->txt(
'answers_multiline' ),
844 $thumb_size =
new ilNumberInputGUI($this->lng->txt(
"thumb_size" ),
"thumb_size");
845 $thumb_size->
setSuffix($this->lng->txt(
"thumb_size_unit_pixel"));
846 $thumb_size->setMinValue( 20 );
847 $thumb_size->setDecimals( 0 );
848 $thumb_size->setSize( 6 );
849 $thumb_size->setInfo( $this->lng->txt(
'thumb_size_info' ) );
850 $thumb_size->setValue( $this->object->getThumbSize() );
851 $thumb_size->setRequired(
false );
853 return $isSingleline;
855 return $isSingleline;
861 include_once
"./Modules/TestQuestionPool/classes/class.ilMultipleChoiceWizardInputGUI.php";
864 $choices->setQuestionObject( $this->
object );
866 $choices->setSingleline( $isSingleline );
867 $choices->setAllowMove(
false );
868 if ($this->object->getSelfAssessmentEditingMode())
870 $choices->setSize( 40 );
871 $choices->setMaxLength( 800 );
873 if ($this->object->getAnswerCount() == 0)
874 $this->object->addAnswer(
"", 0, 0, 0 );
875 $choices->setValues( $this->object->getAnswers() );
918 $this->
aggregateAnswers( $relevant_answers, $this->object->getAnswers() ) )->get();
923 $aggregate = array();
924 foreach ($answers_defined_on_question as $answer)
926 $aggregated_info_for_answer = array();
927 $aggregated_info_for_answer[
'answertext'] = $answer->getAnswerText();
928 $aggregated_info_for_answer[
'count_checked'] = 0;
930 foreach ($relevant_answers_chosen as $relevant_answer)
932 if ($relevant_answer[
'value1'] == $answer->getOrder())
934 $aggregated_info_for_answer[
'count_checked']++;
937 $aggregated_info_for_answer[
'count_unchecked'] =
938 ceil(count($relevant_answers_chosen) / count($answers_defined_on_question))
939 - $aggregated_info_for_answer[
'count_checked'];
941 $aggregate[] = $aggregated_info_for_answer;
953 $tpl =
new ilTemplate(
'tpl.il_as_aggregated_answers_table.html',
true,
true,
"Modules/TestQuestionPool");
955 $tpl->setCurrentBlock(
'headercell');
956 $tpl->setVariable(
'HEADER', $this->lng->txt(
'tst_answer_aggr_answer_header'));
957 $tpl->parseCurrentBlock();
959 $tpl->setCurrentBlock(
'headercell');
960 $tpl->setVariable(
'HEADER', $this->lng->txt(
'tst_answer_aggr_frequency_header'));
961 $tpl->parseCurrentBlock();
963 foreach ($aggregate as $line_data)
965 $tpl->setCurrentBlock(
'aggregaterow' );
966 $tpl->setVariable(
'OPTION', $line_data[
'answertext'] );
967 $tpl->setVariable(
'COUNT', $line_data[
'count_checked'] );
968 $tpl->parseCurrentBlock();
981 if($this->object->getSpecificFeedbackSetting() == 2)
983 foreach($user_solution as $mc_solution)
985 if(strcmp($mc_solution, $answer_id) == 0)
987 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->object->getId(), $answer_id);
990 $template->setCurrentBlock(
"feedback");
991 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput($fb,
true));
992 $template->parseCurrentBlock();
998 if($this->object->getSpecificFeedbackSetting() == 1)
1000 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->object->getId(), $answer_id);
1003 $template->setCurrentBlock(
"feedback");
1004 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput($fb,
true));
1005 $template->parseCurrentBlock();
1009 if($this->object->getSpecificFeedbackSetting() == 3)
1011 $answer = $this->
object->getAnswer($answer_id);
1013 if($answer->getPoints() > 0)
1015 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->object->getId(), $answer_id);
1018 $template->setCurrentBlock(
"feedback");
1019 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput($fb,
true));
1020 $template->parseCurrentBlock();
isTestPresentationContext()
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
hasCorrectSolution($activeId, $passIndex)
addTab_QuestionPreview(ilTabsGUI $tabsGUI)
writePostData()
Evaluates a posted edit form and writes the form data in the question object.
addTab_QuestionHints(ilTabsGUI $tabs)
adds the hints tab to ilTabsGUI
editQuestion($checkonly=FALSE)
Creates an output of the edit form for the question.
getAfterParticipationSuppressionAnswerPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
getChoiceKeys()
Create the key index numbers for the array of choices.
removechoice()
Remove an answer.
getSpecificFeedbackOutput($active_id, $pass)
getTestOutputSolutions($activeId, $pass)
getAggregatedAnswersView($relevant_answers)
Returns an html string containing a question specific representation of the answers so far given in t...
addBasicQuestionFormProperties($form)
getQuestionTemplate()
get question template
const CSS_CLASS_FEEDBACK_CORRECT
getTestOutput( $active_id, $pass, $is_postponed=FALSE, $use_post_solutions=FALSE, $show_feedback=FALSE)
Class for multiple choice tests.
populateTaxonomyFormSection(ilPropertyFormGUI $form)
removeimagechoice()
Remove an image.
addchoice()
Add a new answer.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
populateAnswerSpecificFormPart(\ilPropertyFormGUI $form)
setQuestionTabs()
Sets the ILIAS tabs for this question type.
writeQuestionGenericPostData()
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)
writeAnswerSpecificPostData(ilPropertyFormGUI $form)
Extracts the answer specific values from $_POST and applies them to the data object.
populateQuestionSpecificFormPart(\ilPropertyFormGUI $form)
writePostData($always=false)
Evaluates a posted edit form and writes the form data in the question object.
special template class to simplify handling of ITX/PEAR
addTab_QuestionFeedback(ilTabsGUI $tabs)
adds the feedback tab to ilTabsGUI
writeQuestionSpecificPostData(ilPropertyFormGUI $form)
Extracts the question specific values from $_POST and applies them to the data object.
const CSS_CLASS_FEEDBACK_WRONG
isContentEditingOutputMode()
Basic GUI class for assessment questions.
static getHtmlPath($relative_path)
get url of path
aggregateAnswers($relevant_answers_chosen, $answers_defined_on_question)
getAfterParticipationSuppressionQuestionPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
getAnswerFeedbackOutput($active_id, $pass)
Returns the answer generic feedback depending on the results of the question.
Multiple choice question GUI representation.
getEditAnswersSingleLine($checkonly=false)
Get the single/multiline editing of answers.
__construct($id=-1)
assMultipleChoiceGUI constructor
saveTaxonomyAssignments()
getPreview($show_question_only=FALSE, $showInlineFeedback=false)
renderAggregateView($aggregate)
addBackTab(ilTabsGUI $ilTabs)
uploadchoice()
Upload an image.
static secureString($a_str, $a_strip_html=true, $a_allow="")
Remove unsecure tags.
Interface ilGuiAnswerScoringAdjustable.
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="")
output question page
Interface ilGuiQuestionScoringAdjustable.
populateSpecificFeedbackInline($user_solution, $answer_id, $template)
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.
addTab_SuggestedSolution(ilTabsGUI $tabs, $classname)
addQuestionFormCommandButtons($form)
Add the command buttons of a question properties form.