40 private \ILIAS\TestQuestionPool\InternalRequestService
$request;
123 $this->questionOBJ = $questionGUI->object;
124 $this->feedbackOBJ = $questionGUI->object->feedbackOBJ;
127 $this->request = $DIC->testQuestionPool()->internal()->request();
133 $this->questioninfo = $DIC->testQuestionPool()->questionInfo();
134 $this->content_style = $DIC->contentStyle();
145 $ilHelp = $DIC[
'ilHelp'];
146 $ilHelp->setScreenIdComponent(
'qpl');
148 $cmd = $this->
ctrl->getCmd(self::CMD_SHOW);
149 $nextClass = $this->
ctrl->getNextClass($this);
151 $this->
ctrl->setParameter($this,
'q_id', $this->request->getQuestionId());
155 switch ($nextClass) {
156 case 'ilassspecfeedbackpagegui':
157 case 'ilassgenfeedbackpagegui':
159 $forwarder->forward();
163 $this->
tabs->setTabActive(
'feedback');
175 $this->content_style->gui()->addCss($this->tpl, $this->request->getRefId());
187 $this->feedbackOBJ->initGenericFormProperties($form);
188 if ($this->questionOBJ->hasSpecificFeedback()) {
189 $this->feedbackOBJ->initSpecificFormProperties($form);
192 $this->tpl->setContent($this->
ctrl->getHTML($form));
208 $form->setValuesByPost();
210 if ($form->checkInput()) {
211 $this->feedbackOBJ->saveGenericFormProperties($form);
212 if ($this->questionOBJ->hasSpecificFeedback()) {
213 $this->feedbackOBJ->saveSpecificFormProperties($form);
215 $this->questionOBJ->cleanupMediaObjectUsage();
216 $this->questionOBJ->updateTimestamp();
219 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'saved_successfully'),
true);
220 $this->
ctrl->redirect($this, self::CMD_SHOW_SYNC);
223 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'saved_successfully'),
true);
224 $this->
ctrl->redirect($this, self::CMD_SHOW);
227 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
228 $this->tpl->setContent($this->
ctrl->getHTML($form));
233 $mode = $this->request->raw(
'fb_mode');
234 $this->
ctrl->redirectToUrl(
235 $this->feedbackOBJ->createFeedbackPages($mode)
248 $form->setFormAction($this->
ctrl->getFormAction($this));
249 $form->setTitle($this->
lng->txt(
'feedback_generic'));
250 $form->setTableWidth(
"100%");
251 $form->setId(
"feedback");
253 $this->feedbackOBJ->completeGenericFormProperties($form);
254 if ($this->questionOBJ->hasSpecificFeedback()) {
255 $this->feedbackOBJ->completeSpecificFormProperties($form);
259 $form->addCommandButton(self::CMD_SAVE, $this->
lng->txt(
"save"));
276 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()
277 && !($this->feedbackOBJ->isSaveableInPageObjectEditingMode())) {
281 $hasWriteAccess = $this->
access->checkAccess(
"write",
"", $this->request->getRefId());
282 $isSelfAssessmentEditingMode = $this->questionOBJ->getSelfAssessmentEditingMode();
284 return $hasWriteAccess || $isSelfAssessmentEditingMode;
297 $ilUser = $DIC[
'ilUser'];
299 if (!$this->request->isset(
"calling_test")) {
303 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
307 if (!$this->questioninfo->questionExistsInPool((
int) $this->questionOBJ->getOriginalId())) {
311 if (!$this->questioninfo->questionExistsInPool((
int) $this->questionOBJ->getOriginalId())) {
324 $this->questionGUI->originalSyncForm(
'',
'true');
isFormSaveable()
returns the fact wether the feedback editing form has to be saveable or not.
ContentStyle $content_style
showFeedbackFormCmd()
command for rendering the feedback editing form to the content area
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
buildForm()
builds the feedback editing form object
isSyncAfterSaveRequired()
returns the fact wether the presentation of the question sync2pool form is required after saving the ...
const CMD_SHOW
command constants
ILIAS TestQuestionPool QuestionInfoService $questioninfo
Basic GUI class for assessment questions.
saveFeedbackFormCmd()
command for processing the submitted feedback editing form.
ILIAS TestQuestionPool InternalRequestService $request
executeCommand()
Execute Command.
static _isWriteable(int $question_id, int $user_id)
setContentStyle()
Set content style.