Verified Commit 69be58d0 authored by David Beniamine's avatar David Beniamine
Browse files

Do not grantTeacherAccess for students

parent 8bd781e7
......@@ -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);
......
Markdown is supported
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