Fix for nasty data corruption bug 3915

This commit is contained in:
moodler
2005-08-21 15:40:11 +00:00
parent 7e61008580
commit c8ef1ce0f6
@@ -40,17 +40,13 @@
}
$parsableanswerdef .= '}';
// Fix the questiontext fields of old questions
set_field('quiz_questions', 'questiontext', $parsableanswerdef,
'id', $wrapped->id);
set_field('quiz_questions', 'questiontext', addslashes($parsableanswerdef), 'id', $wrapped->id);
} else {
$parsableanswerdef = str_replace('&#', '&\#',
$wrapped->questiontext);
$parsableanswerdef = str_replace('&#', '&\#', $wrapped->questiontext);
}
//echo "{#$key}<br />";
//echo $parsableanswerdef.'<br />';
$question->questiontext = str_replace
("{#$key}", $parsableanswerdef,
$question->questiontext);
$question->questiontext = str_replace("{#$key}", $parsableanswerdef, $question->questiontext);
}
}
print_heading_with_help(get_string('editingmultianswer', 'quiz'),