}
public function get_question_summary() {
- $question = $this->html_to_text($this->questiontext);
+ $question = $this->html_to_text($this->questiontext, $this->questiontextformat);
$groups = array();
foreach ($this->choices as $group => $choices) {
$cs = array();
foreach ($choices as $choice) {
- $cs[] = $this->html_to_text($choice->text);
+ $cs[] = html_to_text($choice->text, 0, false);
}
$groups[] = '[[' . $group . ']] -> {' . implode(' / ', $cs) . '}';
}
foreach ($this->places as $place => $group) {
if (array_key_exists($this->field($place), $response) &&
$response[$this->field($place)]) {
- $choices[] = '{' . $this->html_to_text($this->get_selected_choice(
- $group, $response[$this->field($place)])->text) . '}';
+ $choices[] = '{' . html_to_text($this->get_selected_choice(
+ $group, $response[$this->field($place)])->text, 0, false) . '}';
$allblank = false;
} else {
$choices[] = '{}';
$choiceno = $this->choiceorder[$group][$response[$fieldname]];
$choice = $this->choices[$group][$choiceno];
$parts[$place] = new question_classified_response(
- $choiceno, $this->html_to_text($choice->text),
+ $choiceno, html_to_text($choice->text, 0, false),
$this->get_right_choice_for($place) == $response[$fieldname]);
}
return $parts;
foreach ($question->choices[$group] as $i => $choice) {
$choices[$i] = new question_possible_response(
- $question->html_to_text($choice->text),
+ html_to_text($choice->text, 0, false),
$question->rightchoices[$place] == $i);
}
$choices[null] = question_possible_response::no_response();
$result = '';
$result .= html_writer::tag('div', $question->format_text($questiontext,
- $qa, 'question', 'questiontext', $question->id),
+ $question->questiontextformat, $qa, 'question', 'questiontext', $question->id),
array('class' => $this->qtext_classname(), 'id' => $qa->get_qt_field_name('')));
$result .= $this->post_qtext_elements($qa, $options);