19 declare(strict_types=1);
42 protected readonly
ilCtrl $ctrl,
49 private readonly ContentStyle $content_style,
50 private readonly
bool $in_pool_context =
false 52 $this->question_obj = $question_gui->getObject();
53 $this->feedback_obj = $question_gui->getObject()->feedbackOBJ;
58 $this->
help->setScreenIdComponent(
'qpl');
60 $cmd = $this->
ctrl->getCmd(self::CMD_SHOW);
61 $nextClass = $this->
ctrl->getNextClass($this);
63 $this->
ctrl->setParameter($this,
'q_id', $this->question_gui->getObject()->getId());
68 case 'ilassspecfeedbackpagegui':
69 case 'ilassgenfeedbackpagegui':
71 $forwarder->forward();
75 $this->
tabs->setTabActive(
'feedback');
84 $this->content_style->gui()->addCss($this->tpl, $this->request->getRefId());
91 $this->feedback_obj->initGenericFormProperties($form);
92 if ($this->question_obj->hasSpecificFeedback()) {
93 $this->feedback_obj->initSpecificFormProperties($form);
96 $this->tpl->setContent($form->getHTML() . $additional_content);
102 $form->setValuesByPost();
104 if ($form->checkInput()) {
105 $this->feedback_obj->saveGenericFormProperties($form);
106 if ($this->question_obj->hasSpecificFeedback()) {
107 $this->feedback_obj->saveSpecificFormProperties($form);
109 $this->question_obj->cleanupMediaObjectUsage();
110 $this->question_obj->updateTimestamp();
113 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'saved_successfully'),
true);
114 $this->
ctrl->redirect($this, self::CMD_SHOW_SYNC);
117 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'saved_successfully'),
true);
118 $this->
ctrl->redirect($this, self::CMD_SHOW);
121 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
122 $this->tpl->setContent($this->
ctrl->getHTML($form));
127 $mode = $this->request->raw(
'fb_mode');
128 $this->
ctrl->redirectToUrl(
129 $this->feedback_obj->createFeedbackPages($mode)
136 $form->setFormAction($this->
ctrl->getFormAction($this));
137 $form->setTitle($this->
lng->txt(
'feedback_generic'));
138 $form->setTableWidth(
"100%");
139 $form->setId(
"feedback");
141 $this->feedback_obj->completeGenericFormProperties($form);
142 if ($this->question_obj->hasSpecificFeedback()) {
143 $this->feedback_obj->completeSpecificFormProperties($form);
147 $form->addCommandButton(self::CMD_SAVE, $this->
lng->txt(
"save"));
155 if ($this->question_obj->isAdditionalContentEditingModePageObject()
156 && !($this->feedback_obj->isSaveableInPageObjectEditingMode())) {
164 if ($this->in_pool_context) {
168 if ($this->question_obj->isAdditionalContentEditingModePageObject()) {
172 if (!$this->question_gui->needsSyncQuery()) {
181 $modal = $this->question_gui->getQuestionSyncModal(self::CMD_SYNC, self::class);
187 $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='')