Skip to content
Snippets Groups Projects
Unverified Commit 918dde1e authored by Tobias Reischmann's avatar Tobias Reischmann
Browse files

Render the login form only once

parent 5cf99558
Branches
No related tags found
No related merge requests found
......@@ -39,6 +39,8 @@ require_once($CFG->libdir . '/oauthlib.php');
*/
class filter_opencast extends moodle_text_filter {
private static $loginrendered = false;
public function filter($text, array $options = array()) {
global $CFG, $PAGE;
......@@ -55,10 +57,11 @@ class filter_opencast extends moodle_text_filter {
// Login if user is not logged in yet.
$loggedin = true;
if (!isset($_COOKIE['JSESSIONID'])) {
if (!isset($_COOKIE['JSESSIONID']) && !self::$loginrendered) {
// Login and set cookie.
filter_opencast_login();
$loggedin = false;
self::$loginrendered = true;
}
$video = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment