From: moodler Date: Thu, 29 Jul 2004 13:12:35 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=16293c38e055ec4a29f7ff7483c89464ad446057;p=moodle.git *** empty log message *** --- diff --git a/course/enrol.php b/course/enrol.php index da7d2d4d31..9f0c57588e 100644 --- a/course/enrol.php +++ b/course/enrol.php @@ -31,7 +31,7 @@ /// Double check just in case they are actually enrolled already /// This might occur if they were enrolled during this session - if ( $USER->student[$course->id] or $USER->teacher[$course->id] ) { + if ( !empty($USER->student[$course->id]) or !empty($USER->teacher[$course->id]) ) { if ($SESSION->wantsurl) { $destination = $SESSION->wantsurl; @@ -43,6 +43,13 @@ redirect($destination); } +/// 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); + } /// Check the submitted enrollment key if there is one