Permalink
Browse files

Merge branch 'MDL-62366-33' of git://github.com/zig-moodle/moodle int…

…o MOODLE_33_STABLE
  • Loading branch information...
dmonllao committed May 10, 2018
2 parents 3bd2c9c + c47cccc commit ab4ecb487dc6b4f3ad52dc0549138e8551d41363
Showing with 4 additions and 4 deletions.
  1. +2 −2 mod/assign/classes/privacy/provider.php
  2. +2 −2 mod/assign/tests/privacy_test.php
@@ -376,7 +376,7 @@ protected static function export_grade_data(\stdClass $grade, \context $context,
'timemodified' => transform::datetime($grade->timemodified),
'grader' => transform::user($grade->grader),
'grade' => $grade->grade,
'attemptnumber' => $grade->attemptnumber
'attemptnumber' => ($grade->attemptnumber + 1)
];
writer::with_context($context)
->export_data(array_merge($currentpath, [get_string('privacy:gradepath', 'mod_assign')]), $gradedata);
@@ -395,7 +395,7 @@ protected static function export_submission_data(\stdClass $submission, \context
'timemodified' => transform::datetime($submission->timemodified),
'status' => get_string('submissionstatus_' . $submission->status, 'mod_assign'),
'groupid' => $submission->groupid,
'attemptnumber' => $submission->attemptnumber,
'attemptnumber' => ($submission->attemptnumber + 1),
'latest' => transform::yesno($submission->latest)
];
writer::with_context($context)
@@ -214,8 +214,8 @@ public function test_export_user_data_student() {
// Check Submissions.
$this->assertEquals($submissiontext, $writer->get_data(['attempt 1', 'Submission Text'])->text);
$this->assertEquals($submissiontext2, $writer->get_data(['attempt 2', 'Submission Text'])->text);
$this->assertEquals(0, $writer->get_data(['attempt 1', 'submission'])->attemptnumber);
$this->assertEquals(1, $writer->get_data(['attempt 2', 'submission'])->attemptnumber);
$this->assertEquals(1, $writer->get_data(['attempt 1', 'submission'])->attemptnumber);
$this->assertEquals(2, $writer->get_data(['attempt 2', 'submission'])->attemptnumber);
// Check grades.
$this->assertEquals($grade1, $writer->get_data(['attempt 1', 'grade'])->grade);
$this->assertEquals($grade2, $writer->get_data(['attempt 2', 'grade'])->grade);

0 comments on commit ab4ecb4

Please sign in to comment.