diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-05-14 08:33:30 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-05-14 08:33:30 +0200 |
| commit | 1a447f53e588bbe2b86fa25ce7628d0be46b5022 (patch) | |
| tree | 4a85b1adeee24ae18b571588049814da03cb082c /app/controllers/course/wizard.php | |
| parent | f69a3082123db28f5156d02a884756cef4e0825f (diff) | |
fix studygroup creation and link to course administration if the module is deactivated, fixes #5591
Closes #5591
Merge request studip/studip!4226
Diffstat (limited to 'app/controllers/course/wizard.php')
| -rw-r--r-- | app/controllers/course/wizard.php | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/app/controllers/course/wizard.php b/app/controllers/course/wizard.php index ad289ed..b1cfcbb 100644 --- a/app/controllers/course/wizard.php +++ b/app/controllers/course/wizard.php @@ -197,13 +197,22 @@ class Course_WizardController extends AuthenticatedController // A studygroup has been created. if (in_array($this->course->status, studygroup_sem_types())) { - $message = MessageBox::success(sprintf( - _('Die Studien-/Arbeitsgruppe „%s“ wurde angelegt. ' - . 'Sie können sie direkt hier weiter verwalten.'), - htmlReady($this->course->name) - )); + if ($this->course->isToolActive(CoreStudygroupAdmin::class)) { + $message = MessageBox::success(sprintf( + _('Die Studien-/Arbeitsgruppe „%s“ wurde angelegt. ' + . 'Sie können sie direkt hier weiter verwalten.'), + htmlReady($this->course->name) + )); + + $target = $this->url_for('course/studygroup/edit', ['cid' => $this->course->id]); + } else { + $message = MessageBox::success(sprintf( + _('Die Studien-/Arbeitsgruppe „%s“ wurde angelegt.'), + htmlReady($this->course->name) + )); - $target = $this->url_for('course/studygroup/edit', ['cid' => $this->course->id]); + $target = $this->url_for('course/go', ['to' => $this->course->id]); + } // "Normal" course. } elseif (Request::int('dialog') && $GLOBALS['perm']->have_perm('admin')) { |
