]> git.mjollnir.org Git - moodle.git/commitdiff
fixing typos of a wrong capability
authortoyomoyo <toyomoyo>
Thu, 14 Jun 2007 07:04:15 +0000 (07:04 +0000)
committertoyomoyo <toyomoyo>
Thu, 14 Jun 2007 07:04:15 +0000 (07:04 +0000)
backup/restore_check.html
backup/restore_form.html

index 1bbf65afa17a08ad23518b96afbaa5c47b32c425..8e8fd102006d640d500ca6af47e6d6a45113485a 100644 (file)
     }
 
     //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"));
index 4ec0708e98d86b44a3d89556d04f88c66ee3d2bc..5c440fe3d0b4fa293b54dbc1aa639e9630866c0e 100644 (file)
@@ -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");   
     }