MDL-48342 Question: qformat_default::readquestion is broken

This commit is contained in:
Jean-Michel Vedrine
2014-11-28 15:38:21 +01:00
parent 97cf440401
commit 71a673cc3b
2 changed files with 5 additions and 6 deletions
+2 -1
View File
@@ -587,7 +587,8 @@ class qformat_default {
/// this format, this function converts it into a question
/// object suitable for processing and insertion into Moodle.
echo "<p>This flash question format has not yet been completed!</p>";
// We should never get there unless the qformat plugin is broken.
throw new coding_exception('Question format plugin is missing important code: readquestion.');
return null;
}
+3 -5
View File
@@ -696,9 +696,8 @@ class qformat_default {
* @return object question object
*/
protected function readquestion($lines) {
$formatnotimplemented = get_string('formatnotimplemented', 'question');
echo "<p>{$formatnotimplemented}</p>";
// We should never get there unless the qformat plugin is broken.
throw new coding_exception('Question format plugin is missing important code: readquestion.');
return null;
}
@@ -930,8 +929,7 @@ class qformat_default {
*/
protected function writequestion($question) {
// if not overidden, then this is an error.
$formatnotimplemented = get_string('formatnotimplemented', 'question');
echo "<p>{$formatnotimplemented}</p>";
throw new coding_exception('Question format plugin is missing important code: writequestion.');
return null;
}