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";
}
}
$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;
}
}
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