MDL-21432 backup - this is finally out. Any backup / restore should use the API
authorEloy Lafuente <stronk7@moodle.org>
Sun, 2 May 2010 18:31:54 +0000 (18:31 +0000)
committerEloy Lafuente <stronk7@moodle.org>
Sun, 2 May 2010 18:31:54 +0000 (18:31 +0000)
backup/try.php [deleted file]

diff --git a/backup/try.php b/backup/try.php
deleted file mode 100644 (file)
index 6b11c70..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?PHP
-    require_once ("../config.php");
-    require_once ("backup_scheduled.php");
-    require_once ("lib.php");
-    require_once ("backuplib.php");
-
-    require_login();
-
-    require_capability('moodle/restore:restorecourse', get_context_instance(CONTEXT_SYSTEM));
-
-    $site = get_site();
-
-    //Check necessary functions exists. Thanks to gregb@crowncollege.edu
-    backup_required_functions();
-
-    //Adjust some php variables to the execution of this script
-    @ini_set("max_execution_time","3000");
-    if (empty($CFG->extramemorylimit)) {
-        raise_memory_limit('128M');
-    } else {
-        raise_memory_limit($CFG->extramemorylimit);
-    }
-
-    echo "<pre>\n";
-
-    $status = true;
-
-    $courses = $DB->get_records("course");
-    foreach ($courses as $course) {
-        echo "Start course ". format_string($course->fullname);
-        $preferences = schedule_backup_course_configure($course);
-        if ($preferences && $status) {
-            $status = schedule_backup_course_execute($preferences);
-        }
-        if ($status && $preferences) {
-            echo "End course ". format_string($course->fullname)." OK\n\n";
-        } else {
-            echo "End course ". format_string($course->fullname)." FAIL\n\n";
-        }
-    }