Skip to content
Snippets Groups Projects
Commit 3f455264 authored by André Noack's avatar André Noack
Browse files

Resolve #5098 "course/lti-Controller: Exception beim Aufruf"

Closes #5098

Merge request studip/studip!3811
parent 5af0698e
No related branches found
No related tags found
No related merge requests found
...@@ -18,21 +18,26 @@ class Course_LtiController extends StudipController ...@@ -18,21 +18,26 @@ class Course_LtiController extends StudipController
{ {
use NegotiatesWithPsr7; 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. * Callback function being called before an action is executed.
*/ */
public function before_filter(&$action, &$args) public function before_filter(&$action, &$args)
{ {
parent::before_filter($action, $args);
// these actions do not require session authentication // these actions do not require session authentication
if (in_array($action, ['profile', 'outcome'])) { 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->course_id = Context::getId();
$this->edit_perm = $GLOBALS['perm']->have_studip_perm('tutor', $this->course_id); $this->edit_perm = $GLOBALS['perm']->have_studip_perm('tutor', $this->course_id);
......
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