fixing typos of a wrong capability
This commit is contained in:
@@ -222,8 +222,8 @@
|
||||
}
|
||||
|
||||
//Now, select the course if needed
|
||||
//if (($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id == 0) and has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
|
||||
if (($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id == 0)) {
|
||||
//if (($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id == 0) and get_capability_courses('moodle/site:restore')) {
|
||||
if (($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id == 0)) {
|
||||
|
||||
if ($courses = get_courses("all","c.fullname","c.id,c.fullname,c.shortname,c.visible")) {
|
||||
print_heading(get_string("choosecourse"));
|
||||
|
||||
@@ -184,7 +184,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
* newcourse
|
||||
*/
|
||||
|
||||
$mycourses = get_capability_courses('moodle/course:restore');
|
||||
$mycourses = get_capability_courses('moodle/site:restore');
|
||||
|
||||
// if the user can manage 2 or more courses,
|
||||
// or if the only course the user can manage is not the current course
|
||||
@@ -194,7 +194,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
$restore_restoreto_options[0] = get_string("existingcoursedeleting");
|
||||
$restore_restoreto_options[1] = get_string("existingcourseadding");
|
||||
// else if the user can write to current course
|
||||
} else if (has_capability('moodle/course:restore', get_context_instance(CONTEXT_COURSE, $id))){
|
||||
} else if (has_capability('moodle/site:restore', get_context_instance(CONTEXT_COURSE, $id))){
|
||||
$restore_restoreto_options[0] = get_string("currentcoursedeleting");
|
||||
$restore_restoreto_options[1] = get_string("currentcourseadding");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user