Skip to content

Commit

Permalink
Test: Fix Formating of Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kergomard committed Dec 11, 2024
1 parent 650e807 commit 7486aca
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*********************************************************************/

use ILIAS\Style\Content\Service as ContentStyle;

/**
* GUI class for feedback editing of assessment questions
*
Expand Down Expand Up @@ -102,6 +104,8 @@ class ilAssQuestionFeedbackEditingGUI
*/
protected $lng = null;

protected ContentStyle $content_style;

/**
* Constructor
*
Expand All @@ -118,6 +122,7 @@ public function __construct(assQuestionGUI $questionGUI, ilCtrl $ctrl, ilAccessH
$this->questionGUI = $questionGUI;
$this->questionOBJ = $questionGUI->object;
$this->feedbackOBJ = $questionGUI->object->feedbackOBJ;
/** @var ILIAS\DI\Container $DIC */
global $DIC;
$this->request = $DIC->testQuestionPool()->internal()->request();
$this->ctrl = $ctrl;
Expand All @@ -126,6 +131,7 @@ public function __construct(assQuestionGUI $questionGUI, ilCtrl $ctrl, ilAccessH
$this->tabs = $tabs;
$this->lng = $lng;
$this->questioninfo = $DIC->testQuestionPool()->questionInfo();
$this->content_style = $DIC->contentStyle();
}

/**
Expand Down Expand Up @@ -154,7 +160,11 @@ public function executeCommand(): void
break;

default:
$this->tabs->setTabActive('feedback');
if ($this->questionOBJ->selfassessmenteditingmode) {
$this->tabs->setTabActive('feedback');
} else {
$this->tabs->setTabActive('tst_feedback');
}
$cmd .= 'Cmd';
$this->$cmd();
break;
Expand All @@ -166,7 +176,7 @@ public function executeCommand(): void
*/
protected function setContentStyle(): void
{
$this->tpl->addCss(ilObjStyleSheet::getContentStylePath(0));
$this->content_style->gui()->addCss($this->tpl, $this->request->getRefId());
}

/**
Expand All @@ -176,10 +186,6 @@ protected function setContentStyle(): void
*/
private function showFeedbackFormCmd(): void
{
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
$this->tpl->parseCurrentBlock();

$form = $this->buildForm();

$this->feedbackOBJ->initGenericFormProperties($form);
Expand Down

0 comments on commit 7486aca

Please sign in to comment.