MDL-30173 Assignment : Convert to use moodle_url and add missing filter param
authorAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Mon, 7 Nov 2011 17:28:39 +0000 (17:28 +0000)
committerAparup Banerjee <aparup@moodle.com>
Mon, 21 Nov 2011 18:02:26 +0000 (02:02 +0800)
mod/assignment/lib.php

index 0be90a6..86906a9 100644 (file)
@@ -770,8 +770,12 @@ class assignment_base {
                 $nextid = required_param('nextid', PARAM_INT);
                 $id = required_param('id', PARAM_INT);
                 $offset = (int)$offset+1;
-                //$this->display_submission($offset+1 , $nextid);
-                redirect('submissions.php?id='.$id.'&userid='. $nextid . '&mode=single&offset='.$offset);
+                $filter = optional_param('filter', self::FILTER_ALL, PARAM_INT);
+                $redirect = new moodle_url('submissions.php',
+                        array('id' => $id, 'offset' => $offset, 'userid' => $nextid,
+                        'mode' => 'single', 'filter' => $filter));
+
+                redirect($redirect);
                 break;
 
             case 'singlenosave':