From db784f7936745c23559ca722b5b19ae21e57b577 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Mon, 5 Jan 2009 15:20:11 +0000 Subject: [PATCH] MDL-17779 Add simple check that question at least has questiontext before allowing it. --- question/format/hotpot/format.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/question/format/hotpot/format.php b/question/format/hotpot/format.php index acf55582e05..245e7b0e3e3 100644 --- a/question/format/hotpot/format.php +++ b/question/format/hotpot/format.php @@ -476,7 +476,10 @@ class qformat_hotpot extends qformat_default { $question->fraction[$aa] = 1; } } - $questions[] = $question; + // add a sanity check for empty questions, see MDL-17779 + if (!empty($question->questiontext)) { + $questions[] = $question; + } $q++; } $x++;