"MDL-19181, display plugin instances based on capabilities"

This commit is contained in:
dongsheng
2009-08-07 10:09:21 +00:00
parent c86dde2ec5
commit 99e2c8bd7a
2 changed files with 35 additions and 0 deletions
+15
View File
@@ -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
)
)
);
+20
View File
@@ -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;
}