format.php in Quiz 6.6
Same filename in this branch
- 6.6 includes/moodle/question/format.php
- 6.6 includes/moodle/question/format/qti2/format.php
- 6.6 includes/moodle/question/format/blackboard/format.php
- 6.6 includes/moodle/question/format/gift/format.php
- 6.6 includes/moodle/question/format/hotpot/format.php
- 6.6 includes/moodle/question/format/examview/format.php
- 6.6 includes/moodle/question/format/aiken/format.php
- 6.6 includes/moodle/question/format/xml/format.php
- 6.6 includes/moodle/question/format/multianswer/format.php
- 6.6 includes/moodle/question/format/coursetestmanager/format.php
- 6.6 includes/moodle/question/format/blackboard_6/format.php
- 6.6 includes/moodle/question/format/webct/format.php
- 6.6 includes/moodle/question/format/missingword/format.php
- 6.6 includes/moodle/question/format/xhtml/format.php
- 6.6 includes/moodle/question/format/learnwise/format.php
Same filename and directory in other branches
File
includes/moodle/question/format/multianswer/format.phpView source
<?php
// $Id$
////////////////////////////////////////////////////////////////////////////
/// MULTIANSWER FORMAT
///
/// Created by Henrik Kaipe
///
////////////////////////////////////////////////////////////////////////////
// Based on format.php, included by ../../import.php
/**
* @package questionbank
* @subpackage importexport
*/
class qformat_multianswer extends qformat_default {
function provide_import() {
return true;
}
function readquestions($lines) {
// Parses an array of lines into an array of questions.
// For this class the method has been simplified as
// there can never be more than one question for a
// multianswer import
$questions = array();
$thequestion = qtype_multianswer_extract_question(addslashes(implode('', $lines)));
$thequestion->qtype = MULTIANSWER;
$thequestion->course = $this->course;
if (!empty($thequestion)) {
$thequestion->name = addslashes($lines[0]);
$questions[] = $thequestion;
}
return $questions;
}
}
Classes
Name | Description |
---|---|
qformat_multianswer | @package questionbank @subpackage importexport |