Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…t assignment was not saved
  • Loading branch information...
commit 2f14dd463bc67f8222f2bc1b8e7465b704e69749 1 parent 12216d3
Andrew Nicols authored November 07, 2011 nebgor committed November 22, 2011

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  mod/assignment/lib.php
5  mod/assignment/lib.php
@@ -756,8 +756,11 @@ function submissions($mode) {
756 756
                 $offset = required_param('offset', PARAM_INT);
757 757
                 $nextid = required_param('nextid', PARAM_INT);
758 758
                 $id = required_param('id', PARAM_INT);
759  
-                $offset = (int)$offset+1;
760 759
                 $filter = optional_param('filter', self::FILTER_ALL, PARAM_INT);
  760
+
  761
+                if ($mode == 'next' || $filter !== self::FILTER_REQUIRE_GRADING) {
  762
+                    $offset = (int)$offset+1;
  763
+                }
761 764
                 $redirect = new moodle_url('submissions.php',
762 765
                         array('id' => $id, 'offset' => $offset, 'userid' => $nextid,
763 766
                         'mode' => 'single', 'filter' => $filter));

0 notes on commit 2f14dd4

Please sign in to comment.
Something went wrong with that request. Please try again.