function qformat_default::format_question_text in Quiz 6.6
Same name and namespace in other branches
- 6.5 includes/moodle/question/format.php \qformat_default::format_question_text()
where question specifies a moodle (text) format this performs the conversion.
File
- includes/
moodle/ question/ format.php, line 812
Class
- qformat_default
- Base class for question import and export formats.
Code
function format_question_text($question) {
$formatoptions = new stdClass();
$formatoptions->noclean = true;
$formatoptions->para = false;
if (empty($question->questiontextformat)) {
$format = FORMAT_MOODLE;
}
else {
$format = $question->questiontextformat;
}
return format_text(stripslashes($question->questiontext), $format, $formatoptions);
}