You are here

function question_require_capability_on in Quiz 6.6

Same name and namespace in other branches
  1. 6.5 includes/moodle/lib/questionlib.php \question_require_capability_on()

Require capability on question.

1 call to question_require_capability_on()
delete_question in includes/moodle/lib/questionlib.php
Deletes question and all associated data from the database

File

includes/moodle/lib/questionlib.php, line 2229

Code

function question_require_capability_on($question, $cap) {
  if (!question_has_capability_on($question, $cap)) {
    print_error('nopermissions', '', '', $cap);
  }
  return true;
}