Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Just simplifying logic a little

  • Loading branch information...
commit e63dc8ea91b459ea54e825785d13f7d349acc72d 1 parent 8c251d1
moodler authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/moodlelib.php
2  lib/moodlelib.php
View
@@ -1591,7 +1591,7 @@ function require_login($courseid=0, $autologinguest=true, $cm=null) {
if (! $course = get_record('course', 'id', $courseid)) {
error('That course doesn\'t exist');
}
- if (!(isteacher($courseid) || !empty($USER->admin)) && (!$course->visible || !course_parent_visible($course))) {
+ if (!isteacher($courseid) && !($course->visible && course_parent_visible($course))) {
print_header();
notice(get_string('coursehidden'), $CFG->wwwroot .'/');
}
Please sign in to comment.
Something went wrong with that request. Please try again.