Commit 095dd233 authored by Francois Gannaz's avatar Francois Gannaz
Browse files

view: fix links

parent 8f657647
<section class="jumbotron">
<div>{{{ description }}}</div>
<a href="{{redirecturl}}">{{#str}}gotoreport, mod_labnbook{{/str}}</a>
<a href="{{redirecturl}}?token={{token_report}}" class="btn btn-primary btn-lg">{{#str}}gotoreport, mod_labnbook{{/str}}</a>
<div>{{{ description }}}</div>
<a href="{{redirecturl}}?token={{token_teaming}}">{{#str}}external_teaming, mod_labnbook{{/str}}</a>
......@@ -69,14 +69,12 @@ $isTeacher = has_capability('moodle/course:manageactivities', $coursecontext)
if ($isTeacher) {
// editing teacher view
$templateName = 'view_teacher';
$templateData['token_teaming'] = $fetcher->getTeamingTokenForRedirect();
$templateData['token_reports'] = $fetcher->getReportsTokenForRedirect();
$templateData['token_teaming'] = $fetcher->getTeamingTokenForRedirect($moduleinstance->labnbook_teamconfigid);
$templateData['token_reports'] = $fetcher->getReportsTokenForRedirect($moduleinstance->labnbook_teamconfigid);
} else {
// student view
$templateName = 'view_student';
// TODO add user to the LnB class(es):
// 1. for this activity, or all activities of the course?
// 2. sync server to server, or async client to server (XHR), or on connection (when landing on report page)?
$templateData['token_report'] = $fetcher->getReportTokenForRedirect($moduleinstance->labnbook_teamconfigid);
echo $OUTPUT->header();
Supports Markdown
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