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

This commit is contained in:
dongsheng 2009-08-07 10:02:47 +00:00
parent 68bd9e5e13
commit c86dde2ec5
66 changed files with 584 additions and 39 deletions

View file

@ -0,0 +1,15 @@
<?php
$repository_boxnet_capabilities = array(
'repository/boxnet:view' => array(
'captype' => 'read',
'contextlevel' => CONTEXT_SYSTEM,
'legacy' => array(
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'admin' => CAP_ALLOW
)
)
);

View file

@ -0,0 +1,20 @@
<?php
function xmldb_repository_boxnet_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;
}

2
repository/boxnet/version.php Executable file
View file

@ -0,0 +1,2 @@
<?php
$plugin->version = 2009080104;