Verified Commit 7e47317d authored by David Beniamine's avatar David Beniamine
Browse files

Add Moodle base url in redirect url

parent 3d8455df
...@@ -26,6 +26,7 @@ class helper ...@@ -26,6 +26,7 @@ class helper
public static function requireLabnbookAuthentication() public static function requireLabnbookAuthentication()
{ {
global $COURSE; global $COURSE;
global $CFG;
if (fetch\user::isAuthenticated()) { if (fetch\user::isAuthenticated()) {
return; return;
} }
...@@ -35,7 +36,7 @@ class helper ...@@ -35,7 +36,7 @@ class helper
return; return;
case fetch\institution::ERROR_LOGIN_UNKNOWN: case fetch\institution::ERROR_LOGIN_UNKNOWN:
redirect( redirect(
"/mod/labnbook/user-binding.php?courseid={$COURSE->id}&return=" $CFG->wwwroot."/mod/labnbook/user-binding.php?courseid={$COURSE->id}&return="
. \base64_encode($_SERVER['REQUEST_URI']) . \base64_encode($_SERVER['REQUEST_URI'])
); );
break; break;
......
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