More capability name typos.
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) || has_capability('moodle/question:managecateory', get_context_instance(CONTEXT_COURSE, $category->course))) {
|
||||
if ((!$only_editable) || has_capability('moodle/question:managecategory', get_context_instance(CONTEXT_COURSE, $category->course))) {
|
||||
echo " <option value=\"$cid\" $seltxt>$cname</option>\n";
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -191,7 +191,7 @@
|
||||
$cats = get_records('question_categories');
|
||||
$categories = array();
|
||||
foreach ($cats as $cat) {
|
||||
if (has_capability('moodle/question:managecateory', get_context_instance(CONTEXT_COURSE, $cat->course))) {
|
||||
if (has_capability('moodle/question:managecategory', get_context_instance(CONTEXT_COURSE, $cat->course))) {
|
||||
$categories[] = $cat;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
if (!$tocategory = get_record('question_categories', 'id', $tocategoryid)) {
|
||||
error('Invalid category');
|
||||
}
|
||||
if (!has_capability('moodle/question:managecateory', get_context_instance(CONTEXT_COURSE, $tocategory->course))){
|
||||
if (!has_capability('moodle/question:managecategory', get_context_instance(CONTEXT_COURSE, $tocategory->course))){
|
||||
error(get_string('categorynoedit', 'quiz', $tocategory->name), 'edit.php?courseid=$course->id');
|
||||
}
|
||||
foreach ($_POST as $key => $value) { // Parse input for question ids
|
||||
|
||||
Reference in New Issue
Block a user