matching qtype: MDL-14420 Could not use '0' as a question stem. Oops, more tests need to be corrected.

This commit is contained in:
tjhunt
2008-12-11 05:01:43 +00:00
parent 112b018900
commit 5be081f0d9
+2 -2
View File
@@ -270,7 +270,7 @@ class question_match_qtype extends default_questiontype {
// Print the input controls
foreach ($subquestions as $key => $subquestion) {
if ($subquestion->questiontext != '') {
if ($subquestion->questiontext !== '') {
// Subquestion text:
$a = new stdClass;
$a->text = $this->format_text($subquestion->questiontext,
@@ -332,7 +332,7 @@ class question_match_qtype extends default_questiontype {
$sumgrade = 0;
$totalgrade = 0;
foreach ($subquestions as $key => $sub) {
if ($sub->questiontext) {
if ($sub->questiontext !== '') {
$totalgrade += 1;
$response = $responses[$key];
if ($response && !array_key_exists($response, $sub->options->answers)) {