From: thepurpleblob Date: Mon, 5 Jan 2009 15:23:10 +0000 (+0000) Subject: MDL-17779 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9843511764e40775bcac45434a09683ff0c4e435;p=moodle.git MDL-17779 Add simple check that question at least has questiontext before allowing it. --- 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++;