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.
This commit is contained in:
Damyon Wiese
2015-10-12 16:55:44 +01:00
committed by Dan Poltawski
parent 7821a81662
commit 5a92a95e9c
2 changed files with 2 additions and 2 deletions
+1 -1
View 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))';
$params['submitted'] = ASSIGN_SUBMISSION_STATUS_SUBMITTED;
} else if (strpos($filter, ASSIGN_FILTER_SINGLE_USER) === 0) {
+1 -1
View File
@@ -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);
}