protected function prepare_response($name, question_attempt $qa, question_attempt_step $step, $context) { if (!$step->has_qt_var($name)) { return ''; } $formatoptions = new stdClass(); $formatoptions->para = false; $text = $qa->rewrite_response_pluginfile_urls($step->get_qt_var($name), $context->id, 'answer', $step); return format_text($text, $step->get_qt_var($name . 'format'), $formatoptions); }