Skip to content
Snippets Groups Projects
Commit a653ba90 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

jump to, open and mark module as selected after storing changes, fixes #4473

Closes #4473

Merge request studip/studip!3261
parent c60f30a6
No related branches found
No related tags found
No related merge requests found
...@@ -101,6 +101,7 @@ class Module_ModuleController extends MVVController ...@@ -101,6 +101,7 @@ class Module_ModuleController extends MVVController
$this->count = Modul::getCount($this->filter); $this->count = Modul::getCount($this->filter);
$this->show_sidebar_search = true; $this->show_sidebar_search = true;
$this->show_sidebar_filter = true; $this->show_sidebar_filter = true;
$this->modul_id = Request::option('modul_id');
$this->setSidebar(); $this->setSidebar();
} }
...@@ -323,7 +324,7 @@ class Module_ModuleController extends MVVController ...@@ -323,7 +324,7 @@ class Module_ModuleController extends MVVController
$success_message, $success_message,
htmlReady($this->modul->getDisplayName()) htmlReady($this->modul->getDisplayName())
)); ));
$this->redirect($this->indexURL()); $this->redirect($this->indexURL(['modul_id' => $this->modul->id]) . "#modul_{$this->modul->id}");
return; return;
} }
} }
......
<? foreach ($module as $modul) : ?> <? foreach ($module as $modul) : ?>
<? $perm = MvvPerm::get($modul) ?> <? $perm = MvvPerm::get($modul) ?>
<tbody class="<?= ($modul->count_modulteile ? '' : 'empty ') ?><?= ($modul_id === $modul->getId() ? 'not-collapsed' : 'collapsed') ?>"> <tbody class="<?= $modul->count_modulteile ? '' : 'empty ' ?><?= $modul_id === $modul->getId() ? 'not-collapsed' : 'collapsed' ?>">
<? $ampel_icon = $GLOBALS['MVV_STUDIENGANG']['STATUS']['values'][$modul->stat]['icon'] ?> <? $ampel_icon = $GLOBALS['MVV_STUDIENGANG']['STATUS']['values'][$modul->stat]['icon'] ?>
<? $ampelstatus = $GLOBALS['MVV_STUDIENGANG']['STATUS']['values'][$modul->stat]['name'] ?> <? $ampelstatus = $GLOBALS['MVV_STUDIENGANG']['STATUS']['values'][$modul->stat]['name'] ?>
<tr class="header-row" id="modul_<?= $modul->getId() ?>"> <tr class="header-row <?= $modul_id === $modul->getId() ? 'selected' : '' ?>" id="modul_<?= $modul->getId() ?>">
<? if ($modul->count_modulteile) : ?> <? if ($modul->count_modulteile) : ?>
<td style="white-space:nowrap;" class="toggle-indicator"> <td style="white-space:nowrap;" class="toggle-indicator">
<? $details_action = $details_action ?? 'details'; ?> <? $details_action = $details_action ?? 'details'; ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment