MDL-56221 mod_assign: Suppress unwanted grade notifications

* Quick grading: Properly recognize unchanged grades
* Individual grading: Amend JS that transfers checkbox state
This commit is contained in:
Henning Bostelmann 2016-11-06 23:16:19 +00:00
parent 0b8e0c374f
commit 9574320a36
3 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -89,7 +89,7 @@ define(['jquery', 'core/yui', 'core/notification', 'core/templates', 'core/fragm
}
// Copy data from notify students checkbox which was moved out of the form.
var checked = $('[data-region="grading-actions-form"] [name="sendstudentnotifications"]').val();
var checked = $('[data-region="grading-actions-form"] [name="sendstudentnotifications"]').prop("checked");
$('.gradeform [name="sendstudentnotifications"]').val(checked);
};

View File

@ -6260,7 +6260,7 @@ class assign {
if ($current->grade !== null) {
$current->grade = floatval($current->grade);
}
$gradechanged = $gradecolpresent && $current->grade !== $modified->grade;
$gradechanged = $gradecolpresent && grade_floats_different($current->grade, $modified->grade);
$markingallocationchanged = $this->get_instance()->markingworkflow &&
$this->get_instance()->markingallocation &&
($modified->allocatedmarker !== false) &&