Merge branch 'MDL-56893-MOODLE_master-edit-grade-item-bug' of https://github.com/mspall/moodle

This commit is contained in:
Andrew Nicols 2016-12-05 12:04:43 +08:00
commit feda939e2f

View File

@ -463,7 +463,8 @@ class edit_item_form extends moodleform {
}
if ($grade_item) {
if ($grade_item->gradetype == GRADE_TYPE_VALUE) {
if (grade_floats_different($data['grademin'], $grade_item->grademin) ||
if ((((bool) get_config('moodle', 'grade_report_showmin')) &&
grade_floats_different($data['grademin'], $grade_item->grademin)) ||
grade_floats_different($data['grademax'], $grade_item->grademax)) {
if ($grade_item->has_grades() && empty($data['rescalegrades'])) {
$errors['rescalegrades'] = get_string('mustchooserescaleyesorno', 'grades');