5 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintAbstractGUI.php';
36 $cmd = $ilCtrl->getCmd(self::CMD_SHOW_FORM);
37 $nextClass = $ilCtrl->getNextClass($this);
62 $form->setValuesByPost();
64 elseif( isset(
$_GET[
'hint_id']) && (
int)
$_GET[
'hint_id'] )
68 if( !$questionHint->load((
int)$_GET[
'hint_id']) )
81 $tpl->setContent( $form->getHTML() );
97 if( $form->checkInput() )
101 if( (
int)$form->getInput(
'hint_id') )
103 $questionHint->load( (
int)$form->getInput(
'hint_id') );
107 $questionHint->setQuestionId( $this->questionOBJ->getId() );
109 $questionHint->setIndex(
114 $questionHint->setText( $form->getInput(
'hint_text') );
115 $questionHint->setPoints( $form->getInput(
'hint_points') );
117 $questionHint->save();
120 $originalexists = $this->questionOBJ->_questionExistsInPool($this->questionOBJ->original_id);
121 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
144 $ilCtrl->redirectByClass(
'ilAssQuestionHintsGUI');
159 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
160 require_once
'Services/Form/classes/class.ilTextAreaInputGUI.php';
161 require_once
'Services/Form/classes/class.ilNumberInputGUI.php';
162 require_once
'Services/Form/classes/class.ilHiddenInputGUI.php';
165 $form->setTableWidth(
'100%');
169 $areaInp =
new ilTextAreaInputGUI($lng->txt(
'tst_question_hints_form_label_hint_text'),
'hint_text');
171 $areaInp->setRows(10);
172 $areaInp->setCols(80);
174 if( !$this->questionGUI->getPreventRteUsage() ) $areaInp->setUseRte(
true);
176 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
179 $areaInp->setRTESupport($this->questionOBJ->getId(),
'qpl',
'assessment', null,
false,
'3.4.7');
181 $areaInp->addPlugin(
"latex");
182 $areaInp->addButton(
"latex");
183 $areaInp->addButton(
"pastelatex");
185 $form->addItem($areaInp);
189 $numInp =
new ilNumberInputGUI($lng->txt(
'tst_question_hints_form_label_hint_points'),
'hint_points');
191 $numInp->setRequired(
true);
194 $form->addItem($numInp);
200 $form->setTitle(sprintf(
201 $lng->txt(
'tst_question_hints_form_header_edit'),
202 $questionHint->getIndex(),
203 $this->questionOBJ->getTitle()
209 $form->addItem($hiddenInp);
213 require_once
'Services/Utilities/classes/class.ilUtil.php';
217 $numInp->setValue($questionHint->getPoints());
219 $hiddenInp->setValue($questionHint->getId());
224 $form->setTitle(sprintf(
225 $lng->txt(
'tst_question_hints_form_header_create'),
226 $this->questionOBJ->getTitle()
230 $form->setFormAction($ilCtrl->getFormAction($this));
232 $form->addCommandButton(self::CMD_CANCEL_FORM, $lng->txt(
'cancel'));
233 $form->addCommandButton(self::CMD_SAVE_FORM, $lng->txt(
'tst_question_hints_form_cmd_save'));