MDL-48861 assign: Make the requires grading filter consistent
authorDamyon Wiese <damyon@moodle.com>
Tue, 13 Oct 2015 06:24:08 +0000 (14:24 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 13 Oct 2015 06:52:50 +0000 (14:52 +0800)
Consistently include submissions with a null grade (see MDL-47694).

mod/assign/gradingtable.php
mod/assign/locallib.php

index c995acf..8e512ae 100644 (file)
@@ -198,7 +198,7 @@ class assign_grading_table extends table_sql implements renderable {
             } else if ($filter == ASSIGN_FILTER_REQUIRE_GRADING) {
                 $where .= ' AND (s.timemodified IS NOT NULL AND
                                  s.status = :submitted AND
-                                 (s.timemodified >= g.timemodified OR g.timemodified IS NULL))';
+                                 (s.timemodified >= g.timemodified OR g.timemodified IS NULL OR g.grade IS NULL))';
                 $params['submitted'] = ASSIGN_SUBMISSION_STATUS_SUBMITTED;
 
             } else if (strpos($filter, ASSIGN_FILTER_SINGLE_USER) === 0) {
index ebd0395..f5bbfaf 100644 (file)
@@ -1521,7 +1521,7 @@ class assign {
                         s.assignment = :assignid AND
                         s.timemodified IS NOT NULL AND
                         s.status = :submitted AND
-                        (s.timemodified >= g.timemodified OR g.timemodified IS NULL)';
+                        (s.timemodified >= g.timemodified OR g.timemodified IS NULL OR g.grade IS NULL)';
 
         return $DB->count_records_sql($sql, $params);
     }