MDL-74041 question bank: page size should be 100

This commit is contained in:
Tim Hunt 2022-03-01 11:25:34 +00:00
parent 1a744030d6
commit 10e8ffe312
4 changed files with 9 additions and 8 deletions

View File

@ -132,7 +132,7 @@ class helper_test extends \advanced_testcase {
ob_start();
$pagevars = [
'qpage' => 0,
'qperpage' => 20,
'qperpage' => DEFAULT_QUESTIONS_PER_PAGE,
'cat' => $this->cat->id . ',' . $this->context->id,
'recurse' => false,
'showhidden' => false,
@ -153,7 +153,7 @@ class helper_test extends \advanced_testcase {
ob_start();
$pagevars = [
'qpage' => 0,
'qperpage' => 20,
'qperpage' => DEFAULT_QUESTIONS_PER_PAGE,
'cat' => $this->cat->id . ',' . $this->context->id,
'recurse' => false,
'showhidden' => false,
@ -169,7 +169,7 @@ class helper_test extends \advanced_testcase {
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,

View File

@ -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;
}

View File

@ -30,8 +30,8 @@ defined('MOODLE_INTERNAL') || die();
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;

View File

@ -63,7 +63,7 @@ class core_question_bank_view_testcase extends advanced_testcase {
ob_start();
$pagevars = [
'qpage' => 0,
'qperpage' => 20,
'qperpage' => DEFAULT_QUESTIONS_PER_PAGE,
'cat' => $cat->id . ',' . $context->id,
'recurse' => false,
'showhidden' => false,
@ -104,7 +104,7 @@ class core_question_bank_view_testcase extends advanced_testcase {
ob_start();
$pagevars = [
'qpage' => 0,
'qperpage' => 20,
'qperpage' => DEFAULT_QUESTIONS_PER_PAGE,
'cat' => $cat->id . ',' . $context->id,
'recurse' => false,
'showhidden' => false,