MDL-60950 assign: Robust filtering of grading table

For assignments with gradetype set to none, we need special handling when generating the query to filter submissions that need grading.
This commit is contained in:
Damyon Wiese
2018-06-19 10:09:42 +08:00
parent a5ff898f90
commit 07d237840e
+2 -1
View File
@@ -277,7 +277,8 @@ class assign_grading_table extends table_sql implements renderable {
s.status = :submitted AND
(s.timemodified >= g.timemodified OR g.timemodified IS NULL OR g.grade IS NULL';
if ($this->assignment->get_grade_item()->gradetype == GRADE_TYPE_SCALE) {
// Assignment grade is set to the negative grade scale id when scales are used.
if ($this->assignment->get_instance()->grade < 0) {
// Scale grades are set to -1 when not graded.
$where .= ' OR g.grade = -1';
}