relacing deprecated functions with capability checks
This commit is contained in:
+1
-1
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user