]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-19181, display plugin instances based on capabilities"
authordongsheng <dongsheng>
Fri, 7 Aug 2009 10:09:21 +0000 (10:09 +0000)
committerdongsheng <dongsheng>
Fri, 7 Aug 2009 10:09:21 +0000 (10:09 +0000)
repository/flickr_public/db/access.php [new file with mode: 0644]
repository/flickr_public/db/upgrade.php [new file with mode: 0644]

diff --git a/repository/flickr_public/db/access.php b/repository/flickr_public/db/access.php
new file mode 100644 (file)
index 0000000..6c78a65
--- /dev/null
@@ -0,0 +1,15 @@
+<?php
+
+$repository_flickr_public_capabilities = array(
+
+    'repository/flickr:view' => array(
+        'captype' => 'read',
+        'contextlevel' => CONTEXT_SYSTEM,
+        'legacy' => array(
+            'student' => CAP_ALLOW,
+            'teacher' => CAP_ALLOW,
+            'editingteacher' => CAP_ALLOW,
+            'admin' => CAP_ALLOW
+        )
+    )
+);
diff --git a/repository/flickr_public/db/upgrade.php b/repository/flickr_public/db/upgrade.php
new file mode 100644 (file)
index 0000000..05333ad
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+function xmldb_repository_flickr_public_upgrade($oldversion) {
+
+    global $CFG, $DB;
+
+    $dbman = $DB->get_manager();
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one
+/// block of code similar to the next one. Please, delete
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of database_manager methods
+/// }
+
+    return $result;
+}