45 $this->tiny_mce_enabled = (
new ilSetting(
'advanced_editing'))->
get(
'advanced_editing_javascript_editor')
46 ===
'tinymce' ?
true :
false;
50 $this->
object->loadFromDb(
$id);
59 $hasErrors = (!$always) ? $this->
editQuestion(
true) :
false;
71 bool $checkonly =
false,
72 ?
bool $is_save_cmd =
null
77 $this->editForm = $form;
79 $form->setFormAction($this->
ctrl->getFormAction($this));
81 $form->setMultipart(
true);
82 $form->setTableWidth(
"100%");
83 $form->setId(
"asstextquestion");
97 $form->setValuesByPost();
98 $errors = !$form->checkInput();
99 $form->setValuesByPost();
115 foreach ($answers as $answer) {
116 $answerTexts[] = $answer->getAnswertext();
126 $rte =
new $rtestring();
127 $rte->addUserTextEditor(
'textarea.textinput');
135 bool $graphical_output =
false,
136 bool $result_output =
false,
137 bool $show_question_only =
true,
138 bool $show_feedback =
false,
139 bool $show_correct_solution =
false,
140 bool $show_manual_scoring =
false,
141 bool $show_question_text =
true,
142 bool $show_inline_feedback =
true
144 if (($active_id > 0) && (!$show_correct_solution)) {
145 $solution = $this->getUserAnswer($active_id, $pass);
147 $solution = $this->getBestAnswer($this->renderPurposeSupportsFormHtml());
150 return $this->renderSolutionOutput(
158 $show_correct_solution,
159 $show_manual_scoring,
167 mixed $user_solutions,
170 bool $graphical_output =
false,
171 bool $result_output =
false,
172 bool $show_question_only =
true,
173 bool $show_feedback =
false,
174 bool $show_correct_solution =
false,
175 bool $show_manual_scoring =
false,
176 bool $show_question_text =
true,
177 bool $show_autosave_title =
false,
178 bool $show_inline_feedback =
false,
181 $template = new
ilTemplate(
"tpl.il_as_qpl_text_question_output_solution.html",
true,
true,
"components/ILIAS/TestQuestionPool");
182 $solutiontemplate =
new ilTemplate(
"tpl.il_as_tst_solution_output.html",
true,
true,
"components/ILIAS/TestQuestionPool");
184 $solution = $this->
object->getHtmlUserSolutionPurifier()->purify($user_solutions);
185 if ($this->renderPurposeSupportsFormHtml()) {
186 $template->setCurrentBlock(
'essay_div');
189 $template->setCurrentBlock(
'essay_textarea');
192 $template->parseCurrentBlock();
194 if (!$show_correct_solution) {
195 $max_no_of_chars = $this->
object->getMaxNumOfChars();
197 if ($max_no_of_chars == 0) {
198 $max_no_of_chars = ucfirst($this->
lng->txt(
'unlimited'));
201 $act_no_of_chars = $this->
object->countLetters($solution);
202 $template->setVariable(
"CHARACTER_INFO",
'<b>' . $max_no_of_chars .
'</b>' .
203 $this->
lng->txt(
'answer_characters') .
' <b>' . $act_no_of_chars .
'</b>');
205 if ($this->
object->isWordCounterEnabled()) {
206 $template->setCurrentBlock(
'word_count');
207 $template->setVariable(
209 $this->
lng->txt(
'qst_essay_written_words') .
210 ' <b>' . $this->object->countWords($solution) .
'</b>'
212 $template->parseCurrentBlock();
215 if (($active_id > 0) && (!$show_correct_solution)) {
216 if ($graphical_output) {
217 $correctness_icon = $this->generateCorrectnessIconsForCorrectness(self::CORRECTNESS_NOT_OK);
218 $reached_points = $this->
object->getReachedPoints($active_id, $pass);
219 if ($reached_points == $this->
object->getMaximumPoints()) {
220 $correctness_icon = $this->generateCorrectnessIconsForCorrectness(self::CORRECTNESS_OK);
221 } elseif ($reached_points > 0) {
222 $correctness_icon = $this->generateCorrectnessIconsForCorrectness(self::CORRECTNESS_MOSTLY_OK);
224 $template->setCurrentBlock(
"icon_ok");
225 $template->setVariable(
"ICON_OK", $correctness_icon);
226 $template->parseCurrentBlock();
229 if ($show_question_text ==
true) {
230 $template->setVariable(
"QUESTIONTEXT", $this->renderLatex(
231 $this->
object->getQuestionForHTMLOutput()
234 $questionoutput = $template->get();
237 if ($show_feedback) {
238 if (!$this->isTestPresentationContext()) {
239 $fb = $this->getGenericFeedbackOutput((
int) $active_id, $pass);
240 $feedback .= strlen($fb) ? $fb :
'';
243 if (strlen($feedback)) {
245 $this->hasCorrectSolution($active_id, $pass) ?
249 $solutiontemplate->setVariable(
"ILC_FB_CSS_CLASS", $cssClass);
250 $solutiontemplate->setVariable(
"FEEDBACK", $this->renderLatex(
255 $solutiontemplate->setVariable(
"SOLUTION_OUTPUT", $questionoutput);
257 $solutionoutput = $solutiontemplate->get();
258 if (!$show_question_only) {
260 $solutionoutput = $this->getILIASPage($solutionoutput);
262 return $solutionoutput;
268 bool $graphical_output =
false,
269 bool $result_output =
false,
270 bool $show_question_only =
true,
271 bool $show_feedback =
false,
272 bool $show_correct_solution =
false,
273 bool $show_manual_scoring =
false,
274 bool $show_question_text =
true,
275 bool $show_autosave_title =
false,
276 bool $show_inline_feedback =
false,
278 $user_solution = $this->getUserAnswer($active_id, $pass);
280 if (($active_id > 0) && (!$show_correct_solution)) {
281 $solution = $user_solution;
283 $solution = $this->getBestAnswer($this->renderPurposeSupportsFormHtml());
286 $template =
new ilTemplate(
"tpl.il_as_qpl_text_question_output_solution.html",
true,
true,
"components/ILIAS/TestQuestionPool");
287 $solutiontemplate =
new ilTemplate(
"tpl.il_as_tst_solution_output.html",
true,
true,
"components/ILIAS/TestQuestionPool");
290 $autosaved_solution = $this->
object->getLatestAutosaveContent($active_id, $pass);
291 if ($autosaved_solution !==
null) {
292 if ($show_autosave_title) {
293 $template->setCurrentBlock(
'autosave_title');
294 $template->setVariable(
'AUTOSAVE_TITLE', $this->
lng->txt(
'autosavecontent'));
295 $template->parseCurrentBlock();
297 $solution = $this->
object->getHtmlUserSolutionPurifier()->purify($autosaved_solution);
298 if ($this->renderPurposeSupportsFormHtml()) {
299 $template->setCurrentBlock(
'essay_div');
302 $template->setCurrentBlock(
'essay_textarea');
305 $template->parseCurrentBlock();
308 if (!$show_correct_solution) {
309 $max_no_of_chars = $this->
object->getMaxNumOfChars();
311 if ($max_no_of_chars == 0) {
312 $max_no_of_chars = ucfirst($this->
lng->txt(
'unlimited'));
315 $act_no_of_chars = $this->
object->countLetters($solution);
316 $template->setVariable(
"CHARACTER_INFO",
'<b>' . $max_no_of_chars .
'</b>' .
317 $this->
lng->txt(
'answer_characters') .
' <b>' . $act_no_of_chars .
'</b>');
319 if ($this->
object->isWordCounterEnabled()) {
320 $template->setCurrentBlock(
'word_count');
321 $template->setVariable(
323 $this->
lng->txt(
'qst_essay_written_words') .
324 ' <b>' . $this->object->countWords($solution) .
'</b>'
326 $template->parseCurrentBlock();
329 if ($show_question_text ==
true) {
330 $template->setVariable(
"QUESTIONTEXT", $this->
object->getQuestionForHTMLOutput());
332 $questionoutput = $template->get();
335 if ($show_feedback) {
336 if (!$this->isTestPresentationContext()) {
337 $fb = $this->getGenericFeedbackOutput((
int) $active_id, $pass);
338 $feedback .= strlen($fb) ? $fb :
'';
341 if (strlen($feedback)) {
343 $this->hasCorrectSolution($active_id, $pass) ?
347 $solutiontemplate->setVariable(
"ILC_FB_CSS_CLASS", $cssClass);
351 $solutiontemplate->setVariable(
"SOLUTION_OUTPUT", $questionoutput);
353 $solutionoutput = $solutiontemplate->get();
354 if (!$show_question_only) {
356 $solutionoutput = $this->getILIASPage($solutionoutput);
358 return $solutionoutput;
363 $answers = $this->
object->getAnswers();
364 if (!count($answers)) {
369 $tplFile =
'tpl.il_as_qpl_text_question_best_solution_html.html';
371 $tplFile =
'tpl.il_as_qpl_text_question_best_solution_ta.html';
374 $tpl =
new ilTemplate($tplFile,
true,
true,
'components/ILIAS/TestQuestionPool');
376 foreach ($answers as $answer) {
379 $keywordString .= (string) $answer->getPoints() .
' ';
380 if ($answer->getPoints() === 1.0 || $answer->getPoints() === -1.0) {
381 $keywordString .= $this->
lng->txt(
'point');
383 $keywordString .= $this->
lng->txt(
'points');
385 $keywordString .=
' ' . $this->
lng->txt(
'for') .
' ';
387 $keywordString .= $answer->getAnswertext();
389 $tpl->setCurrentBlock(
'keyword');
390 $tpl->setVariable(
'KEYWORD', $this->renderLatex($keywordString));
391 $tpl->parseCurrentBlock();
394 $tpl->setVariable(
'KEYWORD_HEADER', $this->
lng->txt(
'solution_contain_keywords'));
395 $tpl->setVariable(
'SCORING_LABEL', $this->
lng->txt(
'essay_scoring_mode') .
': ');
397 switch ($this->
object->getKeywordRelation()) {
399 $tpl->setVariable(
'SCORING_MODE', $this->
lng->txt(
'essay_scoring_mode_keyword_relation_any'));
402 $tpl->setVariable(
'SCORING_MODE', $this->
lng->txt(
'essay_scoring_mode_keyword_relation_all'));
405 $tpl->setVariable(
'SCORING_MODE', $this->
lng->txt(
'essay_scoring_mode_keyword_relation_one'));
415 $solutions = $this->
object->getSolutionValues($active_id, $pass);
416 foreach ($solutions as $idx => $solution_value) {
417 $user_solution = $solution_value[
"value1"];
419 return $user_solution;
423 bool $show_question_only =
false,
424 bool $show_inline_feedback =
false
426 $template = new
ilTemplate(
"tpl.il_as_qpl_text_question_output.html",
true,
true,
"components/ILIAS/TestQuestionPool");
427 if ($this->
object->getMaxNumOfChars()) {
429 $template->setVariable(
"MAXIMUM_CHAR_HINT", sprintf($this->
lng->txt(
"text_maximum_chars_allowed"), $this->object->getMaxNumOfChars()));
430 $template->parseCurrentBlock();
431 #mbecker: No such block. $template->setCurrentBlock("has_maxchars");
432 $template->setVariable(
"MAXCHARS", $this->
object->getMaxNumOfChars());
433 $template->parseCurrentBlock();
434 $template->setCurrentBlock(
"maxchars_counter");
435 $template->setVariable(
"QID", $this->
object->getId());
436 $template->setVariable(
"MAXCHARS", $this->
object->getMaxNumOfChars());
437 $template->setVariable(
"TEXTBOXSIZE", strlen($this->
object->getMaxNumOfChars()));
438 $template->setVariable(
"CHARACTERS", $this->
lng->txt(
"qst_essay_chars_remaining"));
439 $template->parseCurrentBlock();
442 if ($this->
object->isWordCounterEnabled()) {
443 $template->setCurrentBlock(
"word_counter");
444 $template->setVariable(
"QID", $this->
object->getId());
445 $template->setVariable(
"WORDCOUNTER", $this->
lng->txt(
"qst_essay_allready_written_words"));
446 $template->parseCurrentBlock();
449 if (is_object($this->getPreviewSession())) {
450 $template->setVariable(
453 (
string) $this->getPreviewSession()->getParticipantsSolution()
458 $template->setVariable(
"QUESTIONTEXT", $this->renderLatex($this->
object->getQuestionForHTMLOutput()));
459 $template->setVariable(
"QID", $this->
object->getId());
461 $questionoutput = $template->get();
463 $questionoutput .= $this->getJsCode();
465 if (!$show_question_only) {
467 $questionoutput = $this->getILIASPage($questionoutput);
469 return $questionoutput;
475 bool $is_question_postponed =
false,
476 array|
bool $user_post_solutions =
false,
477 bool $show_specific_inline_feedback =
false
482 $solutions = $this->
object->getUserSolutionPreferingIntermediate($active_id, $pass);
483 foreach ($solutions as $solution_value) {
484 $user_solution = $solution_value[
"value1"];
487 if ($this->tiny_mce_enabled) {
488 $user_solution = htmlentities($user_solution);
491 $user_solution = str_replace([
'{',
'}',
'\\'], [
'{',
'}',
'\'], $user_solution);
494 $template =
new ilTemplate(
"tpl.il_as_qpl_text_question_output.html",
true,
true,
"components/ILIAS/TestQuestionPool");
495 if ($this->
object->getMaxNumOfChars()) {
496 $template->setCurrentBlock(
"maximum_char_hint");
497 $template->setVariable(
"MAXIMUM_CHAR_HINT", sprintf($this->
lng->txt(
"text_maximum_chars_allowed"), $this->object->getMaxNumOfChars()));
498 $template->parseCurrentBlock();
499 $template->setVariable(
"MAXCHARS", $this->
object->getMaxNumOfChars());
500 $template->parseCurrentBlock();
501 $template->setCurrentBlock(
"maxchars_counter");
502 $template->setVariable(
"MAXCHARS", $this->
object->getMaxNumOfChars());
503 $template->setVariable(
"QID", $this->
object->getId());
504 $template->setVariable(
"TEXTBOXSIZE", strlen($this->
object->getMaxNumOfChars()));
505 $template->setVariable(
"CHARACTERS", $this->
lng->txt(
"qst_essay_chars_remaining"));
506 $template->parseCurrentBlock();
509 if ($this->
object->isWordCounterEnabled()) {
510 $template->setCurrentBlock(
"word_counter");
511 $template->setVariable(
"QID", $this->
object->getId());
512 $template->setVariable(
"WORDCOUNTER", $this->
lng->txt(
"qst_essay_allready_written_words"));
513 $template->parseCurrentBlock();
516 $template->setVariable(
"QID", $this->
object->getId());
517 $template->setVariable(
"ESSAY", $user_solution);
518 $template->setVariable(
"QUESTIONTEXT", $this->renderLatex($this->
object->getQuestionForHTMLOutput()));
519 $questionoutput = $template->get();
521 $questionoutput .= $this->getJsCode();
523 $pageoutput = $this->outQuestionPage(
"", $is_question_postponed, $active_id, $questionoutput);
529 $tpl =
new ilTemplate(
'tpl.charcounter.html',
true,
true,
'components/ILIAS/TestQuestionPool');
531 $tpl->setCurrentBlock(
'tinymce_handler');
532 $tpl->touchBlock(
'tinymce_handler');
533 $tpl->parseCurrentBlock();
535 if ($this->
object->getMaxNumOfChars() > 0) {
536 $tpl->setCurrentBlock(
'letter_counter_js');
537 $tpl->setVariable(
"MAXCHARS", $this->
object->getMaxNumOfChars());
538 $tpl->parseCurrentBlock();
541 if ($this->
object->isWordCounterEnabled()) {
542 $tpl->setCurrentBlock(
'word_counter_js');
543 $tpl->touchBlock(
'word_counter_js');
544 $tpl->parseCurrentBlock();
547 $tpl->setCurrentBlock(
'counter_js');
548 $tpl->setVariable(
"QID", $this->
object->getId());
549 $tpl->parseCurrentBlock();
551 $this->tpl->addOnLoadCode(
'mcQuestionCharCounterInit();');
557 $this->setAdditionalContentEditingModeFromPost();
559 $cmd = $this->request_data_collector->rawArray(
'cmd');
561 if ($cmd[
'addSuggestedSolution'] && $this->writePostData()) {
563 $this->editQuestion();
566 $this->
object->saveToDb();
567 $this->
ctrl->setParameter($this,
'q_id', $this->
object->getId());
568 $this->tpl->setVariable(
'HEADER', $this->
object->getTitleForHTMLOutput());
569 $this->getQuestionTemplate();
579 $this->
object->setWordCounterEnabled($this->request_data_collector->bool(
'wordcounter') ??
false);
580 $this->
object->setMaxNumOfChars($this->request_data_collector->int(
'maxchars'));
581 $this->
object->setTextRating($this->request_data_collector->string(
'text_rating'));
582 $this->
object->setKeywordRelation($this->request_data_collector->string(
'scoring_mode'));
588 switch ($this->
object->getKeywordRelation()) {
590 $this->
object->setAnswers([]);
591 $points = $this->request_data_collector->float(
'non_keyword_points');
594 $this->
object->setAnswers($this->request_data_collector->raw(
'any_keyword'));
595 $points = $this->
object->getMaximumPoints();
598 $this->
object->setAnswers($this->request_data_collector->raw(
'all_keyword'));
599 $points = $this->request_data_collector->float(
'all_keyword_points');
602 $this->
object->setAnswers($this->request_data_collector->raw(
'one_keyword'));
603 $points = $this->request_data_collector->float(
'one_keyword_points');
606 $this->
object->setPoints((
float) $points);
612 $wordcounter =
new ilCheckboxInputGUI($this->
lng->txt(
'qst_essay_wordcounter_enabled'),
'wordcounter');
613 $wordcounter->setInfo($this->
lng->txt(
'qst_essay_wordcounter_enabled_info'));
614 $wordcounter->setChecked($this->
object->isWordCounterEnabled());
619 $maxchars->setSize(5);
620 $maxchars->setMinValue(1);
621 if ($this->
object->getMaxNumOfChars() > 0) {
622 $maxchars->setValue($this->
object->getMaxNumOfChars());
624 $maxchars->setInfo($this->
lng->txt(
"description_maxchars"));
630 "ci" => $this->
lng->txt(
"cloze_textgap_case_insensitive"),
631 "cs" => $this->
lng->txt(
"cloze_textgap_case_sensitive"),
632 "l1" => sprintf($this->
lng->txt(
"cloze_textgap_levenshtein_of"),
"1"),
633 "l2" => sprintf($this->
lng->txt(
"cloze_textgap_levenshtein_of"),
"2"),
634 "l3" => sprintf($this->
lng->txt(
"cloze_textgap_levenshtein_of"),
"3"),
635 "l4" => sprintf($this->
lng->txt(
"cloze_textgap_levenshtein_of"),
"4"),
636 "l5" => sprintf($this->
lng->txt(
"cloze_textgap_levenshtein_of"),
"5")
638 $textrating->setOptions($text_options);
639 $textrating->setValue($this->
object->getTextRating());
648 $this->
lng->txt(
'essay_scoring_mode'),
653 $this->
lng->txt(
'essay_scoring_mode_without_keywords'),
656 'essay_scoring_mode_without_keywords_desc'
660 $this->
lng->txt(
'essay_scoring_mode_keyword_relation_any'),
663 'essay_scoring_mode_keyword_relation_any_desc'
667 $this->
lng->txt(
'essay_scoring_mode_keyword_relation_all'),
670 'essay_scoring_mode_keyword_relation_all_desc'
674 $this->
lng->txt(
'essay_scoring_mode_keyword_relation_one'),
677 'essay_scoring_mode_keyword_relation_one_desc'
681 $scoringMode->addOption($scoringOptionNone);
682 $scoringMode->addOption($scoringOptionAnyKeyword);
683 $scoringMode->addOption($scoringOptionAllKeyword);
684 $scoringMode->addOption($scoringOptionOneKeyword);
685 $scoringMode->setRequired(
true);
686 $scoringMode->setValue($this->
object->getKeywordRelation());
688 if ($this->
object->getAnswerCount() == 0) {
689 $this->
object->addAnswer(
"", 1, 0, 0);
694 $nonKeywordPoints->allowDecimals(
true);
695 $nonKeywordPoints->setValue($this->
object->getPoints());
696 $nonKeywordPoints->setRequired(
true);
697 $nonKeywordPoints->setSize(3);
698 $nonKeywordPoints->setMinValue(0.0);
699 $nonKeywordPoints->setMinvalueShouldBeGreater(
true);
700 $scoringOptionNone->addSubItem($nonKeywordPoints);
704 $anyKeyword->setRequired(
true);
705 $anyKeyword->setQuestionObject($this->
object);
706 $anyKeyword->setSingleline(
true);
707 $anyKeyword->setValues($this->
object->getAnswers());
708 $scoringOptionAnyKeyword->addSubItem($anyKeyword);
712 $allKeyword->setRequired(
true);
715 $allKeyword->setValues(self::buildAnswerTextOnlyArray($this->
object->getAnswers()));
716 $allKeyword->setMaxLength($anyKeyword->getMaxLength());
717 $scoringOptionAllKeyword->addSubItem($allKeyword);
719 $allKeywordPoints->allowDecimals(
true);
720 $allKeywordPoints->setValue($this->
object->getPoints());
721 $allKeywordPoints->setRequired(
true);
722 $allKeywordPoints->setSize(3);
723 $allKeywordPoints->setMinValue(0.0);
724 $allKeywordPoints->setMinvalueShouldBeGreater(
true);
725 $scoringOptionAllKeyword->addSubItem($allKeywordPoints);
729 $oneKeyword->setRequired(
true);
732 $oneKeyword->setValues(self::buildAnswerTextOnlyArray($this->
object->getAnswers()));
733 $oneKeyword->setMaxLength($anyKeyword->getMaxLength());
734 $scoringOptionOneKeyword->addSubItem($oneKeyword);
736 $oneKeywordPoints->allowDecimals(
true);
737 $oneKeywordPoints->setValue($this->
object->getPoints());
738 $oneKeywordPoints->setRequired(
true);
739 $oneKeywordPoints->setSize(3);
740 $oneKeywordPoints->setMinValue(0.0);
741 $oneKeywordPoints->setMinvalueShouldBeGreater(
true);
742 $scoringOptionOneKeyword->addSubItem($oneKeywordPoints);
788 $this->populateQuestionSpecificFormPart($form);
789 $this->populateAnswerSpecificFormPart($form);
799 $this->writeQuestionSpecificPostData($form);
800 $this->writeAnswerSpecificPostData($form);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
populateTaxonomyFormSection(ilPropertyFormGUI $form)
writeQuestionGenericPostData()
addBasicQuestionFormProperties(ilPropertyFormGUI $form)
renderEditForm(ilPropertyFormGUI $form)
saveTaxonomyAssignments()
addQuestionFormCommandButtons(ilPropertyFormGUI $form)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAnswersFrequency($relevantAnswers, $questionIndex)
populateQuestionSpecificFormPart(\ilPropertyFormGUI $form)
isAnswerFreuqencyStatisticSupported()
getTestOutput(int $active_id, int $pass, bool $is_question_postponed=false, array|bool $user_post_solutions=false, bool $show_specific_inline_feedback=false)
writeQuestionSpecificPostData(ilPropertyFormGUI $form)
Extracts the question specific values from the request and applies them to the data object.
getSolutionOutput(int $active_id, ?int $pass=null, bool $graphical_output=false, bool $result_output=false, bool $show_question_only=true, bool $show_feedback=false, bool $show_correct_solution=false, bool $show_manual_scoring=false, bool $show_question_text=true, bool $show_inline_feedback=true)
__construct($id=-1)
assTextQuestionGUI constructor
writePostData(bool $always=false)
{Evaluates a posted edit form and writes the form data in the question object.integer A positive valu...
editQuestion(bool $checkonly=false, ?bool $is_save_cmd=null)
renderSolutionOutput(mixed $user_solutions, int $active_id, ?int $pass, bool $graphical_output=false, bool $result_output=false, bool $show_question_only=true, bool $show_feedback=false, bool $show_correct_solution=false, bool $show_manual_scoring=false, bool $show_question_text=true, bool $show_autosave_title=false, bool $show_inline_feedback=false,)
saveCorrectionsFormProperties(ilPropertyFormGUI $form)
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...
writeAnswerSpecificPostData(ilPropertyFormGUI $form)
Extracts the answer specific values from the request and applies them to the data object.
getPreview(bool $show_question_only=false, bool $show_inline_feedback=false)
getUserAnswer($active_id, $pass)
static buildAnswerTextOnlyArray($answers)
populateAnswerSpecificFormPart(\ilPropertyFormGUI $form)
populateCorrectionsFormProperties(ilPropertyFormGUI $form)
getAutoSavedSolutionOutput(int $active_id, ?int $pass=null, bool $graphical_output=false, bool $result_output=false, bool $show_question_only=true, bool $show_feedback=false, bool $show_correct_solution=false, bool $show_manual_scoring=false, bool $show_question_text=true, bool $show_autosave_title=false, bool $show_inline_feedback=false,)
getSpecificFeedbackOutput(array $userSolution)
Returns the answer specific feedback for the question.
Class for text questions.
const SCORING_MODE_KEYWORD_RELATION_NONE
const SCORING_MODE_KEYWORD_RELATION_ONE
const SCORING_MODE_KEYWORD_RELATION_ANY
static getScoringModesWithPointsByKeyword()
const SCORING_MODE_KEYWORD_RELATION_ALL
const CSS_CLASS_FEEDBACK_WRONG
const CSS_CLASS_FEEDBACK_CORRECT
static _getRTEClassname()
This class represents an option in a radio group.
static set(string $a_var, $a_val)
Set a value.
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
This class represents a text wizard property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
if(!file_exists('../ilias.ini.php'))