Skip to content

Commit

Permalink
PRG: 43817, do not prepareOutput for async modal responses
Browse files Browse the repository at this point in the history
  • Loading branch information
nhaagen authored and klees committed Jan 28, 2025
1 parent ce565c0 commit 64dfaa0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ilObjStudyProgrammeAutoCategoriesGUI

private const CMD_VIEW = 'view';
private const CMD_SAVE = 'save';
private const CMD_GET_ASYNC_MODAL = 'getAsyncModalOutput';
public const CMD_GET_ASYNC_MODAL = 'getAsyncModalOutput';
private const CMD_DELETE = 'delete';
private const CMD_DELETE_CONFIRMATION = 'deleteConfirmation';
private const CMD_PROFILE_NOT_PUBLIC = 'profile_not_public';
Expand Down Expand Up @@ -293,7 +293,7 @@ protected function getModal(int $current_ref_id = null): RoundTrip
if (!is_null($current_ref_id)) {
$this->ctrl->setParameter($this, self::CHECKBOX_CATEGORY_REF_IDS, (string) $current_ref_id);
}
$link = $this->ctrl->getLinkTarget($this, "getAsyncModalOutput", "", true);
$link = $this->ctrl->getLinkTarget($this, self::CMD_GET_ASYNC_MODAL, "", true);
$this->ctrl->setParameter($this, self::CHECKBOX_CATEGORY_REF_IDS, null);
return $this->ui_factory->modal()->roundtrip(
'',
Expand Down Expand Up @@ -333,7 +333,6 @@ function ($id) use ($form) {
}
);


echo $this->ui_renderer->renderAsync($modal);
exit;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ilObjStudyProgrammeAutoMembershipsGUI
private const CMD_SAVE = 'save';
private const CMD_DELETE = 'delete';
private const CMD_DELETE_CONFIRMATION = 'deleteConfirmation';
private const CMD_GET_ASYNC_MODAL_OUTPUT = 'getAsynchModalOutput';
public const CMD_GET_ASYNC_MODAL_OUTPUT = 'getAsynchModalOutput';
private const CMD_NEXT_STEP = 'nextStep';
private const CMD_ENABLE = 'enable';
private const CMD_DISABLE = 'disable';
Expand Down Expand Up @@ -103,6 +103,8 @@ public function executeCommand(): void
case self::CMD_PROFILE_NOT_PUBLIC:
$this->view(true);
break;
case 'handleExplorerCommand':
break;
default:
throw new ilException("ilObjStudyProgrammeAutoMembershipsGUI: Command not supported: $cmd");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,14 @@ public function executeCommand(): void
$cmd = $this->ctrl->getCmd(self::SUBTAB_VIEW_MANAGE);
$next_class = $this->ctrl->getNextClass($this);

$this->addToNavigationHistory();

parent::prepareOutput();

$this->addHeaderAction();
if (!in_array($cmd, [
ilObjStudyProgrammeAutoCategoriesGUI::CMD_GET_ASYNC_MODAL,
ilObjStudyProgrammeAutoMembershipsGUI::CMD_GET_ASYNC_MODAL_OUTPUT
])) {
$this->addToNavigationHistory();
parent::prepareOutput();
$this->addHeaderAction();
}

switch ($next_class) {
case "ilinfoscreengui":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class ilObjStudyProgrammeListGUI extends ilObjectListGUI
{
public function __construct()
{
global $DIC;
parent::__construct();
$this->lng->loadLanguageModule("prg");
}
Expand Down

0 comments on commit 64dfaa0

Please sign in to comment.