Commit 9e3df32f authored by Dan Poltawski's avatar Dan Poltawski

Merge branch 'MDL-36233-master' of git://github.com/lameze/moodle

parents 74637277 559cfa03
......@@ -758,7 +758,7 @@ function assign_get_grade_details_for_print_overview(&$unmarkedsubmissions, $sql
g.attemptnumber = s.attemptnumber
WHERE
( g.timemodified is NULL OR
s.timemodified > g.timemodified OR
s.timemodified >= g.timemodified OR
g.grade IS NULL ) AND
s.timemodified IS NOT NULL AND
s.status = ? AND
......
......@@ -158,6 +158,13 @@ class mod_assign_lib_testcase extends mod_assign_base_testcase {
$data = new stdClass();
$data->grade = '50.0';
$openassign->testable_apply_grade_to_user($data, $this->students[0]->id, 0);
// The assign_print_overview expects the grade date to be after the submission date.
$graderecord = $DB->get_record('assign_grades', array('assignment' => $openassign->get_instance()->id,
'userid' => $this->students[0]->id, 'attemptnumber' => 0));
$graderecord->timemodified += 1;
$DB->update_record('assign_grades', $graderecord);
$overview = array();
assign_print_overview($courses, $overview);
$this->assertEquals(1, count($overview));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment