Skip to content

Commit f8fd7bc

Browse files
committed
Ensure variables are true before allowing course access in previous commit to local.inc.php
1 parent a01a9bb commit f8fd7bc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

main/inc/local.inc.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,14 +1316,18 @@
13161316
// save the states
13171317
if (isset($is_courseAdmin)) {
13181318
Session::write('is_courseAdmin', $is_courseAdmin);
1319-
$is_allowed_in_course = true;
1319+
if ($is_courseAdmin) {
1320+
$is_allowed_in_course = true;
1321+
}
13201322
}
13211323
if (isset($is_courseMember)) {
13221324
Session::write('is_courseMember', $is_courseMember);
13231325
}
13241326
if (isset($is_courseTutor)) {
13251327
Session::write('is_courseTutor', $is_courseTutor);
1326-
$is_allowed_in_course = true;
1328+
if ($is_courseTutor) {
1329+
$is_allowed_in_course = true;
1330+
}
13271331
}
13281332
Session::write('is_courseCoach', $is_courseCoach);
13291333
Session::write('is_allowed_in_course', $is_allowed_in_course);

0 commit comments

Comments
 (0)