Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5018

Fix for failure to create new slot with conflicting slots

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.2
    • Fix Version/s: 2.7
    • Component/s: Module: Scheduler
    • Labels:
      None
    • Plugin Version:
      2.5.1 (2013092702)
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE

      Description

      In Scheduler plugin, when a user created a new slot, and that slot conflicted with an existing slot, both would disappear.

      Fix inserts slot after after deleting conflicting ones.

      — a/mod/scheduler/teacherview.controller.php
      +++ b/mod/scheduler/teacherview.controller.php
      @@ -89,6 +89,8 @@ function scheduler_action_doaddsession($scheduler, $formdata) {
      foreach ($conflicts as $conflict)

      { scheduler_delete_slot($conflict->id); }

      + $DB->insert_record('scheduler_slots', $slot, false, true);
      + $countslots++;
      }
      } else {
      $DB->insert_record('scheduler_slots', $slot, false, true);

      TEST:

      • Create new scheduler activity
      • Using "Add Slots" create a slot (slot 1).
      • Using "Add Slots" to create a conflicting (same time and date) slot, ticking the "Force when overlap" (slot 2)
        Without patch (current):
      • Slot 1 and Slot 2 both disappear
        With patch (expected):
      • The Slot 1 is deleted and Slot 2 is created.

        Attachments

          Activity

            People

            Assignee:
            bostelm Henning Bostelmann
            Reporter:
            hugh2323 Lloyd Powell
            Participants:
            Component watchers:
            Valery Fremaux
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              12/May/14