diff --git a/backup/restore_check.html b/backup/restore_check.html
index 1bbf65afa17..8e8fd102006 100644
--- a/backup/restore_check.html
+++ b/backup/restore_check.html
@@ -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"));
diff --git a/backup/restore_form.html b/backup/restore_form.html
index 4ec0708e98d..5c440fe3d0b 100644
--- a/backup/restore_form.html
+++ b/backup/restore_form.html
@@ -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");
}