From 9843511764e40775bcac45434a09683ff0c4e435 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Mon, 5 Jan 2009 15:23:10 +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 d3a4056b90..efc708c1d2 100644 --- a/question/format/hotpot/format.php +++ b/question/format/hotpot/format.php @@ -445,7 +445,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++; -- 2.39.5