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"));
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');
static getSystemMessageHTML(string $a_txt, string $a_type="info")
Get HTML for a system message.
setNextCommandCmd($nextCommandCmd)
__construct(ilCtrl $ctrl, ilGlobalTemplateInterface $tpl, ilLanguage $lng, ilTestPlayerAbstractGUI $parentGUI, ilTestPasswordChecker $passwordChecker)
const CMD_SHOW_PASSWORD_FORM
const CMD_BACK_TO_INFO_SCREEN
setNextCommandClass($nextCommandClass)
const CMD_SAVE_ENTERED_PASSWORD
ILIAS Test InternalRequestService $testrequest
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...