diff options
| author | André Noack <noack@data-quest.de> | 2025-01-06 16:17:22 +0000 |
|---|---|---|
| committer | André Noack <noack@data-quest.de> | 2025-01-06 16:17:22 +0000 |
| commit | 3f455264b9a89b3122feedd31aa7b26f6d61ef24 (patch) | |
| tree | afaf1fec055f5b898643c8809870731f4b6dcf4a /app | |
| parent | 5af0698e302dfe412106dded077a0e14607a374f (diff) | |
Resolve #5098 "course/lti-Controller: Exception beim Aufruf"
Closes #5098
Merge request studip/studip!3811
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/course/lti.php | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/app/controllers/course/lti.php b/app/controllers/course/lti.php index 4db7776..ab403af 100644 --- a/app/controllers/course/lti.php +++ b/app/controllers/course/lti.php @@ -18,21 +18,26 @@ class Course_LtiController extends StudipController { use NegotiatesWithPsr7; + public function __construct(\Trails\Dispatcher $dispatcher) + { + // these actions do not require session authentication + $action = basename(get_route()); + if (!in_array($action, ['profile', 'outcome'])) { + $this->with_session = true; + $this->allow_nobody = false; + } + parent::__construct($dispatcher); + } /** * Callback function being called before an action is executed. */ public function before_filter(&$action, &$args) { + parent::before_filter($action, $args); // these actions do not require session authentication if (in_array($action, ['profile', 'outcome'])) { - return parent::before_filter($action, $args); + return; } - - $this->with_session = true; - $this->allow_nobody = false; - - parent::before_filter($action, $args); - $this->course_id = Context::getId(); $this->edit_perm = $GLOBALS['perm']->have_studip_perm('tutor', $this->course_id); |
