Skip to content

Commit

Permalink
Merge branch 'MDL-39317-master' of git://github.com/damyon/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Jun 4, 2013
2 parents 0d9121a + 7775545 commit ea746c0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions mod/assign/gradingtable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ea746c0

Please sign in to comment.