MDL-20154 questions: question_delete_question should not check perms
By Moodle convention, library functions should not implement permission checks, they are to be handled by the invoking code.
This commit is contained in:
@@ -321,9 +321,6 @@ function question_delete_question($questionid) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check permissions.
|
||||
question_require_capability_on($question, 'edit');
|
||||
|
||||
$dm = new question_engine_data_mapper();
|
||||
$dm->delete_previews($questionid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user