Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LabNbook
LabNbook-Moodle
Commits
fb91dabf
Commit
fb91dabf
authored
Nov 12, 2019
by
Francois Gannaz
Browse files
user.getReportTokenForRedirect()
parent
5cd0b0a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
classes/fetch/user.php
View file @
fb91dabf
...
...
@@ -121,6 +121,20 @@ 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 report page.
*
* @param int $teamconfigId
* @return string JWT
* @throws \moodle_exception
*/
public
function
getReportTokenForRedirect
(
int
$teamconfigId
)
:
string
{
$payload
=
[
'path'
=>
"/report/enter/
$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.
*
...
...
classes/local/helper.php
View file @
fb91dabf
...
...
@@ -8,6 +8,8 @@
namespace
mod_labnbook\local
;
use
mod_labnbook
\
fetch
;
class
helper
{
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment