]> git.mjollnir.org Git - moodle.git/commitdiff
Adding support to course/formats from within the editor. MDL-11842
authorstronk7 <stronk7>
Fri, 19 Oct 2007 16:52:34 +0000 (16:52 +0000)
committerstronk7 <stronk7>
Fri, 19 Oct 2007 16:52:34 +0000 (16:52 +0000)
Merged from MOODLE_19_STABLE

admin/xmldb/actions/get_db_directories/get_db_directories.class.php

index 5869231e3a81d87de0cae873ba5bbb2b2017784f..2ac174dbc600b626f1ccc4f710bc16e0ffbb0f25 100644 (file)
@@ -142,6 +142,18 @@ class get_db_directories extends XMLDBAction {
             }
         }
 
+    /// Now, course formats (course/format/xxx/db)
+        if ($plugins = get_list_of_plugins('course/format', 'db')) {
+            foreach ($plugins as $plugin) {
+                $dbdir = new stdClass;
+                $dbdir->path = $CFG->dirroot . '/course/format/' . $plugin . '/db';
+                if (!isset($XMLDB->dbdirs[$dbdir->path])) {
+                    $XMLDB->dbdirs[$dbdir->path] = $dbdir;
+                }
+                $XMLDB->dbdirs[$dbdir->path]->path_exists = file_exists($dbdir->path);  //Update status
+            }
+        }
+
     /// Now, enrolment plugins (enrol/xxx/db)
         if ($plugins = get_list_of_plugins('enrol', 'db')) {
             foreach ($plugins as $plugin) {