function qformat_default::readquestion in Quiz 6.6
Same name and namespace in other branches
- 6.5 includes/moodle/question/format.php \qformat_default::readquestion()
Given the data known to define a question in this format, this function converts it into a question object suitable for processing and insertion into Moodle.
If your format does not use blank lines to delimit questions (e.g. an XML format) you must override 'readquestions' too
Parameters
$lines mixed data that represents question:
Return value
object question object
1 call to qformat_default::readquestion()
- qformat_default::readquestions in includes/
moodle/ question/ format.php - Parses an array of lines into an array of questions, where each item is a question object as defined by readquestion(). Questions are defined as anything between blank lines.
5 methods override qformat_default::readquestion()
- qformat_aiken::readquestion in includes/
moodle/ question/ format/ aiken/ format.php - Given the data known to define a question in this format, this function converts it into a question object suitable for processing and insertion into Moodle.
- qformat_examview::readquestion in includes/
moodle/ question/ format/ examview/ format.php - Given the data known to define a question in this format, this function converts it into a question object suitable for processing and insertion into Moodle.
- qformat_gift::readquestion in includes/
moodle/ question/ format/ gift/ format.php - Given the data known to define a question in this format, this function converts it into a question object suitable for processing and insertion into Moodle.
- qformat_learnwise::readquestion in includes/
moodle/ question/ format/ learnwise/ format.php - Given the data known to define a question in this format, this function converts it into a question object suitable for processing and insertion into Moodle.
- qformat_missingword::readquestion in includes/
moodle/ question/ format/ missingword/ format.php - Given the data known to define a question in this format, this function converts it into a question object suitable for processing and insertion into Moodle.
File
- includes/
moodle/ question/ format.php, line 522
Class
- qformat_default
- Base class for question import and export formats.
Code
function readquestion($lines) {
$formatnotimplemented = get_string('formatnotimplemented', 'quiz');
echo "<p>{$formatnotimplemented}</p>";
return NULL;
}