From 2ea3451018b517efef71de1663291dd6173d7429 Mon Sep 17 00:00:00 2001 From: michaelpenne Date: Thu, 16 Mar 2006 03:26:49 +0000 Subject: [PATCH] SQL error occured when viewing this page and no questions have been added to the quiz. This has been fixed. --- mod/quiz/grading.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/quiz/grading.php b/mod/quiz/grading.php index be8312abef..50a2202869 100644 --- a/mod/quiz/grading.php +++ b/mod/quiz/grading.php @@ -261,7 +261,7 @@ " AND q.id IN ($questionlist)". " AND q.qtype = '".ESSAY."'". " ORDER BY q.name"; - if (!$questions = get_records_sql($sql)) { + if (empty($questionlist) or !$questions = get_records_sql($sql)) { print_heading(get_string('noessayquestionsfound', 'quiz')); print_footer($course); exit(); -- 2.39.5