Permalink
Browse files

Merge branch 'MDL-39317-25' of git://github.com/damyon/moodle into MO…

…ODLE_25_STABLE
  • Loading branch information...
2 parents e19a07b + 028b56f commit acae4313c8e0bdcc10e04279b23f10af4eff3c8e @danpoltawski danpoltawski committed Jun 4, 2013
Showing with 7 additions and 5 deletions.
  1. +7 −5 mod/assign/gradingtable.php
@@ -166,15 +166,17 @@ public function __construct(assign $assignment,
// The filters do not make sense when there are no submissions, so do not apply them.
if ($this->assignment->is_any_submission_plugin_enabled()) {
if ($filter == ASSIGN_FILTER_SUBMITTED) {
- $where .= ' AND s.timecreated > 0 ';
- }
- if ($filter == ASSIGN_FILTER_REQUIRE_GRADING) {
+ $where .= ' AND (s.timemodified IS NOT NULL AND
+ s.status = :submitted) ';
+ $params['submitted'] = ASSIGN_SUBMISSION_STATUS_SUBMITTED;
+
+ } 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))';
$params['submitted'] = ASSIGN_SUBMISSION_STATUS_SUBMITTED;
- }
- if (strpos($filter, ASSIGN_FILTER_SINGLE_USER) === 0) {
+
+ } else if (strpos($filter, ASSIGN_FILTER_SINGLE_USER) === 0) {
$userfilter = (int) array_pop(explode('=', $filter));
$where .= ' AND (u.id = :userid)';
$params['userid'] = $userfilter;

0 comments on commit acae431

Please sign in to comment.