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
8e92e797
Commit
8e92e797
authored
Nov 05, 2019
by
Francois Gannaz
Browse files
tokens for user redirections on LnB pages
parent
ae9fc5bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
classes/fetch/user.php
View file @
8e92e797
...
...
@@ -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
);
}
}
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