"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

@ -1,5 +1,6 @@
<?php <?php
$string['alfresco_url'] = 'Alfresco URL'; $string['alfresco_url'] = 'Alfresco URL';
$string['alfresco:view'] = 'View alfresco repository';
$string['alfrescourltext'] = 'Afresco API url should be: http://yoursite.com/alfresco/api'; $string['alfrescourltext'] = 'Afresco API url should be: http://yoursite.com/alfresco/api';
$string['configplugin'] = 'Alfresco configuration'; $string['configplugin'] = 'Alfresco configuration';
$string['notitle'] = 'notitle'; $string['notitle'] = 'notitle';

View file

@ -1,7 +1,8 @@
<?php <?php
$string['apikey'] = 'API Key'; $string['apikey'] = 'API Key';
$string['boxnet:view'] = 'View box.net repository';
$string['configplugin'] = 'Box.net configuration'; $string['configplugin'] = 'Box.net configuration';
$string['information'] = '<div>Get <a href=\"http://enabled.box.net/\">Box.net API Key</a> for your Moodle site. </div>'; $string['information'] = '<div>Get <a href=\"http://enabled.box.net/my-projects/\">Box.net API Key</a> for your Moodle site. </div>';
$string['invalidpassword'] = 'Invalid password'; $string['invalidpassword'] = 'Invalid password';
$stirng['invalidtoken'] = 'Invalid authentication token'; $stirng['invalidtoken'] = 'Invalid authentication token';
$string['nullfilelist'] = 'There are no files in this repository'; $string['nullfilelist'] = 'There are no files in this repository';

View file

@ -1,3 +1,4 @@
<?php <?php
$string['repositoryname'] = 'Current files'; $string['repositoryname'] = 'Current files';
$string['repositorydesc'] = 'A plug-in for browsing current draft files'; $string['repositorydesc'] = 'A plug-in for browsing current draft files';
$string['draft:view'] = 'View draft files in file picker';

View file

@ -1,10 +1,11 @@
<?php <?php
$string['blockedpath'] = 'Blocked root path';
$string['configplugin'] = 'Setup repository on file system'; $string['configplugin'] = 'Setup repository on file system';
$string['donotusesysdir'] = 'Don\'t use system directory as repository, including';
$string['filesystem:view'] = 'View file system repository';
$string['information'] = 'This is the relative path against %moodledata%/repository/';
$string['invalidpath'] = 'Invalid root path';
$string['repositoryname'] = 'File system'; $string['repositoryname'] = 'File system';
$string['repositorydesc'] = 'Create repository from local directory'; $string['repositorydesc'] = 'Create repository from local directory';
$string['path'] = 'Select a subdirectory'; $string['path'] = 'Select a subdirectory';
$string['information'] = 'This is the relative path against %moodledata%/repository/';
$string['invalidpath'] = 'Invalid root path';
$string['blockedpath'] = 'Blocked root path';
$string['donotusesysdir'] = 'Don\'t use system directory as repository, including';

View file

@ -10,6 +10,7 @@ $string['callbackwarning'] = '<ol>
<li>Edit your <a href=\"http://www.flickr.com/services/api/keys/\">Flickr</a> key details again and set the callback URL.</li></ol>'; <li>Edit your <a href=\"http://www.flickr.com/services/api/keys/\">Flickr</a> key details again and set the callback URL.</li></ol>';
$string['configplugin'] = 'Flickr configuration'; $string['configplugin'] = 'Flickr configuration';
$string['emailaddress'] = 'Email address'; $string['emailaddress'] = 'Email address';
$string['flickr:view'] = 'View Flickr repository';
$string['invalidemail'] = 'Invalid email address for flickr'; $string['invalidemail'] = 'Invalid email address for flickr';
$string['notitle'] = 'notitle'; $string['notitle'] = 'notitle';
$string['nullphotolist'] = 'There are no photos in this account'; $string['nullphotolist'] = 'There are no photos in this account';

View file

