Skip to content

Commit

Permalink
MDL-51305 grade: Fix slow grade operations by setting grade_item early.
Browse files Browse the repository at this point in the history
Exports were fetching the grade item for every item-user combination.
Setting the grade_item object on the grade_item early prevents that.
  • Loading branch information
colin-umn committed Sep 11, 2015
1 parent f495510 commit 9901bdf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions grade/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ public function next_user() {
$grades[$grade_item->id] =
new grade_grade(array('userid'=>$user->id, 'itemid'=>$grade_item->id), false);
}
$grades[$grade_item->id]->grade_item = $grade_item;
}
}

Expand Down

0 comments on commit 9901bdf

Please sign in to comment.