Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31556

Missing "Lesson closes" event in calendar

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.7, 2.1, 2.2
    • 2.1.5, 2.2.2
    • Lesson
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • Hide

      Easy fix:

      @@ -659,7 +659,8 @@ 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';

      Show
      Easy fix: @@ -659,7 +659,8 @@ 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';
    • Hide

      Create lesson with "Available from" and "Deadline" options activated.
      Make sure "Available from" is set BEFORE current date and "Deadline" is set AFTER current date.
      In calendar block, check that both "Lesson opens" and "Lesson closes" events are displayed.

      Show
      Create lesson with "Available from" and "Deadline" options activated. Make sure "Available from" is set BEFORE current date and "Deadline" is set AFTER current date. In calendar block, check that both "Lesson opens" and "Lesson closes" events are displayed.

    Description

      Missing "Lesson closes" event in calendar in all Moodle 2 versions.
      See moodle.org/mod/forum/discuss.php?d=195634

      Attachments

        Activity

          People

            rwijaya Rossiani Wijaya
            rezeau Joseph Rézeau
            Rossiani Wijaya Rossiani Wijaya
            Sam Hemelryk Sam Hemelryk
            Andrew Davis Andrew Davis
            Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              12/Mar/12