From 64f6ef1f3a0c73664f4e876aa807fdaa2d8817ae Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Fri, 9 Oct 2015 15:08:06 +0800 Subject: [PATCH] MDL-48861 mod_assign: use >= for requires grading filter If the grade and submission were modified at exactly the same time, assume that this means the grade was automatically created for the submission and is not a real grade from a teacher interaction. --- mod/assign/gradingtable.php | 2 +- mod/assign/locallib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/assign/gradingtable.php b/mod/assign/gradingtable.php index eeec2780bf2..c995acfcae1 100644 --- a/mod/assign/gradingtable.php +++ b/mod/assign/gradingtable.php @@ -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))'; $params['submitted'] = ASSIGN_SUBMISSION_STATUS_SUBMITTED; } else if (strpos($filter, ASSIGN_FILTER_SINGLE_USER) === 0) { diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index effc0bfdfbd..6a9d791abf3 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -1518,7 +1518,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)'; return $DB->count_records_sql($sql, $params); }