Fixed bug 3393
This commit is contained in:
@@ -341,6 +341,8 @@ if (self.name == 'editquestion') {
|
||||
|
||||
if (isset($_REQUEST['cat'])) { /// coming from category selection drop-down menu
|
||||
$modform->category = $cat;
|
||||
$page = 0;
|
||||
$modform->page = 0;
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['recurse'])) {
|
||||
|
||||
@@ -525,10 +525,15 @@ function quiz_print_cat_question_list($course, $categoryid, $quizselected=true,
|
||||
}
|
||||
|
||||
if (!$questions = get_records_select('quiz_questions', "category IN ($categorylist) AND parent = '0' $showhidden", 'qtype, name ASC', '*', $page*$perpage, $perpage)) {
|
||||
echo "<p align=\"center\">";
|
||||
print_string("noquestions", "quiz");
|
||||
echo "</p>";
|
||||
return;
|
||||
// There are no questions on the requested page.
|
||||
$page = 0;
|
||||
if (!$questions = get_records_select('quiz_questions', "category IN ($categorylist) AND parent = '0' $showhidden", 'qtype, name ASC', '*', 0, $perpage)) {
|
||||
// There are no questions at all
|
||||
echo "<p align=\"center\">";
|
||||
print_string("noquestions", "quiz");
|
||||
echo "</p>";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
print_paging_bar($totalnumber, $page, $perpage,
|
||||
|
||||
Reference in New Issue
Block a user