MDL-48342 Question: qformat_default::readquestion is broken

Conflicts:
	question/format.php
This commit is contained in:
Jean-Michel Vedrine
2014-11-28 15:30:39 +01:00
parent ab3effc0c6
commit 2a4c8dd7ff
2 changed files with 5 additions and 6 deletions
+2 -1
View File
@@ -555,7 +555,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;
}