From 028fa1443619dbbe5e930134d19e355884ec8c29 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Sun, 1 Oct 2017 20:08:07 +0800 Subject: [PATCH] MDL-60058 assign: Updating gradingduedate on drag/drop --- mod/assign/lib.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mod/assign/lib.php b/mod/assign/lib.php index 34accd3dcc0..aa623c84c32 100644 --- a/mod/assign/lib.php +++ b/mod/assign/lib.php @@ -2054,6 +2054,15 @@ function mod_assign_core_calendar_event_timestart_updated(\calendar_event $event $instance->timemodified = time(); $modified = true; } + } else if ($event->eventtype == ASSIGN_EVENT_TYPE_GRADINGDUE) { + $instance = $assign->get_instance(); + $newduedate = $event->timestart; + + if ($newduedate != $instance->gradingduedate) { + $instance->gradingduedate = $newduedate; + $instance->timemodified = time(); + $modified = true; + } } if ($modified) {