MDL-31130 question bank: toggling show all / 20 per page broken.
authorJonathon Fowler <fowlerj@usq.edu.au>
Thu, 12 Jan 2012 12:41:25 +0000 (12:41 +0000)
committerkordan <kordan@mclink.it>
Thu, 19 Jan 2012 17:35:33 +0000 (18:35 +0100)
question/editlib.php

index 7f781a1..c433cbe 100644 (file)
@@ -1360,10 +1360,10 @@ class question_bank_view {
         echo $OUTPUT->render($pagingbar);
         if ($totalnumber > DEFAULT_QUESTIONS_PER_PAGE) {
             if ($perpage == DEFAULT_QUESTIONS_PER_PAGE) {
-                $url = new moodle_url('edit.php', ($pageurl->params()+array('qperpage'=>1000)));
+                $url = new moodle_url('edit.php', array_merge($pageurl->params(), array('qperpage'=>1000)));
                 $showall = '<a href="'.$url.'">'.get_string('showall', 'moodle', $totalnumber).'</a>';
             } else {
-                $url = new moodle_url('edit.php', ($pageurl->params()+array('qperpage'=>DEFAULT_QUESTIONS_PER_PAGE)));
+                $url = new moodle_url('edit.php', array_merge($pageurl->params(), array('qperpage'=>DEFAULT_QUESTIONS_PER_PAGE)));
                 $showall = '<a href="'.$url.'">'.get_string('showperpage', 'moodle', DEFAULT_QUESTIONS_PER_PAGE).'</a>';
             }
             echo "<div class='paging'>$showall</div>";