function qformat_default::error in Quiz 6.5
Same name and namespace in other branches
- 6.6 includes/moodle/question/format.php \qformat_default::error()
Handle parsing error
4 calls to qformat_default::error()
- qformat_gift::check_answer_count in includes/
moodle/ question/ format/ gift/ format.php - 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_xml::getpath in includes/
moodle/ question/ format/ xml/ format.php - return the value of a node, given a path to the node if it doesn't exist return the default value
- qformat_xml::readquestions in includes/
moodle/ question/ format/ xml/ format.php - parse the array of lines into an array of questions this *could* burn memory - but it won't happen that much so fingers crossed!
File
- includes/
moodle/ question/ format.php, line 163
Class
- qformat_default
- Base class for question import and export formats.
Code
function error($message, $text = '', $questionname = '') {
$importerrorquestion = get_string('importerrorquestion', 'quiz');
echo "<div class=\"importerror\">\n";
echo "<strong>{$importerrorquestion} {$questionname}</strong>";
if (!empty($text)) {
$text = s($text);
echo "<blockquote>{$text}</blockquote>\n";
}
echo "<strong>{$message}</strong>\n";
echo "</div>";
$this->importerrors++;
}