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
69be58d0
Verified
Commit
69be58d0
authored
Aug 27, 2020
by
David Beniamine
Browse files
Do not grantTeacherAccess for students
parent
8bd781e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
view.php
View file @
69be58d0
...
...
@@ -45,7 +45,6 @@ $coursecontext = context_course::instance($course->id);
// the teacher has access to all the missions and classes used in this course
$isTeacher
=
has_capability
(
'moodle/course:manageactivities'
,
$coursecontext
)
||
has_capability
(
'mod/labnbook:addinstance'
,
$coursecontext
);
helper
::
grantTeacherAccess
(
$course
->
id
);
/*
$event = \mod_labnbook\event\course_module_viewed::create(array(
...
...
@@ -70,6 +69,7 @@ $templateData = [
'redirecturl'
=>
$fetcher
->
getRedirectUrl
(),
];
if
(
$isTeacher
)
{
helper
::
grantTeacherAccess
(
$course
->
id
);
// editing teacher view
$templateName
=
'view_teacher'
;
$templateData
[
'token_teaming'
]
=
$fetcher
->
getTeamingTokenForRedirect
(
$moduleinstance
->
labnbook_teamconfigid
);
...
...
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