From: michaelpenne Date: Thu, 16 Mar 2006 03:26:49 +0000 (+0000) Subject: SQL error occured when viewing this page and no questions have been added to the... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2ea3451018b517efef71de1663291dd6173d7429;p=moodle.git SQL error occured when viewing this page and no questions have been added to the quiz. This has been fixed. --- 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();