MDL-30174 Assignment : Only increment submission offset if the current assignment was not saved

This commit is contained in:
Andrew Robert Nicols
2011-11-22 02:20:16 +08:00
committed by Aparup Banerjee
parent 89a4471b97
commit 70eddb71cf
+4 -1
View File
@@ -769,8 +769,11 @@ class assignment_base {
$offset = required_param('offset', PARAM_INT);
$nextid = required_param('nextid', PARAM_INT);
$id = required_param('id', PARAM_INT);
$offset = (int)$offset+1;
$filter = optional_param('filter', self::FILTER_ALL, PARAM_INT);
if ($mode == 'next' || $filter !== self::FILTER_REQUIRE_GRADING) {
$offset = (int)$offset+1;
}
$redirect = new moodle_url('submissions.php',
array('id' => $id, 'offset' => $offset, 'userid' => $nextid,
'mode' => 'single', 'filter' => $filter));