4 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintAbstractGUI.php';
5 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
67 $cmd = $ilCtrl->getCmd(self::CMD_SHOW_LIST);
68 $nextClass = $ilCtrl->getNextClass($this);
72 case 'ilasshintpagegui':
74 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintPageObjectCommandForwarder.php';
77 $forwarder->forward();
97 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsTableGUI.php';
99 $questionHintList = $this->questionHintTracking->getRequestedHintsList();
102 $this->questionOBJ, $questionHintList, $this, self::CMD_SHOW_LIST
120 if( !isset(
$_GET[
'hintId']) || !(
int)
$_GET[
'hintId'] )
125 $isRequested = $this->questionHintTracking->isRequested((
int)$_GET[
'hintId']);
129 throw new ilTestException(
'hint with given id is not yet requested for given testactive and testpass');
134 require_once
'Services/Utilities/classes/class.ilUtil.php';
135 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
136 require_once
'Services/Form/classes/class.ilNonEditableValueGUI.php';
142 $form->setFormAction($ilCtrl->getFormAction($this));
144 $form->setTableWidth(
'100%');
146 $form->setTitle(sprintf(
147 $lng->txt(
'tst_question_hints_form_header_edit'),
148 $questionHint->getIndex(),
149 $this->questionOBJ->getTitle()
152 $form->addCommandButton(self::CMD_BACK_TO_QUESTION, $lng->txt(
'tst_question_hints_back_to_question'));
154 $numExistingRequests = $this->questionHintTracking->getNumExistingRequests();
156 if($numExistingRequests > 1)
158 $form->addCommandButton(self::CMD_SHOW_LIST, $lng->txt(
'button_show_requested_question_hints'));
163 $nonEditableHintText =
new ilNonEditableValueGUI($lng->txt(
'tst_question_hints_form_label_hint_text'),
'hint_text',
true);
165 $form->addItem($nonEditableHintText);
169 $nonEditableHintPoints =
new ilNonEditableValueGUI($lng->txt(
'tst_question_hints_form_label_hint_points'),
'hint_points');
170 $nonEditableHintPoints->
setValue($questionHint->getPoints());
171 $form->addItem($nonEditableHintPoints);
188 $nextRequestableHint = $this->questionHintTracking->getNextRequestableHint();
190 require_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
195 $ilCtrl->getFormAction($this),
"hintId={$nextRequestableHint->getId()}"
198 $confirmation->setFormAction($formAction);
203 $confirmation->setHeaderText(sprintf(
204 $lng->txt(
'tst_question_hints_request_confirmation'),
205 $nextRequestableHint->getIndex(),
206 $nextRequestableHint->getPoints()
223 if( !isset(
$_GET[
'hintId']) || !(
int)
$_GET[
'hintId'] )
228 $nextRequestableHint = $this->questionHintTracking->getNextRequestableHint();
230 if( $nextRequestableHint->getId() != (int)$_GET[
'hintId'] )
232 throw new ilTestException(
'given hint id does not relate to the next requestable hint');
235 $this->questionHintTracking->storeRequest($nextRequestableHint);
252 $ilCtrl->redirect($this->parentGUI, $this->parentCMD);
268 $tpl->setBodyClass(
'kiosk');
269 $tpl->setAddFooter(
false);
272 'CONTENT',
'content',
'tpl.il_tst_question_hints_kiosk_page.html',
'Modules/TestQuestionPool'
275 $tpl->setVariable(
'KIOSK_HEAD', $this->parentGUI->getKioskHead());
277 $tpl->setVariable(
'KIOSK_CONTENT', $content);
281 $tpl->setContent($content);
307 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
309 $ilCtrl->setParameterByClass(
'ilasshintpagegui',
'hint_id', $hintId);
310 $linkTarget = $ilCtrl->getLinkTargetByClass(
'ilAssHintPageGUI',
'',
'',
false, $xmlStyle);
314 $ilCtrl->setParameter($this,
'hintId', $hintId);
315 $linkTarget = $ilCtrl->getLinkTarget($this, self::CMD_SHOW_HINT,
'',
false, $xmlStyle);