Skip to content

Commit

Permalink
MDL-61364 core: remove param from question_has_capability_on calls
Browse files Browse the repository at this point in the history
  • Loading branch information
lameze committed Mar 28, 2018
1 parent 2cf7bde commit 13e2b19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions mod/quiz/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down Expand Up @@ -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 '';
}

Expand Down
2 changes: 1 addition & 1 deletion question/format.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}
Expand Down

0 comments on commit 13e2b19

Please sign in to comment.