mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 14:03:52 +01:00
MDL-36233 mod_assign: fixed submission time comparison sql and test.
This commit is contained in:
parent
e7059ec5e2
commit
559cfa03f4
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user