Merge branch 'MDL-31556' of git://github.com/rwijaya/moodle
authorSam Hemelryk <sam@moodle.com>
Sun, 19 Feb 2012 23:39:12 +0000 (12:39 +1300)
committerSam Hemelryk <sam@moodle.com>
Sun, 19 Feb 2012 23:39:12 +0000 (12:39 +1300)
mod/lesson/lib.php

index 6ca0738..4781fbc 100644 (file)
@@ -659,7 +659,9 @@ function lesson_process_post_save(&$lesson) {
         if ($lesson->available) {
             $event->name = $lesson->name.' ('.get_string('lessonopens', 'lesson').')';
             calendar_event::create(clone($event));
-        } else if ($lesson->deadline) {
+        }
+
+        if ($lesson->deadline) {
             $event->name      = $lesson->name.' ('.get_string('lessoncloses', 'lesson').')';
             $event->timestart = $lesson->deadline;
             $event->eventtype = 'close';