'coursereport' => 'course/report',
'report' => $CFG->admin.'/report',
'portfolio' => 'portfolio/type',
+ 'repository' => 'repository',
// following types a very ugly hacks - we should not make exceptions like this - all plugins should be equal;
// these plugins may cause problems such as when wanting to uninstall them
if (is_int($local_plugin_id) or is_int($upload_plugin_id)) {
print_box(get_string('setupdefaultplugins', 'repository'));
}
+ return true;
}
--- /dev/null
+<?php
+
+function xmldb_repository_local_install() {
+ global $CFG;
+ $result = true;
+ require_once($CFG->dirroot.'/repository/lib.php');
+ $local_plugin = new repository_type('local', array(), true);
+ if(!$id = $local_plugin->create(true)) {
+ $result = false;
+ }
+ return $result;
+}
--- /dev/null
+<?php
+function xmldb_repository_local_upgrade($oldversion) {
+ $result = true;
+ /**
+ if ($result && $oldversion < 2009031000) {
+ }
+ */
+ return $result;
+}
--- /dev/null
+<?php
+$plugin->version = 2009031000;
--- /dev/null
+<?php
+
+function xmldb_repository_upload_install() {
+ global $CFG;
+ $result = true;
+ require_once($CFG->dirroot.'/repository/lib.php');
+ $upload_plugin = new repository_type('upload', array(), true);
+ if (!$id = $upload_plugin->create(true)) {
+ $result = false;
+ }
+ return $result;
+}
--- /dev/null
+<?php
+function xmldb_repository_upload_upgrade($oldversion) {
+ $result = true;
+ /**
+ if ($result && $oldversion < 2009031000) {
+ }
+ */
+ return $result;
+}
--- /dev/null
+<?php
+$plugin->version = 2009031000;