You are here

function qformat_default::writequestion in Quiz 6.6

Same name and namespace in other branches
  1. 6.5 includes/moodle/question/format.php \qformat_default::writequestion()

convert a single question object into text output in the given format. This must be overriden

Parameters

object question question object:

Return value

mixed question export text or null if not implemented

1 call to qformat_default::writequestion()
qformat_default::exportprocess in includes/moodle/question/format.php
Do the export For most types this should not need to be overrided
4 methods override qformat_default::writequestion()
qformat_gift::writequestion in includes/moodle/question/format/gift/format.php
convert a single question object into text output in the given format. This must be overriden
qformat_qti2::writequestion in includes/moodle/question/format/qti2/format.php
Creates the export text for a question
qformat_xhtml::writequestion in includes/moodle/question/format/xhtml/format.php
convert a single question object into text output in the given format. This must be overriden
qformat_xml::writequestion in includes/moodle/question/format/xml/format.php
Turns question into an xml segment

File

includes/moodle/question/format.php, line 786

Class

qformat_default
Base class for question import and export formats.

Code

function writequestion($question) {

  // if not overidden, then this is an error.
  $formatnotimplemented = get_string('formatnotimplemented', 'quiz');
  echo "<p>{$formatnotimplemented}</p>";
  return NULL;
}