Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Verified Commit 2f65af0c authored by David Beniamine's avatar David Beniamine
Browse files

Better url detection

parent ac7944a2
...@@ -23,5 +23,6 @@ $isTeacher = has_capability('mod/labnbook:addinstance', $context); ...@@ -23,5 +23,6 @@ $isTeacher = has_capability('mod/labnbook:addinstance', $context);
$role = ($isTeacher ? 'teacher' : 'learner'); $role = ($isTeacher ? 'teacher' : 'learner');
global $USER; global $USER;
$url = $fetchInstitution->getRedirectUrl(); $url = $fetchInstitution->getRedirectUrl();
$token=$fetchInstitution->getBindingTokenForRedirect($CFG->wwwroot . $returnUrl, $role, $USER); $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$returnUrl";
$token=$fetchInstitution->getBindingTokenForRedirect($actual_link, $role, $USER);
redirect($url."?token=".$token); redirect($url."?token=".$token);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment