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
8bd781e7
Verified
Commit
8bd781e7
authored
Jul 23, 2020
by
David Beniamine
Browse files
Add link to mission edition
parent
4717c81f
Changes
5
Hide whitespace changes
Inline
Side-by-side
classes/fetch/user.php
View file @
8bd781e7
...
...
@@ -168,6 +168,21 @@ class user extends moodlefetcher
return
$this
->
fetcher
->
encodeJwtToken
(
'/v1/redirect'
,
$payload
);
}
/**
* Return a JWT token for the redirection page of LnB, pointing to mission edition page.
*
* @param int $missionid
* @return string JWT
* @throws \moodle_exception
*/
public
function
getMissionEditTokenForRedirect
(
int
$missionId
):
string
{
$payload
=
[
'path'
=>
"/authoring_tools/lb_mission_edit.php?idm=
$missionId
"
,
];
return
$this
->
fetcher
->
encodeJwtToken
(
'/v1/redirect'
,
$payload
);
}
/**
* Return a JWT token for the redirection page of LnB, pointing to the config of this teaming.
*
...
...
lang/en/labnbook.php
View file @
8bd781e7
...
...
@@ -63,6 +63,8 @@ $string['external_teaming'] = "Manage teaming";
$string
[
'external_teaming_descr'
]
=
"Advanced teaming configuration using LabNbook interface"
;
$string
[
'external_reports'
]
=
"Manage reports produced by students"
;
$string
[
'external_reports_descr'
]
=
"Acccess to the students' reports, with the capability to annotate the content."
;
$string
[
'external_mission'
]
=
"Edit the mission"
;
$string
[
'external_mission_descr'
]
=
"Acces to the mission edition page."
;
// view as student
$string
[
'gotoreport'
]
=
"Access to the report"
;
...
...
lang/fr/labnbook.php
View file @
8bd781e7
...
...
@@ -63,6 +63,8 @@ $string['external_teaming'] = "Gérer la mise en équipes";
$string
[
'external_teaming_descr'
]
=
"Configuration avancée des équipes avec l'interface de LabNbook."
;
$string
[
'external_reports'
]
=
"Administrer les rapports produits"
;
$string
[
'external_reports_descr'
]
=
"Accéder aux rapports produits par les étudiants, avec possibilité d'annoter le contenu."
;
$string
[
'external_mission'
]
=
"Modifier la mission"
;
$string
[
'external_mission_descr'
]
=
"Accéder à la page d'édition de la mission."
;
// view as student
$string
[
'gotoreport'
]
=
"Accéder au rapport"
;
...
...
templates/view_teacher.mustache
View file @
8bd781e7
...
...
@@ -14,5 +14,11 @@
{{#
str
}}
external_reports_descr, mod_labnbook
{{/
str
}}
</p>
</li>
<li>
<a
href=
"
{{
redirecturl
}}
?token=
{{
token_mission
}}
"
target=
"_blank"
>
{{#
str
}}
external_mission, mod_labnbook
{{/
str
}}
</a>
<p>
{{#
str
}}
external_mission_descr, mod_labnbook
{{/
str
}}
</p>
</li>
</ul>
</section>
view.php
View file @
8bd781e7
...
...
@@ -74,6 +74,7 @@ if ($isTeacher) {
$templateName
=
'view_teacher'
;
$templateData
[
'token_teaming'
]
=
$fetcher
->
getTeamingTokenForRedirect
(
$moduleinstance
->
labnbook_teamconfigid
);
$templateData
[
'token_reports'
]
=
$fetcher
->
getReportsTokenForRedirect
(
$moduleinstance
->
labnbook_teamconfigid
);
$templateData
[
'token_mission'
]
=
$fetcher
->
getMissionEditTokenForRedirect
(
$moduleinstance
->
labnbook_missionid
);
$nStarted
=
$fetcher
->
getNumStartedReports
(
$moduleinstance
->
labnbook_teamconfigid
);
$templateData
[
'started_reports'
]
=
$nStarted
.
" "
.
get_string
(
'reports_started'
,
'labnbook'
);
}
else
{
...
...
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