19 declare(strict_types=1);
43 protected readonly
ilCtrl $ctrl,
50 private readonly ContentStyle $content_style,
51 private readonly
bool $in_pool_context =
false 53 $this->question_obj = $question_gui->getObject();
54 $this->feedback_obj = $question_gui->getObject()->feedbackOBJ;
59 $this->
help->setScreenIdComponent(
'qpl');
61 $cmd = $this->
ctrl->getCmd(self::CMD_SHOW);
62 $nextClass = $this->
ctrl->getNextClass($this);
64 $this->
ctrl->setParameter($this,
'q_id', $this->question_gui->getObject()->getId());
69 case 'ilassspecfeedbackpagegui':
70 case 'ilassgenfeedbackpagegui':
72 $forwarder->forward();
76 $this->
tabs->setTabActive(
'feedback');
85 $this->content_style->gui()->addCss($this->tpl, $this->request->getRefId());
92 $this->feedback_obj->initGenericFormProperties($form);
93 if ($this->question_obj->hasSpecificFeedback()) {
94 $this->feedback_obj->initSpecificFormProperties($form);
97 $this->tpl->setContent($form->getHTML() . $additional_content);
103 $form->setValuesByPost();
105 if ($form->checkInput()) {
106 $this->feedback_obj->saveGenericFormProperties($form);
107 if ($this->question_obj->hasSpecificFeedback()) {
108 $this->feedback_obj->saveSpecificFormProperties($form);
110 $this->question_obj->cleanupMediaObjectUsage();
111 $this->question_obj->updateTimestamp();
114 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'saved_successfully'),
true);
115 $this->
ctrl->redirect($this, self::CMD_SHOW_SYNC);
118 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'saved_successfully'),
true);
119 $this->
ctrl->redirect($this, self::CMD_SHOW);
122 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
123 $this->tpl->setContent($this->
ctrl->getHTML($form));
128 $mode = $this->request->raw(
'fb_mode');
129 $this->
ctrl->redirectToUrl(
130 $this->feedback_obj->createFeedbackPages($mode)
137 $form->setFormAction($this->
ctrl->getFormAction($this));
138 $form->setTitle($this->
lng->txt(
'feedback_generic'));
139 $form->setTableWidth(
"100%");
140 $form->setId(
"feedback");
142 $this->feedback_obj->completeGenericFormProperties($form);
143 if ($this->question_obj->hasSpecificFeedback()) {
144 $this->feedback_obj->completeSpecificFormProperties($form);
148 $form->addCommandButton(self::CMD_SAVE, $this->
lng->txt(
"save"));
156 if ($this->question_obj->isAdditionalContentEditingModePageObject()
157 && !($this->feedback_obj->isSaveableInPageObjectEditingMode())) {
165 if ($this->in_pool_context) {
169 if ($this->question_obj->isAdditionalContentEditingModePageObject()) {
173 if (!$this->question_gui->needsSyncQuery()) {
182 $modal = $this->question_gui->getQuestionSyncModal(self::CMD_SYNC, self::class);
188 $this->question_obj->syncWithOriginal();
__construct(protected readonly assQuestionGUI $question_gui, protected readonly ilCtrl $ctrl, protected readonly ilAccessHandler $access, protected readonly ilGlobalTemplateInterface $tpl, protected readonly ilTabsGUI $tabs, protected readonly ilLanguage $lng, protected readonly ilHelpGUI $help, private readonly RequestDataCollector $request, private readonly ContentStyle $content_style, private readonly bool $in_pool_context=false)
assQuestion $question_obj
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilAssQuestionFeedback $feedback_obj
isSyncAfterSaveRequired()
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
showFeedbackFormCmd(string $additional_content='')