3 ////////////////////////////////////////////////////////////////////////////
6 /// Created by Henrik Kaipe
8 ////////////////////////////////////////////////////////////////////////////
10 // Based on format.php, included by ../../import.php
12 * @package questionbank
13 * @subpackage importexport
15 class qformat_multianswer
extends qformat_default
{
17 function provide_import() {
21 function readquestions($lines) {
22 // Parses an array of lines into an array of questions.
23 // For this class the method has been simplified as
24 // there can never be more than one question for a
28 $thequestion= qtype_multianswer_extract_question(
29 addslashes(implode('',$lines)));
30 $thequestion->qtype
= MULTIANSWER
;
31 $thequestion->course
= $this->course
;
33 if (!empty($thequestion)) {
34 $thequestion->name
= addslashes($lines[0]);
36 $questions[] = $thequestion;