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

Fix for failure to create new slot with conflicting slots

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.7
    • 2.6.2
    • Module: Scheduler
    • None
    • 2.5.1 (2013092702)
    • MOODLE_26_STABLE
    • MOODLE_27_STABLE

      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.

            bostelm Henning Bostelmann
            hugh2323 Lloyd Powell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.