MDL-25743 fix inverted timestart/end logic
authorPetr Skoda <commits@skodak.org>
Tue, 25 Jan 2011 15:15:09 +0000 (16:15 +0100)
committerPetr Skoda <commits@skodak.org>
Wed, 26 Jan 2011 12:26:31 +0000 (13:26 +0100)
enrol/self/lib.php

index c977fcf..99f4779 100644 (file)
@@ -179,12 +179,12 @@ class enrol_self_plugin extends enrol_plugin {
             return null;
         }
 
-        if ($instance->enrolstartdate != 0 and $instance->enrolstartdate < time()) {
+        if ($instance->enrolstartdate != 0 and $instance->enrolstartdate > time()) {
             //TODO: inform that we can not enrol yet
             return null;
         }
 
-        if ($instance->enrolenddate != 0 and $instance->enrolenddate > time()) {
+        if ($instance->enrolenddate != 0 and $instance->enrolenddate < time()) {
             //TODO: inform that enrolment is not possible any more
             return null;
         }