Commit 4b3f22e5 authored by Paul Holden's avatar Paul Holden
Browse files

MDL-71127 mod_quiz: fix thrown exception for invalid question columns.

parent 0fd37bf5
......@@ -24,8 +24,8 @@
*/
namespace mod_quiz\question\bank;
defined('MOODLE_INTERNAL') || die();
use coding_exception;
/**
* Subclass to customise the view of the question bank for the quiz editing screen.
......@@ -81,7 +81,7 @@ class custom_view extends \core_question\bank\view {
$fullname, DEBUG_DEVELOPER);
$fullname = 'question_bank_' . $fullname;
} else {
throw new coding_exception("No such class exists: $fullname");
throw new coding_exception('Invalid quiz question bank column', $fullname);
}
}
$this->requiredcolumns[$fullname] = new $fullname($this);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment