mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
relacing deprecated functions with capability checks
This commit is contained in:
parent
0dde27bb52
commit
9ce384ba1e
10 changed files with 17 additions and 20 deletions
|
@ -1481,7 +1481,7 @@ function question_category_select_menu($courseid, $published = false, $only_edit
|
|||
if ($cid==$selected) {
|
||||
$seltxt = "selected=\"selected\"";
|
||||
}
|
||||
if ((!$only_editable) || isteacheredit($category->course)) {
|
||||
if ((!$only_editable) || has_capability('moodle/question:managecateory', get_context_instance(CONTEXT_COURSE, $category->course))) {
|
||||
echo " <option value=\"$cid\" $seltxt>$cname</option>\n";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue