40 private \ILIAS\TestQuestionPool\InternalRequestService
$request;
122 $this->questionOBJ = $questionGUI->object;
123 $this->feedbackOBJ = $questionGUI->object->feedbackOBJ;
126 $this->request = $DIC->testQuestionPool()->internal()->request();
132 $this->content_style = $DIC->contentStyle();
143 $ilHelp = $DIC[
'ilHelp'];
144 $ilHelp->setScreenIdComponent(
'qpl');
146 $cmd = $this->
ctrl->getCmd(self::CMD_SHOW);
147 $nextClass = $this->
ctrl->getNextClass($this);
149 $this->
ctrl->setParameter($this,
'q_id', $this->request->getQuestionId());
153 switch ($nextClass) {
154 case 'ilassspecfeedbackpagegui':
155 case 'ilassgenfeedbackpagegui':
157 $forwarder->forward();
161 if ($this->questionOBJ->selfassessmenteditingmode) {
162 $this->
tabs->setTabActive(
'feedback');
164 $this->
tabs->setTabActive(
'tst_feedback');
177 $this->content_style->gui()->addCss($this->tpl, $this->request->getRefId());
189 $this->feedbackOBJ->initGenericFormProperties($form);
190 if ($this->questionOBJ->hasSpecificFeedback()) {
191 $this->feedbackOBJ->initSpecificFormProperties($form);
194 $this->tpl->setContent($this->
ctrl->getHTML($form));
210 $form->setValuesByPost();
212 if ($form->checkInput()) {
213 $this->feedbackOBJ->saveGenericFormProperties($form);
214 if ($this->questionOBJ->hasSpecificFeedback()) {
215 $this->feedbackOBJ->saveSpecificFormProperties($form);
217 $this->questionOBJ->cleanupMediaObjectUsage();
218 $this->questionOBJ->updateTimestamp();
221 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'saved_successfully'),
true);
222 $this->
ctrl->redirect($this, self::CMD_SHOW_SYNC);
225 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'saved_successfully'),
true);
226 $this->
ctrl->redirect($this, self::CMD_SHOW);
229 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
230 $this->tpl->setContent($this->
ctrl->getHTML($form));
242 $form->setFormAction($this->
ctrl->getFormAction($this));
243 $form->setTitle($this->
lng->txt(
'feedback_generic'));
244 $form->setTableWidth(
"100%");
245 $form->setId(
"feedback");
247 $this->feedbackOBJ->completeGenericFormProperties($form);
248 if ($this->questionOBJ->hasSpecificFeedback()) {
249 $this->feedbackOBJ->completeSpecificFormProperties($form);
253 $form->addCommandButton(self::CMD_SAVE, $this->
lng->txt(
"save"));
270 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()
271 && !($this->feedbackOBJ->isSaveableInPageObjectEditingMode())) {
275 $hasWriteAccess = $this->
access->checkAccess(
"write",
"", $this->request->getRefId());
276 $isSelfAssessmentEditingMode = $this->questionOBJ->getSelfAssessmentEditingMode();
278 return $hasWriteAccess || $isSelfAssessmentEditingMode;
293 if (!$this->request->isset(
"calling_test")) {
297 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
301 if (!$this->questionOBJ->_questionExistsInPool((
int) $this->questionOBJ->getOriginalId())) {
305 if (!$this->questionOBJ->_questionExistsInPool((
int) $this->questionOBJ->getOriginalId())) {
318 $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
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
saveFeedbackFormCmd()
command for processing the submitted feedback editing form.
ILIAS TestQuestionPool InternalRequestService $request
__construct(Container $dic, ilPlugin $plugin)
executeCommand()
Execute Command.
static _isWriteable(int $question_id, int $user_id)
setContentStyle()
Set content style.