Skip to content

Commit

Permalink
Merge branch 'MDL-32630-workshop-calendar' of git://github.com/mudrd8…
Browse files Browse the repository at this point in the history
…mz/moodle
  • Loading branch information
stronk7 committed Apr 26, 2012
2 parents d7f84a2 + de7daa8 commit 0529f63
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions mod/workshop/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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
Expand Down

0 comments on commit 0529f63

Please sign in to comment.