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/

Commit 8e92e797 authored by Francois Gannaz's avatar Francois Gannaz
Browse files

tokens for user redirections on LnB pages

parent ae9fc5bc
......@@ -107,4 +107,32 @@ class user extends moodlefetcher
}
}).then(x => x.data)';
}
/**
* Return a JWT token for the redirection page of LnB, so that the user ends on the teaming page.
*
* @param int $teamconfigId
* @return string JWT
* @throws \moodle_exception
*/
public function getReportsTokenForRedirect(int $teamconfigId) : string {
$payload = [
'path' => "/authoring_tools/lb_reports.php#teamconfig=$teamconfigId",
];
return $this->fetcher->encodeJwtToken('/v1/redirect', $payload);
}
/**
* Return a JWT token for the redirection page of LnB, so that the user ends on the teaming page.
*
* @param int $teamconfigId
* @return string JWT
* @throws \moodle_exception
*/
public function getTeamingTokenForRedirect(int $teamconfigId) : string {
$payload = [
'path' => "/authoring_tools/lb_students.php#teamconfig=$teamconfigId",
];
return $this->fetcher->encodeJwtToken('/v1/redirect', $payload);
}
}
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