MDL-78025 questions: fix PHPdoc on question_require_capability_on
This commit is contained in:
+4
-3
@@ -1494,9 +1494,10 @@ function question_has_capability_on($questionorid, $cap, $notused = -1): bool {
|
||||
/**
|
||||
* Require capability on question.
|
||||
*
|
||||
* @param object $question
|
||||
* @param string $cap
|
||||
* @return bool
|
||||
* @param int|stdClass|question_definition $question object or id.
|
||||
* If an object is passed, it should include ->contextid and ->createdby.
|
||||
* @param string $cap 'add', 'edit', 'view', 'use', 'move' or 'tag'.
|
||||
* @return bool true if the user has the capability. Throws exception if not.
|
||||
*/
|
||||
function question_require_capability_on($question, $cap): bool {
|
||||
if (!question_has_capability_on($question, $cap)) {
|
||||
|
||||
Reference in New Issue
Block a user