@ -14,6 +14,7 @@ $string['commercialuse'] = 'Allow commercial uses of your work?';
$string['creativecommonscommercial'] = 'Only creative commons commercial'; $string['creativecommonscommercial'] = 'Only creative commons commercial';
$string['emailaddress'] = 'Email address'; $string['emailaddress'] = 'Email address';
$string['fulltext'] = 'Full text'; $string['fulltext'] = 'Full text';
$string['flickr_public:view'] = 'View flickr_public repository';
$string['information'] = '<div>Get <a href=\"http://www.flickr.com/services/api/keys/\">Flickr API Key</a> for your Moodle site. </div>'; $string['information'] = '<div>Get <a href=\"http://www.flickr.com/services/api/keys/\">Flickr API Key</a> for your Moodle site. </div>';
$string['invalidemail'] = 'Invalid email account for flickr'; $string['invalidemail'] = 'Invalid email account for flickr';
$string['license'] = 'License'; $string['license'] = 'License';

View file

@ -1,3 +1,4 @@
<?php <?php
$string['repositoryname'] = 'Google Docs'; $string['repositoryname'] = 'Google Docs';
$string['googledocs:view'] = 'View google docs repository';
?> ?>

View file

@ -1,8 +1,9 @@
<?php // $Id$ <?php // $Id$
$string['emptyfilelist'] = 'There are no files to show';
$string['configplugin'] = 'Configuration for local file repository'; $string['configplugin'] = 'Configuration for local file repository';
$string['currentusefiles'] = 'Current use files'; $string['currentusefiles'] = 'Current use files';
$string['local:view'] = 'View local repository';
$string['repositoryname'] = 'Local files'; $string['repositoryname'] = 'Local files';
$string['repositorydesc'] = 'Repository on the local Moodle server'; $string['repositorydesc'] = 'Repository on the local Moodle server';
$string['notitle'] = 'notitle';
$string['remember'] = 'Remember me'; $string['remember'] = 'Remember me';
$string['emptyfilelist'] = 'There are no files to show'; $string['notitle'] = 'notitle';

View file

@ -1,16 +1,17 @@
<?php // $Id$ <?php // $Id$
$string['configplugin'] = 'Configuration for Mahara repository'; $string['configplugin'] = 'Configuration for Mahara repository';
$string['repositoryname'] = 'Mahara'; $string['connectionfailure'] = 'Failed to retrieve file listing - The host moodle has either a version older than 2.0, either its Mahara Repository service hasn\'t been activated';
$string['repositorydesc'] = 'Files on a remote Moodle server'; $string['emptyfilelist'] = 'There are no files to show';
$string['failtoretrievelist'] = 'List could not be retrieved or is empty';
$string['usercannotaccess'] = 'You ($a) cannot access to this file';
$string['hostnotfound'] = 'Cannot find the Mahara site into the database - contact your system administrator';
$string['mahara:view'] = 'View mahara repository';
$string['notitle'] = 'notitle'; $string['notitle'] = 'notitle';
$string['peer'] = 'Peer'; $string['peer'] = 'Peer';
$string['nopeer'] = 'Please setup some <a href=\"http://docs.moodle.org/en/admin/mnet/peers#Peer_to_Peer_Network\">Moodle peers</a> for your Mahara site.';
$string['repositoryname'] = 'Mahara';
$string['repositorydesc'] = 'Files on a remote Moodle server';
$string['remember'] = 'Remember me'; $string['remember'] = 'Remember me';
$string['emptyfilelist'] = 'There are no files to show';
$string['remoterep_name'] = 'Mahara'; $string['remoterep_name'] = 'Mahara';
$string['remoterep_description'] = 'Allow the service to be discovered'; $string['remoterep_description'] = 'Allow the service to be discovered';
$string['connectionfailure'] = 'Failed to retrieve file listing - The host moodle has either a version older than 2.0, either its Mahara Repository service hasn\'t been activated';
$string['failtoretrievelist'] = 'List could not be retrieved or is empty';
$string['usernotfound'] = 'The user $a is not registered into the Mahara'; $string['usernotfound'] = 'The user $a is not registered into the Mahara';
$string['usercannotaccess'] = 'You ($a) cannot access to this file';
$string['nopeer'] = 'Please setup some <a href=\"http://docs.moodle.org/en/admin/mnet/peers#Peer_to_Peer_Network\">Moodle peers</a> for your Mahara site.';
$string['hostnotfound'] = 'Cannot find the Mahara site into the database - contact your system administrator';

View file

@ -1,3 +1,4 @@
<?php <?php
$string['picasa:view'] = 'View picasa repository';
$string['repositoryname'] = 'Picasa web album'; $string['repositoryname'] = 'Picasa web album';
?> ?>

View file

