Permalink
Browse files

MDL-30174 Assignment : Only increment submission offset if the curren…

…t assignment was not saved
  • Loading branch information...
1 parent 89a4471 commit 70eddb71cf2f9f3e592ed44a1ac17c60652f6d24 @andrewnicols andrewnicols committed with nebgor Nov 7, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 mod/assignment/lib.php
View
5 mod/assignment/lib.php
@@ -769,8 +769,11 @@ function submissions($mode) {
$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));

0 comments on commit 70eddb7

Please sign in to comment.