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:
Eric Merrill
2014-06-05 11:06:59 -04:00
parent d73b1f3e71
commit 0d5c68bfd8
-3
View File
@@ -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);