@ -1,16 +1,17 @@
<?php // $Id$ <?php // $Id$
$string['configplugin'] = 'Configuration for remote Moodle file repository'; $string['configplugin'] = 'Configuration for remote Moodle file repository';
$string['connectionfailure'] = 'Failed to retrieve file listing - The host moodle has either a version older than 2.0, either its Moodle Remote Repository service hasn\'t been activated';
$string['emptyfilelist'] = 'There are no files to show';
$string['failtoretrievelist'] = 'List could not be retrieved or is empty';
$string['notitle'] = 'notitle';
$string['hostnotfound'] = 'Cannot find the remote Moodle into the database - contact your system administrator';
$string['nopeer'] = 'Please setup some <a href=\"http://docs.moodle.org/en/admin/mnet/peers#Peer_to_Peer_Network\">Moodle peers</a> for your Moodle site.';
$string['peer'] = 'Peer';
$string['repositoryname'] = 'Remote Moodle site'; $string['repositoryname'] = 'Remote Moodle site';
$string['repositorydesc'] = 'Files on a remote Moodle server'; $string['repositorydesc'] = 'Files on a remote Moodle server';
$string['notitle'] = 'notitle';
$string['peer'] = 'Peer';
$string['remember'] = 'Remember me'; $string['remember'] = 'Remember me';
$string['emptyfilelist'] = 'There are no files to show'; $string['remotemoodle:view'] = 'View remote moodle repository';
$string['remoterep_name'] = 'Remote Moodle site'; $string['remoterep_name'] = 'Remote Moodle site';
$string['remoterep_description'] = 'Allow the service to be discovered'; $string['remoterep_description'] = 'Allow the service to be discovered';
$string['connectionfailure'] = 'Failed to retrieve file listing - The host moodle has either a version older than 2.0, either its Moodle Remote Repository service hasn\'t been activated';
$string['failtoretrievelist'] = 'List could not be retrieved or is empty';
$string['usernotfound'] = 'The user $a is not registered into the remote Moodle'; $string['usernotfound'] = 'The user $a is not registered into the remote Moodle';
$string['usercannotaccess'] = 'You ($a) cannot access to this file'; $string['usercannotaccess'] = 'You ($a) cannot access to this file';
$string['nopeer'] = 'Please setup some <a href=\"http://docs.moodle.org/en/admin/mnet/peers#Peer_to_Peer_Network\">Moodle peers</a> for your Moodle site.';
$string['hostnotfound'] = 'Cannot find the remote Moodle into the database - contact your system administrator';

View file

@ -1,7 +1,8 @@
<?php // $Id$ <?php // $Id$
$string['repositoryname'] = 'Amazon S3';
$string['configplugin'] = 'Amazon S3 settings';
$string['access_key'] = 'Access key'; $string['access_key'] = 'Access key';
$string['configplugin'] = 'Amazon S3 settings';
$string['s3:view'] = 'View amazon s3 repository';
$string['secret_key'] = 'Secret key'; $string['secret_key'] = 'Secret key';
$string['needaccesskey'] = 'Access key must be provided'; $string['needaccesskey'] = 'Access key must be provided';
$string['repositoryname'] = 'Amazon S3';

View file

@ -1,4 +1,5 @@
<?php // $Id$ <?php // $Id$
$string['configplugin'] = 'Configuration for upload plugin'; $string['configplugin'] = 'Configuration for upload plugin';
$string['upload:view'] = 'Use uploading in file picker';
$string['repositoryname'] = 'Upload a file'; $string['repositoryname'] = 'Upload a file';
$string['repositorydesc'] = 'Upload a file to Moodle'; $string['repositorydesc'] = 'Upload a file to Moodle';

View file

@ -1,6 +1,7 @@
<?php // $Id$ <?php // $Id$
$string['repositoryname'] = 'URL Downloader';
$string['url'] = 'URL';
$string['rename'] = 'Name';
$string['download'] = 'Download'; $string['download'] = 'Download';
$string['url'] = 'URL';
$string['url:view'] = 'Use url downloader in file picker';
$string['rename'] = 'Name';
$string['repositoryname'] = 'URL Downloader';
$string['validname'] = 'You must provide a valid file name'; $string['validname'] = 'You must provide a valid file name';

View file

