Skip to content

Commit

Permalink
MDL-71127 mod_quiz: fix thrown exception for invalid question columns.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Apr 19, 2021
1 parent 9600bec commit e64eae8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod/quiz/classes/question/bank/custom_view.php
Expand Up @@ -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.
Expand Down Expand Up @@ -81,7 +81,7 @@ protected function wanted_columns() {
$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);
Expand Down

0 comments on commit e64eae8

Please sign in to comment.