]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13298 "Question bank displays always page 1 after adding new question" this was...
authorjamiesensei <jamiesensei>
Tue, 5 Feb 2008 12:14:46 +0000 (12:14 +0000)
committerjamiesensei <jamiesensei>
Tue, 5 Feb 2008 12:14:46 +0000 (12:14 +0000)
question/editlib.php

index 1ce4e085507feba5668721917195ce43b59361a7..2f5c45c153998dfce9c957220ee34ec944d57844 100644 (file)
@@ -637,8 +637,10 @@ function question_edit_setup($edittab, $requirecmid = false, $requirecourseid =
     //a new cat.
     $pagevars['cat'] = optional_param('cat', 0, PARAM_SEQUENCE);// if empty will be set up later
     if  ($category = optional_param('category', 0, PARAM_SEQUENCE)){
-        $pagevars['cat'] = $category;
-        $pagevars['qpage'] = 0;
+        if ($pagevars['cat'] != $category){ // is this a move to a new category?
+            $pagevars['cat'] = $category;
+            $pagevars['qpage'] = 0;
+        }
     }
     if ($pagevars['cat']){
         $thispageurl->param('cat', $pagevars['cat']);