-
Bug
-
Resolution: Fixed
-
Minor
-
2.6.2
-
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)
+ $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.