diff options
| author | Thomas Hackl <hackl@data-quest.de> | 2024-06-18 12:18:17 +0000 |
|---|---|---|
| committer | Thomas Hackl <hackl@data-quest.de> | 2024-06-18 12:18:17 +0000 |
| commit | 26e02e32841671fa162cf11cb0fa925aa4452da5 (patch) | |
| tree | e6dc3f0264f966b6095d967828f7971595d27060 /app/controllers | |
| parent | ab3352dec1bc28b5b828b35afb5f2d974d6c3fb1 (diff) | |
Resolve "Neues Benachrichtungssystem für Stud.IP"
Closes #660
Merge request studip/studip!2557
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/course/basicdata.php | 8 | ||||
| -rw-r--r-- | app/controllers/settings/general.php | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/course/basicdata.php b/app/controllers/course/basicdata.php index f4f50fe..97ec053 100644 --- a/app/controllers/course/basicdata.php +++ b/app/controllers/course/basicdata.php @@ -445,6 +445,14 @@ class Course_BasicdataController extends AuthenticatedController $widget = new CourseManagementSelectWidget(); $sidebar->addWidget($widget); } + + foreach ($this->flash['msg'] ?? [] as $msg) { + match ($msg[0]) { + 'msg' => PageLayout::postSuccess($msg[1]), + 'error' => PageLayout::postError($msg[1]), + 'info' => PageLayout::postInfo($msg[1]), + }; + } } /** diff --git a/app/controllers/settings/general.php b/app/controllers/settings/general.php index 734cca1..0e8ec70 100644 --- a/app/controllers/settings/general.php +++ b/app/controllers/settings/general.php @@ -44,6 +44,7 @@ class Settings_GeneralController extends Settings_SettingsController public function index_action() { $this->user_language = getUserLanguage($this->user->id); + $this->notifications_placement = User::findCurrent()->getConfiguration()->SYSTEM_NOTIFICATIONS_PLACEMENT; } /** @@ -80,6 +81,7 @@ class Settings_GeneralController extends Settings_SettingsController } else { PersonalNotifications::deactivateAudioFeedback($this->user->id); } + $this->config->store('SYSTEM_NOTIFICATIONS_PLACEMENT', Request::get('system_notifications_placement')); PageLayout::postSuccess(_('Die Einstellungen wurden gespeichert.')); $this->redirect('settings/general'); |
