MDL-31713 core_grade: added updating of grade min and max to update_final_grade()