Merge branch 'w43_MDL-29984_m22_enroltoday' of git://github.com/skodak/moodle
authorAparup Banerjee <aparup@moodle.com>
Mon, 31 Oct 2011 07:25:55 +0000 (15:25 +0800)
committerAparup Banerjee <aparup@moodle.com>
Mon, 31 Oct 2011 07:25:55 +0000 (15:25 +0800)
enrol/manual/lib.php

index 206ee89..92d5e74 100644 (file)
@@ -209,10 +209,10 @@ class enrol_manual_plugin extends enrol_plugin {
         $startdateoptions = array();
         $timeformat = get_string('strftimedatefullshort');
         if ($startdate > 0) {
-            $today = time();
-            $today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);
             $startdateoptions[2] = get_string('coursestart') . ' (' . userdate($startdate, $timeformat) . ')';
         }
+        $today = time();
+        $today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);
         $startdateoptions[3] = get_string('today') . ' (' . userdate($today, $timeformat) . ')' ;
 
         $modules = array('moodle-enrol_manual-quickenrolment', 'moodle-enrol_manual-quickenrolment-skin');