Skip to content
Permalink
Browse files

Fixed bug that prevented guest access to courses that are not enrollable

  • Loading branch information...
gustav_delius
gustav_delius committed Oct 8, 2006
1 parent bcde80f commit 572badbdcec78dc0964af50d7e6c3ad3181bbda8
Showing with 3 additions and 2 deletions.
  1. +3 −2 course/enrol.php
@@ -85,10 +85,11 @@
notice(get_string('enrolmentnointernal'), "$CFG->wwwroot/index.php");
}
if (!$course->enrollable ||
if (!$loginasguest and ($USER->username != 'guest') and(
!$course->enrollable ||
($course->enrollable == 2 && $course->enrolstartdate > 0 && $course->enrolstartdate > time()) ||
($course->enrollable == 2 && $course->enrolenddate > 0 && $course->enrolenddate <= time())
) {
)) {
print_header($course->shortname, $course->fullname, $course->shortname );
notice(get_string('notenrollable'), "$CFG->wwwroot/index.php");
}

0 comments on commit 572badb

Please sign in to comment.
You can’t perform that action at this time.