Merge branch 'MDL-32630-workshop-calendar' of git://github.com/mudrd8mz/moodle
This commit is contained in:
+12
-8
@@ -1481,8 +1481,9 @@ function workshop_calendar_update(stdClass $workshop, $cmid) {
|
||||
// should not be set but just in case
|
||||
unset($event->id);
|
||||
}
|
||||
// calendar_event::create will reuse a db record if the id field is set
|
||||
calendar_event::create($event);
|
||||
// update() will reuse a db record if the id field is set
|
||||
$eventobj = new calendar_event($event);
|
||||
$eventobj->update($event, false);
|
||||
}
|
||||
|
||||
if ($workshop->submissionend) {
|
||||
@@ -1495,8 +1496,9 @@ function workshop_calendar_update(stdClass $workshop, $cmid) {
|
||||
// should not be set but just in case
|
||||
unset($event->id);
|
||||
}
|
||||
// calendar_event::create will reuse a db record if the id field is set
|
||||
calendar_event::create($event);
|
||||
// update() will reuse a db record if the id field is set
|
||||
$eventobj = new calendar_event($event);
|
||||
$eventobj->update($event, false);
|
||||
}
|
||||
|
||||
if ($workshop->assessmentstart) {
|
||||
@@ -1509,8 +1511,9 @@ function workshop_calendar_update(stdClass $workshop, $cmid) {
|
||||
// should not be set but just in case
|
||||
unset($event->id);
|
||||
}
|
||||
// calendar_event::create will reuse a db record if the id field is set
|
||||
calendar_event::create($event);
|
||||
// update() will reuse a db record if the id field is set
|
||||
$eventobj = new calendar_event($event);
|
||||
$eventobj->update($event, false);
|
||||
}
|
||||
|
||||
if ($workshop->assessmentend) {
|
||||
@@ -1523,8 +1526,9 @@ function workshop_calendar_update(stdClass $workshop, $cmid) {
|
||||
// should not be set but just in case
|
||||
unset($event->id);
|
||||
}
|
||||
// calendar_event::create will reuse a db record if the id field is set
|
||||
calendar_event::create($event);
|
||||
// update() will reuse a db record if the id field is set
|
||||
$eventobj = new calendar_event($event);
|
||||
$eventobj->update($event, false);
|
||||
}
|
||||
|
||||
// delete any leftover events
|
||||
|
||||
Reference in New Issue
Block a user