diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php index 9350ec95985f6..888addf7b094e 100644 --- a/mod/quiz/locallib.php +++ b/mod/quiz/locallib.php @@ -1333,12 +1333,12 @@ function quiz_question_edit_button($cmid, $question, $returnurl, $contentafteric // What sort of icon should we show? $action = ''; if (!empty($question->id) && - (question_has_capability_on($question, 'edit', $question->category) || - question_has_capability_on($question, 'move', $question->category))) { + (question_has_capability_on($question, 'edit') || + question_has_capability_on($question, 'move'))) { $action = $stredit; $icon = 't/edit'; } else if (!empty($question->id) && - question_has_capability_on($question, 'view', $question->category)) { + question_has_capability_on($question, 'view')) { $action = $strview; $icon = 'i/info'; } @@ -1390,7 +1390,7 @@ function quiz_question_preview_url($quiz, $question, $variant = null) { */ function quiz_question_preview_button($quiz, $question, $label = false, $variant = null) { global $PAGE; - if (!question_has_capability_on($question, 'use', $question->category)) { + if (!question_has_capability_on($question, 'use')) { return ''; } diff --git a/question/format.php b/question/format.php index 08689f5b700e0..a3257cf869436 100644 --- a/question/format.php +++ b/question/format.php @@ -857,7 +857,7 @@ public function exportprocess() { // export the question displaying message $count++; - if (question_has_capability_on($question, 'view', $question->category)) { + if (question_has_capability_on($question, 'view')) { $expout .= $this->writequestion($question, $contextid) . "\n"; } }