mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
"MDL-19181, display plugin instances based on capabilities"
This commit is contained in:
parent
68bd9e5e13
commit
c86dde2ec5
66 changed files with 584 additions and 39 deletions
15
repository/url/db/access.php
Normal file
15
repository/url/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_url_capabilities = array(
|
||||
|
||||
'repository/url:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
20
repository/url/db/upgrade.php
Normal file
20
repository/url/db/upgrade.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_url_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;
|
||||
}
|
|
@ -1,2 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009051800;
|
||||
$plugin->version = 2009080101;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue