Bug #6033 - missing string for unknown questiontype. Also tidied up some messy code.

This commit is contained in:
tjhunt
2006-07-18 15:27:50 +00:00
parent f2ea23a1bd
commit e10e4fdd55
4 changed files with 38 additions and 35 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
<?php // $Id$
if (!empty($options->answers)) {
$answersraw = get_records_list("question_answers", "id", $options->answers);
$answersraw = get_records_list('question_answers', 'id', $options->answers);
}
@@ -13,10 +13,10 @@
}
$yesnooptions = array();
$yesnooptions[0] = get_string("no");
$yesnooptions[1] = get_string("yes");
$yesnooptions[0] = get_string('no');
$yesnooptions[1] = get_string('yes');
print_heading_with_help(get_string("editingmissingtype", "quiz"), "multichoice", "quiz");
print_heading(get_string('warningmissingtype', 'quiz'));
require("$CFG->dirroot/question/type/missingtype/editquestion.html");
?>
@@ -38,6 +38,7 @@ class question_missingtype_qtype extends default_questiontype {
$anss = array();
if ($answers) {
foreach ($answers as $answer) {
$a = new stdClass;
$a->text = format_text("$answer->answer", FORMAT_MOODLE, $formatoptions, $cmoptions->course);
$anss[] = clone($a);