]> git.mjollnir.org Git - moodle.git/commitdiff
merged fix for MDL-7773, restore_to not set for creators
authortoyomoyo <toyomoyo>
Mon, 4 Dec 2006 01:14:43 +0000 (01:14 +0000)
committertoyomoyo <toyomoyo>
Mon, 4 Dec 2006 01:14:43 +0000 (01:14 +0000)
backup/restore_form.html

index 2ce2a52a52e9738f2ced2d3b029c05f05b9217fa..0e1f8bb2b3bcf3d4d47c2502baae388909bcb621 100644 (file)
@@ -169,15 +169,16 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
     echo "<td align=\"right\"><b>";
     echo get_string("restoreto").":</b>";
     echo "</td><td colspan=\"3\">";
-    if (!has_capability('moodle/course:create', get_context_instance(CONTEXT_COURSE, $id))) {
-        $restore_restoreto_options[0] = get_string("currentcoursedeleting");
-        $restore_restoreto_options[1] = get_string("currentcourseadding");
-    } 
+    
     if (has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
         $restore_restoreto_options[0] = get_string("existingcoursedeleting");
         $restore_restoreto_options[1] = get_string("existingcourseadding");
         $restore_restoreto_options[2] = get_string("newcourse"); 
+    } else { // fix for MDL-7773
+        $restore_restoreto_options[0] = get_string("currentcoursedeleting");
+        $restore_restoreto_options[1] = get_string("currentcourseadding");
     }
+   
     choose_from_menu($restore_restoreto_options, "restore_restoreto", $restore_restoreto, "");
     echo "</td></tr>";
     if (iscreator()) {  //display these fields conditionally