4 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintAbstractGUI.php';
5 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
65 $cmd = $ilCtrl->getCmd(self::CMD_SHOW_LIST);
66 $nextClass = $ilCtrl->getNextClass($this);
70 case 'ilasshintpagegui':
72 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintPageObjectCommandForwarder.php';
75 $forwarder->forward();
95 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsTableGUI.php';
98 $this->questionOBJ->getId(), $this->testSession->getActiveId(), $this->testSession->getPass()
102 $this->questionOBJ, $questionHintList, $this, self::CMD_SHOW_LIST
120 if( !isset(
$_GET[
'hintId']) || !(
int)
$_GET[
'hintId'] )
126 (
int)$_GET[
'hintId'], $this->testSession->getActiveId(), $this->testSession->getPass()
131 throw new ilTestException(
'hint with given id is not yet requested for given testactive and testpass');
136 require_once
'Services/Utilities/classes/class.ilUtil.php';
137 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
138 require_once
'Services/Form/classes/class.ilNonEditableValueGUI.php';
144 $form->setFormAction($ilCtrl->getFormAction($this));
146 $form->setTableWidth(
'100%');
148 $form->setTitle(sprintf(
149 $lng->txt(
'tst_question_hints_form_header_edit'),
150 $questionHint->getIndex(),
151 $this->questionOBJ->getTitle()
154 $form->addCommandButton(self::CMD_BACK_TO_QUESTION, $lng->txt(
'tst_question_hints_back_to_question'));
157 $this->questionOBJ->getId(), $this->testSession->getActiveId(), $this->testSession->getPass()
160 if($numExistingRequests > 1)
162 $form->addCommandButton(self::CMD_SHOW_LIST, $lng->txt(
'button_show_requested_question_hints'));
167 $nonEditableHintText =
new ilNonEditableValueGUI($lng->txt(
'tst_question_hints_form_label_hint_text'),
'hint_text',
true);
169 $form->addItem($nonEditableHintText);
173 $nonEditableHintPoints =
new ilNonEditableValueGUI($lng->txt(
'tst_question_hints_form_label_hint_points'),
'hint_points');
174 $nonEditableHintPoints->
setValue($questionHint->getPoints());
175 $form->addItem($nonEditableHintPoints);
193 $this->questionOBJ->getId(), $this->testSession->getActiveId(), $this->testSession->getPass()
196 require_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
201 $ilCtrl->getFormAction($this),
"hintId={$nextRequestableHint->getId()}"
204 $confirmation->setFormAction($formAction);
209 $confirmation->setHeaderText(sprintf(
210 $lng->txt(
'tst_question_hints_request_confirmation'),
211 $nextRequestableHint->getIndex(),
212 $nextRequestableHint->getPoints()
229 if( !isset(
$_GET[
'hintId']) || !(
int)
$_GET[
'hintId'] )
235 $this->questionOBJ->getId(), $this->testSession->getActiveId(), $this->testSession->getPass()
238 if( $nextRequestableHint->getId() != (int)$_GET[
'hintId'] )
240 throw new ilTestException(
'given hint id does not relate to the next requestable hint');
244 $nextRequestableHint, $this->questionOBJ->getId(),
245 $this->testSession->getActiveId(), $this->testSession->getPass()
263 $ilCtrl->redirectByClass(
'ilTestOutputGUI',
'redirectQuestion');
277 if( $this->testOutputGUI->object->getKioskMode() )
279 $tpl->setBodyClass(
'kiosk');
280 $tpl->setAddFooter(
false);
283 'CONTENT',
'content',
'tpl.il_tst_question_hints_kiosk_page.html',
'Modules/TestQuestionPool'
286 $tpl->setVariable(
'KIOSK_HEAD', $this->testOutputGUI->getKioskHead());
288 $tpl->setVariable(
'KIOSK_CONTENT', $content);
292 $tpl->setContent($content);
308 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
310 $ilCtrl->setParameterByClass(
'ilasshintpagegui',
'hint_id', $hintId);
311 $linkTarget = $ilCtrl->getLinkTargetByClass(
'ilAssHintPageGUI',
'',
'',
false, $xmlStyle);
315 $ilCtrl->setParameter($this,
'hintId', $hintId);
316 $linkTarget = $ilCtrl->getLinkTarget($this, self::CMD_SHOW_HINT,
'',
false, $xmlStyle);