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/alfresco/db/access.php
Normal file
15
repository/alfresco/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_alfresco_capabilities = array(
|
||||
|
||||
'repository/alfresco:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
20
repository/alfresco/db/upgrade.php
Normal file
20
repository/alfresco/db/upgrade.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_alfresco_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/alfresco/version.php
Normal file
2
repository/alfresco/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 20090080101;
|
15
repository/boxnet/db/access.php
Normal file
15
repository/boxnet/db/access.php
Normal 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
|
||||
)
|
||||
)
|
||||
);
|
20
repository/boxnet/db/upgrade.php
Normal file
20
repository/boxnet/db/upgrade.php
Normal 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
2
repository/boxnet/version.php
Executable file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009080104;
|
15
repository/draft/db/access.php
Normal file
15
repository/draft/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_draft_capabilities = array(
|
||||
|
||||
'repository/draft:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
|
@ -1,2 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009062000;
|
||||
$plugin->version = 2009080101;
|
||||
|
|
15
repository/filesystem/db/access.php
Normal file
15
repository/filesystem/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_filesystem_capabilities = array(
|
||||
|
||||
'repository/filesystem:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
20
repository/filesystem/db/upgrade.php
Normal file
20
repository/filesystem/db/upgrade.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_filesystem_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/filesystem/version.php
Normal file
2
repository/filesystem/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009080101;
|
15
repository/flickr/db/access.php
Normal file
15
repository/flickr/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_flickr_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
repository/flickr/db/upgrade.php
Normal file
20
repository/flickr/db/upgrade.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_flickr_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/flickr/version.php
Normal file
2
repository/flickr/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009080101;
|
2
repository/flickr_public/version.php
Normal file
2
repository/flickr_public/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009080101;
|
15
repository/googledocs/db/access.php
Normal file
15
repository/googledocs/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_googledocs_capabilities = array(
|
||||
|
||||
'repository/googledocs:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
20
repository/googledocs/db/upgrade.php
Normal file
20
repository/googledocs/db/upgrade.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_googledocs_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/googledocs/version.php
Normal file
2
repository/googledocs/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009080101;
|
|
@ -623,6 +623,7 @@ abstract class repository {
|
|||
$is_supported = true;
|
||||
|
||||
$repository = new $classname($repo->id, $repo->contextid, $options, $repo->readonly);
|
||||
$context = get_context_instance_by_id(CONTEXT_SYSTEM, $repo->contextid);
|
||||
if (empty($repository->super_called)) {
|
||||
debugging('parent::__construct must be called by '.$repo->repositorytype.' plugin.');
|
||||
} else {
|
||||
|
@ -645,7 +646,8 @@ abstract class repository {
|
|||
if (!$onlyvisible || ($repository->is_visible() && !$repository->disabled)) {
|
||||
// super_called will make sure the parent construct function is called
|
||||
// by repository construct function
|
||||
if ($is_supported) {
|
||||
$capability = has_capability('repository/'.$repo->repositorytype.':view', $context, $USER->id, false);
|
||||
if ($is_supported && $capability) {
|
||||
$ret[] = $repository;
|
||||
}
|
||||
}
|
||||
|
|
15
repository/local/db/access.php
Normal file
15
repository/local/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_local_capabilities = array(
|
||||
|
||||
'repository/local:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
|
@ -1,2 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009052000;
|
||||
$plugin->version = 2009080101;
|
||||
|
|
15
repository/mahara/db/access.php
Normal file
15
repository/mahara/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_mahara_capabilities = array(
|
||||
|
||||
'repository/mahara:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
20
repository/mahara/db/upgrade.php
Normal file
20
repository/mahara/db/upgrade.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_mahara_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/mahara/version.php
Normal file
2
repository/mahara/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009080101;
|
15
repository/picasa/db/access.php
Normal file
15
repository/picasa/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_picasa_capabilities = array(
|
||||
|
||||
'repository/picasa:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
20
repository/picasa/db/upgrade.php
Normal file
20
repository/picasa/db/upgrade.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_picasa_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/picasa/version.php
Normal file
2
repository/picasa/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009080101;
|
15
repository/remotemoodle/db/access.php
Normal file
15
repository/remotemoodle/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_remotemoodle_capabilities = array(
|
||||
|
||||
'repository/remotemoodle:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
20
repository/remotemoodle/db/upgrade.php
Normal file
20
repository/remotemoodle/db/upgrade.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_remotemoodle_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/remotemoodle/version.php
Normal file
2
repository/remotemoodle/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009080101;
|
15
repository/s3/db/access.php
Normal file
15
repository/s3/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_s3_capabilities = array(
|
||||
|
||||
'repository/s3:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
20
repository/s3/db/upgrade.php
Normal file
20
repository/s3/db/upgrade.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_s3_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/s3/version.php
Normal file
2
repository/s3/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009080101;
|
15
repository/upload/db/access.php
Normal file
15
repository/upload/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_upload_capabilities = array(
|
||||
|
||||
'repository/upload:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
|
@ -69,7 +69,7 @@ class repository_upload extends repository {
|
|||
* @return string
|
||||
*/
|
||||
public function get_name(){
|
||||
return get_string('repositoryname', 'repository_upload');;
|
||||
return get_string('repositoryname', 'repository_upload');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009031000;
|
||||
$plugin->version = 2009080101;
|
||||
|
|
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;
|
||||
|
|
15
repository/webdav/db/access.php
Normal file
15
repository/webdav/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_webdav_capabilities = array(
|
||||
|
||||
'repository/webdav:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
20
repository/webdav/db/upgrade.php
Normal file
20
repository/webdav/db/upgrade.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_webdav_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/webdav/version.php
Normal file
2
repository/webdav/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009080101;
|
15
repository/wikimedia/db/access.php
Normal file
15
repository/wikimedia/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_wikimedia_capabilities = array(
|
||||
|
||||
'repository/wikimedia:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
20
repository/wikimedia/db/upgrade.php
Normal file
20
repository/wikimedia/db/upgrade.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_wikimedia_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/wikimedia/version.php
Normal file
2
repository/wikimedia/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009080101;
|
15
repository/youtube/db/access.php
Normal file
15
repository/youtube/db/access.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$repository_youtube_capabilities = array(
|
||||
|
||||
'repository/youtube:view' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
20
repository/youtube/db/upgrade.php
Normal file
20
repository/youtube/db/upgrade.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_youtube_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/youtube/version.php
Normal file
2
repository/youtube/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009080101;
|
Loading…
Add table
Add a link
Reference in a new issue