Compare commits
390 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d0e016f53f | |||
| 6451a6b15c | |||
| 773d1ec56b | |||
| f6ce2eb25a | |||
| 3b40f3b1a7 | |||
| 6416c6c25b | |||
| 0f4c6067e5 | |||
| 9be14d29e4 | |||
| 0fa557d5fd | |||
| 264764e222 | |||
| 7bebeb2a29 | |||
| bba1338a60 | |||
| eb7ee15659 | |||
| 63a0768888 | |||
| c000545dee | |||
| c3f185949f | |||
| 59e6df2883 | |||
| e8c3f32f83 | |||
| c9c7b8fb0b | |||
| 9ecbb6e494 | |||
| fa6765cf9c | |||
| 65c7713115 | |||
| 15cca3e470 | |||
| e95a0cefda | |||
| 8620bfee90 | |||
| e8012802db | |||
| 20ab954b3c | |||
| 4202a9173f | |||
| f25aee3251 | |||
| d423462e1c | |||
| 1a9528e010 | |||
| b50ac85799 | |||
| 35b81f27ca | |||
| 96b3002aae | |||
| 2069c52e20 | |||
| 52eebcc8df | |||
| 39ee0ced4a | |||
| 58800b7c36 | |||
| 1bb422319f | |||
| f2fecd0d7c | |||
| f8b02913ad | |||
| 4d693fc44c | |||
| d8aa5ec7a0 | |||
| 9b7e2cbb2e | |||
| 7927af450c | |||
| 67124a020f | |||
| 0a9b7c2b6d | |||
| 4117b4fcd8 | |||
| b64a3e1ac1 | |||
| 0c0d501144 | |||
| 3ddbd75acc | |||
| 4041478751 | |||
| fd20817aa9 | |||
| 11106669a1 | |||
| 37c48acb45 | |||
| b5c04aa153 | |||
| 0790df351f | |||
| 466bc44fb5 | |||
| 633d5a07af | |||
| 5563272125 | |||
| 25a333877c | |||
| 9c89c04af5 | |||
| 9dbf768ede | |||
| 7f6e07a3eb | |||
| d68b3dbe72 | |||
| be974aa7f9 | |||
| a5b5881d46 | |||
| 5ac8e50b89 | |||
| 5b14551371 | |||
| 457e9ab606 | |||
| 2321e0d661 | |||
| 231d40d543 | |||
| 8192d3cf43 | |||
| cc6a4b0ecd | |||
| ab83fa53fd | |||
| 1b39425dae | |||
| fb056a811e | |||
| f091da528e | |||
| 9ac82391a2 | |||
| 223b3ce3a0 | |||
| 925ae95824 | |||
| e343ff6a5d | |||
| 67411c8399 | |||
| 07cc3d11e2 | |||
| 82fb6d1a08 | |||
| e68fa2500a | |||
| 055a278ad9 | |||
| bada16d35c | |||
| 8cfa492c45 | |||
| 56c062a45f | |||
| 3654f38623 | |||
| e7b90ca0fa | |||
| 3385a144b8 | |||
| 68ec4a273c | |||
| 7d087744cb | |||
| dbf4433d75 | |||
| 66b97716c5 | |||
| ec0d6ea2a9 | |||
| 3625e9049f | |||
| 900d5fd61c | |||
| 00347b3c3c | |||
| bbe5bad575 | |||
| 3c33d77817 | |||
| ac386aa925 | |||
| beb684ba11 | |||
| 5c0b8ea3f1 | |||
| beb180689b | |||
| 86b3dd264e | |||
| 24b6984613 | |||
| ea4721f047 | |||
| 486a9ad89f | |||
| 1ff31a54a2 | |||
| d11d1e5bc0 | |||
| ee2592346f | |||
| 8e470797e3 | |||
| 5bca744cad | |||
| 368f5b7b4c | |||
| d05e39b0d9 | |||
| 589071ba34 | |||
| 03636668d4 | |||
| d8d11e9dde | |||
| cdc8577762 | |||
| e30f6ff338 | |||
| 2dce240984 | |||
| 660bc937f0 | |||
| 4b05a49bcb | |||
| 1de9151c6f | |||
| a22e233cbb | |||
| 6381177b9f | |||
| c745d1e80e | |||
| 4021f5f986 | |||
| 98377ed578 | |||
| 66d8f36b9e | |||
| ef77af3852 | |||
| 64432a901c | |||
| 77da06ceb4 | |||
| ede7105fd9 | |||
| 2afaf485cf | |||
| d905b69e95 | |||
| 0620787a17 | |||
| 7355a8e4b7 | |||
| c42f1288ea | |||
| adf8f7a172 | |||
| 4f26504015 | |||
| 1f238ad4df | |||
| 4d33fbef43 | |||
| c47b8c7d0c | |||
| 6348043461 | |||
| 3ca3098f31 | |||
| 185db1c962 | |||
| 6c72ee14cd | |||
| c08a5622b8 | |||
| 73d000f389 | |||
| d53e3298c0 | |||
| 16ef46e7b6 | |||
| 9e23487a10 | |||
| 43fb30d652 | |||
| 8ccbf8d1e5 | |||
| 07a27990a0 | |||
| c897e4639c | |||
| 9002363b35 | |||
| ab9dde2f97 | |||
| 48e74d2c10 | |||
| 1bb98bd7a4 | |||
| 5535390c55 | |||
| 3a02133f3f | |||
| c32e3a0a0a | |||
| 9d06eb139c | |||
| d7de1c8a62 | |||
| 4cff8cb550 | |||
| a9c56ad2df | |||
| b674092416 | |||
| 03848c4568 | |||
| 5cde86faa9 | |||
| 2c5857186b | |||
| d2b5a2caf5 | |||
| 4ea621f75b | |||
| b9b9614356 | |||
| 4fd95658bb | |||
| 2d8732d199 | |||
| a0d26f45f7 | |||
| 7722bb5df8 | |||
| b489d37d56 | |||
| b8a2a92773 | |||
| 689461f4d8 | |||
| ba54648b45 | |||
| 0f6cc7a7cc | |||
| 20adbd65cd | |||
| ea46fcbced | |||
| 1316fc8af9 | |||
| 8ea233e7ad | |||
| 7242b051ac | |||
| c8a82fdbfe | |||
| b04ae8ad2b | |||
| 6207bf8f05 | |||
| f2d11739a8 | |||
| bc86c87261 | |||
| 10625d2efe | |||
| a1f9bc038e | |||
| efbbe2f047 | |||
| f40a7feb2a | |||
| f34f2891b8 | |||
| 61f85d9ecd | |||
| 85cba684b8 | |||
| b2d3e5cc49 | |||
| 15415bf8e8 | |||
| 3d8138bbd2 | |||
| 086ed2a6c0 | |||
| 561d547173 | |||
| 6dc2df50f9 | |||
| d898238081 | |||
| c2dbe006d0 | |||
| e0e2db92a3 | |||
| 6e17567624 | |||
| 7b5abb50ce | |||
| 65fbaea13d | |||
| 525e45795a | |||
| ade30ad3c4 | |||
| 46fc365c77 | |||
| db8312d23c | |||
| 2ecbad416e | |||
| 6aabd59e69 | |||
| b28de4b412 | |||
| 95641b4529 | |||
| d6e23c1466 | |||
| ecdd2d183c | |||
| 3a9e6be55a | |||
| 187672608e | |||
| 79b0fece1f | |||
| df17785210 | |||
| b8ba54a408 | |||
| 3370582b86 | |||
| f5d0ac1077 | |||
| 08fa81d6c5 | |||
| fbe33209ce | |||
| 009b14c065 | |||
| 495bcb06d1 | |||
| 2b72f6dc62 | |||
| 70eddb71cf | |||
| 89a4471b97 | |||
| 85227804b4 | |||
| 7715c88d36 | |||
| 59fc5c5404 | |||
| 038d8e30c3 | |||
| 4c598b133f | |||
| b907d3f58c | |||
| 12812ad5da | |||
| 3a59d04c65 | |||
| 9dc97097b1 | |||
| 338b9cab83 | |||
| 6b532f5d4d | |||
| feeb52949f | |||
| 27e5ce8b9f | |||
| e5235e6eef | |||
| 6737aae6bb | |||
| 5f72d1025b | |||
| d167cc3397 | |||
| eba4bcb441 | |||
| 919423fc6c | |||
| c6185e2eac | |||
| 77a7978f11 | |||
| 6ee5f11511 | |||
| 695f327a70 | |||
| 0fca3dbbce | |||
| 253f5575c9 | |||
| 8efcee5f8c | |||
| 34087d7be2 | |||
| 28e6598dff | |||
| 67c768dbe8 | |||
| 4f0596f874 | |||
| 291029dfd5 | |||
| 34e05996c1 | |||
| b8c117e126 | |||
| eb3217dc40 | |||
| 7cdf3904a7 | |||
| 98dd8e72e9 | |||
| 7e7fdf59c6 | |||
| 685dc4438f | |||
| 32322d8680 | |||
| 7f86bee330 | |||
| 544832790d | |||
| 4e8d084bc9 | |||
| e164a0dfea | |||
| c198390a49 | |||
| 0b9f2a02ab | |||
| fed02be153 | |||
| a453ec079f | |||
| 870896eca1 | |||
| a8097d6dda | |||
| 8f201c9ded | |||
| 69ac5d478f | |||
| c04e80e328 | |||
| 22e23da6f4 | |||
| 24050190e3 | |||
| 967bc47c80 | |||
| 2062be1a01 | |||
| 036e84c389 | |||
| f218cdab34 | |||
| 668933bcaa | |||
| 532ae9aa34 | |||
| efba8960e1 | |||
| fc2dafcff5 | |||
| 194f2c60ef | |||
| 7d7d82de03 | |||
| 3a2927081c | |||
| 1acad8eed7 | |||
| f8cd596aae | |||
| dd3fafbda5 | |||
| a19d1057ca | |||
| 8adce198e4 | |||
| 5a1038bb47 | |||
| e94113a859 | |||
| 00db87ad38 | |||
| fe41ba7489 | |||
| d9f2975413 | |||
| 38936053a3 | |||
| aeae316274 | |||
| 8f45215d1c | |||
| 76519c52f0 | |||
| 8a9426bc17 | |||
| 8f6384a9ec | |||
| fa2fa5c698 | |||
| 408ea3b547 | |||
| 6edcab7a1a | |||
| 461bde28d8 | |||
| 34eb05018f | |||
| ddcfda87d6 | |||
| 0297a3d4b7 | |||
| 776e5cfa0f | |||
| b07878ec7d | |||
| e3b977ac83 | |||
| f71e41691a | |||
| 0850e6301a | |||
| 9f2dc66f72 | |||
| b750c6b388 | |||
| bfad2f2fff | |||
| 7d82204fab | |||
| 1f40b7e252 | |||
| 28ab9dbe98 | |||
| d647c2d608 | |||
| e929eb0353 | |||
| b22dc5374c | |||
| e5bac3491a | |||
| 2c9073ab2a | |||
| 0918488dec | |||
| 85e013ef79 | |||
| 7f8dc336aa | |||
| 69f9e7f3e4 | |||
| 7a25d39873 | |||
| cfaa2bd744 | |||
| 7d058f73e2 | |||
| 2fee72e19b | |||
| 3d17cd3f1c | |||
| 15d660a8fd | |||
| e079e82c08 | |||
| 63a1625d78 | |||
| ad7612f597 | |||
| af03513f93 | |||
| d3e303470d | |||
| 7e82d9c61d | |||
| 799cc1cfcb | |||
| 0e91846730 | |||
| 23b3e448b2 | |||
| 801fdcfd3f | |||
| 20d694ac59 | |||
| cffd976ee3 | |||
| d3bf0a950f | |||
| 24ad1d1feb | |||
| 4a645a6821 | |||
| 770b7f6c9f | |||
| 0c9cb1bc19 | |||
| 08502b574d | |||
| 7238cd2ef0 | |||
| 0f7477c07f | |||
| f7094147b1 | |||
| 6c314a3681 | |||
| 94c0ec2159 | |||
| 5cc021a00b | |||
| 6336bd914a | |||
| cb1564b1ce | |||
| 1067775131 | |||
| ad6fbb6074 | |||
| f1c0d7bdce | |||
| 07a90ec313 | |||
| e3ab75de2b | |||
| 2a420f5cd4 | |||
| bce6b3c70a | |||
| 7633f4b55b | |||
| 7a66fb6dec | |||
| 0ea7fc2587 |
+1
-27
@@ -98,33 +98,7 @@
|
||||
exit;
|
||||
|
||||
} else {
|
||||
// Inform block it's about to be deleted
|
||||
if (file_exists("$CFG->dirroot/blocks/$block->name/block_$block->name.php")) {
|
||||
$blockobject = block_instance($block->name);
|
||||
if ($blockobject) {
|
||||
$blockobject->before_delete(); //only if we can create instance, block might have been already removed
|
||||
}
|
||||
}
|
||||
|
||||
// First delete instances and then block
|
||||
$instances = $DB->get_records('block_instances', array('blockname' => $block->name));
|
||||
if(!empty($instances)) {
|
||||
foreach($instances as $instance) {
|
||||
blocks_delete_instance($instance);
|
||||
}
|
||||
}
|
||||
|
||||
// Delete block
|
||||
$DB->delete_records('block', array('id'=>$block->id));
|
||||
|
||||
drop_plugin_tables($block->name, "$CFG->dirroot/blocks/$block->name/db/install.xml", false); // old obsoleted table names
|
||||
drop_plugin_tables('block_'.$block->name, "$CFG->dirroot/blocks/$block->name/db/install.xml", false);
|
||||
|
||||
// Delete the capabilities that were defined by this block
|
||||
capabilities_cleanup('block/'.$block->name);
|
||||
|
||||
// Remove event handlers and dequeue pending events
|
||||
events_uninstall('block/'.$block->name);
|
||||
uninstall_plugin('block', $block->name);
|
||||
|
||||
$a->block = $strblockname;
|
||||
$a->directory = $CFG->dirroot.'/blocks/'.$block->name;
|
||||
|
||||
@@ -133,9 +133,6 @@ $CFG->dirroot = dirname(dirname(dirname(__FILE__)));
|
||||
$CFG->libdir = "$CFG->dirroot/lib";
|
||||
$CFG->wwwroot = "http://localhost";
|
||||
$CFG->httpswwwroot = $CFG->wwwroot;
|
||||
$CFG->dataroot = str_replace('\\', '/', dirname(dirname(dirname(dirname(__FILE__)))).'/moodledata');
|
||||
$CFG->tempdir = $CFG->dataroot.'/temp';
|
||||
$CFG->cachedir = $CFG->dataroot.'/temp';
|
||||
$CFG->docroot = 'http://docs.moodle.org';
|
||||
$CFG->running_installer = true;
|
||||
$CFG->early_install_lang = true;
|
||||
@@ -186,7 +183,7 @@ list($options, $unrecognized) = cli_get_params(
|
||||
'chmod' => '2777',
|
||||
'lang' => $CFG->lang,
|
||||
'wwwroot' => '',
|
||||
'dataroot' => $CFG->dataroot,
|
||||
'dataroot' => str_replace('\\', '/', dirname(dirname(dirname(dirname(__FILE__)))).'/moodledata'),
|
||||
'dbtype' => $defaultdb,
|
||||
'dbhost' => 'localhost',
|
||||
'dbname' => 'moodle',
|
||||
@@ -270,7 +267,7 @@ if ($interactive) {
|
||||
$chmod = octdec(clean_param($options['chmod'], PARAM_INT));
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading('Data directories permission'); // todo localize
|
||||
cli_heading(get_string('datarootpermission', 'install'));
|
||||
$prompt = get_string('clitypevaluedefault', 'admin', decoct($chmod));
|
||||
$error = '';
|
||||
do {
|
||||
@@ -330,9 +327,12 @@ $CFG->httpswwwroot = $CFG->wwwroot;
|
||||
|
||||
|
||||
//We need dataroot before lang download
|
||||
if (!empty($options['dataroot'])) {
|
||||
$CFG->dataroot = $options['dataroot'];
|
||||
$dataroot = clean_param($options['dataroot'], PARAM_PATH);
|
||||
if ($dataroot !== $options['dataroot']) {
|
||||
$a = (object)array('option' => 'dataroot', 'value' => $options['dataroot']);
|
||||
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
|
||||
}
|
||||
$CFG->dataroot = $dataroot;
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
$i=0;
|
||||
@@ -380,6 +380,8 @@ if ($interactive) {
|
||||
cli_error(get_string('pathserrcreatedataroot', 'install', $a));
|
||||
}
|
||||
}
|
||||
$CFG->tempdir = $CFG->dataroot.'/temp';
|
||||
$CFG->cachedir = $CFG->dataroot.'/cache';
|
||||
|
||||
// download required lang packs
|
||||
if ($CFG->lang !== 'en') {
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package core
|
||||
* @subpackage cli
|
||||
* @copyright 2011 David Mudrak <david@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
define('CLI_SCRIPT', true);
|
||||
|
||||
require(dirname(dirname(dirname(__FILE__))).'/config.php');
|
||||
require_once($CFG->libdir.'/clilib.php');
|
||||
|
||||
list($options, $unrecognized) = cli_get_params(array('help' => false), array('h' => 'help'));
|
||||
|
||||
if ($unrecognized) {
|
||||
$unrecognized = implode("\n ", $unrecognized);
|
||||
cli_error(get_string('cliunknowoption', 'admin', $unrecognized), 2);
|
||||
}
|
||||
|
||||
if ($options['help']) {
|
||||
$help =
|
||||
"Invalidates all Moodle internal caches
|
||||
|
||||
Options:
|
||||
-h, --help Print out this help
|
||||
|
||||
Example:
|
||||
\$sudo -u www-data /usr/bin/php admin/cli/purge_caches.php
|
||||
";
|
||||
|
||||
echo $help;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
purge_all_caches();
|
||||
|
||||
exit(0);
|
||||
@@ -56,8 +56,16 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
6 => get_string('saturday', 'calendar')
|
||||
)));
|
||||
$temp->add(new admin_setting_special_calendar_weekend());
|
||||
$temp->add(new admin_setting_configtext('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,PARAM_INT));
|
||||
$temp->add(new admin_setting_configtext('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,PARAM_INT));
|
||||
$options = array();
|
||||
for ($i=1; $i<=99; $i++) {
|
||||
$options[$i] = $i;
|
||||
}
|
||||
$temp->add(new admin_setting_configselect('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,$options));
|
||||
$options = array();
|
||||
for ($i=1; $i<=20; $i++) {
|
||||
$options[$i] = $i;
|
||||
}
|
||||
$temp->add(new admin_setting_configselect('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,$options));
|
||||
$temp->add(new admin_setting_configcheckbox('enablecalendarexport', get_string('enablecalendarexport', 'admin'), get_string('configenablecalendarexport','admin'), 1));
|
||||
$temp->add(new admin_setting_configtext('calendar_exportsalt', get_string('calendarexportsalt','admin'), get_string('configcalendarexportsalt', 'admin'), random_string(60)));
|
||||
$ADMIN->add('appearance', $temp);
|
||||
|
||||
@@ -89,6 +89,9 @@ if ($hassiteconfig
|
||||
$defaultuserid = 0;
|
||||
}
|
||||
|
||||
$restorersnewrole = $creatornewroles;
|
||||
$restorersnewrole[0] = get_string('none');
|
||||
|
||||
$temp->add(new admin_setting_configselect('notloggedinroleid', get_string('notloggedinroleid', 'admin'),
|
||||
get_string('confignotloggedinroleid', 'admin'), $defaultguestid, ($guestroles + $otherroles)));
|
||||
$temp->add(new admin_setting_configselect('guestroleid', get_string('guestroleid', 'admin'),
|
||||
@@ -97,12 +100,15 @@ if ($hassiteconfig
|
||||
get_string('configdefaultuserroleid', 'admin'), $defaultuserid, ($userroles + $otherroles)));
|
||||
$temp->add(new admin_setting_configselect('creatornewroleid', get_string('creatornewroleid', 'admin'),
|
||||
get_string('creatornewroleid_help', 'admin'), $defaultteacherid, $creatornewroles));
|
||||
$temp->add(new admin_setting_configselect('restorernewroleid', get_string('restorernewroleid', 'admin'),
|
||||
get_string('restorernewroleid_help', 'admin'), $defaultteacherid, $restorersnewrole));
|
||||
|
||||
// release memory
|
||||
unset($otherroles);
|
||||
unset($guestroles);
|
||||
unset($userroles);
|
||||
unset($creatornewroles);
|
||||
unset($restorersnewrole);
|
||||
}
|
||||
|
||||
$temp->add(new admin_setting_configcheckbox('autologinguests', get_string('autologinguests', 'admin'), get_string('configautologinguests', 'admin'), 0));
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information
|
||||
*
|
||||
* @package tool
|
||||
* @subpackage customlang
|
||||
* @copyright 2010 David Mudrak <david@moodle.com>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -35,17 +35,29 @@ require_once($CFG->libdir.'/componentlib.class.php');
|
||||
|
||||
admin_externalpage_setup('toollangimport');
|
||||
|
||||
if (!empty($CFG->skiplangupgrade)) {
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->box(get_string('langimportdisabled', 'tool_langimport'));
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
if (empty($CFG->langotherroot)) {
|
||||
throw new moodle_exception('missingcfglangotherroot', 'tool_langimport');
|
||||
}
|
||||
|
||||
$mode = optional_param('mode', 0, PARAM_INT); // action
|
||||
$pack = optional_param_array('pack', array(), PARAM_SAFEDIR); // pack to install
|
||||
$uninstalllang = optional_param('uninstalllang', '', PARAM_LANG); // installed pack to uninstall
|
||||
$confirm = optional_param('confirm', 0, PARAM_BOOL); // uninstallation confirmation
|
||||
$purgecaches = optional_param('purgecaches', false, PARAM_BOOL); // explicit caches reset
|
||||
|
||||
if ($purgecaches) {
|
||||
require_sesskey();
|
||||
get_string_manager()->reset_caches();
|
||||
redirect($PAGE->url);
|
||||
}
|
||||
|
||||
if (!empty($CFG->skiplangupgrade)) {
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->box(get_string('langimportdisabled', 'tool_langimport'));
|
||||
echo $OUTPUT->single_button(new moodle_url($PAGE->url, array('purgecaches' => 1)), get_string('purgestringcaches', 'tool_langimport'));
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
|
||||
define('INSTALLATION_OF_SELECTED_LANG', 2);
|
||||
define('DELETION_OF_SELECTED_LANG', 4);
|
||||
|
||||
@@ -26,15 +26,17 @@
|
||||
$string['install'] = 'Install selected language pack';
|
||||
$string['installedlangs'] = 'Installed language packs';
|
||||
$string['langimport'] = 'Language import utility';
|
||||
$string['langimportdisabled'] = 'Language import feature has been disabled. You have to update your language packs manually at the file-system level.';
|
||||
$string['langimportdisabled'] = 'Language import feature has been disabled. You have to update your language packs manually at the file-system level. Do not forget to purge string caches after you do so.';
|
||||
$string['langpackinstalled'] = 'Language pack {$a} was successfully installed';
|
||||
$string['langpackremoved'] = 'Language pack was uninstalled';
|
||||
$string['langpackupdateskipped'] = 'Update of {$a} language pack skipped';
|
||||
$string['langpackuptodate'] = 'Language pack {$a} is up-to-date';
|
||||
$string['langupdatecomplete'] = 'Language pack update completed';
|
||||
$string['missingcfglangotherroot'] = 'Missing configuration value $CFG->langotherroot';
|
||||
$string['missinglangparent'] = 'Missing parent language <em>{$a->parent}</em> of <em>{$a->lang}</em>.';
|
||||
$string['nolangupdateneeded'] = 'All your language packs are up to date, no update is needed';
|
||||
$string['pluginname'] = 'Language packs';
|
||||
$string['purgestringcaches'] = 'Purge string caches';
|
||||
$string['remotelangnotavailable'] = 'Because Moodle can not connect to download.moodle.org, we are unable to do language pack installation automatically. Please download the appropriate zip file(s) from http://download.moodle.org, copy them to your {$a} directory and unzip them manually.';
|
||||
$string['uninstall'] = 'Uninstall selected language pack';
|
||||
$string['uninstallconfirm'] = 'You are about to completely uninstall language pack {$a}, are you sure?';
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* @copyright 2011 Petr Skoda {@link http://skodak.org}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500;
|
||||
$plugin->requires = 2011092100;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500;
|
||||
$plugin->requires = 2011092100;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500;
|
||||
$plugin->requires = 2011092100;
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
*
|
||||
* @package tool
|
||||
* @subpackage unittest
|
||||
* @copyright 2009 David Mudrak <david.mudrak@gmail.com>
|
||||
* @author N.D.Freear@open.ac.uk, T.J.Hunt@open.ac.uk
|
||||
* @copyright 2009 David Mudrak <david.mudrak@gmail.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
$plugin->component = 'tool_unittest'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* @copyright 2010 Petr Skoda {@link http://skodak.org}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
This files describes API changes in /admin/tool/* - plugins,
|
||||
information provided here is intended especially for developers.
|
||||
|
||||
|
||||
=== 2.2 ===
|
||||
|
||||
API changes:
|
||||
* new admin tool plugin type introduced
|
||||
|
||||
|
||||
How to migrate existing admin reports:
|
||||
# move all files to new /admin/tool/yourplugin/ location
|
||||
# update all links to admin tools /$CFG->admin/report/ to /$CFG->admin/tool/
|
||||
# add language pack with at least 'pluginname' string
|
||||
# update all language strings (use 'tool_yourplugin' instead of 'report_yourplugin') - use AMOS hints in commit message
|
||||
# update all capability names
|
||||
# create db/install.php migration script - delete old settings and capabilities (see converted plugins for examples)
|
||||
# grep the plugin codebase and look for any remaining 'coursereport' occurrences
|
||||
# update CSS selectors
|
||||
|
||||
See http://docs.moodle.org/dev/Admin_tools for more details and explanation.
|
||||
@@ -22,7 +22,8 @@
|
||||
* @copyright 2011 Petr Skoda {@link http://skodak.org}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -71,6 +71,7 @@ $string['down'] = 'Down';
|
||||
$string['duplicate'] = 'Duplicate';
|
||||
$string['duplicatefieldname'] = 'Another field with that name exists';
|
||||
$string['duplicatekeyname'] = 'Another key with that name exists';
|
||||
$string['duplicatetablename'] = 'Another table with that name exists';
|
||||
$string['edit'] = 'Edit';
|
||||
$string['edit_field'] = 'Edit field';
|
||||
$string['edit_field_save'] = 'Save field';
|
||||
@@ -113,6 +114,7 @@ $string['incorrectfieldname'] = 'Incorrect name';
|
||||
$string['index'] = 'Index';
|
||||
$string['indexes'] = 'Indexes';
|
||||
$string['integerincorrectlength'] = 'Incorrect length for integer field';
|
||||
$string['incorrecttablename'] = 'Incorrect table name';
|
||||
$string['key'] = 'Key';
|
||||
$string['keys'] = 'Keys';
|
||||
$string['listreservedwords'] = 'List of Reserved Words<br />(used to keep <a href="http://docs.moodle.org/en/XMLDB_reserved_words" target="_blank">XMLDB_reserved_words</a> updated)';
|
||||
@@ -156,6 +158,7 @@ $string['selectonecommand'] = 'Please select one action from the list to view PH
|
||||
$string['selectonefieldkeyindex'] = 'Please select one field/key/index from the list to view the PHP code';
|
||||
$string['selecttable'] = 'Select table:';
|
||||
$string['table'] = 'Table';
|
||||
$string['tablenameempty'] = 'The table name cannot be empty';
|
||||
$string['tables'] = 'Tables';
|
||||
$string['textincorrectlength'] = 'Incorrect length for text field';
|
||||
$string['unload'] = 'Unload';
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011092100; // Requires this Moodle version
|
||||
|
||||
@@ -68,6 +68,11 @@ class external_service_form extends moodleform {
|
||||
get_string('restrictedusers', 'webservice'));
|
||||
$mform->addHelpButton('restrictedusers', 'restrictedusers', 'webservice');
|
||||
|
||||
//can users download files
|
||||
$mform->addElement('advcheckbox', 'downloadfiles', get_string('downloadfiles', 'webservice'));
|
||||
$mform->setAdvanced('downloadfiles');
|
||||
$mform->addHelpButton('downloadfiles', 'downloadfiles', 'webservice');
|
||||
|
||||
/// needed to select automatically the 'No required capability" option
|
||||
$currentcapabilityexist = false;
|
||||
if (empty($service->requiredcapability)) {
|
||||
|
||||
+30
-1
@@ -1,3 +1,32 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2010072600;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage cas
|
||||
* @author Martin Dougiamas
|
||||
* @author Jerome GUTIERREZ
|
||||
* @author Iñaky Arenaza
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_cas'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
+28
-1
@@ -1,3 +1,30 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009112400;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage db
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_db'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage email
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_email'; // Full name of the plugin (used for diagnostics)
|
||||
+28
-1
@@ -1,3 +1,30 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009112400;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage fc
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_fc'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
+28
-1
@@ -1,3 +1,30 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009112400;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage imap
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_imap'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
+29
-1
@@ -1,3 +1,31 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2010072600;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage ldap
|
||||
* @author Martin Dougiamas
|
||||
* @author Iñaky Arenaza
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_ldap'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -25,5 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011022700;
|
||||
$plugin->component = 'auth_manual';
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_manual'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -37,6 +37,13 @@ if (!is_enabled_auth('mnet')) {
|
||||
|
||||
// If hostid hasn't been specified, try getting it using wwwroot
|
||||
if (!$hostid) {
|
||||
$hostwwwroot = trim($hostwwwroot);
|
||||
$hostwwwroot = rtrim($hostwwwroot, '/');
|
||||
|
||||
// ensure the wwwroot starts with a http or https prefix
|
||||
if (strtolower(substr($hostwwwroot, 0, 4)) != 'http') {
|
||||
$hostwwwroot = 'http://'.$hostwwwroot;
|
||||
}
|
||||
$hostid = $DB->get_field('mnet_host', 'id', array('wwwroot' => $hostwwwroot));
|
||||
}
|
||||
|
||||
|
||||
+28
-1
@@ -1,3 +1,30 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2010071300;
|
||||
/**
|
||||
* Manual authentication plugin version information
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage mnet
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_mnet'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
+28
-1
@@ -1,3 +1,30 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009112400;
|
||||
/**
|
||||
* Version information
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage nntp
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_nntp'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage nologin
|
||||
* @copyright 2011 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_nologin'; // Full name of the plugin (used for diagnostics)
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage none
|
||||
* @copyright 2011 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_none'; // Full name of the plugin (used for diagnostics)
|
||||
+28
-1
@@ -1,3 +1,30 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009112400;
|
||||
/**
|
||||
* Version information
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage pam
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_pam'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
+28
-1
@@ -1,3 +1,30 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009112400;
|
||||
/**
|
||||
* Version information
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage pop3
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_pop3'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
+28
-1
@@ -1,3 +1,30 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009112400;
|
||||
/**
|
||||
* Version information
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage radius
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_radius'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009112400;
|
||||
/**
|
||||
* Version information
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage shibboleth
|
||||
* @author Martin Dougiamas
|
||||
* @author Lukas Haemmerle
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_shibboleth'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage webservice
|
||||
* @copyright 2011 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_webservice'; // Full name of the plugin (used for diagnostics)
|
||||
@@ -43,6 +43,9 @@ class cc_resource extends entities {
|
||||
}
|
||||
|
||||
private function create_node_course_modules_mod_resource ($sheet_mod_resource, $instance) {
|
||||
global $CFG;
|
||||
|
||||
require_once($CFG->libdir.'/validateurlsyntax.php');
|
||||
|
||||
$link = '';
|
||||
$mod_alltext = '';
|
||||
@@ -77,9 +80,19 @@ class cc_resource extends entities {
|
||||
|
||||
if (!empty($resource)) {
|
||||
$xpath = cc2moodle::newx_path($resource, cc2moodle::getresourcens());
|
||||
$resource = $xpath->query('/wl:webLink/wl:url/@href');
|
||||
$resource = $xpath->query('//url/@href');
|
||||
if ($resource->length > 0) {
|
||||
$link = $resource->item(0)->nodeValue;
|
||||
$rawlink = $resource->item(0)->nodeValue;
|
||||
if (!validateUrlSyntax($rawlink, 's+')) {
|
||||
$changed = rawurldecode($rawlink);
|
||||
if (validateUrlSyntax($changed, 's+')) {
|
||||
$link = $changed;
|
||||
} else {
|
||||
$link = 'http://invalidurldetected/';
|
||||
}
|
||||
} else {
|
||||
$link = $rawlink;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,7 +111,7 @@ class cc_resource extends entities {
|
||||
$mod_options = 'objectframe';
|
||||
$mod_reference = $link;
|
||||
//detected if we are dealing with html file
|
||||
if (!empty($link) && ($instance['common_cartriedge_type'] == cc112moodle::CC_TYPE_WEBCONTENT)) {
|
||||
if (!empty($link) && ($instance['common_cartriedge_type'] == cc2moodle::CC_TYPE_WEBCONTENT)) {
|
||||
$ext = strtolower(pathinfo($link, PATHINFO_EXTENSION));
|
||||
if (in_array($ext, array('html', 'htm', 'xhtml'))) {
|
||||
$mod_type = 'html';
|
||||
|
||||
@@ -43,6 +43,9 @@ class cc11_resource extends entities11 {
|
||||
}
|
||||
|
||||
private function create_node_course_modules_mod_resource ($sheet_mod_resource, $instance) {
|
||||
global $CFG;
|
||||
|
||||
require_once($CFG->libdir.'/validateurlsyntax.php');
|
||||
|
||||
$link = '';
|
||||
$mod_alltext = '';
|
||||
@@ -87,7 +90,17 @@ class cc11_resource extends entities11 {
|
||||
$xpath = cc112moodle::newx_path($resource, cc112moodle::$resourcens);
|
||||
$resource = $xpath->query('/wl:webLink/wl:url/@href');
|
||||
if ($resource->length > 0) {
|
||||
$link = $resource->item(0)->nodeValue;
|
||||
$rawlink = $resource->item(0)->nodeValue;
|
||||
if (!validateUrlSyntax($rawlink, 's+')) {
|
||||
$changed = rawurldecode($rawlink);
|
||||
if (validateUrlSyntax($changed, 's+')) {
|
||||
$link = $changed;
|
||||
} else {
|
||||
$link = 'http://invalidurldetected/';
|
||||
}
|
||||
} else {
|
||||
$link = $rawlink;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<!-- LanguageId -->
|
||||
<xs:complexType name="LanguageId">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:language">
|
||||
<xs:extension base="xs:token">
|
||||
<xs:attributeGroup ref="ex:customAttributes"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
@@ -66,7 +66,7 @@
|
||||
<xs:complexType name="LangString">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="CharacterString">
|
||||
<xs:attribute name="language" type="xs:language"/>
|
||||
<xs:attribute name="language" type="xs:token"/>
|
||||
<xs:attributeGroup ref="ex:customAttributes"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<!-- LanguageId -->
|
||||
<xs:complexType name="LanguageId">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:language">
|
||||
<xs:extension base="xs:token">
|
||||
<xs:attributeGroup ref="ex:customAttributes" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
@@ -78,7 +78,7 @@
|
||||
<xs:complexType name="LangString">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="CharacterString">
|
||||
<xs:attribute name="language" type="xs:language" />
|
||||
<xs:attribute name="language" type="xs:token" />
|
||||
<xs:attributeGroup ref="ex:customAttributes" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<!-- LanguageId -->
|
||||
<xs:complexType name="LanguageId">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:language">
|
||||
<xs:extension base="xs:token">
|
||||
<xs:attributeGroup ref="ex:customAttributes"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<!-- LanguageId -->
|
||||
<xs:complexType name="LanguageId">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:language">
|
||||
<xs:extension base="xs:token">
|
||||
<xs:attributeGroup ref="ex:customAttributes" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
@@ -75,7 +75,7 @@
|
||||
<xs:complexType name="LangString">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="CharacterString">
|
||||
<xs:attribute name="language" type="xs:language" />
|
||||
<xs:attribute name="language" type="xs:token" />
|
||||
<xs:attributeGroup ref="ex:customAttributes" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
<xs:element ref="mat_extension" minOccurs="0" maxOccurs="0" />
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="attribute3" type="xs:language" />
|
||||
<xs:attribute name="attribute3" type="xs:token" />
|
||||
</xs:complexType>
|
||||
<!-- ********* -->
|
||||
<!-- ** and ** -->
|
||||
@@ -839,7 +839,7 @@
|
||||
<xs:attribute name="charset" type="xs:string" default="ascii-us" />
|
||||
<xs:attribute name="uri" type="xs:string" />
|
||||
<xs:attribute ref="xml:space" default="default" />
|
||||
<xs:attribute name="attribute11" type="xs:language" />
|
||||
<xs:attribute name="attribute11" type="xs:token" />
|
||||
<xs:attribute name="entityref" type="xs:ENTITY" use="prohibited" />
|
||||
<xs:attribute name="width" type="xs:string" />
|
||||
<xs:attribute name="height" type="xs:string" />
|
||||
@@ -869,7 +869,7 @@
|
||||
<xs:element name="altmaterial" type="altmaterialType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="label" type="string256" />
|
||||
<xs:attribute name="attribute5" type="xs:language" />
|
||||
<xs:attribute name="attribute5" type="xs:token" />
|
||||
</xs:complexType>
|
||||
<!-- ****************** -->
|
||||
<!-- ** material_ref ** -->
|
||||
@@ -912,7 +912,7 @@
|
||||
<xs:attribute name="charset" type="xs:string" default="ascii-us" />
|
||||
<xs:attribute name="uri" type="xs:string" />
|
||||
<xs:attribute ref="xml:space" default="default" />
|
||||
<xs:attribute name="attribute11" type="xs:language" />
|
||||
<xs:attribute name="attribute11" type="xs:token" />
|
||||
<xs:attribute name="entityref" type="xs:ENTITY" use="prohibited" />
|
||||
<xs:attribute name="width" type="xs:string" />
|
||||
<xs:attribute name="height" type="xs:string" />
|
||||
@@ -1220,7 +1220,7 @@
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="label" type="xs:string" />
|
||||
<xs:attribute name="attribute5" type="xs:language" />
|
||||
<xs:attribute name="attribute5" type="xs:token" />
|
||||
<xs:attribute name="y0" type="xs:string" />
|
||||
<xs:attribute name="x0" type="xs:string" />
|
||||
<xs:attribute name="width" type="xs:string" />
|
||||
@@ -1791,7 +1791,7 @@
|
||||
</xs:sequence>
|
||||
<xs:attribute name="ident" type="xs:string" use="required" />
|
||||
<xs:attribute name="title" type="xs:string" />
|
||||
<xs:attribute name="attribute7" type="xs:language" />
|
||||
<xs:attribute name="attribute7" type="xs:token" />
|
||||
</xs:complexType>
|
||||
<!-- ******************** -->
|
||||
<!-- ** sectioncontrol ** -->
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
the empty string.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:simpleType>
|
||||
<xs:union memberTypes="xs:language">
|
||||
<xs:union memberTypes="xs:token">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="" />
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:simpleType>
|
||||
<xs:union memberTypes="xs:language">
|
||||
<xs:union memberTypes="xs:token">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value=""/>
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
the empty string.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:simpleType>
|
||||
<xs:union memberTypes="xs:language">
|
||||
<xs:union memberTypes="xs:token">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="" />
|
||||
|
||||
@@ -1114,14 +1114,12 @@ class backup_users_structure_step extends backup_structure_step {
|
||||
$user->set_source_sql('SELECT u.*, c.id AS contextid, m.wwwroot AS mnethosturl
|
||||
FROM {user} u
|
||||
JOIN {backup_ids_temp} bi ON bi.itemid = u.id
|
||||
JOIN {context} c ON c.instanceid = u.id
|
||||
LEFT JOIN {context} c ON c.instanceid = u.id AND c.contextlevel = ' . CONTEXT_USER . '
|
||||
LEFT JOIN {mnet_host} m ON m.id = u.mnethostid
|
||||
WHERE bi.backupid = ?
|
||||
AND bi.itemname = ?
|
||||
AND c.contextlevel = ?', array(
|
||||
AND bi.itemname = ?', array(
|
||||
backup_helper::is_sqlparam($this->get_backupid()),
|
||||
backup_helper::is_sqlparam('userfinal'),
|
||||
backup_helper::is_sqlparam(CONTEXT_USER)));
|
||||
backup_helper::is_sqlparam('userfinal')));
|
||||
|
||||
// All the rest on information is only added if we arent
|
||||
// in an anonymized backup
|
||||
@@ -1772,12 +1770,15 @@ class backup_annotate_all_user_files extends backup_execution_step {
|
||||
'backupid' => $this->get_backupid(), 'itemname' => 'userfinal'));
|
||||
foreach ($rs as $record) {
|
||||
$userid = $record->itemid;
|
||||
$userctxid = get_context_instance(CONTEXT_USER, $userid)->id;
|
||||
$userctx = get_context_instance(CONTEXT_USER, $userid);
|
||||
if (!$userctx) {
|
||||
continue; // User has not context, sure it's a deleted user, so cannot have files
|
||||
}
|
||||
// Proceed with every user filearea
|
||||
foreach ($fileareas as $filearea) {
|
||||
// We don't need to specify itemid ($userid - 5th param) as far as by
|
||||
// context we can get all the associated files. See MDL-22092
|
||||
backup_structure_dbops::annotate_files($this->get_backupid(), $userctxid, 'user', $filearea, null);
|
||||
backup_structure_dbops::annotate_files($this->get_backupid(), $userctx->id, 'user', $filearea, null);
|
||||
}
|
||||
}
|
||||
$rs->close();
|
||||
|
||||
@@ -133,6 +133,26 @@ class restore_course_task extends restore_task {
|
||||
$startdate->set_ui(new backup_setting_ui_dateselector($startdate, get_string('setting_course_startdate', 'backup')));
|
||||
$this->add_setting($startdate);
|
||||
|
||||
$keep_enrols = new restore_course_generic_setting('keep_roles_and_enrolments', base_setting::IS_BOOLEAN, false);
|
||||
$keep_enrols->set_ui(new backup_setting_ui_select($keep_enrols, $keep_enrols->get_name(), array(1=>get_string('yes'), 0=>get_string('no'))));
|
||||
$keep_enrols->get_ui()->set_label(get_string('setting_keep_roles_and_enrolments', 'backup'));
|
||||
if ($this->get_target() != backup::TARGET_CURRENT_DELETING and $this->get_target() != backup::TARGET_EXISTING_DELETING) {
|
||||
$keep_enrols->set_value(false);
|
||||
$keep_enrols->set_status(backup_setting::LOCKED_BY_CONFIG);
|
||||
$keep_enrols->set_visibility(backup_setting::HIDDEN);
|
||||
}
|
||||
$this->add_setting($keep_enrols);
|
||||
|
||||
$keep_groups = new restore_course_generic_setting('keep_groups_and_groupings', base_setting::IS_BOOLEAN, false);
|
||||
$keep_groups->set_ui(new backup_setting_ui_select($keep_groups, $keep_groups->get_name(), array(1=>get_string('yes'), 0=>get_string('no'))));
|
||||
$keep_groups->get_ui()->set_label(get_string('setting_keep_groups_and_groupings', 'backup'));
|
||||
if ($this->get_target() != backup::TARGET_CURRENT_DELETING and $this->get_target() != backup::TARGET_EXISTING_DELETING) {
|
||||
$keep_groups->set_value(false);
|
||||
$keep_groups->set_status(backup_setting::LOCKED_BY_CONFIG);
|
||||
$keep_groups->set_visibility(backup_setting::HIDDEN);
|
||||
}
|
||||
$this->add_setting($keep_groups);
|
||||
|
||||
// Define overwrite_conf to decide if course configuration will be restored over existing one
|
||||
$overwrite = new restore_course_overwrite_conf_setting('overwrite_conf', base_setting::IS_BOOLEAN, false);
|
||||
$overwrite->set_ui(new backup_setting_ui_select($overwrite, $overwrite->get_name(), array(1=>get_string('yes'), 0=>get_string('no'))));
|
||||
|
||||
@@ -37,6 +37,10 @@ class restore_root_task extends restore_task {
|
||||
// Conditionally create the temp table (can exist from prechecks) and delete old stuff
|
||||
$this->add_step(new restore_create_and_clean_temp_stuff('create_and_clean_temp_stuff'));
|
||||
|
||||
// Now make sure the user that is running the restore can actually access the course
|
||||
// before executing any other step (potentially performing permission checks)
|
||||
$this->add_step(new restore_fix_restorer_access_step('fix_restorer_access'));
|
||||
|
||||
// If we haven't preloaded information, load all the included inforef records to temp_ids table
|
||||
$this->add_step(new restore_load_included_inforef_records('load_inforef_records'));
|
||||
|
||||
|
||||
@@ -802,7 +802,14 @@ class restore_groups_structure_step extends restore_structure_step {
|
||||
|
||||
$data->groupingid = $this->get_new_parentid('grouping'); // Use new parentid
|
||||
$data->groupid = $this->get_mappingid('group', $data->groupid); // Get from mappings
|
||||
$DB->insert_record('groupings_groups', $data); // No need to set this mapping (no child info nor files)
|
||||
|
||||
$params = array();
|
||||
$params['groupingid'] = $data->groupingid;
|
||||
$params['groupid'] = $data->groupid;
|
||||
|
||||
if (!$DB->record_exists('groupings_groups', $params)) {
|
||||
$DB->insert_record('groupings_groups', $data); // No need to set this mapping (no child info nor files)
|
||||
}
|
||||
}
|
||||
|
||||
protected function after_execute() {
|
||||
@@ -1102,7 +1109,6 @@ class restore_course_structure_step extends restore_structure_step {
|
||||
global $CFG, $DB;
|
||||
|
||||
$data = (object)$data;
|
||||
$oldid = $data->id; // We'll need this later
|
||||
|
||||
$fullname = $this->get_setting_value('course_fullname');
|
||||
$shortname = $this->get_setting_value('course_shortname');
|
||||
@@ -1115,7 +1121,13 @@ class restore_course_structure_step extends restore_structure_step {
|
||||
$data->id = $this->get_courseid();
|
||||
$data->fullname = $fullname;
|
||||
$data->shortname= $shortname;
|
||||
$data->idnumber = '';
|
||||
|
||||
$context = get_context_instance_by_id($this->task->get_contextid());
|
||||
if (has_capability('moodle/course:changeidnumber', $context, $this->task->get_userid())) {
|
||||
$data->idnumber = '';
|
||||
} else {
|
||||
unset($data->idnumber);
|
||||
}
|
||||
|
||||
// Only restrict modules if original course was and target site too for new courses
|
||||
$data->restrictmodules = $data->restrictmodules && !empty($CFG->restrictmodulesfor) && $CFG->restrictmodulesfor == 'all';
|
||||
@@ -1422,6 +1434,57 @@ class restore_enrolments_structure_step extends restore_structure_step {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make sure the user restoring the course can actually access it.
|
||||
*/
|
||||
class restore_fix_restorer_access_step extends restore_execution_step {
|
||||
protected function define_execution() {
|
||||
global $CFG, $DB;
|
||||
|
||||
if (!$userid = $this->task->get_userid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (empty($CFG->restorernewroleid)) {
|
||||
// Bad luck, no fallback role for restorers specified
|
||||
return;
|
||||
}
|
||||
|
||||
$courseid = $this->get_courseid();
|
||||
$context = context_course::instance($courseid);
|
||||
|
||||
if (is_enrolled($context, $userid, 'moodle/course:update', true) or is_viewing($context, $userid, 'moodle/course:update')) {
|
||||
// Current user may access the course (admin, category manager or restored teacher enrolment usually)
|
||||
return;
|
||||
}
|
||||
|
||||
// Try to add role only - we do not need enrolment if user has moodle/course:view or is already enrolled
|
||||
role_assign($CFG->restorernewroleid, $userid, $context);
|
||||
|
||||
if (is_enrolled($context, $userid, 'moodle/course:update', true) or is_viewing($context, $userid, 'moodle/course:update')) {
|
||||
// Extra role is enough, yay!
|
||||
return;
|
||||
}
|
||||
|
||||
// The last chance is to create manual enrol if it does not exist and and try to enrol the current user,
|
||||
// hopefully admin selected suitable $CFG->restorernewroleid ...
|
||||
if (!enrol_is_enabled('manual')) {
|
||||
return;
|
||||
}
|
||||
if (!$enrol = enrol_get_plugin('manual')) {
|
||||
return;
|
||||
}
|
||||
if (!$DB->record_exists('enrol', array('enrol'=>'manual', 'courseid'=>$courseid))) {
|
||||
$course = $DB->get_record('course', array('id'=>$courseid), '*', MUST_EXIST);
|
||||
$fields = array('status'=>ENROL_INSTANCE_ENABLED, 'enrolperiod'=>$enrol->get_config('enrolperiod', 0), 'roleid'=>$enrol->get_config('roleid', 0));
|
||||
$enrol->add_instance($course, $fields);
|
||||
}
|
||||
|
||||
enrol_try_internal_enrol($courseid, $userid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This structure steps restores the filters and their configs
|
||||
*/
|
||||
@@ -1981,7 +2044,7 @@ class restore_activity_grading_structure_step extends restore_structure_step {
|
||||
$newitemid = $this->get_mappingid(restore_gradingform_plugin::itemid_mapping($areaname), $data->itemid);
|
||||
|
||||
$oldid = $data->id;
|
||||
$data->formid = $newformid;
|
||||
$data->definitionid = $newformid;
|
||||
$data->raterid = $this->get_mappingid('user', $data->raterid);
|
||||
$data->itemid = $newitemid;
|
||||
|
||||
@@ -2362,8 +2425,6 @@ class restore_module_structure_step extends restore_structure_step {
|
||||
* - Activity includes completion info (file_exists)
|
||||
*/
|
||||
class restore_userscompletion_structure_step extends restore_structure_step {
|
||||
private $done = array();
|
||||
|
||||
/**
|
||||
* To conditionally decide if this step must be executed
|
||||
* Note the "settings" conditions are evaluated in the
|
||||
@@ -2407,15 +2468,14 @@ class restore_userscompletion_structure_step extends restore_structure_step {
|
||||
$data->userid = $this->get_mappingid('user', $data->userid);
|
||||
$data->timemodified = $this->apply_date_offset($data->timemodified);
|
||||
|
||||
// Find the existing record
|
||||
$existing = $DB->get_record('course_modules_completion', array(
|
||||
'coursemoduleid' => $data->coursemoduleid,
|
||||
'userid' => $data->userid), 'id, timemodified');
|
||||
// Check we didn't already insert one for this cmid and userid
|
||||
// (there aren't supposed to be duplicates in that field, but
|
||||
// it was possible until MDL-28021 was fixed).
|
||||
$key = $data->coursemoduleid . ',' . $data->userid;
|
||||
if (array_key_exists($key, $this->done)) {
|
||||
// Find the existing record
|
||||
$existing = $DB->get_record('course_modules_completion', array(
|
||||
'coursemoduleid' => $data->coursemoduleid,
|
||||
'userid' => $data->userid), 'id, timemodified');
|
||||
if ($existing) {
|
||||
// Update it to these new values, but only if the time is newer
|
||||
if ($existing->timemodified < $data->timemodified) {
|
||||
$data->id = $existing->id;
|
||||
@@ -2424,17 +2484,8 @@ class restore_userscompletion_structure_step extends restore_structure_step {
|
||||
} else {
|
||||
// Normal entry where it doesn't exist already
|
||||
$DB->insert_record('course_modules_completion', $data);
|
||||
// Remember this entry
|
||||
$this->done[$key] = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected function after_execute() {
|
||||
// This gets called once per activity (according to my testing).
|
||||
// Clearing the array isn't strictly required, but avoids using
|
||||
// unnecessary memory.
|
||||
$this->done = array();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ if (!$restore->is_independent()) {
|
||||
$restore->execute();
|
||||
} catch(Exception $e) {
|
||||
$restore->cleanup();
|
||||
throw new moodle_exception((string)$e);
|
||||
throw $e;
|
||||
}
|
||||
} else {
|
||||
$restore->save_controller();
|
||||
|
||||
@@ -824,54 +824,58 @@ abstract class restore_dbops {
|
||||
$newuserid = $DB->insert_record('user', $user);
|
||||
self::set_backup_ids_record($restoreid, 'user', $recuser->itemid, $newuserid);
|
||||
// Let's create the user context and annotate it (we need it for sure at least for files)
|
||||
$newuserctxid = get_context_instance(CONTEXT_USER, $newuserid)->id;
|
||||
self::set_backup_ids_record($restoreid, 'context', $recuser->parentitemid, $newuserctxid);
|
||||
// but for deleted users that don't have a context anymore (MDL-30192). We are done for them
|
||||
// and nothing else (custom fields, prefs, tags, files...) will be created.
|
||||
if (empty($user->deleted)) {
|
||||
$newuserctxid = $user->deleted ? 0 : get_context_instance(CONTEXT_USER, $newuserid)->id;
|
||||
self::set_backup_ids_record($restoreid, 'context', $recuser->parentitemid, $newuserctxid);
|
||||
|
||||
// Process custom fields
|
||||
if (isset($user->custom_fields)) { // if present in backup
|
||||
foreach($user->custom_fields['custom_field'] as $udata) {
|
||||
$udata = (object)$udata;
|
||||
// If the profile field has data and the profile shortname-datatype is defined in server
|
||||
if ($udata->field_data) {
|
||||
if ($field = $DB->get_record('user_info_field', array('shortname'=>$udata->field_name, 'datatype'=>$udata->field_type))) {
|
||||
/// Insert the user_custom_profile_field
|
||||
$rec = new stdClass();
|
||||
$rec->userid = $newuserid;
|
||||
$rec->fieldid = $field->id;
|
||||
$rec->data = $udata->field_data;
|
||||
$DB->insert_record('user_info_data', $rec);
|
||||
// Process custom fields
|
||||
if (isset($user->custom_fields)) { // if present in backup
|
||||
foreach($user->custom_fields['custom_field'] as $udata) {
|
||||
$udata = (object)$udata;
|
||||
// If the profile field has data and the profile shortname-datatype is defined in server
|
||||
if ($udata->field_data) {
|
||||
if ($field = $DB->get_record('user_info_field', array('shortname'=>$udata->field_name, 'datatype'=>$udata->field_type))) {
|
||||
/// Insert the user_custom_profile_field
|
||||
$rec = new stdClass();
|
||||
$rec->userid = $newuserid;
|
||||
$rec->fieldid = $field->id;
|
||||
$rec->data = $udata->field_data;
|
||||
$DB->insert_record('user_info_data', $rec);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Process tags
|
||||
if (!empty($CFG->usetags) && isset($user->tags)) { // if enabled in server and present in backup
|
||||
$tags = array();
|
||||
foreach($user->tags['tag'] as $usertag) {
|
||||
$usertag = (object)$usertag;
|
||||
$tags[] = $usertag->rawname;
|
||||
// Process tags
|
||||
if (!empty($CFG->usetags) && isset($user->tags)) { // if enabled in server and present in backup
|
||||
$tags = array();
|
||||
foreach($user->tags['tag'] as $usertag) {
|
||||
$usertag = (object)$usertag;
|
||||
$tags[] = $usertag->rawname;
|
||||
}
|
||||
tag_set('user', $newuserid, $tags);
|
||||
}
|
||||
tag_set('user', $newuserid, $tags);
|
||||
}
|
||||
|
||||
// Process preferences
|
||||
if (isset($user->preferences)) { // if present in backup
|
||||
foreach($user->preferences['preference'] as $preference) {
|
||||
$preference = (object)$preference;
|
||||
// Prepare the record and insert it
|
||||
$preference->userid = $newuserid;
|
||||
$status = $DB->insert_record('user_preferences', $preference);
|
||||
// Process preferences
|
||||
if (isset($user->preferences)) { // if present in backup
|
||||
foreach($user->preferences['preference'] as $preference) {
|
||||
$preference = (object)$preference;
|
||||
// Prepare the record and insert it
|
||||
$preference->userid = $newuserid;
|
||||
$status = $DB->insert_record('user_preferences', $preference);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create user files in pool (profile, icon, private) by context
|
||||
restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'icon', $recuser->parentitemid, $userid);
|
||||
restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'profile', $recuser->parentitemid, $userid);
|
||||
if ($userfiles) { // private files only if enabled in settings
|
||||
restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'private', $recuser->parentitemid, $userid);
|
||||
}
|
||||
// Create user files in pool (profile, icon, private) by context
|
||||
restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'icon', $recuser->parentitemid, $userid);
|
||||
restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'profile', $recuser->parentitemid, $userid);
|
||||
if ($userfiles) { // private files only if enabled in settings
|
||||
restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'private', $recuser->parentitemid, $userid);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$rs->close();
|
||||
}
|
||||
@@ -1197,7 +1201,7 @@ abstract class restore_dbops {
|
||||
// With problems of type error, throw exception, shouldn't happen if prechecks were originally
|
||||
// executed, so be radical here.
|
||||
if (array_key_exists('errors', $problems)) {
|
||||
throw new restore_dbops_exception('restore_problems_processing_questions', null, implode(', ', $problems));
|
||||
throw new restore_dbops_exception('restore_problems_processing_questions', null, implode(', ', $problems['errors']));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1354,10 +1358,11 @@ abstract class restore_dbops {
|
||||
/**
|
||||
* Deletes all of the content associated with the given course (courseid)
|
||||
* @param int $courseid
|
||||
* @param array $options
|
||||
* @return bool True for success
|
||||
*/
|
||||
public static function delete_course_content($courseid) {
|
||||
return remove_course_contents($courseid, false);
|
||||
public static function delete_course_content($courseid, array $options = null) {
|
||||
return remove_course_contents($courseid, false, $options);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -232,15 +232,9 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
$html .= $this->output->heading(get_string('restoretonewcourse', 'backup'), 2, array('class'=>'header'));
|
||||
$html .= $this->backup_detail_input(get_string('restoretonewcourse', 'backup'), 'radio', 'target', backup::TARGET_NEW_COURSE, array('checked'=>'checked'));
|
||||
$html .= $this->backup_detail_pair(get_string('selectacategory', 'backup'), $this->render($categories));
|
||||
$html .= $this->backup_detail_pair('', html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('continue'), 'class'=>'newcoursecontinue')));
|
||||
$html .= $this->backup_detail_pair('', html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('continue'))));
|
||||
$html .= html_writer::end_tag('div');
|
||||
$html .= html_writer::end_tag('form');
|
||||
$config = new stdClass;
|
||||
$config->title = get_string('confirmnewcoursecontinue', 'backup');
|
||||
$config->question = get_string('confirmnewcoursecontinuequestion', 'backup');
|
||||
$config->yesLabel = get_string('continue');
|
||||
$config->noLabel = get_string('cancel');
|
||||
$PAGE->requires->yui_module('moodle-backup-confirmcancel', 'M.core_backup.watch_newcoursecontinue_buttons', array($config));
|
||||
}
|
||||
|
||||
if ($wholecourse && !empty($currentcourse)) {
|
||||
|
||||
@@ -139,7 +139,10 @@ class restore_ui extends base_ui {
|
||||
throw new restore_ui_exception('restoreuifinalisedbeforeexecute');
|
||||
}
|
||||
if ($this->controller->get_target() == backup::TARGET_CURRENT_DELETING || $this->controller->get_target() == backup::TARGET_EXISTING_DELETING) {
|
||||
restore_dbops::delete_course_content($this->controller->get_courseid());
|
||||
$options = array();
|
||||
$options['keep_roles_and_enrolments'] = $this->get_setting_value('keep_roles_and_enrolments');
|
||||
$options['keep_groups_and_groupings'] = $this->get_setting_value('keep_groups_and_groupings');
|
||||
restore_dbops::delete_course_content($this->controller->get_courseid(), $options);
|
||||
}
|
||||
$this->controller->execute_plan();
|
||||
$this->progress = self::PROGRESS_EXECUTED;
|
||||
|
||||
@@ -27,24 +27,4 @@ M.core_backup.watch_cancel_buttons = function(config) {
|
||||
});
|
||||
}
|
||||
|
||||
M.core_backup.watch_newcoursecontinue_buttons = function(config) {
|
||||
Y.all('.newcoursecontinue').each(function(){
|
||||
this._confirmationListener = this._confirmationListener || this.on('click', function(e){
|
||||
// Prevent the default event (sumbit) from firing
|
||||
e.preventDefault();
|
||||
// Create the confirm box
|
||||
var confirm = new M.core.confirm(config);
|
||||
// If the user clicks yes
|
||||
confirm.on('complete-yes', function(e){
|
||||
// Detach the listener for the confirm box so it doesn't fire again.
|
||||
this._confirmationListener.detach();
|
||||
// Simulate the original cancel button click
|
||||
this.simulate('click');
|
||||
}, this);
|
||||
// Show the confirm box
|
||||
confirm.show();
|
||||
}, this);
|
||||
});
|
||||
}
|
||||
|
||||
}, '@VERSION@', {'requires':['base','node','node-event-simulate','moodle-enrol-notification']});
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage activity_modules
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_activity_modules'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage admin_bookmarks
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_admin_bookmarks'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009071700;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage blog_menu
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_blog_menu'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009070900;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage blog_recent
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_blog_recent'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage blog_tags
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_blog_tags'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage calendar_moth
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_calendar_month'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage calendar_upcoming
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_calendar_upcoming'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -74,7 +74,7 @@ class block_comments extends block_base {
|
||||
$args->linktext = get_string('showcomments');
|
||||
$args->notoggle = true;
|
||||
$args->autostart = true;
|
||||
$args->displaycancel = true;
|
||||
$args->displaycancel = false;
|
||||
$comment = new comment($args);
|
||||
$comment->set_view_permission(true);
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009072000;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage comments
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_comments'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -193,6 +193,8 @@ class block_community_renderer extends plugin_renderer_base {
|
||||
|
||||
|
||||
//Create course content html
|
||||
$blocks = get_plugin_list('block');
|
||||
$activities = get_plugin_list('mod');
|
||||
if (!empty($course->contents)) {
|
||||
$activitieshtml = '';
|
||||
$blockhtml = '';
|
||||
@@ -202,14 +204,22 @@ class block_community_renderer extends plugin_renderer_base {
|
||||
if (!empty($blockhtml)) {
|
||||
$blockhtml .= ' - ';
|
||||
}
|
||||
$blockhtml .= get_string('pluginname', 'block_' . $content->modulename)
|
||||
. " (" . $content->contentcount . ")";
|
||||
if (array_key_exists($content->modulename, $blocks)) {
|
||||
$blockname = get_string('pluginname', 'block_' . $content->modulename);
|
||||
} else {
|
||||
$blockname = $content->modulename;
|
||||
}
|
||||
$blockhtml .= $blockname . " (" . $content->contentcount . ")";
|
||||
} else {
|
||||
if (!empty($activitieshtml)) {
|
||||
$activitieshtml .= ' - ';
|
||||
}
|
||||
$activitieshtml .= get_string('modulename', $content->modulename)
|
||||
. " (" . $content->contentcount . ")";
|
||||
if (array_key_exists($content->modulename, $activities)) {
|
||||
$activityname = get_string('modulename', $content->modulename);
|
||||
} else {
|
||||
$activityname = $content->modulename;
|
||||
}
|
||||
$activitieshtml .= $activityname . " (" . $content->contentcount . ")";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2010042701;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage community
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_community'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011110300;
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_completionstatus';
|
||||
$plugin->dependencies = array('report_completion' => 2011110200);
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage course_list
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_course_list'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2010021100;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage course_overview
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_course_overview'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage course_summary
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_course_summary'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2010050200;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage feedback
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_feedback'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage glossary_random
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_glossary_random'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
+14
-2
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2010071900;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage html
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_html'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage login
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_login'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage mentees
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_mentees'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage messages
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_messages'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -16,7 +15,16 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Network servers block version is defined in this file
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage mnet_hosts
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$plugin->version = 2010112900;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_mnet_hosts'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -26,4 +26,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2009123100;
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_myprofile'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2010091400;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage navigation
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_navigation'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage news_items
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_news_items'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101510;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage online_users
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_online_users'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage participants
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_participants'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2010030100;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage private_files
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_private_files'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -24,10 +23,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
$plugin->version = 2011100300;
|
||||
$plugin->requires = 2011091600;
|
||||
$plugin->component = 'block_quiz_results';
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_quiz_results'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage recent_activity
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_recent_activity'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,5 +14,18 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009072901;
|
||||
$plugin->cron = 300; /// Set min time between cron executions to 300 secs (5 mins)
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage rss_client
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_rss_client'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 300; // Set min time between cron executions to 300 secs (5 mins)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101509;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage search_forums
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_search_forums'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -55,6 +55,7 @@ class block_section_links extends block_base {
|
||||
if(isset($this->config)){
|
||||
$config = $this->config;
|
||||
} else{
|
||||
// TODO: Move these config settings to proper ones using component name
|
||||
$config = get_config('blocks/section_links');
|
||||
}
|
||||
|
||||
@@ -155,7 +156,8 @@ class block_section_links extends block_base {
|
||||
}
|
||||
function before_delete() {
|
||||
global $DB;
|
||||
$DB->delete_records('config_plugins', 'plugin', 'blocks/section_links');
|
||||
// TODO: Move these config settings to proper ones using component name
|
||||
$DB->delete_records('config_plugins', array('plugin' => 'blocks/section_links'));
|
||||
}
|
||||
|
||||
function has_config() {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2007101511;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage section_links
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_section_links'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -15,4 +14,17 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$plugin->version = 2009072800;
|
||||
/**
|
||||
* Version details
|
||||
*
|
||||
* @package block
|
||||
* @subpackage selfcompletion
|
||||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2011112900; // Requires this Moodle version
|
||||
$plugin->component = 'block_selfcompletion'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user