Fixed bug 3393

This commit is contained in:
gustav_delius
2005-06-01 20:07:50 +00:00
parent 643f215f0a
commit 72a054b9f9
2 changed files with 11 additions and 4 deletions
+2
View File
@@ -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'])) {
+9 -4
View File
@@ -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,