@ -1,10 +1,11 @@
<?php <?php
$string['repositoryname'] = 'WebDAV repository';
$string['configplugin'] = 'WebDav configuration'; $string['configplugin'] = 'WebDav configuration';
$string['http'] = 'HTTP';
$string['https'] = 'HTTPS';
$string['repositoryname'] = 'WebDAV repository';
$string['webdav:view'] = 'View WebDav repository';
$string['webdav_type'] = 'WebDav type'; $string['webdav_type'] = 'WebDav type';
$string['webdav_server'] = 'WebDAV server'; $string['webdav_server'] = 'WebDAV server';
$string['webdav_port'] = 'WebDAV server port'; $string['webdav_port'] = 'WebDAV server port';
$string['webdav_user'] = 'WebDAV server user'; $string['webdav_user'] = 'WebDAV server user';
$string['webdav_password'] = 'WebDAV server password'; $string['webdav_password'] = 'WebDAV server password';
$string['http'] = 'HTTP';
$string['https'] = 'HTTPS';

View file

@ -1,3 +1,4 @@
<?php <?php
$string['repositoryname'] = 'Wikimedia';
$string['keyword'] = 'Image name'; $string['keyword'] = 'Image name';
$string['repositoryname'] = 'Wikimedia';
$string['wikimedia:view'] = 'View wikimedia repository';

View file

@ -1,3 +1,4 @@
<?php <?php
$string['repositoryname'] = 'Youtube videos'; $string['youtube:view'] = 'Use youtube in file picker';
$string['search'] = 'Search videos'; $string['search'] = 'Search videos';
$string['repositoryname'] = 'Youtube videos';

View 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
)
)
);

View 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;
}

View file

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

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;

View 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
)
)
);

View file

@ -1,2 +1,2 @@
<?php <?php
$plugin->version = 2009062000; $plugin->version = 2009080101;

View 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
)
)
);

View 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;
}

View file

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

View 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
)
)
);

View 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;
}

View file

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

View file

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

View 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
)
)
);

View 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;
}

View file

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

View file

@ -623,6 +623,7 @@ abstract class repository {
$is_supported = true; $is_supported = true;
$repository = new $classname($repo->id, $repo->contextid, $options, $repo->readonly); $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)) { if (empty($repository->super_called)) {
debugging('parent::__construct must be called by '.$repo->repositorytype.' plugin.'); debugging('parent::__construct must be called by '.$repo->repositorytype.' plugin.');
} else { } else {
@ -645,7 +646,8 @@ abstract class repository {
if (!$onlyvisible || ($repository->is_visible() && !$repository->disabled)) { if (!$onlyvisible || ($repository->is_visible() && !$repository->disabled)) {
// super_called will make sure the parent construct function is called // super_called will make sure the parent construct function is called
// by repository construct function // by repository construct function
if ($is_supported) { $capability = has_capability('repository/'.$repo->repositorytype.':view', $context, $USER->id, false);
if ($is_supported && $capability) {
$ret[] = $repository; $ret[] = $repository;
} }
} }

View 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
)
)
);

View file

@ -1,2 +1,2 @@
<?php <?php
$plugin->version = 2009052000; $plugin->version = 2009080101;

View 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
)
)
);

View 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;
}

View file

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

View 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
)
)
);

View 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;
}

View file

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

View 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
)
)
);

View 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;
}

View file

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

View 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
)
)
);

View 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;
}

View file

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

View 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
)
)
);

View file

@ -69,7 +69,7 @@ class repository_upload extends repository {
* @return string * @return string
*/ */
public function get_name(){ public function get_name(){
return get_string('repositoryname', 'repository_upload');; return get_string('repositoryname', 'repository_upload');
} }
} }
?> ?>

View file

@ -1,2 +1,2 @@
<?php <?php
$plugin->version = 2009031000; $plugin->version = 2009080101;

View 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
)
)
);

View 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;
}

View file

@ -1,2 +1,2 @@
<?php <?php
$plugin->version = 2009051800; $plugin->version = 2009080101;

View 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
)
)
);

View 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;
}

View file

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

View 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
)
)
);

View 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;
}

View file

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

View 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
)
)
);

View 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;
}

View file

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

View file

@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine // This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php) // whether upgrades should be performed (see lib/db/*.php)
$version = 2009073101; // YYYYMMDD = date of the last version bump $version = 2009080700; // YYYYMMDD = date of the last version bump
// XX = daily increments // XX = daily increments
$release = '2.0 dev (Build: 20090807)'; // Human-friendly version name $release = '2.0 dev (Build: 20090807)'; // Human-friendly version name