Skip to content

Commit

Permalink
MDL-74041 question bank: page size should be 100
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed May 4, 2022
1 parent 1a74403 commit 10e8ffe
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions question/bank/bulkmove/tests/helper_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function test_bulk_move_questions() {
ob_start();
$pagevars = [
'qpage' => 0,
'qperpage' => 20,
'qperpage' => DEFAULT_QUESTIONS_PER_PAGE,
'cat' => $this->cat->id . ',' . $this->context->id,
'recurse' => false,
'showhidden' => false,
Expand All @@ -153,7 +153,7 @@ public function test_bulk_move_questions() {
ob_start();
$pagevars = [
'qpage' => 0,
'qperpage' => 20,
'qperpage' => DEFAULT_QUESTIONS_PER_PAGE,
'cat' => $this->cat->id . ',' . $this->context->id,
'recurse' => false,
'showhidden' => false,
Expand All @@ -169,7 +169,7 @@ public function test_bulk_move_questions() {
ob_start();
$pagevars = [
'qpage' => 0,
'qperpage' => 20,
'qperpage' => DEFAULT_QUESTIONS_PER_PAGE,
'cat' => $this->secondcategory->id . ',' . $this->context->id,
'category' => $this->secondcategory->id . ',' . $this->context->id,
'recurse' => false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ class question_category_list extends moodle_list {
* @param \context $context
*/
public function __construct($type='ul', $attributes='', $editable = false, $pageurl=null,
$page = 0, $pageparamname = 'page', $itemsperpage = 20, $context = null) {
$page = 0, $pageparamname = 'page',
$itemsperpage = DEFAULT_QUESTIONS_PER_PAGE, $context = null) {
parent::__construct('ul', '', $editable, $pageurl, $page, 'cpage', $itemsperpage);
$this->context = $context;
}
Expand Down
4 changes: 2 additions & 2 deletions question/editlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

require_once($CFG->libdir . '/questionlib.php');

define('DEFAULT_QUESTIONS_PER_PAGE', 20);
define('MAXIMUM_QUESTIONS_PER_PAGE', 1000);
define('DEFAULT_QUESTIONS_PER_PAGE', 100);
define('MAXIMUM_QUESTIONS_PER_PAGE', 4000);

function get_module_from_cmid($cmid) {
global $CFG, $DB;
Expand Down
4 changes: 2 additions & 2 deletions question/tests/bank_view_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function test_viewing_question_bank_should_not_load_individual_questions(
ob_start();
$pagevars = [
'qpage' => 0,
'qperpage' => 20,
'qperpage' => DEFAULT_QUESTIONS_PER_PAGE,
'cat' => $cat->id . ',' . $context->id,
'recurse' => false,
'showhidden' => false,
Expand Down Expand Up @@ -104,7 +104,7 @@ public function test_unknown_qtype_does_not_break_view() {
ob_start();
$pagevars = [
'qpage' => 0,
'qperpage' => 20,
'qperpage' => DEFAULT_QUESTIONS_PER_PAGE,
'cat' => $cat->id . ',' . $context->id,
'recurse' => false,
'showhidden' => false,
Expand Down

0 comments on commit 10e8ffe

Please sign in to comment.