~ubuntu-branches/ubuntu/saucy/moodle/saucy

« back to all changes in this revision

Viewing changes to question/type/multichoice/questiontype.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2013-09-09 15:22:35 UTC
  • mfrom: (1.1.17) (3.1.29 sid)
  • Revision ID: package-import@ubuntu.com-20130909152235-f5g7gphaseb84qeu
Tags: 2.5.2-1
* New upstream version: 2.5.2.
  - Incorporates S3 security patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
            $responses = array();
204
204
 
205
205
            foreach ($questiondata->options->answers as $aid => $answer) {
206
 
                $responses[$aid] = new question_possible_response(html_to_text(format_text(
207
 
                        $answer->answer, $answer->answerformat, array('noclean' => true)),
208
 
                        0, false), $answer->fraction);
 
206
                $responses[$aid] = new question_possible_response(
 
207
                        question_utils::to_plain_text($answer->answer, $answer->answerformat),
 
208
                        $answer->fraction);
209
209
            }
210
210
 
211
211
            $responses[null] = question_possible_response::no_response();
214
214
            $parts = array();
215
215
 
216
216
            foreach ($questiondata->options->answers as $aid => $answer) {
217
 
                $parts[$aid] = array($aid =>
218
 
                        new question_possible_response(html_to_text(format_text(
219
 
                        $answer->answer, $answer->answerformat, array('noclean' => true)),
220
 
                        0, false), $answer->fraction));
 
217
                $parts[$aid] = array($aid => new question_possible_response(
 
218
                        question_utils::to_plain_text($answer->answer, $answer->answerformat),
 
219
                        $answer->fraction));
221
220
            }
222
221
 
223
222
            return $parts;