Skip to content
Browse files

MDL-37533 Assign: assign_print_overview does not correctly display as…

…signments that need grading

Conflicts:

	mod/assign/lib.php
  • Loading branch information...
1 parent 8ca54db commit 153292da44f4282ef642496f90866af73b230b2f @sbourget sbourget committed with damyon
Showing with 18 additions and 6 deletions.
  1. +18 −6 mod/assign/lib.php
View
24 mod/assign/lib.php
@@ -327,12 +327,24 @@ function assign_print_overview($courses, &$htmlarray) {
//
list($sqlassignmentids, $assignmentidparams) = $DB->get_in_or_equal($assignmentids);
- // build up and array of unmarked submissions indexed by assignment id/ userid
- // for use where the user has grading rights on assignment
- $rs = $DB->get_recordset_sql("SELECT s.assignment as assignment, s.userid as userid, s.id as id, s.status as status, g.timemodified as timegraded
- FROM {assign_submission} s LEFT JOIN {assign_grades} g ON s.userid = g.userid and s.assignment = g.assignment
- WHERE g.timemodified = 0 OR s.timemodified > g.timemodified
- AND s.assignment $sqlassignmentids", $assignmentidparams);
+ // Build up and array of unmarked submissions indexed by assignment id/ userid
+ // for use where the user has grading rights on assignment.
+ $rs = $DB->get_recordset_sql('SELECT
+ s.assignment as assignment,
+ s.userid as userid,
+ s.id as id,
+ s.status as status,
+ g.timemodified as timegraded
+ FROM {assign_submission} s
+ LEFT JOIN {assign_grades} g ON
+ s.userid = g.userid AND
+ s.assignment = g.assignment
+ WHERE
+ ( g.timemodified is NULL OR
+ s.timemodified > g.timemodified ) AND
+ s.timemodified IS NOT NULL AND
+ s.status = "submitted" AND
+ s.assignment ' . $sqlassignmentids, $assignmentidparams);
$unmarkedsubmissions = array();
foreach ($rs as $rd) {

0 comments on commit 153292d

Please sign in to comment.
Something went wrong with that request. Please try again.