Skip to content
Permalink
Browse files

MDL-50799 question: Improve Show all text to be more accurate

  • Loading branch information...
merrill-oakland committed Jul 8, 2015
1 parent 1f2979d commit 4a97af59ef437cd7767b5e3cd63e6ce7e26b265b
Showing with 8 additions and 2 deletions.
  1. +7 −2 question/classes/bank/view.php
  2. +1 −0 question/editlib.php
@@ -710,8 +710,13 @@ protected function display_question_list($contexts, $pageurl, $categoryandcontex
echo $OUTPUT->render($pagingbar);
if ($totalnumber > DEFAULT_QUESTIONS_PER_PAGE) {
if ($perpage == DEFAULT_QUESTIONS_PER_PAGE) {
$url = new \moodle_url('edit.php', array_merge($pageurl->params(), array('qperpage' => 1000)));
$showall = '<a href="'.$url.'">'.get_string('showall', 'moodle', $totalnumber).'</a>';
$url = new \moodle_url('edit.php', array_merge($pageurl->params(),
array('qperpage' => MAXIMUM_QUESTIONS_PER_PAGE)));
if ($totalnumber > MAXIMUM_QUESTIONS_PER_PAGE) {
$showall = '<a href="'.$url.'">'.get_string('showperpage', 'moodle', MAXIMUM_QUESTIONS_PER_PAGE).'</a>';
} else {
$showall = '<a href="'.$url.'">'.get_string('showall', 'moodle', $totalnumber).'</a>';
}
} else {
$url = new \moodle_url('edit.php', array_merge($pageurl->params(),
array('qperpage' => DEFAULT_QUESTIONS_PER_PAGE)));
@@ -31,6 +31,7 @@
require_once($CFG->libdir . '/questionlib.php');
define('DEFAULT_QUESTIONS_PER_PAGE', 20);
define('MAXIMUM_QUESTIONS_PER_PAGE', 1000);
function get_module_from_cmid($cmid) {
global $CFG, $DB;

0 comments on commit 4a97af5

Please sign in to comment.
You can’t perform that action at this time.