Skip to content
Snippets Groups Projects
Unverified Commit 9b4fdcae authored by TamaraGunkel's avatar TamaraGunkel Committed by GitHub
Browse files

Merge pull request #15 from tobiasreischmann/feature/loginonce

Render the login form only once
parents 5cf99558 918dde1e
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