.
/**
* XHTML question exporter.
*
* @package qformat
* @subpackage xhtml
* @copyright 2005 Howard Miller
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* XHTML question exporter.
*
* Exports questions as static HTML.
*
* @copyright 2005 Howard Miller
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qformat_xhtml extends qformat_default {
public function provide_export() {
return true;
}
protected function repchar($text) {
return $text;
}
protected function writequestion($question) {
global $OUTPUT;
// turns question into string
// question reflects database fields for general question and specific to type
// if a category switch, just ignore
if ($question->qtype=='category') {
return '';
}
// initial string;
$expout = "";
$id = $question->id;
// add comment and div tags
$expout .= "\n";
$expout .= "
\n";
// add header
$expout .= "
$question->name
\n";
// Format and add the question text
$expout .= '