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';
30 require_once
'Modules/TestQuestionPool/classes/class.assKprimChoice.php';
34 $this->
object->loadFromDb($qId);
43 return $this->
object->feedbackOBJ->isSpecificAnswerFeedbackAvailable($this->object->getId());
48 return array(
'uploadImage',
'removeImage');
59 $this->tpl->setVariable(
"QUESTION_DATA", $this->ctrl->getHTML($form));
67 $this->
object->saveToDb();
74 $position = key(
$_POST[
'cmd'][
'removeImage']);
75 $this->
object->removeAnswerImage($position);
77 $this->
object->saveToDb();
83 if (isset(
$_POST[
'cmd'][__FUNCTION__]) && count(
$_POST[
'cmd'][__FUNCTION__])) {
84 $this->
object->moveAnswerDown(key(
$_POST[
'cmd'][__FUNCTION__]));
85 $this->
object->saveToDb();
93 if (isset(
$_POST[
'cmd'][__FUNCTION__]) && count(
$_POST[
'cmd'][__FUNCTION__])) {
94 $this->
object->moveAnswerUp(key(
$_POST[
'cmd'][__FUNCTION__]));
95 $this->
object->saveToDb();
107 $form->setValuesByPost();
108 $errors = !$form->checkInput();
109 $form->setValuesByPost();
112 $answersInput = $form->getItemByPostVar(
'kprim_answers');
113 $answersInput->setIgnoreMissingUploadsEnabled(
true);
115 if (!$answersInput->checkUploads(
$_POST[$answersInput->getPostVar()])) {
121 $answersInput->collectValidFiles();
161 $shuffleAnswers =
new ilCheckboxInputGUI($this->lng->txt(
"shuffle_answers"),
"shuffle_answers_enabled");
162 $shuffleAnswers->
setChecked($this->object->isShuffleAnswersEnabled());
163 $form->
addItem($shuffleAnswers);
165 if (!$this->object->getSelfAssessmentEditingMode()) {
167 $answerType =
new ilSelectInputGUI($this->lng->txt(
'answer_types'),
'answer_type');
168 $answerType->setOptions($this->object->getAnswerTypeSelectOptions($this->lng));
169 $answerType->setValue($this->object->getAnswerType());
173 if (!$this->object->getSelfAssessmentEditingMode() && $this->
object->isSingleLineAnswerType($this->object->getAnswerType())) {
175 $thumbSize =
new ilNumberInputGUI($this->lng->txt(
'thumb_size'),
'thumb_size');
176 $thumbSize->
setSuffix($this->lng->txt(
"thumb_size_unit_pixel"));
177 $thumbSize->setInfo($this->lng->txt(
'thumb_size_info'));
178 $thumbSize->setDecimals(
false);
179 $thumbSize->setMinValue(20);
180 $thumbSize->setSize(6);
181 if ($this->object->getThumbSize() > 0) {
182 $thumbSize->setValue($this->object->getThumbSize());
189 $optionLabel->
setInfo($this->lng->txt(
'option_label_info'));
190 $optionLabel->setRequired(
true);
191 $optionLabel->setValue($this->object->getOptionLabel());
192 foreach ($this->object->getValidOptionLabelsTranslated($this->lng) as $labelValue => $labelText) {
194 $optionLabel->addOption($option);
196 if ($this->object->isCustomOptionLabel($labelValue)) {
198 $this->lng->txt(
'option_label_custom_true'),
199 'option_label_custom_true' 201 $customLabelTrue->setValue($this->object->getCustomTrueOptionLabel());
202 $option->addSubItem($customLabelTrue);
205 $this->lng->txt(
'option_label_custom_false'),
206 'option_label_custom_false' 208 $customLabelFalse->setValue($this->object->getCustomFalseOptionLabel());
209 $option->addSubItem($customLabelFalse);
218 $points->allowDecimals(
true);
219 $points->setMinValue(0);
220 $points->setMinvalueShouldBeGreater(
true);
221 $points->setValue($this->object->getPoints());
225 $scorePartialSolution =
new ilCheckboxInputGUI($this->lng->txt(
'score_partsol_enabled'),
'score_partsol_enabled');
226 $scorePartialSolution->
setInfo($this->lng->txt(
'score_partsol_enabled_info'));
227 $scorePartialSolution->setChecked($this->object->isScorePartialSolutionEnabled());
228 $form->
addItem($scorePartialSolution);
238 $oldAnswerType = $this->
object->getAnswerType();
240 $this->
object->setShuffleAnswersEnabled($form->
getItemByPostVar(
'shuffle_answers_enabled')->getChecked());
242 if (!$this->object->getSelfAssessmentEditingMode()) {
243 $this->
object->setAnswerType($form->
getItemByPostVar(
'answer_type')->getValue());
248 if (!$this->object->getSelfAssessmentEditingMode() && $this->
object->isSingleLineAnswerType($oldAnswerType)) {
249 $this->
object->setThumbSize($form->
getItemByPostVar(
'thumb_size')->getValue());
252 $this->
object->setOptionLabel($form->
getItemByPostVar(
'option_label')->getValue());
254 if ($this->object->isCustomOptionLabel($this->object->getOptionLabel())) {
255 $this->
object->setCustomTrueOptionLabel(strip_tags(
258 $this->
object->setCustomFalseOptionLabel(strip_tags(
265 $this->
object->setScorePartialSolutionEnabled($form->
getItemByPostVar(
'score_partsol_enabled')->getChecked());
274 require_once
'Modules/TestQuestionPool/classes/class.ilKprimChoiceWizardInputGUI.php';
276 $kprimAnswers->
setInfo($this->lng->txt(
'kprim_answers_info'));
277 $kprimAnswers->setSize(64);
278 $kprimAnswers->setMaxLength(1000);
279 $kprimAnswers->setRequired(
true);
280 $kprimAnswers->setAllowMove(
true);
281 $kprimAnswers->setQuestionObject($this->
object);
282 if (!$this->object->getSelfAssessmentEditingMode()) {
283 $kprimAnswers->setSingleline($this->object->isSingleLineAnswerType($this->object->getAnswerType()));
285 $kprimAnswers->setSingleline(
false);
287 $kprimAnswers->setValues($this->object->getAnswers());
302 $this->
object->handleFileUploads($answers, $files);
303 $this->
object->setAnswers($answers);
312 foreach ($answers as $key => $answer) {
343 $is_postponed =
false,
344 $use_post_solutions =
false,
345 $showInlineFeedback =
false 351 $user_solution = array();
355 #include_once "./Modules/Test/classes/class.ilObjTest.php"; 356 #if (!ilObjTest::_getUsePreviousAnswers($active_id, true)) 358 # if (is_null($pass)) $pass = ilObjTest::_getPass($active_id); 360 $solutions = $this->
object->getTestOutputSolutions($active_id,
$pass);
362 foreach ($solutions as $idx => $solution_value) {
363 $user_solution[$solution_value[
"value1"]] = $solution_value[
"value2"];
368 include_once
"./Services/UICore/classes/class.ilTemplate.php";
369 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_kprim_output.html",
true,
true,
"Modules/TestQuestionPool");
371 foreach (
$keys as $answer_id) {
372 $answer = $this->
object->getAnswer($answer_id);
373 if (strlen($answer->getImageFile())) {
374 if ($this->object->getThumbSize()) {
375 $template->setCurrentBlock(
"preview");
376 $template->setVariable(
"URL_PREVIEW", $answer->getImageWebPath());
377 $template->setVariable(
"TEXT_PREVIEW", $this->lng->txt(
'preview'));
379 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getThumbWebPath());
380 list($width, $height,
$type, $attr) = getimagesize($answer->getImageFsPath());
381 $alt = $answer->getImageFile();
382 if (strlen($answer->getAnswertext())) {
383 $alt = $answer->getAnswertext();
385 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
388 $template->parseCurrentBlock();
390 $template->setCurrentBlock(
"answer_image");
391 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getImageWebPath());
392 list($width, $height,
$type, $attr) = getimagesize($answer->getImageFsPath());
393 $alt = $answer->getImageFile();
394 if (strlen($answer->getAnswertext())) {
395 $alt = $answer->getAnswertext();
397 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
398 $template->setVariable(
"ATTR", $attr);
401 $template->parseCurrentBlock();
405 if ($showInlineFeedback) {
409 $template->setCurrentBlock(
"answer_row");
410 $template->setVariable(
"ANSWER_ID", $answer_id);
411 $template->setVariable(
"ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(),
true));
412 $template->setVariable(
'VALUE_TRUE', 1);
413 $template->setVariable(
'VALUE_FALSE', 0);
415 if (isset($user_solution[$answer->getPosition()])) {
416 $tplVar = $user_solution[$answer->getPosition()] ?
'CHECKED_ANSWER_TRUE' :
'CHECKED_ANSWER_FALSE';
417 $template->setVariable($tplVar,
" checked=\"checked\"");
420 $template->parseCurrentBlock();
422 $template->setVariable(
"QUESTIONTEXT", $this->object->getQuestionForHTMLOutput());
423 $template->setVariable(
"INSTRUCTIONTEXT", $this->object->getInstructionTextTranslation(
425 $this->object->getOptionLabel()
428 $template->setVariable(
"OPTION_LABEL_TRUE", $this->object->getTrueOptionLabelTranslation(
430 $this->object->getOptionLabel()
433 $template->setVariable(
"OPTION_LABEL_FALSE", $this->object->getFalseOptionLabelTranslation(
435 $this->object->getOptionLabel()
438 $questionoutput = $template->get();
439 $pageoutput = $this->
outQuestionPage(
"", $is_postponed, $active_id, $questionoutput, $showInlineFeedback);
447 public function getPreview($show_question_only =
false, $showInlineFeedback =
false)
454 include_once
"./Services/UICore/classes/class.ilTemplate.php";
455 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_kprim_output.html",
true,
true,
"Modules/TestQuestionPool");
457 foreach (
$keys as $answer_id) {
458 $answer = $this->
object->getAnswer($answer_id);
459 if (strlen($answer->getImageFile())) {
460 if ($this->object->getThumbSize()) {
461 $template->setCurrentBlock(
"preview");
462 $template->setVariable(
"URL_PREVIEW", $answer->getImageWebPath());
463 $template->setVariable(
"TEXT_PREVIEW", $this->lng->txt(
'preview'));
465 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getThumbWebPath());
466 list($width, $height,
$type, $attr) = getimagesize($answer->getImageFsPath());
467 $alt = $answer->getImageFile();
468 if (strlen($answer->getAnswertext())) {
469 $alt = $answer->getAnswertext();
471 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
474 $template->parseCurrentBlock();
476 $template->setCurrentBlock(
"answer_image");
477 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getImageWebPath());
478 list($width, $height,
$type, $attr) = getimagesize($answer->getImageFsPath());
479 $alt = $answer->getImageFile();
480 if (strlen($answer->getAnswertext())) {
481 $alt = $answer->getAnswertext();
483 $alt = preg_replace(
"/<[^>]*?>/",
"", $alt);
484 $template->setVariable(
"ATTR", $attr);
487 $template->parseCurrentBlock();
491 if ($showInlineFeedback) {
495 $template->setCurrentBlock(
"answer_row");
496 $template->setVariable(
"ANSWER_ID", $answer_id);
497 $template->setVariable(
"ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(),
true));
498 $template->setVariable(
'VALUE_TRUE', 1);
499 $template->setVariable(
'VALUE_FALSE', 0);
501 if (isset($user_solution[$answer->getPosition()])) {
502 $tplVar = $user_solution[$answer->getPosition()] ?
'CHECKED_ANSWER_TRUE' :
'CHECKED_ANSWER_FALSE';
503 $template->setVariable($tplVar,
" checked=\"checked\"");
506 $template->parseCurrentBlock();
508 $questiontext = $this->
object->getQuestionForHTMLOutput();
512 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext,
true));
514 $template->setVariable(
"INSTRUCTIONTEXT", $this->object->getInstructionTextTranslation(
516 $this->object->getOptionLabel()
519 $template->setVariable(
"OPTION_LABEL_TRUE", $this->object->getTrueOptionLabelTranslation(
521 $this->object->getOptionLabel()
524 $template->setVariable(
"OPTION_LABEL_FALSE", $this->object->getFalseOptionLabelTranslation(
526 $this->object->getOptionLabel()
529 $questionoutput = $template->get();
530 if (!$show_question_only) {
534 return $questionoutput;
562 $graphicalOutput =
false,
563 $result_output =
false,
564 $show_question_only =
true,
565 $show_feedback =
false,
566 $show_correct_solution =
false,
567 $show_manual_scoring =
false,
568 $show_question_text =
true 574 $user_solution = array();
575 if (($active_id > 0) && (!$show_correct_solution)) {
577 foreach ($solutions as $idx => $solution_value) {
578 $user_solution[$solution_value[
'value1']] = $solution_value[
'value2'];
582 foreach ($this->object->getAnswers() as $answer) {
583 $user_solution[$answer->getPosition()] = $answer->getCorrectness();
588 $template =
new ilTemplate(
"tpl.il_as_qpl_mc_kprim_output_solution.html",
true,
true,
"Modules/TestQuestionPool");
590 foreach (
$keys as $answer_id) {
591 $answer = $this->
object->getAnswer($answer_id);
593 if (($active_id > 0) && (!$show_correct_solution)) {
594 if ($graphicalOutput) {
597 if ($user_solution[$answer->getPosition()] == $answer->getCorrectness()) {
598 $template->setCurrentBlock(
"icon_ok");
600 $template->setVariable(
"TEXT_OK", $this->lng->txt(
"answer_is_right"));
601 $template->parseCurrentBlock();
603 $template->setCurrentBlock(
"icon_ok");
605 $template->setVariable(
"TEXT_NOT_OK", $this->lng->txt(
"answer_is_wrong"));
606 $template->parseCurrentBlock();
610 if (strlen($answer->getImageFile())) {
611 $template->setCurrentBlock(
"answer_image");
612 if ($this->object->getThumbSize()) {
613 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getThumbWebPath());
615 $template->setVariable(
"ANSWER_IMAGE_URL", $answer->getImageWebPath());
620 $template->parseCurrentBlock();
623 if ($show_feedback) {
627 $template->setCurrentBlock(
"answer_row");
628 $template->setVariable(
"ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(),
true));
631 if (isset($user_solution[$answer->getPosition()])) {
632 if ($user_solution[$answer->getPosition()]) {
634 $template->setVariable(
"SOLUTION_ALT_TRUE", $this->lng->txt(
"checked"));
636 $template->setVariable(
"SOLUTION_ALT_FALSE", $this->lng->txt(
"unchecked"));
639 $template->setVariable(
"SOLUTION_ALT_TRUE", $this->lng->txt(
"unchecked"));
641 $template->setVariable(
"SOLUTION_ALT_FALSE", $this->lng->txt(
"checked"));
645 $template->setVariable(
"SOLUTION_ALT_TRUE", $this->lng->txt(
"unchecked"));
647 $template->setVariable(
"SOLUTION_ALT_FALSE", $this->lng->txt(
"unchecked"));
650 $template->setVariable(
'SOL_QID', $this->object->getId());
651 $template->setVariable(
'SOL_SUFFIX', $show_correct_solution ?
'bestsolution' :
'usersolution');
652 $template->setVariable(
'SOL_POSITION', $answer->getPosition());
654 $template->setVariable(
'SOL_TRUE_VALUE', 1);
655 $template->setVariable(
'SOL_FALSE_VALUE', 0);
657 if (isset($user_solution[$answer->getPosition()])) {
658 if ($user_solution[$answer->getPosition()]) {
659 $template->setVariable(
'SOL_TRUE_CHECKED',
'checked');
661 $template->setVariable(
'SOL_FALSE_CHECKED',
'checked');
666 $template->parseCurrentBlock();
669 if ($show_question_text ==
true) {
670 $questiontext = $this->
object->getQuestionForHTMLOutput();
674 $template->setVariable(
"QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext,
true));
676 $template->setVariable(
"INSTRUCTIONTEXT", $this->object->getInstructionTextTranslation(
678 $this->object->getOptionLabel()
682 $template->setVariable(
"OPTION_LABEL_TRUE", $this->object->getTrueOptionLabelTranslation(
684 $this->object->getOptionLabel()
687 $template->setVariable(
"OPTION_LABEL_FALSE", $this->object->getFalseOptionLabelTranslation(
689 $this->object->getOptionLabel()
693 $questionoutput = $template->get();
696 $solutiontemplate =
new ilTemplate(
"tpl.il_as_tst_solution_output.html",
true,
true,
"Modules/TestQuestionPool");
698 if (strlen($feedback)) {
704 $solutiontemplate->setVariable(
"ILC_FB_CSS_CLASS", $cssClass);
705 $solutiontemplate->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput($feedback,
true));
708 $solutiontemplate->setVariable(
"SOLUTION_OUTPUT", $questionoutput);
710 $solutionoutput = $solutiontemplate->get();
712 if (!$show_question_only) {
716 return $solutionoutput;
721 $choiceKeys = array_keys($this->object->getAnswers());
723 if ($this->object->isShuffleAnswersEnabled()) {
724 $choiceKeys = $this->
object->getShuffler()->shuffle($choiceKeys);
732 require_once
'Modules/TestQuestionPool/classes/feedback/class.ilAssConfigurableMultiOptionQuestionFeedback.php';
735 if ($user_solution[$answer_id]) {
736 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->object->getId(), 0, $answer_id);
738 $template->setCurrentBlock(
"feedback");
739 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput($fb,
true));
740 $template->parseCurrentBlock();
746 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->object->getId(), 0, $answer_id);
748 $template->setCurrentBlock(
"feedback");
749 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput($fb,
true));
750 $template->parseCurrentBlock();
755 $answer = $this->
object->getAnswer($answer_id);
757 if ($answer->getCorrectness()) {
758 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->object->getId(), 0, $answer_id);
760 $template->setCurrentBlock(
"feedback");
761 $template->setVariable(
"FEEDBACK", $this->object->prepareTextareaOutput($fb,
true));
762 $template->parseCurrentBlock();
810 return '<pre>' . print_r($relevant_answers, 1) .
'</pre>';
815 $trueOptionLabel = $this->
object->getTrueOptionLabelTranslation($this->lng, $this->object->getOptionLabel());
816 $falseOptionLabel = $this->
object->getFalseOptionLabelTranslation($this->lng, $this->object->getOptionLabel());
818 $tpl =
new ilTemplate(
'tpl.il_as_aggregated_kprim_answers_table.html',
true,
true,
"Modules/TestQuestionPool");
820 foreach ($aggregate as $lineData) {
821 $tpl->setCurrentBlock(
'aggregaterow');
822 $tpl->setVariable(
'OPTION', $lineData[
'answertext']);
823 $tpl->setVariable(
'COUNT_TRUE', $lineData[
'count_true']);
824 $tpl->setVariable(
'COUNT_FALSE', $lineData[
'count_false']);
825 $tpl->parseCurrentBlock();
828 $tpl->setVariable(
'OPTION_HEAD', $this->lng->txt(
'answers'));
829 $tpl->setVariable(
'COUNT_TRUE_HEAD', $trueOptionLabel);
830 $tpl->setVariable(
'COUNT_FALSE_HEAD', $falseOptionLabel);
837 $aggregate = array();
839 foreach ($answers as $answer) {
841 'answertext' => $answer->getAnswerText(),
'count_true' => 0,
'count_false' => 0
844 foreach ($rawSolutionData as $solutionRecord) {
845 if ($solutionRecord[
'value1'] == $answer->getPosition()) {
846 if ($solutionRecord[
'value2']) {
847 $answerAgg[
'count_true']++;
849 $answerAgg[
'count_false']++;
854 $aggregate[] = $answerAgg;
862 $agg = $this->
aggregateAnswers($relevantAnswers, $this->object->getAnswers());
866 foreach ($agg as $ans) {
868 'answer' => $ans[
'answertext'],
869 'frequency_true' => $ans[
'count_true'],
870 'frequency_false' => $ans[
'count_false']
886 require_once
'Modules/TestQuestionPool/classes/tables/class.ilKprimChoiceAnswerFreqStatTableGUI.php';
889 $table->setQuestionIndex($questionIndex);
891 $table->initColumns();
902 $points->allowDecimals(
true);
903 $points->setMinValue(0);
904 $points->setMinvalueShouldBeGreater(
true);
905 $points->setValue($this->object->getPoints());
909 $scorePartialSolution =
new ilCheckboxInputGUI($this->lng->txt(
'score_partsol_enabled'),
'score_partsol_enabled');
910 $scorePartialSolution->
setInfo($this->lng->txt(
'score_partsol_enabled_info'));
911 $scorePartialSolution->setChecked($this->object->isScorePartialSolutionEnabled());
912 $form->
addItem($scorePartialSolution);
915 require_once
'Modules/TestQuestionPool/classes/forms/class.ilKprimChoiceCorrectionsInputGUI.php';
917 $kprimAnswers->
setInfo($this->lng->txt(
'kprim_answers_info'));
918 $kprimAnswers->setSize(64);
919 $kprimAnswers->setMaxLength(1000);
920 $kprimAnswers->setRequired(
true);
921 $kprimAnswers->setQuestionObject($this->
object);
922 $kprimAnswers->setValues($this->object->getAnswers());
933 $this->
object->setPoints(
937 $this->
object->setScorePartialSolutionEnabled(
938 (
bool) $form->
getInput(
'score_partsol_enabled')
941 $this->
object->setAnswers(
isTestPresentationContext()
writeQuestionSpecificPostData(ilPropertyFormGUI $form)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
hasCorrectSolution($activeId, $passIndex)
This class represents an option in a radio group.
getAfterParticipationSuppressionQuestionPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
getAnswerFrequencyTableGUI($parentGui, $parentCmd, $relevantAnswers, $questionIndex)
saveCorrectionsFormProperties(ilPropertyFormGUI $form)
addBasicQuestionFormProperties($form)
Add basic question form properties: assessment: title, author, description, question, working time.
buildBasicEditFormObject()
populateAnswerSpecificFormPart(ilPropertyFormGUI $form)
getQuestionTemplate()
get question template
const CSS_CLASS_FEEDBACK_CORRECT
const FEEDBACK_SETTING_CHECKED
getPreview($show_question_only=false, $showInlineFeedback=false)
populateTaxonomyFormSection(ilPropertyFormGUI $form)
getAdditionalEditQuestionCommands()
getUseIntermediateSolution()
Get if intermediate solution should be used for solution output.
handleAnswerTextsSubmit($answers)
const ANSWER_TYPE_MULTI_LINE
writePostData($upload=false)
{}
writeQuestionGenericPostData()
const FEEDBACK_SETTING_CORRECT
getTestOutput( $active_id, $pass, $is_postponed=false, $use_post_solutions=false, $showInlineFeedback=false)
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)
renderAggregateView($aggregate)
writeAnswerSpecificPostData(ilPropertyFormGUI $form)
const CSS_CLASS_FEEDBACK_WRONG
Basic GUI class for assessment questions.
static getHtmlPath($relative_path)
get url of path
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
getAggregatedAnswersView($relevant_answers)
Returns an html string containing a question specific representation of the answers so far given in t...
getAfterParticipationSuppressionAnswerPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
saveTaxonomyAssignments()
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="", $inlineFeedbackEnabled=false)
output question page
const FEEDBACK_SETTING_ALL
__construct(Container $dic, ilPlugin $plugin)
editQuestion(ilPropertyFormGUI $form=null)
static secureString($a_str, $a_strip_html=true, $a_allow="")
Remove unsecure tags.
isRenderPurposePrintPdf()
Interface ilGuiAnswerScoringAdjustable.
populateCorrectionsFormProperties(ilPropertyFormGUI $form)
aggregateAnswers($rawSolutionData, $answers)
getGenericFeedbackOutput($active_id, $pass)
Returns the answer specific feedback for the question.
Interface ilGuiQuestionScoringAdjustable.
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)
supportsIntermediateSolutionOutput()
Question type specific support of intermediate solution output The function getSolutionOutput respect...
populateSpecificFeedbackInline($user_solution, $answer_id, $template)
getAnswersFrequency($relevantAnswers, $questionIndex)
getParticipantsAnswerKeySequence()
addQuestionFormCommandButtons($form)
Add the command buttons of a question properties form.
getSpecificFeedbackOutput($userSolution)
populateQuestionSpecificFormPart(ilPropertyFormGUI $form)
renderPurposeSupportsFormHtml()