From: toyomoyo Date: Thu, 14 Jun 2007 07:04:15 +0000 (+0000) Subject: fixing typos of a wrong capability X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8556ba1740993fee8da0db3bb54e2a924eec97c5;p=moodle.git fixing typos of a wrong capability --- diff --git a/backup/restore_check.html b/backup/restore_check.html index 1bbf65afa1..8e8fd10200 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 4ec0708e98..5c440fe3d0 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"); }