Browse files

MDL-31556 Lesson Module: fixed missing 'lesson closes' event in calendar

  • Loading branch information...
1 parent ea75a57 commit 6404d229547e3a5bd5152616216b5bd662f81461 Joseph Rezeau committed with rwijaya Feb 16, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/lesson/lib.php
View
4 mod/lesson/lib.php
@@ -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';

0 comments on commit 6404d22

Please sign in to comment.