Better check of upcoming enrolment

This commit is contained in:
moodler
2004-09-09 09:25:49 +00:00
parent 34f5efca4b
commit 33cfeeb2a5
+5 -3
View File
@@ -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