]> git.mjollnir.org Git - moodle.git/commitdiff
Error message for when a questiontype is missing is prepended to question text.
authorgustav_delius <gustav_delius>
Sun, 30 Apr 2006 17:33:00 +0000 (17:33 +0000)
committergustav_delius <gustav_delius>
Sun, 30 Apr 2006 17:33:00 +0000 (17:33 +0000)
lib/questionlib.php

index 94b9ca10cf7af8c35a59cbb038afb01ae9b73c93..831bc0020da2dacb3516ca74aa0b39cd217cc33a 100644 (file)
@@ -517,6 +517,7 @@ function get_question_options(&$questions) {
         foreach ($keys as $i) {
             if (!array_key_exists($questions[$i]->qtype, $QTYPES)) {
                 $questions[$i]->qtype = 'missingtype';
+                $questions[$i]->questiontext = get_string('warningmissingtype').$questions[$i]->questiontext;
             }
             
             // set name prefix
@@ -529,6 +530,7 @@ function get_question_options(&$questions) {
     } else { // deal with single question
         if (!array_key_exists($questions->qtype, $QTYPES)) {
             $questions->qtype = 'missingtype';
+            $questions[$i]->questiontext = get_string('warningmissingtype').$questions[$i]->questiontext;
         }
         $questions->name_prefix = question_make_name_prefix($questions->id);
         return $QTYPES[$questions->qtype]->get_question_options($questions);