Permalink
Browse files

MDL-37533 Assign: Fix grading filters to show only assignments needin…

…g grading
  • Loading branch information...
1 parent d43b310 commit 0b33e91cd61fd757c3d7f03d12a73612713332f9 @sbourget sbourget committed with damyon Jan 21, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 mod/assign/gradingtable.php
@@ -144,8 +144,10 @@ public function __construct(assign $assignment,
$where .= ' AND s.timecreated > 0 ';
}
if ($filter == ASSIGN_FILTER_REQUIRE_GRADING) {
- $where .= ' AND (s.timemodified > g.timemodified OR
- (s.timemodified IS NOT NULL AND g.timemodified IS NULL))';
+ $where .= ' AND (s.timemodified IS NOT NULL AND
+ s.status = :submitted AND
+ (s.timemodified > g.timemodified OR g.timemodified IS NULL))';
+ $params['submitted'] = ASSIGN_SUBMISSION_STATUS_SUBMITTED;
}
if (strpos($filter, ASSIGN_FILTER_SINGLE_USER) === 0) {
$userfilter = (int) array_pop(explode('=', $filter));

0 comments on commit 0b33e91

Please sign in to comment.