Permalink
Browse files

Merge branch 'MDL-18095-MOODLE_22_STABLE-1' of git://git.luns.net.uk/…

…moodle into MOODLE_22_STABLE
  • Loading branch information...
2 parents 3a48019 + ed88a0b commit a1f173f7743c78bf882a339fb996b366a1ee10bf Sam Hemelryk committed May 8, 2012
Showing with 5 additions and 7 deletions.
  1. +5 −7 grade/edit/tree/grade.php
View
@@ -193,20 +193,18 @@
$data->feedbackformat = $old_grade_grade->feedbackformat;
}
// update final grade or feedback
+ // when we set override grade the first time, it happens here
$grade_item->update_final_grade($data->userid, $data->finalgrade, 'editgrade', $data->feedback, $data->feedbackformat);
$grade_grade = new grade_grade(array('userid'=>$data->userid, 'itemid'=>$grade_item->id), true);
$grade_grade->grade_item =& $grade_item; // no db fetching
if (has_capability('moodle/grade:manage', $context) or has_capability('moodle/grade:edit', $context)) {
- if (!grade_floats_different($data->finalgrade, $old_grade_grade->finalgrade)
- and $data->feedback === $old_grade_grade->feedback) {
- // change overridden flag only if grade or feedback not changed
- if (!isset($data->overridden)) {
- $data->overridden = 0; // checkbox
- }
- $grade_grade->set_overridden($data->overridden);
+ // change overridden flag
+ if (!isset($data->overridden)) {
+ $data->overridden = 0; // checkbox unticked
}
+ $grade_grade->set_overridden($data->overridden);
}
if (has_capability('moodle/grade:manage', $context) or has_capability('moodle/grade:hide', $context)) {

0 comments on commit a1f173f

Please sign in to comment.