Skip to content
Browse files

Better check of upcoming enrolment

  • Loading branch information...
1 parent 34f5efc commit 33cfeeb2a5092b04ca98cd1bf02b893f208e662a moodler committed Sep 9, 2004
Showing with 5 additions and 3 deletions.
  1. +5 −3 course/enrol.php
View
8 course/enrol.php
@@ -52,9 +52,11 @@
/// Double check just in case they are enrolled to start in the future
if ($student = get_record('user_students', 'userid', $USER->id, 'course', $course->id)) {
- $message = get_string('enrolmentnotyet', '', userdate($student->timestart));
- print_header();
- notice($message, $CFG->wwwroot);
+ if ($course->enrolperiod and $student->timestart and ($student->timestart >= time())) {
+ $message = get_string('enrolmentnotyet', '', userdate($student->timestart));
+ print_header();
+ notice($message, $CFG->wwwroot);
+ }
}
/// Check the submitted enrollment key if there is one

0 comments on commit 33cfeeb

Please sign in to comment.
Something went wrong with that request. Please try again.