19 declare(strict_types=1);
36 private \ILIAS\DI\UIServices
$ui;
370 $this->anythingRendered =
true;
383 'ilTestMarkQuestionIcon' 386 $actions[] = $this->ui_factory->button()->shy(
389 )->withAdditionalOnLoadCode(
390 static function (
string $id) use ($target):
string {
391 return "document.getElementById('$id').addEventListener('click', " 393 .
" il.TestPlayerQuestionEditControl.checkNavigation('{$target}', 'show', e);" 400 $actions[] = $this->ui_factory->button()->shy(
401 $this->
lng->txt(
'postpone_question'),
406 if ($actions !== []) {
407 $actions[] = $this->ui_factory->divider()->horizontal();
410 $actions[] = $this->ui_factory->button()->shy(
411 $this->
lng->txt(
'tst_revert_changes'),
415 $actions[] = $this->ui_factory->button()->shy(
416 $this->
lng->txt(
'discard_answer'),
421 fn(
$id) =>
"document.getElementById('$id').addEventListener( 423 ()=>$('#tst_discard_solution_modal').modal('show') 427 $list = $this->ui_factory->dropdown()->standard($actions)->withLabel($this->
lng->txt(
"actions"));
428 $tpl->setVariable(
'ACTION_MENU', $this->ui_renderer->render($list));
475 $this->
lng->txt(
'show_requested_question_hints')
492 return $this->
lng->txt(
'edit_answer');
495 return $this->
lng->txt(
'answer_question');
501 return $this->
lng->txt(
'submit_and_check');
504 return $this->
lng->txt(
'check');
510 return $this->
lng->txt(
'button_request_next_question_hint');
513 return $this->
lng->txt(
'button_request_question_hint');
520 return $this->
lng->txt(
'tst_remove_mark');
523 return $this->
lng->txt(
'tst_question_mark');
530 return $this->
lng->txt(
'tst_question_marked');
533 return$this->
lng->txt(
'tst_question_not_marked');
554 switch ($a_purpose) {
557 'tpl.tst_question_navigation.html',
565 'tpl.tst_question_actions.html',
599 $tpl->
setVariable(
"BUTTON_INSTANCE", $this->ui_renderer->render($button));
620 $this->ui_factory->button()->standard($label,
'')->withAdditionalOnLoadCode($on_load_code)
634 $this->ui_factory->button()->primary($label,
'')->withAdditionalOnLoadCode($on_load_code)
641 $this->ui_factory->button()->standard($label,
'')->withAdditionalOnLoadCode($on_load_code)
647 return static function (
$id) use ($command):
string {
648 return "document.getElementById('$id').addEventListener('click', " 650 .
" e.target.setAttribute('name', 'cmd[$command]');" 651 .
' e.target.form.requestSubmit(e.target);' parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
getEditSolutionButtonLabel()
isForceInstantResponseEnabled()
renderActionsIcon(ilTemplate $tpl, $iconSrc, $label, $cssClass)
getSkipQuestionLinkTarget()
renderButtonInstance(ilTemplate $tpl, Button $button)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
isQuestionWorkedThrough()
getInstantFeedbackCommand()
setSubmitSolutionCommand($submitSolutionCommand)
setHintRequestsExist($hintRequestsExist)
withAdditionalOnLoadCode(Closure $binder)
renderIcon(ilTemplate $tpl, $command, $iconSrc, $label, $cssClass)
getRequestHintButtonLabel()
const CSS_CLASS_SUBMIT_BUTTONS
parseButtonsBlock(ilTemplate $tpl)
getRevertChangesLinkTarget()
getOnLoadCode(string $command)
getQuestionMarkIconSource()
setQuestionWorkedThrough($questionWorkedThrough)
setDiscardSolutionButtonEnabled($discardSolutionButtonEnabled)
setRevertChangesLinkTarget($revertChangesLinkTarget)
setVariable($variable, $value='')
Sets a variable value.
renderSubmitButton(ilTemplate $tpl, string $command, string $label)
setInstantFeedbackCommand($instantFeedbackCommand)
__construct(protected ilLanguage $lng, protected UIFactory $ui_factory, protected UIRenderer $ui_renderer)
$forceInstantResponseEnabled
const SHOW_DISABLED_COMMANDS
setSkipQuestionLinkTarget($skipQuestionLinkTarget)
isAnswerFreezingEnabled()
setEditSolutionCommand($editSolutionCommand)
renderInstantFeedbackButton(ilTemplate $tpl, string $command, string $label, bool $is_primary)
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
isDiscardSolutionButtonEnabled()
setForceInstantResponseEnabled($forceInstantResponseEnabled)
setShowHintsCommand($showHintsCommand)
getQuestionMarkLinkTarget()
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getQuestionMarkIconLabel()
setAnswerFreezingEnabled($answerFreezingEnabled)
setQuestionMarkLinkTarget($questionMarkLinkTarget)
setQuestionMarked($questionMarked)
getTemplate($a_purpose='toolbar')
Get the template.
getSubmitSolutionCommand()
$discardSolutionButtonEnabled
setRequestHintCommand($requestHintCommand)
getQuestionMarkActionLabel()
parseNavigation(ilTemplate $tpl)