Skip to content

Commit

Permalink
MDL-58578 mod_assign: Correctly update user override priority
Browse files Browse the repository at this point in the history
Since we now sort priority in ASC order, the top priority should be 0.
  • Loading branch information
cameorn1730 committed Apr 27, 2017
1 parent 7eae70e commit 30aa540
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mod/assign/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ function assign_refresh_events($courseid = 0) {
$assignment->update_calendar($cm->id);

// Refresh the calendar events also for the assignment overrides.
$overrides = $DB->get_records('assign_overrides', ['assignid' => $assign->id], '', 'id, groupid, userid');
$overrides = $DB->get_records('assign_overrides', ['assignid' => $assign->id], '',
'id, groupid, userid, duedate, sortorder');
foreach ($overrides as $override) {
if (empty($override->userid)) {
unset($override->userid);
Expand Down

0 comments on commit 30aa540

Please sign in to comment.