5 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintAbstractGUI.php';
6 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
66 $cmd = $ilCtrl->getCmd(self::CMD_SHOW_LIST);
67 $nextClass = $ilCtrl->getNextClass($this);
88 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsTableGUI.php';
91 $this->questionOBJ->getId(), $this->testSession->getActiveId(), $this->testSession->getPass()
95 $this->questionOBJ, $questionHintList, $this, self::CMD_SHOW_LIST
113 if( !isset(
$_GET[
'hintId']) || !(
int)
$_GET[
'hintId'] )
119 (
int)$_GET[
'hintId'], $this->testSession->getActiveId(), $this->testSession->getPass()
124 throw new ilTestException(
'hint with given id is not yet requested for given testactive and testpass');
129 require_once
'Services/Utilities/classes/class.ilUtil.php';
130 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
131 require_once
'Services/Form/classes/class.ilNonEditableValueGUI.php';
137 $form->setFormAction($ilCtrl->getFormAction($this));
139 $form->setTableWidth(
'100%');
141 $form->setTitle(sprintf(
142 $lng->txt(
'tst_question_hints_form_header_edit'),
143 $questionHint->getIndex(),
144 $this->questionOBJ->getTitle()
147 $form->addCommandButton(self::CMD_BACK_TO_QUESTION, $lng->txt(
'tst_question_hints_back_to_question'));
150 $this->questionOBJ->getId(), $this->testSession->getActiveId(), $this->testSession->getPass()
153 if($numExistingRequests > 1)
155 $form->addCommandButton(self::CMD_SHOW_LIST, $lng->txt(
'button_show_requested_question_hints'));
160 $nonEditableHintText =
new ilNonEditableValueGUI($lng->txt(
'tst_question_hints_form_label_hint_text'),
'hint_text',
true);
162 $form->addItem($nonEditableHintText);
166 $nonEditableHintPoints =
new ilNonEditableValueGUI($lng->txt(
'tst_question_hints_form_label_hint_points'),
'hint_points');
167 $nonEditableHintPoints->
setValue($questionHint->getPoints());
168 $form->addItem($nonEditableHintPoints);
186 $this->questionOBJ->getId(), $this->testSession->getActiveId(), $this->testSession->getPass()
189 require_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
194 $ilCtrl->getFormAction($this),
"hintId={$nextRequestableHint->getId()}"
197 $confirmation->setFormAction($formAction);
202 $confirmation->setHeaderText(sprintf(
203 $lng->txt(
'tst_question_hints_request_confirmation'),
204 $nextRequestableHint->getIndex(),
205 $nextRequestableHint->getPoints()
222 if( !isset(
$_GET[
'hintId']) || !(
int)
$_GET[
'hintId'] )
228 $this->questionOBJ->getId(), $this->testSession->getActiveId(), $this->testSession->getPass()
231 if( $nextRequestableHint->getId() != (int)$_GET[
'hintId'] )
233 throw new ilTestException(
'given hint id does not relate to the next requestable hint');
237 $nextRequestableHint, $this->questionOBJ->getId(),
238 $this->testSession->getActiveId(), $this->testSession->getPass()
242 $ilCtrl->getLinkTarget($this, self::CMD_SHOW_HINT,
'',
false,
false),
"hintId={$nextRequestableHint->getId()}"
258 $ilCtrl->redirectByClass(
'ilTestOutputGUI',
'redirectQuestion');
272 if( $this->testOutputGUI->object->getKioskMode() )
274 $tpl->setBodyClass(
'kiosk');
275 $tpl->setAddFooter(
false);
278 'CONTENT',
'content',
'tpl.il_tst_question_hints_kiosk_page.html',
'Modules/TestQuestionPool'
281 $tpl->setVariable(
'KIOSK_HEAD', $this->testOutputGUI->getKioskHead());
283 $tpl->setVariable(
'KIOSK_CONTENT', $content);
287 $tpl->setContent($content);