Permalink
Browse files

MDL-41063 Lesson qformat_default class is missing an error function

  • Loading branch information...
Jean-Michel Vedrine
Jean-Michel Vedrine committed Aug 7, 2013
1 parent d59796a commit e87688d1f4672edceadf9a5a120c7f4b57b96c62
Showing with 20 additions and 0 deletions.
  1. +20 −0 mod/lesson/format.php
View
@@ -297,6 +297,26 @@ function provide_import() {
return false;
}
/**
* Handle parsing error
*
* @param string $message information about error
* @param string $text imported text that triggered the error
* @param string $questionname imported question name
*/
protected function error($message, $text='', $questionname='') {
$importerrorquestion = get_string('importerrorquestion', 'question');
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>";
}
function importpreprocess() {
// Does any pre-processing that may be desired
return true;

0 comments on commit e87688d

Please sign in to comment.