Permalink
Browse files

Just simplifying logic a little

  • Loading branch information...
1 parent 8c251d1 commit e63dc8ea91b459ea54e825785d13f7d349acc72d moodler committed Jul 19, 2006
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 .'/');
}

0 comments on commit e63dc8e

Please sign in to comment.