diff --git a/mod/quiz/tests/behat/editing_add_from_question_bank.feature b/mod/quiz/tests/behat/editing_add_from_question_bank.feature index b8c8e687c69..3ff5acd4f33 100644 --- a/mod/quiz/tests/behat/editing_add_from_question_bank.feature +++ b/mod/quiz/tests/behat/editing_add_from_question_bank.feature @@ -79,6 +79,9 @@ Feature: Adding questions to a quiz from the question bank Then I should see "question 21 name" in the "categoryquestions" "table" And I should see "question 22 name" in the "categoryquestions" "table" And I should not see "question 01 name" in the "categoryquestions" "table" + And I click on "Show all 22" "link" in the ".pagingbottom" "css_element" + And I should see "question 01 name" in the "categoryquestions" "table" + And I should see "question 22 name" in the "categoryquestions" "table" Scenario: Questions are added in the right place with multiple sections Given the following "questions" exist: diff --git a/question/classes/bank/view.php b/question/classes/bank/view.php index c8ec2257503..de74be8c03e 100644 --- a/question/classes/bank/view.php +++ b/question/classes/bank/view.php @@ -860,7 +860,7 @@ class view { if ($totalnumber > DEFAULT_QUESTIONS_PER_PAGE) { if ($perpage == DEFAULT_QUESTIONS_PER_PAGE) { $url = new \moodle_url('edit.php', array_merge($pageurl->params(), - array('qperpage' => MAXIMUM_QUESTIONS_PER_PAGE))); + array('qpage' => 0, 'qperpage' => MAXIMUM_QUESTIONS_PER_PAGE))); if ($totalnumber > MAXIMUM_QUESTIONS_PER_PAGE) { $showall = ''.get_string('showperpage', 'moodle', MAXIMUM_QUESTIONS_PER_PAGE).''; } else {