Skip to content

Commit

Permalink
Just simplifying logic a little
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Jul 19, 2006
1 parent 8c251d1 commit e63dc8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/moodlelib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ function require_login($courseid=0, $autologinguest=true, $cm=null) {
if (! $course = get_record('course', 'id', $courseid)) { if (! $course = get_record('course', 'id', $courseid)) {
error('That course doesn\'t exist'); 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(); print_header();
notice(get_string('coursehidden'), $CFG->wwwroot .'/'); notice(get_string('coursehidden'), $CFG->wwwroot .'/');
} }
Expand Down

0 comments on commit e63dc8e

Please sign in to comment.