mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-74041 quiz: use own size for paging the question bank
This commit is contained in:
parent
10e8ffe312
commit
aac5b47cea
4 changed files with 29 additions and 12 deletions
|
@ -36,6 +36,8 @@ use mod_quiz\question\bank\filter\custom_category_condition;
|
|||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class custom_view extends \core_question\local\bank\view {
|
||||
/** @var int number of questions per page to show in the add from question bank modal. */
|
||||
const DEFAULT_PAGE_SIZE = 20;
|
||||
|
||||
/** @var bool $quizhasattempts whether the quiz this is used by has been attemptd. */
|
||||
protected $quizhasattempts = false;
|
||||
|
@ -57,6 +59,7 @@ class custom_view extends \core_question\local\bank\view {
|
|||
public function __construct($contexts, $pageurl, $course, $cm, $quiz) {
|
||||
parent::__construct($contexts, $pageurl, $course, $cm);
|
||||
$this->quiz = $quiz;
|
||||
$this->pagesize = self::DEFAULT_PAGE_SIZE;
|
||||
}
|
||||
|
||||
protected function get_question_bank_plugins(): array {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue