72 $this->testrequest =
$DIC->test()->internal()->request();
82 $this->
ctrl->saveParameter($this,
'nextCommand');
83 $nextCommand = explode(
'::', $this->testrequest->getNextCommand());
87 $this->
ctrl->saveParameter($this->parentGUI,
'lock');
89 switch ($this->
ctrl->getNextClass()) {
92 $cmd = $this->
ctrl->getCmd() .
'Cmd';
99 if (!$this->passwordChecker->wrongUserEnteredPasswordExist()) {
104 $this->
lng->txt(
'tst_password_entered_wrong_password'),
115 $form->setTitle($this->
lng->txt(
"tst_password_form"));
116 $form->setDescription($this->
lng->txt(
"tst_password_introduction"));
118 $form->setFormAction($this->
ctrl->getFormAction($this));
119 $form->addCommandButton(self::CMD_SAVE_ENTERED_PASSWORD, $this->
lng->txt(
"submit"));
120 $form->addCommandButton(self::CMD_BACK_TO_INFO_SCREEN, $this->
lng->txt(
"cancel"));
123 $inp->setRequired(
true);
124 $inp->setRetype(
false);
125 $form->addItem($inp);
131 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
132 require_once
'Services/Form/classes/class.ilPasswordInputGUI.php';
135 $DIC->globalScreen()->tool()->context()->current()->getAdditionalData()->replace(
137 $this->parentGUI->getObject()->getTitle() .
' - ' . $this->lng->txt(
'tst_password_form')
143 $this->tpl->setVariable(
144 $this->parentGUI->getContentBlockName(),
145 $msg . $this->ctrl->getHTML($form)
151 $this->passwordChecker->setUserEnteredPassword($_POST[
"password"]);
153 if (!$this->passwordChecker->isUserEnteredPasswordCorrect()) {
154 $this->passwordChecker->logWrongEnteredPassword();
162 $this->
ctrl->redirectByClass(
'ilObjTestGUI',
'infoScreen');
Class ilCtrl provides processing control methods.
__construct(ilCtrl $ctrl, ilGlobalTemplateInterface $tpl, ilLanguage $lng, ilTestPlayerAbstractGUI $parentGUI, ilTestPasswordChecker $passwordChecker)
const CMD_SAVE_ENTERED_PASSWORD
ILIAS Test InternalRequestService $testrequest
const CMD_BACK_TO_INFO_SCREEN
const CMD_SHOW_PASSWORD_FORM
setNextCommandCmd($nextCommandCmd)
setNextCommandClass($nextCommandClass)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getSystemMessageHTML(string $a_txt, string $a_type="info")
Get HTML for a system message.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...