mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-70065 quiz: fix paging when adding questions from the bank
This commit is contained in:
parent
99680d1be4
commit
1622425260
2 changed files with 4 additions and 1 deletions
|
@ -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"
|
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 see "question 22 name" in the "categoryquestions" "table"
|
||||||
And I should not see "question 01 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
|
Scenario: Questions are added in the right place with multiple sections
|
||||||
Given the following "questions" exist:
|
Given the following "questions" exist:
|
||||||
|
|
|
@ -860,7 +860,7 @@ class view {
|
||||||
if ($totalnumber > DEFAULT_QUESTIONS_PER_PAGE) {
|
if ($totalnumber > DEFAULT_QUESTIONS_PER_PAGE) {
|
||||||
if ($perpage == DEFAULT_QUESTIONS_PER_PAGE) {
|
if ($perpage == DEFAULT_QUESTIONS_PER_PAGE) {
|
||||||
$url = new \moodle_url('edit.php', array_merge($pageurl->params(),
|
$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) {
|
if ($totalnumber > MAXIMUM_QUESTIONS_PER_PAGE) {
|
||||||
$showall = '<a href="'.$url.'">'.get_string('showperpage', 'moodle', MAXIMUM_QUESTIONS_PER_PAGE).'</a>';
|
$showall = '<a href="'.$url.'">'.get_string('showperpage', 'moodle', MAXIMUM_QUESTIONS_PER_PAGE).'</a>';
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue