Compare commits
602 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cbb12cf972 | |||
| 86290203d9 | |||
| c82c32ccaf | |||
| c49b7392a8 | |||
| 87cf7ea783 | |||
| 7b1750734c | |||
| 356e2b500f | |||
| 3a0fe18ddf | |||
| eb103862bb | |||
| de23ec6438 | |||
| 32bfcdd502 | |||
| edec209469 | |||
| 3fb1177ff6 | |||
| 88b51a719e | |||
| 1c72f3bd84 | |||
| 4f55378528 | |||
| a8100d24a6 | |||
| 3d1559fe23 | |||
| e350963c83 | |||
| 0d1dbd6967 | |||
| 36da7ed5df | |||
| 7b9e0cd78c | |||
| 2474203e2b | |||
| 18fd289e63 | |||
| 9f213270f6 | |||
| 0b60fbac61 | |||
| fc7c554de6 | |||
| 759ad16cc7 | |||
| b95c8cc1d4 | |||
| aecb3a8a78 | |||
| b1db14efe1 | |||
| 54c236dff8 | |||
| b40036ac66 | |||
| 1ac5b0ad16 | |||
| 8e2b2206f4 | |||
| 55abae4375 | |||
| 0ba77acca6 | |||
| e1dd8c529c | |||
| 2093a0c3c3 | |||
| 079364c25f | |||
| 887b6d9599 | |||
| fa6b2edf7b | |||
| 962f036b0f | |||
| cd8f20d26a | |||
| 854159f747 | |||
| 77cb09867c | |||
| 7529b398a7 | |||
| 3a986edd89 | |||
| 090a5f635d | |||
| 22c1afc8f9 | |||
| 29d5e81473 | |||
| fadb971dde | |||
| c65b3a048e | |||
| d756385a0c | |||
| ca2e480fb1 | |||
| 902f5d70a7 | |||
| 0be9bb55c4 | |||
| c209ffaef3 | |||
| f3f09491c8 | |||
| cd829c9077 | |||
| cab5304902 | |||
| 99df9ea8ad | |||
| 9ce818b6d7 | |||
| 6209efbb2c | |||
| ef7c73d5d8 | |||
| f7ef99e59e | |||
| b87b72955f | |||
| 8dbc9cf753 | |||
| c5cb333a38 | |||
| d4ce5e6e2d | |||
| b47ef00098 | |||
| 863d00ca29 | |||
| 7fe7fd5da7 | |||
| 02e539c462 | |||
| 6d1ebb59dd | |||
| d2f7fe83bd | |||
| 9bf7f10834 | |||
| f830a2d729 | |||
| e670f3e8c2 | |||
| 8ddf23ed3b | |||
| 8d296ea5e4 | |||
| 17e37c57e4 | |||
| 94e36bc01f | |||
| ffbb1a21c3 | |||
| 0ba744205e | |||
| 627dc76546 | |||
| 1a07c564c8 | |||
| 0a7afb8746 | |||
| 392c581c45 | |||
| 77182cd299 | |||
| a251526d72 | |||
| a5a4a5ea1e | |||
| 7d2b47d265 | |||
| 6d8558ed06 | |||
| c76c989420 | |||
| 1adad7f783 | |||
| e13acecad7 | |||
| 490bf4e84f | |||
| 919a40f31c | |||
| de42137285 | |||
| 16b73cf30d | |||
| fcbba30ad4 | |||
| 4e286e58a3 | |||
| fb17d60fde | |||
| 0b8f6159b2 | |||
| 2624a2edf4 | |||
| 1d5932bf44 | |||
| d89ca90ca6 | |||
| 2928ac025c | |||
| b19d21e26b | |||
| c55a7ac5b0 | |||
| d158acc4ff | |||
| 4010b22051 | |||
| d306f96750 | |||
| 410899e3b2 | |||
| 6005edc60f | |||
| a2e47d596a | |||
| c209e59206 | |||
| d80a7da7c1 | |||
| 80178c1c9e | |||
| 3553982d6d | |||
| 6420fea64b | |||
| 66d0022594 | |||
| 78fa55b23e | |||
| 7aec80dd9e | |||
| 319b329367 | |||
| 3ad26c86eb | |||
| d71021f601 | |||
| ade9bbc32e | |||
| 30b38ce4fa | |||
| f49cd5fcd8 | |||
| 62c4ccef0e | |||
| df86b97f1a | |||
| 35c70d0425 | |||
| 7fb1afbb38 | |||
| 4dac72bcc8 | |||
| 0b79440ddf | |||
| a971dd3992 | |||
| 5d447145ba | |||
| 1691794cb1 | |||
| 5838cbd4ff | |||
| d63b6cf619 | |||
| dc7d68880a | |||
| eabe1d3b6b | |||
| 4ea0abedb0 | |||
| c5338156c5 | |||
| db1a0b53c5 | |||
| e456edf9b7 | |||
| eb38cf2d7a | |||
| 1d26199125 | |||
| 3a2ad025e1 | |||
| f3358600e7 | |||
| 3343cd5d92 | |||
| 610f07c288 | |||
| d5bba86435 | |||
| da297e7390 | |||
| 0ec8a329bc | |||
| bb059c31ad | |||
| 61603bb034 | |||
| 885c3f5824 | |||
| 0a4dcf2ad7 | |||
| 1735fbc1ef | |||
| 94be2b5074 | |||
| 628e0528e8 | |||
| b87dc0e925 | |||
| f83cd734f9 | |||
| ad6976aae5 | |||
| 16b143ef22 | |||
| 206db13c8e | |||
| 92df65aedd | |||
| f296df5125 | |||
| 663e3ce8b2 | |||
| f3369f1607 | |||
| bf4a95e6a3 | |||
| 1cb1157809 | |||
| 4908daf0c1 | |||
| 969e5b51a0 | |||
| 4abc48ac46 | |||
| 7e05737fb4 | |||
| a07b82a9bb | |||
| a6ce14dfb5 | |||
| 3ffbbeea7c | |||
| 5e8de26794 | |||
| 330ae1764f | |||
| 7072c3cdc6 | |||
| f2f5e4dd44 | |||
| f21e4e5b5f | |||
| 03cfbefbff | |||
| c47cd3442f | |||
| 92b8d952f1 | |||
| 62f0d51b4f | |||
| e5c2e2cfab | |||
| 22be561eb6 | |||
| 94572e5c93 | |||
| 7b21fa1712 | |||
| 3454eea93e | |||
| 5f83d3d3d6 | |||
| db70e53773 | |||
| 6bc6ddd29d | |||
| 5f7c57ef85 | |||
| 09773eca4e | |||
| 4f8af9cbdf | |||
| 337c63aac4 | |||
| 266a68e840 | |||
| 7b78c24ba0 | |||
| d49e53b39f | |||
| 459b4e96a1 | |||
| db728b8e59 | |||
| b34fdf7d1f | |||
| 83165bec0b | |||
| 00e4ad0d17 | |||
| a3ccd8e86e | |||
| 2fd690e4b8 | |||
| 1a3e7ab0d3 | |||
| 417dbe3840 | |||
| dbe006d468 | |||
| 39d0fe3693 | |||
| e4b771cf0d | |||
| 8feae80284 | |||
| 9b61ac3fdc | |||
| 449f2f9b18 | |||
| 8d148dd866 | |||
| 3db65127c3 | |||
| 689ba48b00 | |||
| ee2e56ee9e | |||
| c5fd8a39f2 | |||
| 323af23325 | |||
| cf697e3406 | |||
| 8deed6fdc5 | |||
| ce7e354ae5 | |||
| 25534fde40 | |||
| 85b320becb | |||
| ec928e8c14 | |||
| be5a3e6117 | |||
| 4aa5c142a1 | |||
| b2bcd0ff35 | |||
| 6ce0c9ce42 | |||
| 5c713da067 | |||
| f7da02f3b0 | |||
| 7621b70368 | |||
| dc3d236a4b | |||
| 4a19404d65 | |||
| 06535ae415 | |||
| c36e4e6ed8 | |||
| 748524f1b6 | |||
| f23331836d | |||
| 96b821e126 | |||
| 6d5bcdebf1 | |||
| 5724b42c03 | |||
| 0a18bd17cc | |||
| 1b0528adf0 | |||
| 7e8514c5fd | |||
| 95f982b0ac | |||
| 342dc2025c | |||
| 612dc9f648 | |||
| 98a0a2faaa | |||
| 2b6e9bd10a | |||
| 2d0669e775 | |||
| aaea60dea0 | |||
| 4126c81e32 | |||
| 166e25fec7 | |||
| edcb7a0bc6 | |||
| aa108f6125 | |||
| 7f943085cd | |||
| 8210b61ff7 | |||
| 1318bf1bff | |||
| d981c4b0fa | |||
| cb3ab31fde | |||
| 6062d3f0bc | |||
| 81fe100cf8 | |||
| 23dc9305c7 | |||
| d35705102c | |||
| ad28e1b6a3 | |||
| 239eb7e230 | |||
| 10fcc48782 | |||
| 02890b991a | |||
| 7627b9999c | |||
| 77947f22ff | |||
| 832db2f18f | |||
| ae55874269 | |||
| 73c6550ddb | |||
| 93cbd15ec8 | |||
| fb46297f52 | |||
| f0d8c53ae0 | |||
| f26acbbf5b | |||
| 25dba50b9d | |||
| 63e314128b | |||
| 56e69c6188 | |||
| 6250057612 | |||
| c9827a9135 | |||
| 13a322f4b6 | |||
| 2e97c22310 | |||
| 05933e48dc | |||
| a2d06016f4 | |||
| c0f177f19c | |||
| 4a727367e7 | |||
| f6735ae534 | |||
| 48265a6549 | |||
| e4e1bd900a | |||
| 6185fa79e7 | |||
| ccc0b20a8f | |||
| ee87608e1a | |||
| cc2fb80742 | |||
| 50269914ce | |||
| be6281e2cb | |||
| 1fc34e37fd | |||
| 667eaec4d2 | |||
| 9dc1f6856e | |||
| 7f8cc6f777 | |||
| 926e6170ce | |||
| ce3fa5931d | |||
| 8aa12adcf2 | |||
| b26066bf68 | |||
| 9705bfa84f | |||
| 152a040acd | |||
| 6f9e83e892 | |||
| bf5f227817 | |||
| 700b5b679e | |||
| c6b1ff865f | |||
| 0edd01e943 | |||
| 4b5dcd72d5 | |||
| 28772fb9e7 | |||
| 14b536dd6f | |||
| d270524855 | |||
| ee439acb1e | |||
| b8401ee7ac | |||
| 955a081e3a | |||
| a035b96fd5 | |||
| 55157bfc2e | |||
| fc282e4ab3 | |||
| 3565867b4f | |||
| 100da2dcfb | |||
| b4eeee49cd | |||
| ed8772d0f5 | |||
| 6679bfdbd3 | |||
| 6d28ff14f0 | |||
| b67bb742a0 | |||
| b908e2fcd9 | |||
| ec6ca49767 | |||
| fc9fedb375 | |||
| c8c3599cf4 | |||
| 0fabc84119 | |||
| c5602897c1 | |||
| 70d7e35499 | |||
| 76645b7e6c | |||
| 6f0a4b8f24 | |||
| 53095b7ebe | |||
| 2d1fd9e244 | |||
| abd110f8f9 | |||
| ff198ea740 | |||
| c738cc946f | |||
| 6137bc9ca2 | |||
| 81c19f4d1f | |||
| f89ca0ea6e | |||
| 48c8137388 | |||
| b6bfe3b35c | |||
| 55d2126310 | |||
| 8617a082bb | |||
| c9b3e9eb23 | |||
| c1163a13fe | |||
| 7281117d6e | |||
| 10abf35eac | |||
| 6b8f82e412 | |||
| c594709cf4 | |||
| cfbf324052 | |||
| ff01692765 | |||
| ff6479d21c | |||
| 46295524d7 | |||
| 12091f27cf | |||
| fa15dda773 | |||
| 8cee951622 | |||
| 503630ed47 | |||
| de0917ef7f | |||
| b748564398 | |||
| d0fc4cf539 | |||
| 5ddfd45539 | |||
| e46515bd83 | |||
| e47a7b904c | |||
| dc67a0e9b6 | |||
| 81d6802709 | |||
| d3c575bd6f | |||
| 08a1a195b4 | |||
| e206f3ffcb | |||
| 5402f64623 | |||
| 70f7ea9327 | |||
| e1aaddef66 | |||
| 018e8a9ad4 | |||
| 2a6c9c1536 | |||
| 50590afe38 | |||
| 092f45148a | |||
| d9c557099c | |||
| 161f4e0d79 | |||
| 3c9175acb2 | |||
| c464052692 | |||
| 5e00b9a6e7 | |||
| 4b9ae9e997 | |||
| cddf19fccd | |||
| 9a6230c822 | |||
| c8b33aa772 | |||
| f8028c2f30 | |||
| 6b59b89a1b | |||
| b5163c5132 | |||
| b4eb152f69 | |||
| 5312d1fbeb | |||
| 3c719fafc5 | |||
| c7f7ad249d | |||
| 9d34eba78d | |||
| 7d7824b0c1 | |||
| 54f03faba2 | |||
| ced8b30bd5 | |||
| 42f64a01c7 | |||
| cf473c2189 | |||
| 5c728f6303 | |||
| cbf837ce04 | |||
| 18646a683b | |||
| d519be4dab | |||
| 472ec72b2a | |||
| 8f6894b5f1 | |||
| 50a40aed52 | |||
| 8be4f7da65 | |||
| d56837de60 | |||
| dd8e2dde96 | |||
| cd8dbd11a2 | |||
| a5ce56011a | |||
| ce51cb98a6 | |||
| 32f2cceecc | |||
| ef8d4d590c | |||
| 534707ff8d | |||
| ec934409e6 | |||
| 387dc90072 | |||
| 17c980cc80 | |||
| 35c4301b2c | |||
| 770e8c02db | |||
| fd33a80fa1 | |||
| f7f4494fb7 | |||
| c7ed914077 | |||
| d84477702d | |||
| 7f96a4dffe | |||
| 1b08751cfa | |||
| 38b18a142c | |||
| 726e41abaa | |||
| d3b880b578 | |||
| 7bfe54c41c | |||
| 595ef991ee | |||
| 0b4c2c04f9 | |||
| d110758759 | |||
| dce8cb0576 | |||
| 7b9df2353c | |||
| 2a564dc2bf | |||
| bec7d18248 | |||
| bf944109f0 | |||
| 932d87f841 | |||
| f3d49933b0 | |||
| 557383cd94 | |||
| 3b89216c24 | |||
| b3e792b946 | |||
| ea6ef858f5 | |||
| c01f9e8bc1 | |||
| 7d042f6734 | |||
| 2967681e64 | |||
| aeacefdb19 | |||
| b93ca5a53d | |||
| 70c3c66943 | |||
| 59b50da6e9 | |||
| 650e0141fe | |||
| 112bb36c24 | |||
| e37db6dc17 | |||
| 1d05ecfd3e | |||
| fcb47c06b0 | |||
| 679620265a | |||
| 3848b9c8d5 | |||
| 0f16db943c | |||
| 0992cee1de | |||
| 7cfccbb148 | |||
| f3da6ac7aa | |||
| 1b9d0b9e3e | |||
| f80b096a5e | |||
| 75899ed480 | |||
| 39525889eb | |||
| a82871d4f7 | |||
| 0dec339211 | |||
| 2b705fc409 | |||
| c2217f57d0 | |||
| 7dc59651b0 | |||
| ad20106a0b | |||
| 68d6206d85 | |||
| d4aac8e4f6 | |||
| 7d253e0977 | |||
| 8318d25d49 | |||
| 927b7c29c8 | |||
| 3cee2ad262 | |||
| 3f8a77fb21 | |||
| a88b558c83 | |||
| f24fb2fec4 | |||
| 45d7974cc9 | |||
| 17dfe60da0 | |||
| 8cea78f500 | |||
| d82cef65c6 | |||
| d6868e54b8 | |||
| e53be83e10 | |||
| 772e6ab1bf | |||
| 2dc4d19f79 | |||
| 482823f2b6 | |||
| 8132e0f899 | |||
| c74325d17a | |||
| b4dcb723ff | |||
| ccf46ba2d9 | |||
| 13c708233e | |||
| 5a2c3ece38 | |||
| f6d596dd5d | |||
| 9efd33dc61 | |||
| 4984697c12 | |||
| e721f2dec8 | |||
| 4c31a15261 | |||
| aca26e0641 | |||
| 9821beacb6 | |||
| 642cbeec6b | |||
| 47b17f9123 | |||
| 470730c86b | |||
| 2ec0ba91b8 | |||
| 4c1689ba52 | |||
| ba7c052171 | |||
| 1a5d5334bf | |||
| 7e53f1a231 | |||
| c50107c847 | |||
| 97707318c3 | |||
| 1947345e42 | |||
| 4523bbba8f | |||
| 44ee5acee4 | |||
| 25e348d6aa | |||
| 3d2ec04484 | |||
| 8a95402f94 | |||
| e8eb6a1d50 | |||
| d196b17587 | |||
| 5320a265ab | |||
| 12b6eebf37 | |||
| eea80d257c | |||
| f54579f72a | |||
| e848bf1153 | |||
| 2e83fee85c | |||
| f466f71902 | |||
| 23149b2e13 | |||
| 8bb0c27f1b | |||
| 7c5fa92210 | |||
| 8dc10e915e | |||
| 3ea063fe7d | |||
| 4174fc1176 | |||
| 1fde603819 | |||
| 4f47ee6476 | |||
| 63308668d6 | |||
| 4b226f3b37 | |||
| d3a9460d57 | |||
| e004354787 | |||
| 4688b27ab3 | |||
| 417c261001 | |||
| e815163162 | |||
| 665f13c50c | |||
| 601054daca | |||
| a3a6b68ae9 | |||
| c2879b7db8 | |||
| 9146ab295d | |||
| 14742ceb73 | |||
| 7a4605ae62 | |||
| e250e9ae29 | |||
| a0b12848a4 | |||
| 07c65a6029 | |||
| 7849c44376 | |||
| e2c7333c2e | |||
| ecd68bf7b6 | |||
| b2b512671d | |||
| 6211a05866 | |||
| e24cb35c18 | |||
| dd8ec00067 | |||
| a3db3bfac0 | |||
| cf9b57d181 | |||
| 28896f12f7 | |||
| b100f948cb | |||
| 2de3def418 | |||
| 5a3ebd5ea6 | |||
| e40c3f7cc4 | |||
| 475ba4478d | |||
| 532c3d8803 | |||
| d312ce89e2 | |||
| 52a19fac1e | |||
| 682b737316 | |||
| b433c4cedf | |||
| 340cba5b22 | |||
| 2ffd3701f5 | |||
| e421b1524f | |||
| 0147d3da53 | |||
| d8a20b8828 | |||
| 77df5b724d | |||
| 951a9fcc67 | |||
| 95c7d1d076 | |||
| 831ecc9af3 | |||
| 42a42bcd46 | |||
| 1d19d5c219 | |||
| 14d6c90f81 | |||
| c1607b5378 | |||
| b5ef760c57 | |||
| f1192522c8 | |||
| 276d1134e2 |
@@ -0,0 +1,91 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* This script fixed incorrectly deleted users.
|
||||
*
|
||||
* @package core
|
||||
* @subpackage cli
|
||||
* @copyright 2013 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
define('CLI_SCRIPT', true);
|
||||
|
||||
require(__DIR__.'/../../config.php');
|
||||
require_once($CFG->libdir.'/clilib.php');
|
||||
|
||||
|
||||
// Now get cli options.
|
||||
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));
|
||||
}
|
||||
|
||||
if ($options['help']) {
|
||||
$help =
|
||||
"Fix incorrectly deleted users.
|
||||
|
||||
This scripts detects users that are marked as deleted instead
|
||||
of calling delete_user().
|
||||
|
||||
Deleted users do not have original username, idnumber or email,
|
||||
we must also delete all roles, enrolments, group memberships, etc.
|
||||
|
||||
Please note this script does not delete any public information
|
||||
such as forum posts.
|
||||
|
||||
Options:
|
||||
-h, --help Print out this help
|
||||
|
||||
Example:
|
||||
\$sudo -u www-data /usr/bin/php admin/cli/fix_deleted_users.php
|
||||
";
|
||||
|
||||
echo $help;
|
||||
die;
|
||||
}
|
||||
|
||||
cli_heading('Looking for sloppy user deletes');
|
||||
|
||||
// Look for sloppy deleted users where somebody only flipped the deleted flag.
|
||||
$sql = "SELECT *
|
||||
FROM {user}
|
||||
WHERE deleted = 1 AND email LIKE '%@%' AND username NOT LIKE '%@%'";
|
||||
$rs = $DB->get_recordset_sql($sql);
|
||||
foreach ($rs as $user) {
|
||||
echo "Redeleting user $user->id: $user->username ($user->email)\n";
|
||||
delete_user($user);
|
||||
}
|
||||
|
||||
cli_heading('Deleting all leftovers');
|
||||
|
||||
$DB->set_field('user', 'idnumber', '', array('deleted'=>1));
|
||||
|
||||
$DB->delete_records_select('role_assignments', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
|
||||
$DB->delete_records_select('cohort_members', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
|
||||
$DB->delete_records_select('groups_members', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
|
||||
$DB->delete_records_select('user_enrolments', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
|
||||
$DB->delete_records_select('user_preferences', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
|
||||
$DB->delete_records_select('user_info_data', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
|
||||
$DB->delete_records_select('user_lastaccess', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
|
||||
$DB->delete_records_select('external_tokens', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
|
||||
$DB->delete_records_select('external_services_users', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
|
||||
|
||||
exit(0);
|
||||
+249
-20
@@ -227,7 +227,7 @@
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
@@ -237,7 +237,7 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="curlrequired" />
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
@@ -277,12 +277,12 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="splrequired" />
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
@@ -344,7 +344,7 @@
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
@@ -354,7 +354,7 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="curlrequired" />
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
@@ -394,12 +394,12 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="splrequired" />
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
@@ -454,7 +454,7 @@
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
@@ -464,7 +464,7 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="curlrequired" />
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
@@ -504,12 +504,12 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="splrequired" />
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
@@ -569,7 +569,7 @@
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
@@ -579,7 +579,7 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="curlrequired" />
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
@@ -619,12 +619,12 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="splrequired" />
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
@@ -685,7 +685,7 @@
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
@@ -695,7 +695,7 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="curlrequired" />
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
@@ -735,12 +735,12 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="splrequired" />
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
@@ -776,4 +776,233 @@
|
||||
</PHP_SETTING>
|
||||
</PHP_SETTINGS>
|
||||
</MOODLE>
|
||||
<MOODLE version="2.5" requires="2.2">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mysql" version="5.1.33" />
|
||||
<VENDOR name="postgres" version="8.3" />
|
||||
<VENDOR name="mssql" version="9.0" />
|
||||
<VENDOR name="odbc_mssql" version="9.0" />
|
||||
<VENDOR name="mssql_n" version="9.0" />
|
||||
<VENDOR name="oracle" version="10.2" />
|
||||
<VENDOR name="sqlite" version="2.0" />
|
||||
</DATABASE>
|
||||
<PHP version="5.3.3" level="required">
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="pcreunicodewarning" />
|
||||
</FEEDBACK>
|
||||
</PCREUNICODE>
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="mbstringrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="opensslrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="tokenizer" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="tokenizerrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xmlrpc" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="xmlrpcrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="soap" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="soaprecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="ctype" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ctyperequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="zip" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ziprequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="gd" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="gdrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="dom" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xml" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="intl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="intlrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="json" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="hash" level="required"/>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="40M" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="settingmemorylimit" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="safe_mode" value="0" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingsafemode" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="file_uploads" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingfileuploads" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
</PHP_SETTINGS>
|
||||
</MOODLE>
|
||||
<MOODLE version="2.6" requires="2.2">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mysql" version="5.1.33" />
|
||||
<VENDOR name="postgres" version="8.3" />
|
||||
<VENDOR name="mssql" version="9.0" />
|
||||
<VENDOR name="oracle" version="10.2" />
|
||||
</DATABASE>
|
||||
<PHP version="5.3.3" level="required">
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="pcreunicodewarning" />
|
||||
</FEEDBACK>
|
||||
</PCREUNICODE>
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="mbstringrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="opensslrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="tokenizer" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="tokenizerrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xmlrpc" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="xmlrpcrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="soap" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="soaprecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="ctype" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ctyperequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="zip" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ziprequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="gd" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="gdrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="dom" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xml" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="intl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="intlrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="json" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="hash" level="required"/>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="64M" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="settingmemorylimit" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="safe_mode" value="0" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingsafemode" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="file_uploads" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingfileuploads" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
</PHP_SETTINGS>
|
||||
</MOODLE>
|
||||
</COMPATIBILITY_MATRIX>
|
||||
|
||||
@@ -244,6 +244,8 @@ class site_registration_form extends moodleform {
|
||||
$questionsnumber = get_config('hub', 'site_questionsnumber_' . $cleanhuburl);
|
||||
$resourcesnumber = get_config('hub', 'site_resourcesnumber_' . $cleanhuburl);
|
||||
$mediancoursesize = get_config('hub', 'site_mediancoursesize_' . $cleanhuburl);
|
||||
$participantnumberaveragecfg = get_config('hub', 'site_participantnumberaverage_' . $cleanhuburl);
|
||||
$modulenumberaveragecfg = get_config('hub', 'site_modulenumberaverage_' . $cleanhuburl);
|
||||
|
||||
//hidden parameters
|
||||
$mform->addElement('hidden', 'huburl', $huburl);
|
||||
@@ -376,36 +378,36 @@ class site_registration_form extends moodleform {
|
||||
if (HUB_MOODLEORGHUBURL != $huburl) {
|
||||
$mform->addElement('checkbox', 'courses', get_string('sendfollowinginfo', 'hub'),
|
||||
" " . get_string('coursesnumber', 'hub', $coursecount));
|
||||
$mform->setDefault('courses', true);
|
||||
$mform->setDefault('courses', $coursesnumber != -1);
|
||||
$mform->addHelpButton('courses', 'sendfollowinginfo', 'hub');
|
||||
|
||||
$mform->addElement('checkbox', 'users', '',
|
||||
" " . get_string('usersnumber', 'hub', $usercount));
|
||||
$mform->setDefault('users', true);
|
||||
$mform->setDefault('users', $usersnumber != -1);
|
||||
|
||||
$mform->addElement('checkbox', 'roleassignments', '',
|
||||
" " . get_string('roleassignmentsnumber', 'hub', $roleassigncount));
|
||||
$mform->setDefault('roleassignments', true);
|
||||
$mform->setDefault('roleassignments', $roleassignmentsnumber != -1);
|
||||
|
||||
$mform->addElement('checkbox', 'posts', '',
|
||||
" " . get_string('postsnumber', 'hub', $postcount));
|
||||
$mform->setDefault('posts', true);
|
||||
$mform->setDefault('posts', $postsnumber != -1);
|
||||
|
||||
$mform->addElement('checkbox', 'questions', '',
|
||||
" " . get_string('questionsnumber', 'hub', $questioncount));
|
||||
$mform->setDefault('questions', true);
|
||||
$mform->setDefault('questions', $questionsnumber != -1);
|
||||
|
||||
$mform->addElement('checkbox', 'resources', '',
|
||||
" " . get_string('resourcesnumber', 'hub', $resourcecount));
|
||||
$mform->setDefault('resources', true);
|
||||
$mform->setDefault('resources', $resourcesnumber != -1);
|
||||
|
||||
$mform->addElement('checkbox', 'participantnumberaverage', '',
|
||||
" " . get_string('participantnumberaverage', 'hub', $participantnumberaverage));
|
||||
$mform->setDefault('participantnumberaverage', true);
|
||||
$mform->setDefault('participantnumberaverage', $participantnumberaveragecfg != -1);
|
||||
|
||||
$mform->addElement('checkbox', 'modulenumberaverage', '',
|
||||
" " . get_string('modulenumberaverage', 'hub', $modulenumberaverage));
|
||||
$mform->setDefault('modulenumberaverage', true);
|
||||
$mform->setDefault('modulenumberaverage', $modulenumberaveragecfg != -1);
|
||||
} else {
|
||||
$mform->addElement('static', 'courseslabel', get_string('sendfollowinginfo', 'hub'),
|
||||
" " . get_string('coursesnumber', 'hub', $coursecount));
|
||||
|
||||
@@ -62,7 +62,18 @@ $siteregistrationform = new site_registration_form('',
|
||||
$fromform = $siteregistrationform->get_data();
|
||||
|
||||
if (!empty($fromform) and confirm_sesskey()) {
|
||||
//save the settings
|
||||
|
||||
// Set to -1 all optional data marked as "don't send" by the admin.
|
||||
// The function get_site_info() will not calculate the optional data if config is set to -1.
|
||||
$inputnames = array('courses', 'users', 'roleassignments', 'posts', 'questions', 'resources',
|
||||
'modulenumberaverage', 'participantnumberaverage');
|
||||
foreach ($inputnames as $inputname) {
|
||||
if (empty($fromform->{$inputname})) {
|
||||
$fromform->{$inputname} = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Save the settings.
|
||||
$cleanhuburl = clean_param($huburl, PARAM_ALPHANUMEXT);
|
||||
set_config('site_name_' . $cleanhuburl, $fromform->name, 'hub');
|
||||
set_config('site_description_' . $cleanhuburl, $fromform->description, 'hub');
|
||||
@@ -113,6 +124,19 @@ if ($update and confirm_sesskey()) {
|
||||
if (!empty($fromform) and empty($update) and confirm_sesskey()) {
|
||||
|
||||
if (!empty($fromform) and confirm_sesskey()) { // if the register button has been clicked
|
||||
|
||||
// Retrieve the optional info (specially course number, user number, module number average...).
|
||||
$siteinfo = $registrationmanager->get_site_info($huburl);
|
||||
$fromform->courses = $siteinfo['courses'];
|
||||
$fromform->users = $siteinfo['users'];
|
||||
$fromform->enrolments = $siteinfo['enrolments'];
|
||||
$fromform->posts = $siteinfo['posts'];
|
||||
$fromform->questions = $siteinfo['questions'];
|
||||
$fromform->resources = $siteinfo['resources'];
|
||||
$fromform->modulenumberaverage = $siteinfo['modulenumberaverage'];
|
||||
$fromform->participantnumberaverage = $siteinfo['participantnumberaverage'];
|
||||
$fromform->street = $siteinfo['street'];
|
||||
|
||||
$params = (array) $fromform; //we are using the form input as the redirection parameters (token, url and name)
|
||||
|
||||
$unconfirmedhub = $registrationmanager->get_unconfirmedhub($huburl);
|
||||
|
||||
@@ -38,7 +38,7 @@ class core_register_renderer extends plugin_renderer_base {
|
||||
public function moodleorg_registration_message() {
|
||||
$moodleorgurl = html_writer::link('http://moodle.org', 'Moodle.org');
|
||||
$moodleorgstatsurl = html_writer::link('http://moodle.org/stats', get_string('statsmoodleorg', 'admin'));
|
||||
$moochurl = html_writer::link(HUB_MOODLEORGHUBURL, 'MOOCH');
|
||||
$moochurl = html_writer::link(HUB_MOODLEORGHUBURL, 'Moodle.net');
|
||||
$moodleorgregmsg = get_string('registermoodleorg', 'admin', $moodleorgurl);
|
||||
$items = array(get_string('registermoodleorgli1', 'admin'),
|
||||
get_string('registermoodleorgli2', 'admin', $moodleorgstatsurl),
|
||||
@@ -92,4 +92,4 @@ class core_register_renderer extends plugin_renderer_base {
|
||||
return html_writer::table($table);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ $lng = required_param('lng', PARAM_LANG);
|
||||
$currentpage = optional_param('p', 0, PARAM_INT);
|
||||
$translatorsubmitted = optional_param('translatorsubmitted', 0, PARAM_BOOL);
|
||||
|
||||
$PAGE->set_pagelayout('standard');
|
||||
$PAGE->set_pagelayout('report'); // Allows for wide page contents.
|
||||
$PAGE->set_url('/admin/tool/customlang/edit.php', array('lng' => $lng));
|
||||
navigation_node::override_active_url(new moodle_url('/admin/tool/customlang/index.php'));
|
||||
$PAGE->set_title(get_string('pluginname', 'tool_customlang'));
|
||||
|
||||
@@ -47,14 +47,16 @@ list($options, $unrecognized) = cli_get_params(
|
||||
)
|
||||
);
|
||||
|
||||
if (file_exists(__DIR__.'/../../../../vendor/autoload.php')) {
|
||||
if (file_exists(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/Autoload.php')) {
|
||||
// Composer packages present.
|
||||
require_once(__DIR__.'/../../../../vendor/autoload.php');
|
||||
}
|
||||
require_once(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/Autoload.php');
|
||||
|
||||
// Verify PHPUnit libs can be loaded.
|
||||
if (!include_once('PHPUnit/Autoload.php')) {
|
||||
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
|
||||
} else {
|
||||
// Verify PHPUnit PEAR libs can be loaded.
|
||||
if (!include('PHPUnit/Autoload.php')) {
|
||||
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
|
||||
}
|
||||
}
|
||||
|
||||
if ($options['run']) {
|
||||
|
||||
@@ -69,7 +69,7 @@ $string['showsearch'] = 'Show the search for test files.';
|
||||
$string['skip'] = 'Skip';
|
||||
$string['stacktrace'] = 'Stack trace:';
|
||||
$string['summary'] = '{$a->run}/{$a->total} test cases complete: <strong>{$a->passes}</strong> passes, <strong>{$a->fails}</strong> fails and <strong>{$a->exceptions}</strong> exceptions.';
|
||||
$string['tablesnotsetup'] = 'Unit test tables are not yet built. Do you want to build them now?.';
|
||||
$string['tablesnotsetup'] = 'Unit test tables are not yet built. Do you want to build them now?';
|
||||
$string['testdboperations'] = 'Test database operations';
|
||||
$string['testtablescsvfileunwritable'] = 'The test tables CSV file is not writable ({$a->filename})';
|
||||
$string['testtablesneedupgrade'] = 'The test DB tables need to be upgraded. Do you wish to proceed with the upgrade now?';
|
||||
|
||||
@@ -32,8 +32,9 @@
|
||||
//
|
||||
// hack by Vangelis Haniotakis to handle the absence of $_SERVER['REQUEST_URI'] in IIS
|
||||
//
|
||||
if (!isset($_SERVER['REQUEST_URI'])) {
|
||||
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
|
||||
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
|
||||
if (isset($_SERVER['QUERY_STRING'])) {
|
||||
$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -2160,7 +2160,7 @@ class CASClient
|
||||
if ($this->_cas_server_cert != '' && $this->_cas_server_ca_cert != '') {
|
||||
// This branch added by IDMS. Seems phpCAS implementor got a bit confused about the curl options CURLOPT_SSLCERT and CURLOPT_CAINFO
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
|
||||
curl_setopt($ch, CURLOPT_SSLCERT, $this->_cas_server_cert);
|
||||
curl_setopt($ch, CURLOPT_CAINFO, $this->_cas_server_ca_cert);
|
||||
curl_setopt($ch, CURLOPT_VERBOSE, '1');
|
||||
@@ -2172,7 +2172,7 @@ class CASClient
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
|
||||
curl_setopt($ch, CURLOPT_CAINFO, $this->_cas_server_ca_cert);
|
||||
} else {
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -549,6 +549,8 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
if ($user->firstaccess == 0) {
|
||||
$DB->set_field('user', 'firstaccess', time(), array('id'=>$user->id));
|
||||
}
|
||||
$euser = $DB->get_record('user', array('id' => $user->id));
|
||||
events_trigger('user_updated', $euser);
|
||||
return AUTH_CONFIRM_OK;
|
||||
}
|
||||
} else {
|
||||
@@ -710,6 +712,8 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
$updateuser->auth = 'nologin';
|
||||
$DB->update_record('user', $updateuser);
|
||||
echo "\t"; print_string('auth_dbsuspenduser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)); echo "\n";
|
||||
$euser = $DB->get_record('user', array('id' => $user->id));
|
||||
events_trigger('user_updated', $euser);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -735,6 +739,8 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
$updateuser->auth = $this->authtype;
|
||||
$DB->update_record('user', $updateuser);
|
||||
echo "\t"; print_string('auth_dbreviveduser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)); echo "\n";
|
||||
$euser = $DB->get_record('user', array('id' => $user->id));
|
||||
events_trigger('user_updated', $euser);
|
||||
}
|
||||
} else {
|
||||
print_string('nouserentriestorevive', 'auth_ldap');
|
||||
@@ -848,6 +854,8 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
|
||||
$id = $DB->insert_record('user', $user);
|
||||
echo "\t"; print_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)); echo "\n";
|
||||
$euser = $DB->get_record('user', array('id' => $id));
|
||||
events_trigger('user_created', $euser);
|
||||
if (!empty($this->config->forcechangepassword)) {
|
||||
set_user_preference('auth_forcepasswordchange', 1, $id);
|
||||
}
|
||||
@@ -918,6 +926,10 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($updatekeys)) {
|
||||
$euser = $DB->get_record('user', array('id' => $userid));
|
||||
events_trigger('user_updated', $euser);
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ class auth_plugin_radius extends auth_plugin_base {
|
||||
}
|
||||
|
||||
$result = $rauth->send();
|
||||
if (PEAR::isError($result)) {
|
||||
if ($rauth->isError($result)) {
|
||||
printf("Radius send failed: %s<br/>\n", $result->getMessage());
|
||||
exit;
|
||||
} else if ($result === true) {
|
||||
|
||||
@@ -1209,12 +1209,16 @@ class moodle1_file_manager implements loggable {
|
||||
*/
|
||||
public function migrate_file($sourcepath, $filepath = '/', $filename = null, $sortorder = 0, $timecreated = null, $timemodified = null) {
|
||||
|
||||
$sourcefullpath = $this->basepath.'/'.$sourcepath;
|
||||
// Normalise Windows paths a bit.
|
||||
$sourcepath = str_replace('\\', '/', $sourcepath);
|
||||
|
||||
if ($sourcefullpath !== clean_param($sourcefullpath, PARAM_PATH)) {
|
||||
throw new moodle1_convert_exception('file_invalid_path', $sourcefullpath);
|
||||
// PARAM_PATH must not be used on full OS path!
|
||||
if ($sourcepath !== clean_param($sourcepath, PARAM_PATH)) {
|
||||
throw new moodle1_convert_exception('file_invalid_path', $sourcepath);
|
||||
}
|
||||
|
||||
$sourcefullpath = $this->basepath.'/'.$sourcepath;
|
||||
|
||||
if (!is_readable($sourcefullpath)) {
|
||||
throw new moodle1_convert_exception('file_not_readable', $sourcefullpath);
|
||||
}
|
||||
|
||||
@@ -1764,6 +1764,10 @@ class backup_questions_structure_step extends backup_structure_step {
|
||||
$qhint = new backup_nested_element('question_hint', array('id'), array(
|
||||
'hint', 'hintformat', 'shownumcorrect', 'clearwrong', 'options'));
|
||||
|
||||
$tags = new backup_nested_element('tags');
|
||||
|
||||
$tag = new backup_nested_element('tag', array('id'), array('name', 'rawname'));
|
||||
|
||||
// Build the tree
|
||||
|
||||
$qcategories->add_child($qcategory);
|
||||
@@ -1772,6 +1776,9 @@ class backup_questions_structure_step extends backup_structure_step {
|
||||
$question->add_child($qhints);
|
||||
$qhints->add_child($qhint);
|
||||
|
||||
$question->add_child($tags);
|
||||
$tags->add_child($tag);
|
||||
|
||||
// Define the sources
|
||||
|
||||
$qcategory->set_source_sql("
|
||||
@@ -1791,6 +1798,12 @@ class backup_questions_structure_step extends backup_structure_step {
|
||||
ORDER BY id',
|
||||
array('questionid' => backup::VAR_PARENTID));
|
||||
|
||||
$tag->set_source_sql("SELECT t.id, t.name, t.rawname
|
||||
FROM {tag} t
|
||||
JOIN {tag_instance} ti ON ti.tagid = t.id
|
||||
WHERE ti.itemid = ?
|
||||
AND ti.itemtype = 'question'", array(backup::VAR_PARENTID));
|
||||
|
||||
// don't need to annotate ids nor files
|
||||
// (already done by {@link backup_annotate_all_question_files}
|
||||
|
||||
|
||||
@@ -74,6 +74,8 @@ class restore_course_task extends restore_task {
|
||||
// Restore course role assignments and overrides (internally will observe the role_assignments setting)
|
||||
$this->add_step(new restore_ras_and_caps_structure_step('course_ras_and_caps', 'roles.xml'));
|
||||
|
||||
$this->add_step(new restore_course_legacy_files_step('legacy_files'));
|
||||
|
||||
// Restore course enrolments (plugins and membership). Conditionally prevented for any IMPORT/HUB operation
|
||||
if ($this->plan->get_mode() != backup::MODE_IMPORT && $this->plan->get_mode() != backup::MODE_HUB) {
|
||||
$this->add_step(new restore_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
|
||||
|
||||
@@ -143,6 +143,9 @@ class restore_final_task extends restore_task {
|
||||
$rules[] = new restore_log_rule('course', 'report stats', 'report/stats/index.php?id={course}', '{course}');
|
||||
$rules[] = new restore_log_rule('course', 'view section', 'view.php?id={course}§ionid={course_section}', '{course_section}');
|
||||
|
||||
// module 'grade' rules
|
||||
$rules[] = new restore_log_rule('grade', 'update', 'report/grader/index.php?id={course}', null);
|
||||
|
||||
// module 'user' rules
|
||||
$rules[] = new restore_log_rule('user', 'view', 'view.php?id={user}&course={course}', '{user}');
|
||||
$rules[] = new restore_log_rule('user', 'change password', 'view.php?id={user}&course={course}', '{user}');
|
||||
|
||||
@@ -150,6 +150,11 @@ class restore_gradebook_structure_step extends restore_structure_step {
|
||||
if ($data->itemtype=='manual') {
|
||||
// manual grade items store category id in categoryid
|
||||
$data->categoryid = $this->get_mappingid('grade_category', $data->categoryid, NULL);
|
||||
// if mapping failed put in course's grade category
|
||||
if (NULL == $data->categoryid) {
|
||||
$coursecat = grade_category::fetch_course_category($this->get_courseid());
|
||||
$data->categoryid = $coursecat->id;
|
||||
}
|
||||
} else if ($data->itemtype=='course') {
|
||||
// course grade item stores their category id in iteminstance
|
||||
$coursecat = grade_category::fetch_course_category($this->get_courseid());
|
||||
@@ -1166,7 +1171,7 @@ class restore_section_structure_step extends restore_structure_step {
|
||||
// Otherwise, when you restore to an existing course, it will mess up
|
||||
// existing section availability entries.
|
||||
if (!$this->get_mappingid('course_sections_availability', $data->id, false)) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Update source cmid / grade id to new value.
|
||||
@@ -1179,7 +1184,12 @@ class restore_section_structure_step extends restore_structure_step {
|
||||
$data->gradeitemid = null;
|
||||
}
|
||||
|
||||
$DB->update_record('course_sections_availability', $data);
|
||||
// Delete the record if the condition wasn't found, otherwise update it.
|
||||
if ($data->sourcecmid === null && $data->gradeitemid === null) {
|
||||
$DB->delete_records('course_sections_availability', array('id' => $data->id));
|
||||
} else {
|
||||
$DB->update_record('course_sections_availability', $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1340,7 +1350,6 @@ class restore_course_structure_step extends restore_structure_step {
|
||||
|
||||
// Add course related files, without itemid to match
|
||||
$this->add_related_files('course', 'summary', null);
|
||||
$this->add_related_files('course', 'legacy', null);
|
||||
|
||||
// Deal with legacy allowed modules.
|
||||
if ($this->legacyrestrictmodules) {
|
||||
@@ -1367,6 +1376,29 @@ class restore_course_structure_step extends restore_structure_step {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Execution step that will migrate legacy files if present.
|
||||
*/
|
||||
class restore_course_legacy_files_step extends restore_execution_step {
|
||||
public function define_execution() {
|
||||
global $DB;
|
||||
|
||||
// Do a check for legacy files and skip if there are none.
|
||||
$sql = 'SELECT count(*)
|
||||
FROM {backup_files_temp}
|
||||
WHERE backupid = ?
|
||||
AND contextid = ?
|
||||
AND component = ?
|
||||
AND filearea = ?';
|
||||
$params = array($this->get_restoreid(), $this->task->get_old_contextid(), 'course', 'legacy');
|
||||
|
||||
if ($DB->count_records_sql($sql, $params)) {
|
||||
$DB->set_field('course', 'legacyfiles', 2, array('id' => $this->get_courseid()));
|
||||
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'course',
|
||||
'legacy', $this->task->get_old_contextid(), $this->task->get_userid());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Structure step that will read the roles.xml file (at course/activity/block levels)
|
||||
@@ -2843,10 +2875,13 @@ class restore_create_categories_and_questions extends restore_structure_step {
|
||||
$hint = new restore_path_element('question_hint',
|
||||
'/question_categories/question_category/questions/question/question_hints/question_hint');
|
||||
|
||||
$tag = new restore_path_element('tag',
|
||||
'/question_categories/question_category/questions/question/tags/tag');
|
||||
|
||||
// Apply for 'qtype' plugins optional paths at question level
|
||||
$this->add_plugin_structure('qtype', $question);
|
||||
|
||||
return array($category, $question, $hint);
|
||||
return array($category, $question, $hint, $tag);
|
||||
}
|
||||
|
||||
protected function process_question_category($data) {
|
||||
@@ -2993,6 +3028,29 @@ class restore_create_categories_and_questions extends restore_structure_step {
|
||||
$this->set_mapping('question_hint', $oldid, $newitemid);
|
||||
}
|
||||
|
||||
protected function process_tag($data) {
|
||||
global $CFG, $DB;
|
||||
|
||||
$data = (object)$data;
|
||||
$newquestion = $this->get_new_parentid('question');
|
||||
|
||||
if (!empty($CFG->usetags)) { // if enabled in server
|
||||
// TODO: This is highly inneficient. Each time we add one tag
|
||||
// we fetch all the existing because tag_set() deletes them
|
||||
// so everything must be reinserted on each call
|
||||
$tags = array();
|
||||
$existingtags = tag_get_tags('question', $newquestion);
|
||||
// Re-add all the existitng tags
|
||||
foreach ($existingtags as $existingtag) {
|
||||
$tags[] = $existingtag->rawname;
|
||||
}
|
||||
// Add the one being restored
|
||||
$tags[] = $data->rawname;
|
||||
// Send all the tags back to the question
|
||||
tag_set('question', $newquestion, $tags);
|
||||
}
|
||||
}
|
||||
|
||||
protected function after_execute() {
|
||||
global $DB;
|
||||
|
||||
|
||||
@@ -822,7 +822,7 @@ abstract class restore_dbops {
|
||||
* @return array of result object
|
||||
*/
|
||||
public static function send_files_to_pool($basepath, $restoreid, $component, $filearea, $oldcontextid, $dfltuserid, $itemname = null, $olditemid = null, $forcenewcontextid = null, $skipparentitemidctxmatch = false) {
|
||||
global $DB;
|
||||
global $DB, $CFG;
|
||||
|
||||
$results = array();
|
||||
|
||||
@@ -917,6 +917,12 @@ abstract class restore_dbops {
|
||||
|
||||
// create the file in the filepool if it does not exist yet
|
||||
if (!$fs->file_exists($newcontextid, $component, $filearea, $rec->newitemid, $file->filepath, $file->filename)) {
|
||||
|
||||
// If no license found, use default.
|
||||
if ($file->license == null){
|
||||
$file->license = $CFG->sitedefaultlicense;
|
||||
}
|
||||
|
||||
$file_record = array(
|
||||
'contextid' => $newcontextid,
|
||||
'component' => $component,
|
||||
|
||||
-95
@@ -26,101 +26,6 @@ defined('MOODLE_INTERNAL') || die();
|
||||
// Include all the needed stuff
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
|
||||
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
|
||||
|
||||
/**
|
||||
* Restore dbops tests (all).
|
||||
*/
|
||||
class restore_dbops_testcase extends advanced_testcase {
|
||||
|
||||
/**
|
||||
* Verify the xxx_ids_cached (in-memory backup_ids cache) stuff works as expected.
|
||||
*
|
||||
* Note that those private implementations are tested here by using the public
|
||||
* backup_ids API and later performing low-level tests.
|
||||
*/
|
||||
public function test_backup_ids_cached() {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager(); // We are going to use database_manager services.
|
||||
|
||||
$this->resetAfterTest(true); // Playing with temp tables, better reset once finished.
|
||||
|
||||
// Some variables and objects for testing.
|
||||
$restoreid = 'testrestoreid';
|
||||
|
||||
$mapping = new stdClass();
|
||||
$mapping->itemname = 'user';
|
||||
$mapping->itemid = 1;
|
||||
$mapping->newitemid = 2;
|
||||
$mapping->parentitemid = 3;
|
||||
$mapping->info = 'info';
|
||||
|
||||
// Create the backup_ids temp tables used by restore.
|
||||
restore_controller_dbops::create_restore_temp_tables($restoreid);
|
||||
|
||||
// Send one mapping using the public api with defaults.
|
||||
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
|
||||
// Get that mapping and verify everything is returned as expected.
|
||||
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
|
||||
$this->assertSame($mapping->itemname, $result->itemname);
|
||||
$this->assertSame($mapping->itemid, $result->itemid);
|
||||
$this->assertSame(0, $result->newitemid);
|
||||
$this->assertSame(null, $result->parentitemid);
|
||||
$this->assertSame(null, $result->info);
|
||||
|
||||
// Drop the backup_xxx_temp temptables manually, so memory cache won't be invalidated.
|
||||
$dbman->drop_table(new xmldb_table('backup_ids_temp'));
|
||||
$dbman->drop_table(new xmldb_table('backup_files_temp'));
|
||||
|
||||
// Verify the mapping continues returning the same info,
|
||||
// now from cache (the table does not exist).
|
||||
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
|
||||
$this->assertSame($mapping->itemname, $result->itemname);
|
||||
$this->assertSame($mapping->itemid, $result->itemid);
|
||||
$this->assertSame(0, $result->newitemid);
|
||||
$this->assertSame(null, $result->parentitemid);
|
||||
$this->assertSame(null, $result->info);
|
||||
|
||||
// Recreate the temp table, just to drop it using the restore API in
|
||||
// order to check that, then, the cache becomes invalid for the same request.
|
||||
restore_controller_dbops::create_restore_temp_tables($restoreid);
|
||||
restore_controller_dbops::drop_restore_temp_tables($restoreid);
|
||||
|
||||
// No cached info anymore, so the mapping request will arrive to
|
||||
// DB leading to error (temp table does not exist).
|
||||
try {
|
||||
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
|
||||
$this->fail('Expecting an exception, none occurred');
|
||||
} catch (Exception $e) {
|
||||
$this->assertTrue($e instanceof dml_exception);
|
||||
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
|
||||
}
|
||||
|
||||
// Create the backup_ids temp tables once more.
|
||||
restore_controller_dbops::create_restore_temp_tables($restoreid);
|
||||
|
||||
// Send one mapping using the public api with complete values.
|
||||
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid,
|
||||
$mapping->newitemid, $mapping->parentitemid, $mapping->info);
|
||||
// Get that mapping and verify everything is returned as expected.
|
||||
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
|
||||
$this->assertSame($mapping->itemname, $result->itemname);
|
||||
$this->assertSame($mapping->itemid, $result->itemid);
|
||||
$this->assertSame($mapping->newitemid, $result->newitemid);
|
||||
$this->assertSame($mapping->parentitemid, $result->parentitemid);
|
||||
$this->assertSame($mapping->info, $result->info);
|
||||
|
||||
// Finally, drop the temp tables properly and get the DB error again (memory caches empty).
|
||||
restore_controller_dbops::drop_restore_temp_tables($restoreid);
|
||||
try {
|
||||
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
|
||||
$this->fail('Expecting an exception, none occurred');
|
||||
} catch (Exception $e) {
|
||||
$this->assertTrue($e instanceof dml_exception);
|
||||
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Backup dbops tests (all).
|
||||
@@ -0,0 +1,122 @@
|
||||
<?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_backup
|
||||
* @category phpunit
|
||||
* @copyright 2010 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();
|
||||
|
||||
// Include all the needed stuff
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
|
||||
|
||||
/**
|
||||
* Restore dbops tests (all).
|
||||
*/
|
||||
class restore_dbops_testcase extends advanced_testcase {
|
||||
|
||||
/**
|
||||
* Verify the xxx_ids_cached (in-memory backup_ids cache) stuff works as expected.
|
||||
*
|
||||
* Note that those private implementations are tested here by using the public
|
||||
* backup_ids API and later performing low-level tests.
|
||||
*/
|
||||
public function test_backup_ids_cached() {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager(); // We are going to use database_manager services.
|
||||
|
||||
$this->resetAfterTest(true); // Playing with temp tables, better reset once finished.
|
||||
|
||||
// Some variables and objects for testing.
|
||||
$restoreid = 'testrestoreid';
|
||||
|
||||
$mapping = new stdClass();
|
||||
$mapping->itemname = 'user';
|
||||
$mapping->itemid = 1;
|
||||
$mapping->newitemid = 2;
|
||||
$mapping->parentitemid = 3;
|
||||
$mapping->info = 'info';
|
||||
|
||||
// Create the backup_ids temp tables used by restore.
|
||||
restore_controller_dbops::create_restore_temp_tables($restoreid);
|
||||
|
||||
// Send one mapping using the public api with defaults.
|
||||
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
|
||||
// Get that mapping and verify everything is returned as expected.
|
||||
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
|
||||
$this->assertSame($mapping->itemname, $result->itemname);
|
||||
$this->assertSame($mapping->itemid, $result->itemid);
|
||||
$this->assertSame(0, $result->newitemid);
|
||||
$this->assertSame(null, $result->parentitemid);
|
||||
$this->assertSame(null, $result->info);
|
||||
|
||||
// Drop the backup_xxx_temp temptables manually, so memory cache won't be invalidated.
|
||||
$dbman->drop_table(new xmldb_table('backup_ids_temp'));
|
||||
$dbman->drop_table(new xmldb_table('backup_files_temp'));
|
||||
|
||||
// Verify the mapping continues returning the same info,
|
||||
// now from cache (the table does not exist).
|
||||
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
|
||||
$this->assertSame($mapping->itemname, $result->itemname);
|
||||
$this->assertSame($mapping->itemid, $result->itemid);
|
||||
$this->assertSame(0, $result->newitemid);
|
||||
$this->assertSame(null, $result->parentitemid);
|
||||
$this->assertSame(null, $result->info);
|
||||
|
||||
// Recreate the temp table, just to drop it using the restore API in
|
||||
// order to check that, then, the cache becomes invalid for the same request.
|
||||
restore_controller_dbops::create_restore_temp_tables($restoreid);
|
||||
restore_controller_dbops::drop_restore_temp_tables($restoreid);
|
||||
|
||||
// No cached info anymore, so the mapping request will arrive to
|
||||
// DB leading to error (temp table does not exist).
|
||||
try {
|
||||
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
|
||||
$this->fail('Expecting an exception, none occurred');
|
||||
} catch (Exception $e) {
|
||||
$this->assertTrue($e instanceof dml_exception);
|
||||
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
|
||||
}
|
||||
|
||||
// Create the backup_ids temp tables once more.
|
||||
restore_controller_dbops::create_restore_temp_tables($restoreid);
|
||||
|
||||
// Send one mapping using the public api with complete values.
|
||||
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid,
|
||||
$mapping->newitemid, $mapping->parentitemid, $mapping->info);
|
||||
// Get that mapping and verify everything is returned as expected.
|
||||
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
|
||||
$this->assertSame($mapping->itemname, $result->itemname);
|
||||
$this->assertSame($mapping->itemid, $result->itemid);
|
||||
$this->assertSame($mapping->newitemid, $result->newitemid);
|
||||
$this->assertSame($mapping->parentitemid, $result->parentitemid);
|
||||
$this->assertSame($mapping->info, $result->info);
|
||||
|
||||
// Finally, drop the temp tables properly and get the DB error again (memory caches empty).
|
||||
restore_controller_dbops::drop_restore_temp_tables($restoreid);
|
||||
try {
|
||||
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
|
||||
$this->fail('Expecting an exception, none occurred');
|
||||
} catch (Exception $e) {
|
||||
$this->assertTrue($e instanceof dml_exception);
|
||||
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -521,6 +521,15 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
$url = $component->get_url();
|
||||
|
||||
$output = html_writer::start_tag('div', array('class' => 'restore-course-search'));
|
||||
|
||||
$countstr = '';
|
||||
if ($component->has_more_results()) {
|
||||
$countstr = get_string('morecoursesearchresults', 'backup', $component->get_count());
|
||||
} else {
|
||||
$countstr = get_string('totalcoursesearchresults', 'backup', $component->get_count());
|
||||
}
|
||||
|
||||
$output .= html_writer::tag('div', $countstr, array('class'=>'rcs-totalresults'));
|
||||
$output .= html_writer::start_tag('div', array('class' => 'rcs-results'));
|
||||
|
||||
$table = new html_table();
|
||||
@@ -590,8 +599,14 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
return $output;
|
||||
}
|
||||
|
||||
$output .= html_writer::tag('div', get_string('totalcoursesearchresults', 'backup', $component->get_count()), array('class'=>'ics-totalresults'));
|
||||
$countstr = '';
|
||||
if ($component->has_more_results()) {
|
||||
$countstr = get_string('morecoursesearchresults', 'backup', $component->get_count());
|
||||
} else {
|
||||
$countstr = get_string('totalcoursesearchresults', 'backup', $component->get_count());
|
||||
}
|
||||
|
||||
$output .= html_writer::tag('div', $countstr, array('class'=>'ics-totalresults'));
|
||||
$output .= html_writer::start_tag('div', array('class' => 'ics-results'));
|
||||
|
||||
$table = new html_table();
|
||||
@@ -610,6 +625,14 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
);
|
||||
$table->data[] = $row;
|
||||
}
|
||||
if ($component->has_more_results()) {
|
||||
$cell = new html_table_cell(get_string('moreresults', 'backup'));
|
||||
$cell->colspan = 3;
|
||||
$cell->attributes['class'] = 'notifyproblem';
|
||||
$row = new html_table_row(array($cell));
|
||||
$row->attributes['class'] = 'rcs-course';
|
||||
$table->data[] = $row;
|
||||
}
|
||||
$output .= html_writer::table($table);
|
||||
$output .= html_writer::end_tag('div');
|
||||
|
||||
|
||||
@@ -65,6 +65,11 @@ abstract class restore_search_base implements renderable {
|
||||
* @var array
|
||||
*/
|
||||
private $requiredcapabilities = array();
|
||||
/**
|
||||
* Indicates if we have more than maxresults found.
|
||||
* @var boolean
|
||||
*/
|
||||
private $hasmoreresults = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -177,7 +182,7 @@ abstract class restore_search_base implements renderable {
|
||||
foreach ($this->requiredcapabilities as $cap) {
|
||||
$requiredcaps[] = $cap['capability'];
|
||||
}
|
||||
// Iterate while we have records and haven't reached MAXRESULTS
|
||||
// Iterate while we have records and haven't reached $this->maxresults.
|
||||
while ($totalcourses > $offs and $this->totalcount < self::$MAXRESULTS) {
|
||||
$resultset = $DB->get_records_sql($sql, $params, $offs, $blocksz);
|
||||
foreach ($resultset as $result) {
|
||||
@@ -188,11 +193,14 @@ abstract class restore_search_base implements renderable {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$this->results[$result->id] = $result;
|
||||
$this->totalcount++;
|
||||
if ($this->totalcount >= self::$MAXRESULTS) {
|
||||
// Check if we are over the limit.
|
||||
if ($this->totalcount+1 > self::$MAXRESULTS) {
|
||||
$this->hasmoreresults = true;
|
||||
break;
|
||||
}
|
||||
// If not, then continue.
|
||||
$this->totalcount++;
|
||||
$this->results[$result->id] = $result;
|
||||
}
|
||||
$offs += $blocksz;
|
||||
}
|
||||
@@ -201,7 +209,10 @@ abstract class restore_search_base implements renderable {
|
||||
}
|
||||
|
||||
final public function has_more_results() {
|
||||
return $this->get_count() >= self::$MAXRESULTS;
|
||||
if ($this->results === null) {
|
||||
$this->search();
|
||||
}
|
||||
return $this->hasmoreresults;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -216,9 +216,9 @@ if (empty($completions)) {
|
||||
echo '(<i>';
|
||||
|
||||
if ($agg == COMPLETION_AGGREGATION_ALL) {
|
||||
echo strtolower(get_string('aggregateall', 'completion'));
|
||||
echo strtolower(get_string('all', 'completion'));
|
||||
} else {
|
||||
echo strtolower(get_string('aggregateany', 'completion'));
|
||||
echo strtolower(get_string('any', 'completion'));
|
||||
}
|
||||
|
||||
echo '</i> '.strtolower(get_string('required')).')';
|
||||
|
||||
@@ -329,7 +329,7 @@ class block_base {
|
||||
|
||||
/**
|
||||
* Subclasses should override this and return true if the
|
||||
* subclass block has a config_global.html file.
|
||||
* subclass block has a settings.php file.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
|
||||
+5
-1
@@ -340,11 +340,15 @@ BRANCH.prototype = {
|
||||
},
|
||||
/**
|
||||
* Attaches required events to the branch structure.
|
||||
*
|
||||
* @chainable
|
||||
* @method wire
|
||||
* @return {BRANCH} This function is chainable, it always returns itself.
|
||||
*/
|
||||
wire : function() {
|
||||
this.node = this.node || Y.one('#'+this.get('id'));
|
||||
if (!this.node) {
|
||||
return false;
|
||||
return this;
|
||||
}
|
||||
if (this.get('expandable')) {
|
||||
this.event_ajaxload = this.node.on('ajaxload|click', this.ajaxLoad, this);
|
||||
|
||||
@@ -84,15 +84,16 @@ if (!empty($rssrecord->preferredtitle)) {
|
||||
$feedtitle = $rss->get_title();
|
||||
}
|
||||
echo '<table align="center" width="50%" cellspacing="1">'."\n";
|
||||
echo '<tr><td colspan="2"><strong>'. $feedtitle .'</strong></td></tr>'."\n";
|
||||
echo '<tr><td colspan="2"><strong>'. s($feedtitle) .'</strong></td></tr>'."\n";
|
||||
foreach ($rss->get_items() as $item) {
|
||||
echo '<tr><td valign="middle">'."\n";
|
||||
echo '<a href="'. $item->get_link() .'" target="_blank"><strong>'. $item->get_title();
|
||||
echo '<a href="'.$item->get_link().'" target="_blank"><strong>';
|
||||
echo s($item->get_title());
|
||||
echo '</strong></a>'."\n";
|
||||
echo '</td>'."\n";
|
||||
echo '</tr>'."\n";
|
||||
echo '<tr><td colspan="2"><small>';
|
||||
echo $item->get_description() .'</small></td></tr>'."\n";
|
||||
echo format_text($item->get_description(), FORMAT_HTML) .'</small></td></tr>'."\n";
|
||||
}
|
||||
echo '</table>'."\n";
|
||||
|
||||
|
||||
+1
-7
@@ -183,13 +183,7 @@ if (!empty($userid)) {
|
||||
print_error('donothaveblog', 'blog');
|
||||
}
|
||||
} else {
|
||||
$personalcontext = get_context_instance(CONTEXT_USER, $userid);
|
||||
|
||||
if (!has_capability('moodle/blog:view', $sitecontext) && !has_capability('moodle/user:readuserblogs', $personalcontext)) {
|
||||
print_error('cannotviewuserblog', 'blog');
|
||||
}
|
||||
|
||||
if (!blog_user_can_view_user_entry($userid)) {
|
||||
if (!has_capability('moodle/blog:view', $sitecontext) || !blog_user_can_view_user_entry($userid)) {
|
||||
print_error('cannotviewcourseblog', 'blog');
|
||||
}
|
||||
|
||||
|
||||
+38
-15
@@ -65,35 +65,36 @@ function blog_user_can_view_user_entry($targetuserid, $blogentry=null) {
|
||||
global $CFG, $USER, $DB;
|
||||
|
||||
if (empty($CFG->bloglevel)) {
|
||||
return false; // blog system disabled
|
||||
return false; // Blog system disabled.
|
||||
}
|
||||
|
||||
if (isloggedin() && $USER->id == $targetuserid) {
|
||||
return true; // can view own entries in any case
|
||||
return true; // Can view own entries in any case.
|
||||
}
|
||||
|
||||
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
if (has_capability('moodle/blog:manageentries', $sitecontext)) {
|
||||
return true; // can manage all entries
|
||||
return true; // Can manage all entries.
|
||||
}
|
||||
|
||||
// coming for 1 entry, make sure it's not a draft
|
||||
// If blog is in draft state, then make sure user have proper capability.
|
||||
if ($blogentry && $blogentry->publishstate == 'draft' && !has_capability('moodle/blog:viewdrafts', $sitecontext)) {
|
||||
return false; // can not view draft of others
|
||||
return false; // Can not view draft of others.
|
||||
}
|
||||
|
||||
// coming for 0 entry, make sure user is logged in, if not a public blog
|
||||
// If blog entry is not public, make sure user is logged in.
|
||||
if ($blogentry && $blogentry->publishstate != 'public' && !isloggedin()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If blogentry is not passed or all above checks pass, then check capability based on system config.
|
||||
switch ($CFG->bloglevel) {
|
||||
case BLOG_GLOBAL_LEVEL:
|
||||
return true;
|
||||
break;
|
||||
|
||||
case BLOG_SITE_LEVEL:
|
||||
if (isloggedin()) { // not logged in viewers forbidden
|
||||
if (isloggedin()) { // Not logged in viewers forbidden.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -101,6 +102,7 @@ function blog_user_can_view_user_entry($targetuserid, $blogentry=null) {
|
||||
|
||||
case BLOG_USER_LEVEL:
|
||||
default:
|
||||
// If user is viewing other user blog, then user should have user:readuserblogs capability.
|
||||
$personalcontext = get_context_instance(CONTEXT_USER, $targetuserid);
|
||||
return has_capability('moodle/user:readuserblogs', $personalcontext);
|
||||
break;
|
||||
@@ -1001,6 +1003,8 @@ function blog_get_associated_count($courseid, $cmid=null) {
|
||||
* may have switch to turn on/off comments option, this callback will
|
||||
* affect UI display, not like pluginname_comment_validate only throw
|
||||
* exceptions.
|
||||
* blog_comment_validate will be called before viewing/adding/deleting
|
||||
* comment, so don't repeat checks.
|
||||
* Capability check has been done in comment->check_permissions(), we
|
||||
* don't need to do it again here.
|
||||
*
|
||||
@@ -1017,7 +1021,17 @@ function blog_get_associated_count($courseid, $cmid=null) {
|
||||
* @return array
|
||||
*/
|
||||
function blog_comment_permissions($comment_param) {
|
||||
return array('post'=>true, 'view'=>true);
|
||||
global $DB;
|
||||
|
||||
// If blog is public and current usre is guest, then don't let him post comments.
|
||||
$blogentry = $DB->get_record('post', array('id' => $comment_param->itemid), 'publishstate', MUST_EXIST);
|
||||
|
||||
if ($blogentry->publishstate != 'public') {
|
||||
if (!isloggedin() || isguestuser()) {
|
||||
return array('post' => false, 'view' => true);
|
||||
}
|
||||
}
|
||||
return array('post' => true, 'view' => true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1036,16 +1050,21 @@ function blog_comment_permissions($comment_param) {
|
||||
* @return boolean
|
||||
*/
|
||||
function blog_comment_validate($comment_param) {
|
||||
global $DB;
|
||||
// validate comment itemid
|
||||
if (!$entry = $DB->get_record('post', array('id'=>$comment_param->itemid))) {
|
||||
throw new comment_exception('invalidcommentitemid');
|
||||
global $CFG, $DB, $USER;
|
||||
|
||||
// Check if blogs are enabled user can comment.
|
||||
if (empty($CFG->bloglevel) || empty($CFG->blogusecomments)) {
|
||||
throw new comment_exception('nopermissiontocomment');
|
||||
}
|
||||
// validate comment area
|
||||
|
||||
// Validate comment area.
|
||||
if ($comment_param->commentarea != 'format_blog') {
|
||||
throw new comment_exception('invalidcommentarea');
|
||||
}
|
||||
// validation for comment deletion
|
||||
|
||||
$blogentry = $DB->get_record('post', array('id' => $comment_param->itemid), '*', MUST_EXIST);
|
||||
|
||||
// Validation for comment deletion.
|
||||
if (!empty($comment_param->commentid)) {
|
||||
if ($record = $DB->get_record('comments', array('id'=>$comment_param->commentid))) {
|
||||
if ($record->commentarea != 'format_blog') {
|
||||
@@ -1061,7 +1080,11 @@ function blog_comment_validate($comment_param) {
|
||||
throw new comment_exception('invalidcommentid');
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
// Validate if user has blog view permission.
|
||||
$sitecontext = context_system::instance();
|
||||
return has_capability('moodle/blog:view', $sitecontext) &&
|
||||
blog_user_can_view_user_entry($blogentry->userid, $blogentry);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+7
-4
@@ -214,11 +214,14 @@ class blog_entry {
|
||||
$contentcell->text .= $template['body'];
|
||||
$contentcell->text .= $attachedimages;
|
||||
|
||||
// Uniquehash is used as a link to an external blog
|
||||
if (!empty($this->uniquehash)) {
|
||||
$contentcell->text .= $OUTPUT->container_start('externalblog');
|
||||
$contentcell->text .= html_writer::link($this->uniquehash, get_string('linktooriginalentry', 'blog'));
|
||||
$contentcell->text .= $OUTPUT->container_end();
|
||||
// Uniquehash is used as a link to an external blog
|
||||
$url = clean_param($this->uniquehash, PARAM_URL);
|
||||
if (!empty($url)) {
|
||||
$contentcell->text .= $OUTPUT->container_start('externalblog');
|
||||
$contentcell->text .= html_writer::link($url, get_string('linktooriginalentry', 'blog'));
|
||||
$contentcell->text .= $OUTPUT->container_end();
|
||||
}
|
||||
}
|
||||
|
||||
// Links to tags
|
||||
|
||||
+2
-1
@@ -77,6 +77,7 @@ $search .= html_writer::start_tag('div');
|
||||
$search .= html_writer::label(get_string('searchcohort', 'cohort').':', 'cohort_search_q');
|
||||
$search .= html_writer::empty_tag('input', array('id'=>'cohort_search_q', 'type'=>'text', 'name'=>'search', 'value'=>$searchquery));
|
||||
$search .= html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('search', 'cohort')));
|
||||
$search .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'contextid', 'value'=>$contextid));
|
||||
$search .= html_writer::end_tag('div');
|
||||
$search .= html_writer::end_tag('form');
|
||||
echo $search;
|
||||
@@ -137,4 +138,4 @@ if ($manager) {
|
||||
echo $OUTPUT->single_button(new moodle_url('/cohort/edit.php', array('contextid'=>$context->id)), get_string('add'));
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
+1
-1
@@ -520,7 +520,7 @@ class comment {
|
||||
$c->format = $u->cformat;
|
||||
$c->timecreated = $u->ctimecreated;
|
||||
$url = new moodle_url('/user/view.php', array('id'=>$u->id, 'course'=>$this->courseid));
|
||||
$c->profileurl = $url->out(false);
|
||||
$c->profileurl = $url->out(true);
|
||||
$c->fullname = fullname($u);
|
||||
$c->time = userdate($c->timecreated, get_string('strftimerecent', 'langconfig'));
|
||||
$c->content = format_text($c->content, $c->format, $formatoptions);
|
||||
|
||||
@@ -61,6 +61,12 @@ $context = $PAGE->context;
|
||||
// And the object has been loaded for us no need for another DB call
|
||||
$category = $PAGE->category;
|
||||
|
||||
// This needs to match caps checked in can_edit_in_category below.
|
||||
$PAGE->set_other_editing_capability(array(
|
||||
'moodle/category:manage',
|
||||
'moodle/course:create'
|
||||
));
|
||||
|
||||
$canedit = can_edit_in_category($category->id);
|
||||
if ($canedit) {
|
||||
if ($categoryedit !== -1) {
|
||||
|
||||
@@ -51,7 +51,7 @@ function dndupload_add_to_course($course, $modnames) {
|
||||
// Add the javascript to the page.
|
||||
$jsmodule = array(
|
||||
'name' => 'coursedndupload',
|
||||
'fullpath' => new moodle_url('/course/dndupload.js'),
|
||||
'fullpath' => '/course/dndupload.js',
|
||||
'strings' => array(
|
||||
array('addfilehere', 'moodle'),
|
||||
array('dndworkingfiletextlink', 'moodle'),
|
||||
|
||||
+10
-1
@@ -130,6 +130,15 @@ class course_edit_form extends moodleform {
|
||||
if (!isset($max) || !is_numeric($max)) {
|
||||
$max = 52;
|
||||
}
|
||||
|
||||
// Increase the number of sections combo box values if the user has increased the number of sections
|
||||
// using the icon on the course page beyond course 'maxsections' or course 'maxsections' has been
|
||||
// reduced below the number of sections already set for the course on the site administration course
|
||||
// defaults page. This is so that the number of sections is not reduced leaving unintended orphaned
|
||||
// activities / resources.
|
||||
if (isset($course->numsections) && $course->numsections > $max) {
|
||||
$max = $course->numsections;
|
||||
}
|
||||
for ($i = 0; $i <= $max; $i++) {
|
||||
$sectionmenu[$i] = "$i";
|
||||
}
|
||||
@@ -201,7 +210,7 @@ class course_edit_form extends moodleform {
|
||||
enrol_course_edit_form($mform, $course, $context);
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
$mform->addElement('header','', get_string('groups', 'group'));
|
||||
$mform->addElement('header', '', get_string('groupsettingsheader', 'group'));
|
||||
|
||||
$choices = array();
|
||||
$choices[NOGROUPS] = get_string('groupsnone', 'group');
|
||||
|
||||
+60
-57
@@ -108,6 +108,7 @@ class core_course_external extends external_api {
|
||||
$sections = get_all_sections($course->id);
|
||||
|
||||
//for each sections (first displayed to last displayed)
|
||||
$modinfosections = $modinfo->get_sections();
|
||||
foreach ($sections as $key => $section) {
|
||||
|
||||
$showsection = (has_capability('moodle/course:viewhiddensections', $context) or $section->visible or !$course->hiddensections);
|
||||
@@ -126,62 +127,64 @@ class core_course_external extends external_api {
|
||||
$sectioncontents = array();
|
||||
|
||||
//for each module of the section
|
||||
foreach ($modinfo->sections[$section->section] as $cmid) { //matching /course/lib.php:print_section() logic
|
||||
$cm = $modinfo->cms[$cmid];
|
||||
if (!empty($modinfosections[$section->section])) {
|
||||
foreach ($modinfosections[$section->section] as $cmid) {
|
||||
$cm = $modinfo->cms[$cmid];
|
||||
|
||||
// stop here if the module is not visible to the user
|
||||
if (!$cm->uservisible) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$module = array();
|
||||
|
||||
//common info (for people being able to see the module or availability dates)
|
||||
$module['id'] = $cm->id;
|
||||
$module['name'] = format_string($cm->name, true);
|
||||
$module['modname'] = $cm->modname;
|
||||
$module['modplural'] = $cm->modplural;
|
||||
$module['modicon'] = $cm->get_icon_url()->out(false);
|
||||
$module['indent'] = $cm->indent;
|
||||
|
||||
$modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
if (!empty($cm->showdescription)) {
|
||||
$module['description'] = $cm->get_content();
|
||||
}
|
||||
|
||||
//url of the module
|
||||
$url = $cm->get_url();
|
||||
if ($url) { //labels don't have url
|
||||
$module['url'] = $cm->get_url()->out();
|
||||
}
|
||||
|
||||
$canviewhidden = has_capability('moodle/course:viewhiddenactivities',
|
||||
get_context_instance(CONTEXT_MODULE, $cm->id));
|
||||
//user that can view hidden module should know about the visibility
|
||||
$module['visible'] = $cm->visible;
|
||||
|
||||
//availability date (also send to user who can see hidden module when the showavailabilyt is ON)
|
||||
if ($canupdatecourse or ($CFG->enableavailability && $canviewhidden && $cm->showavailability)) {
|
||||
$module['availablefrom'] = $cm->availablefrom;
|
||||
$module['availableuntil'] = $cm->availableuntil;
|
||||
}
|
||||
|
||||
$baseurl = 'webservice/pluginfile.php';
|
||||
|
||||
//call $modulename_export_contents
|
||||
//(each module callback take care about checking the capabilities)
|
||||
require_once($CFG->dirroot . '/mod/' . $cm->modname . '/lib.php');
|
||||
$getcontentfunction = $cm->modname.'_export_contents';
|
||||
if (function_exists($getcontentfunction)) {
|
||||
if ($contents = $getcontentfunction($cm, $baseurl)) {
|
||||
$module['contents'] = $contents;
|
||||
// stop here if the module is not visible to the user
|
||||
if (!$cm->uservisible) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$module = array();
|
||||
|
||||
//common info (for people being able to see the module or availability dates)
|
||||
$module['id'] = $cm->id;
|
||||
$module['name'] = format_string($cm->name, true);
|
||||
$module['modname'] = $cm->modname;
|
||||
$module['modplural'] = $cm->modplural;
|
||||
$module['modicon'] = $cm->get_icon_url()->out(false);
|
||||
$module['indent'] = $cm->indent;
|
||||
|
||||
$modcontext = context_module::instance($cm->id);
|
||||
|
||||
if (!empty($cm->showdescription)) {
|
||||
$module['description'] = $cm->get_content();
|
||||
}
|
||||
|
||||
//url of the module
|
||||
$url = $cm->get_url();
|
||||
if ($url) { //labels don't have url
|
||||
$module['url'] = $cm->get_url()->out();
|
||||
}
|
||||
|
||||
$canviewhidden = has_capability('moodle/course:viewhiddenactivities',
|
||||
context_module::instance($cm->id));
|
||||
//user that can view hidden module should know about the visibility
|
||||
$module['visible'] = $cm->visible;
|
||||
|
||||
//availability date (also send to user who can see hidden module when the showavailabilyt is ON)
|
||||
if ($canupdatecourse or ($CFG->enableavailability && $canviewhidden && $cm->showavailability)) {
|
||||
$module['availablefrom'] = $cm->availablefrom;
|
||||
$module['availableuntil'] = $cm->availableuntil;
|
||||
}
|
||||
|
||||
$baseurl = 'webservice/pluginfile.php';
|
||||
|
||||
//call $modulename_export_contents
|
||||
//(each module callback take care about checking the capabilities)
|
||||
require_once($CFG->dirroot . '/mod/' . $cm->modname . '/lib.php');
|
||||
$getcontentfunction = $cm->modname.'_export_contents';
|
||||
if (function_exists($getcontentfunction)) {
|
||||
if ($contents = $getcontentfunction($cm, $baseurl)) {
|
||||
$module['contents'] = $contents;
|
||||
}
|
||||
}
|
||||
|
||||
//assign result to $sectioncontents
|
||||
$sectioncontents[] = $module;
|
||||
|
||||
}
|
||||
|
||||
//assign result to $sectioncontents
|
||||
$sectioncontents[] = $module;
|
||||
|
||||
}
|
||||
$sectionvalues['modules'] = $sectioncontents;
|
||||
|
||||
@@ -675,9 +678,9 @@ class core_course_external extends external_api {
|
||||
"users" (int) Include users (default to 0 that is equal to no),
|
||||
"role_assignments" (int) Include role assignments (default to 0 that is equal to no),
|
||||
"comments" (int) Include user comments (default to 0 that is equal to no),
|
||||
"completion_information" (int) Include user course completion information (default to 0 that is equal to no),
|
||||
"userscompletion" (int) Include user course completion information (default to 0 that is equal to no),
|
||||
"logs" (int) Include course logs (default to 0 that is equal to no),
|
||||
"histories" (int) Include histories (default to 0 that is equal to no)'
|
||||
"grade_histories" (int) Include histories (default to 0 that is equal to no)'
|
||||
),
|
||||
'value' => new external_value(PARAM_RAW, 'the value for the option 1 (yes) or 0 (no)'
|
||||
)
|
||||
@@ -739,9 +742,9 @@ class core_course_external extends external_api {
|
||||
'users' => 0,
|
||||
'role_assignments' => 0,
|
||||
'comments' => 0,
|
||||
'completion_information' => 0,
|
||||
'userscompletion' => 0,
|
||||
'logs' => 0,
|
||||
'histories' => 0
|
||||
'grade_histories' => 0
|
||||
);
|
||||
|
||||
$backupsettings = array();
|
||||
|
||||
@@ -324,7 +324,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
||||
* @param array $mods course modules indexed by id (from get_all_mods)
|
||||
* @return string HTML to output.
|
||||
*/
|
||||
private function section_activity_summary($section, $course, $mods) {
|
||||
protected function section_activity_summary($section, $course, $mods) {
|
||||
if (empty($section->sequence)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -42,6 +42,14 @@ M.course.format.swap_sections = function(Y, node1, node2) {
|
||||
var sectionlist = Y.Node.all('.'+CSS.COURSECONTENT+' '+M.course.format.get_section_selector(Y));
|
||||
// Swap menus.
|
||||
sectionlist.item(node1).one('.'+CSS.SECTIONADDMENUS).swap(sectionlist.item(node2).one('.'+CSS.SECTIONADDMENUS));
|
||||
|
||||
if (sectionlist.item(node1).hasClass('current')) {
|
||||
sectionlist.item(node1).removeClass('current');
|
||||
sectionlist.item(node2).addClass('current');
|
||||
} else if (sectionlist.item(node2).hasClass('current')) {
|
||||
sectionlist.item(node2).removeClass('current');
|
||||
sectionlist.item(node1).addClass('current');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,6 +44,12 @@ $PAGE->set_url('/course/index.php');
|
||||
$PAGE->set_context($systemcontext);
|
||||
$PAGE->set_pagelayout('admin');
|
||||
|
||||
// This needs to match caps checked in can_edit_in_category below.
|
||||
$PAGE->set_other_editing_capability(array(
|
||||
'moodle/category:manage',
|
||||
'moodle/course:create'
|
||||
));
|
||||
|
||||
if (can_edit_in_category()) {
|
||||
if ($categoryedit !== -1) {
|
||||
$USER->editing = $categoryedit;
|
||||
|
||||
+36
-20
@@ -94,6 +94,9 @@ function make_log_url($module, $url) {
|
||||
case 'role':
|
||||
$url = '/'.$url;
|
||||
break;
|
||||
case 'grade':
|
||||
$url = "/grade/$url";
|
||||
break;
|
||||
default:
|
||||
$url = "/mod/$module/$url";
|
||||
break;
|
||||
@@ -857,7 +860,9 @@ function print_overview($courses, array $remote_courses=array()) {
|
||||
foreach ($courses as $course) {
|
||||
$fullname = format_string($course->fullname, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id)));
|
||||
echo $OUTPUT->box_start('coursebox');
|
||||
$attributes = array('title' => s($fullname));
|
||||
// decode &'s. format_string above will have encoded them and html_writer will encode again when it processed the title
|
||||
// attribute leading to double encoding.
|
||||
$attributes = array('title' => str_replace('&', '&', $fullname));
|
||||
if (empty($course->visible)) {
|
||||
$attributes['class'] = 'dimmed';
|
||||
}
|
||||
@@ -1727,13 +1732,15 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
||||
'type' => 'hidden', 'name' => 'completionstate',
|
||||
'value' => $newstate));
|
||||
echo html_writer::empty_tag('input', array(
|
||||
'type' => 'image', 'src' => $imgsrc, 'alt' => $imgalt, 'title' => $imgtitle));
|
||||
'type' => 'image', 'src' => $imgsrc, 'alt' => $imgalt, 'title' => $imgtitle,
|
||||
'aria-live' => 'polite'));
|
||||
echo html_writer::end_tag('div');
|
||||
echo html_writer::end_tag('form');
|
||||
} else {
|
||||
// In auto mode, or when editing, the icon is just an image
|
||||
echo "<span class='autocompletion'>";
|
||||
echo "<img src='$imgsrc' alt='$imgalt' title='$imgalt' /></span>";
|
||||
// In auto mode, or when editing, the icon is just an image.
|
||||
echo html_writer::tag('span', html_writer::empty_tag('img', array(
|
||||
'src' => $imgsrc, 'alt' => $imgalt, 'title' => $imgalt)),
|
||||
array('class' => 'autocompletion'));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2916,16 +2923,23 @@ function set_coursemodule_visible($id, $visible, $prevstateoverrides=false) {
|
||||
}
|
||||
}
|
||||
|
||||
$cminfo = new stdClass();
|
||||
$cminfo->id = $id;
|
||||
$cminfo->visible = $visible;
|
||||
|
||||
if ($prevstateoverrides) {
|
||||
if ($visible == '0') {
|
||||
// Remember the current visible state so we can toggle this back.
|
||||
$DB->set_field('course_modules', 'visibleold', $cm->visible, array('id'=>$id));
|
||||
// If we making whole section visiblility change..
|
||||
if ($visible == 0) {
|
||||
// Retain previous visibility state.
|
||||
$cminfo->visibleold = $cm->visible;
|
||||
} else {
|
||||
// Get the previous saved visible states.
|
||||
return $DB->set_field('course_modules', 'visible', $cm->visibleold, array('id'=>$id));
|
||||
// Restore previous visibility state.
|
||||
$cminfo->visible = $cm->visibleold;
|
||||
}
|
||||
} else {
|
||||
$cminfo->visibleold = $visible;
|
||||
}
|
||||
return $DB->set_field("course_modules", "visible", $visible, array("id"=>$id));
|
||||
return $DB->update_record('course_modules', $cminfo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3166,15 +3180,17 @@ function moveto_module($mod, $section, $beforemod=NULL) {
|
||||
/// Update module itself if necessary
|
||||
|
||||
// If moving to a hidden section then hide module.
|
||||
if (!$section->visible && $mod->visible) {
|
||||
// Set this in the object because it is sent as a response to ajax calls.
|
||||
set_coursemodule_visible($mod->id, 0, true);
|
||||
$mod->visible = 0;
|
||||
}
|
||||
if ($section->visible && !$mod->visible) {
|
||||
set_coursemodule_visible($mod->id, 1, true);
|
||||
// Set this in the object because it is sent as a response to ajax calls.
|
||||
$mod->visible = $mod->visibleold;
|
||||
if ($mod->section != $section->id) {
|
||||
if (!$section->visible && $mod->visible) {
|
||||
// Set this in the object because it is sent as a response to ajax calls.
|
||||
set_coursemodule_visible($mod->id, 0, true);
|
||||
$mod->visible = 0;
|
||||
}
|
||||
if ($section->visible && !$mod->visible) {
|
||||
set_coursemodule_visible($mod->id, 1, true);
|
||||
// Set this in the object because it is sent as a response to ajax calls.
|
||||
$mod->visible = $mod->visibleold;
|
||||
}
|
||||
}
|
||||
|
||||
/// Add the module into the new section
|
||||
|
||||
+27
-7
@@ -4,13 +4,22 @@
|
||||
require_once('../config.php');
|
||||
require_once('lib.php');
|
||||
|
||||
$id = optional_param('id', SITEID, PARAM_INT); // course id
|
||||
$id = optional_param('id', SITEID, PARAM_INT); // course id
|
||||
$redirect = optional_param('redirect', 0, PARAM_BOOL);
|
||||
|
||||
$url = new moodle_url('/course/loginas.php', array('id'=>$id));
|
||||
$PAGE->set_url($url);
|
||||
|
||||
/// Reset user back to their real self if needed, for security reasons you need to log out and log in again
|
||||
if (session_is_loggedinas()) {
|
||||
require_sesskey();
|
||||
require_logout();
|
||||
|
||||
// We can not set wanted URL here because the session is closed.
|
||||
redirect(new moodle_url($url, array('redirect'=>1)));
|
||||
}
|
||||
|
||||
if ($redirect) {
|
||||
if ($id and $id != SITEID) {
|
||||
$SESSION->wantsurl = "$CFG->wwwroot/course/view.php?id=".$id;
|
||||
} else {
|
||||
@@ -25,12 +34,6 @@ if (session_is_loggedinas()) {
|
||||
|
||||
$userid = required_param('user', PARAM_INT); // login as this user
|
||||
|
||||
$url = new moodle_url('/course/loginas.php', array('user'=>$userid, 'sesskey'=>sesskey()));
|
||||
if ($id !== SITEID) {
|
||||
$url->param('id', $id);
|
||||
}
|
||||
$PAGE->set_url($url);
|
||||
|
||||
require_sesskey();
|
||||
$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
|
||||
|
||||
@@ -57,6 +60,23 @@ if (has_capability('moodle/user:loginas', $systemcontext)) {
|
||||
print_error('usernotincourse');
|
||||
}
|
||||
$context = $coursecontext;
|
||||
|
||||
// Check if course has SEPARATEGROUPS and user is part of that group.
|
||||
if (groups_get_course_groupmode($course) == SEPARATEGROUPS &&
|
||||
!has_capability('moodle/site:accessallgroups', $context)) {
|
||||
$samegroup = false;
|
||||
if ($groups = groups_get_all_groups($course->id, $USER->id)) {
|
||||
foreach ($groups as $group) {
|
||||
if (groups_is_member($group->id, $userid)) {
|
||||
$samegroup = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$samegroup) {
|
||||
print_error('nologinas');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Login as this user and return to course home page.
|
||||
|
||||
+2
-2
@@ -335,7 +335,7 @@ if ($mform->is_cancelled()) {
|
||||
$cm->groupmembersonly = $fromform->groupmembersonly;
|
||||
|
||||
$completion = new completion_info($course);
|
||||
if ($completion->is_enabled()) {
|
||||
if ($completion->is_enabled() && !empty($fromform->completionunlocked)) {
|
||||
// Update completion settings
|
||||
$cm->completion = $fromform->completion;
|
||||
$cm->completiongradeitemnumber = $fromform->completiongradeitemnumber;
|
||||
@@ -412,6 +412,7 @@ if ($mform->is_cancelled()) {
|
||||
$newcm->module = $fromform->module;
|
||||
$newcm->instance = 0; // not known yet, will be updated later (this is similar to restore code)
|
||||
$newcm->visible = $fromform->visible;
|
||||
$newcm->visibleold = $fromform->visible;
|
||||
$newcm->groupmode = $fromform->groupmode;
|
||||
$newcm->groupingid = $fromform->groupingid;
|
||||
$newcm->groupmembersonly = $fromform->groupmembersonly;
|
||||
@@ -481,7 +482,6 @@ if ($mform->is_cancelled()) {
|
||||
// make sure visibility is set correctly (in particular in calendar)
|
||||
// note: allow them to set it even without moodle/course:activityvisibility
|
||||
set_coursemodule_visible($fromform->coursemodule, $fromform->visible);
|
||||
$DB->set_field('course_modules', 'visibleold', 1, array('id' => $fromform->coursemodule));
|
||||
|
||||
if (isset($fromform->cmidnumber)) { //label
|
||||
// set cm idnumber - uniqueness is already verified by form validation
|
||||
|
||||
@@ -303,8 +303,11 @@ abstract class moodleform_mod extends moodleform {
|
||||
}
|
||||
|
||||
// Completion: Don't let them choose automatic completion without turning
|
||||
// on some conditions
|
||||
if (array_key_exists('completion', $data) && $data['completion']==COMPLETION_TRACKING_AUTOMATIC) {
|
||||
// on some conditions. Ignore this check when completion settings are
|
||||
// locked, as the options are then disabled.
|
||||
if (array_key_exists('completion', $data) &&
|
||||
$data['completion'] == COMPLETION_TRACKING_AUTOMATIC &&
|
||||
!empty($data['completionunlocked'])) {
|
||||
if (empty($data['completionview']) && empty($data['completionusegrade']) &&
|
||||
!$this->completion_rule_enabled($data)) {
|
||||
$errors['completion'] = get_string('badautocompletion', 'completion');
|
||||
|
||||
+23
-6
@@ -30,6 +30,7 @@ require_once('recent_form.php');
|
||||
$id = required_param('id', PARAM_INT);
|
||||
|
||||
$PAGE->set_url('/course/recent.php', array('id'=>$id));
|
||||
$PAGE->set_pagelayout('report');
|
||||
|
||||
if (!$course = $DB->get_record('course', array('id'=>$id))) {
|
||||
print_error("That's an invalid course id");
|
||||
@@ -280,21 +281,37 @@ echo $OUTPUT->footer();
|
||||
|
||||
function compare_activities_by_time_desc($a, $b) {
|
||||
// make sure the activities actually have a timestamp property
|
||||
if ((!array_key_exists('timestamp', $a)) or (!array_key_exists('timestamp', $b))) {
|
||||
return 0;
|
||||
}
|
||||
if ($a->timestamp == $b->timestamp)
|
||||
if ((!array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
|
||||
return 0;
|
||||
}
|
||||
// We treat instances without timestamp as if they have a timestamp of 0.
|
||||
if ((!array_key_exists('timestamp', $a)) && (array_key_exists('timestamp', $b))) {
|
||||
return 1;
|
||||
}
|
||||
if ((array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
|
||||
return -1;
|
||||
}
|
||||
if ($a->timestamp == $b->timestamp) {
|
||||
return 0;
|
||||
}
|
||||
return ($a->timestamp > $b->timestamp) ? -1 : 1;
|
||||
}
|
||||
|
||||
function compare_activities_by_time_asc($a, $b) {
|
||||
// make sure the activities actually have a timestamp property
|
||||
if ((!array_key_exists('timestamp', $a)) or (!array_key_exists('timestamp', $b))) {
|
||||
if ((!array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
|
||||
return 0;
|
||||
}
|
||||
if ($a->timestamp == $b->timestamp)
|
||||
// We treat instances without timestamp as if they have a timestamp of 0.
|
||||
if ((!array_key_exists('timestamp', $a)) && (array_key_exists('timestamp', $b))) {
|
||||
return -1;
|
||||
}
|
||||
if ((array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
|
||||
return 1;
|
||||
}
|
||||
if ($a->timestamp == $b->timestamp) {
|
||||
return 0;
|
||||
}
|
||||
return ($a->timestamp < $b->timestamp) ? -1 : 1;
|
||||
}
|
||||
|
||||
|
||||
+2
-6
@@ -191,18 +191,14 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
$formcontent .= html_writer::start_tag('div', array('class' => 'alloptions'));
|
||||
|
||||
// Activities
|
||||
$activities = array_filter($modules, function($mod) {
|
||||
return ($mod->archetype !== MOD_ARCHETYPE_RESOURCE && $mod->archetype !== MOD_ARCHETYPE_SYSTEM);
|
||||
});
|
||||
$activities = array_filter($modules, create_function('$mod', 'return ($mod->archetype !== MOD_ARCHETYPE_RESOURCE && $mod->archetype !== MOD_ARCHETYPE_SYSTEM);'));
|
||||
if (count($activities)) {
|
||||
$formcontent .= $this->course_modchooser_title('activities');
|
||||
$formcontent .= $this->course_modchooser_module_types($activities);
|
||||
}
|
||||
|
||||
// Resources
|
||||
$resources = array_filter($modules, function($mod) {
|
||||
return ($mod->archetype === MOD_ARCHETYPE_RESOURCE);
|
||||
});
|
||||
$resources = array_filter($modules, create_function('$mod', 'return ($mod->archetype === MOD_ARCHETYPE_RESOURCE);'));
|
||||
if (count($resources)) {
|
||||
$formcontent .= $this->course_modchooser_title('resources');
|
||||
$formcontent .= $this->course_modchooser_module_types($resources);
|
||||
|
||||
+13
-5
@@ -87,7 +87,11 @@ foreach ($modinfo->cms as $cm) {
|
||||
|
||||
// preload instances
|
||||
foreach ($resources as $modname=>$instances) {
|
||||
$resources[$modname] = $DB->get_records_list($modname, 'id', $instances, 'id', 'id,name,intro,introformat,timemodified');
|
||||
$additionalfields = '';
|
||||
if (plugin_supports('mod', $modname, FEATURE_MOD_INTRO)) {
|
||||
$additionalfields = ',intro,introformat';
|
||||
}
|
||||
$resources[$modname] = $DB->get_records_list($modname, 'id', $instances, 'id', 'id,name'.$additionalfields);
|
||||
}
|
||||
|
||||
if (!$cms) {
|
||||
@@ -112,8 +116,8 @@ foreach ($cms as $cm) {
|
||||
continue;
|
||||
}
|
||||
$resource = $resources[$cm->modname][$cm->instance];
|
||||
$printsection = '';
|
||||
if ($usesections) {
|
||||
$printsection = '';
|
||||
if ($cm->sectionnum !== $currentsection) {
|
||||
if ($cm->sectionnum) {
|
||||
$printsection = get_section_name($course, $sections[$cm->sectionnum]);
|
||||
@@ -123,8 +127,6 @@ foreach ($cms as $cm) {
|
||||
}
|
||||
$currentsection = $cm->sectionnum;
|
||||
}
|
||||
} else {
|
||||
$printsection = '<span class="smallinfo">'.userdate($resource->timemodified)."</span>";
|
||||
}
|
||||
|
||||
$extra = empty($cm->extra) ? '' : $cm->extra;
|
||||
@@ -134,11 +136,17 @@ foreach ($cms as $cm) {
|
||||
$icon = '<img src="'.$OUTPUT->pix_url('icon', $cm->modname).'" class="activityicon" alt="'.get_string('modulename', $cm->modname).'" /> ';
|
||||
}
|
||||
|
||||
if (isset($resource->intro) && isset($resource->introformat)) {
|
||||
$intro = format_module_intro('resource', $resource, $cm->id);
|
||||
} else {
|
||||
$intro = '';
|
||||
}
|
||||
|
||||
$class = $cm->visible ? '' : 'class="dimmed"'; // hidden modules are dimmed
|
||||
$table->data[] = array (
|
||||
$printsection,
|
||||
"<a $class $extra href=\"$CFG->wwwroot/mod/$cm->modname/view.php?id=$cm->id\">".$icon.format_string($resource->name)."</a>",
|
||||
format_module_intro('resource', $resource, $cm->id));
|
||||
$intro);
|
||||
}
|
||||
|
||||
echo html_writer::table($table);
|
||||
|
||||
@@ -290,4 +290,265 @@ class courselib_testcase extends advanced_testcase {
|
||||
// Check that the section number has been changed in the cm
|
||||
$this->assertEquals($newsection->id, $cm->section);
|
||||
}
|
||||
|
||||
public function test_module_visibility() {
|
||||
$this->setAdminUser();
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Create course and modules.
|
||||
$course = $this->getDataGenerator()->create_course(array('numsections' => 5));
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id));
|
||||
$page = $this->getDataGenerator()->create_module('page', array('duedate' => time(), 'course' => $course->id));
|
||||
$modules = compact('forum', 'page');
|
||||
|
||||
// Hiding the modules.
|
||||
foreach ($modules as $mod) {
|
||||
set_coursemodule_visible($mod->cmid, 0);
|
||||
$this->check_module_visibility($mod, 0, 0);
|
||||
}
|
||||
|
||||
// Showing the modules.
|
||||
foreach ($modules as $mod) {
|
||||
set_coursemodule_visible($mod->cmid, 1);
|
||||
$this->check_module_visibility($mod, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public function test_section_visibility() {
|
||||
$this->setAdminUser();
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Create course.
|
||||
$course = $this->getDataGenerator()->create_course(array('numsections' => 3), array('createsections' => true));
|
||||
|
||||
// Testing an empty section.
|
||||
$sectionnumber = 1;
|
||||
set_section_visible($course->id, $sectionnumber, 0);
|
||||
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
|
||||
$this->assertEquals($section_info->visible, 0);
|
||||
set_section_visible($course->id, $sectionnumber, 1);
|
||||
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
|
||||
$this->assertEquals($section_info->visible, 1);
|
||||
|
||||
// Testing a section with visible modules.
|
||||
$sectionnumber = 2;
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id),
|
||||
array('section' => $sectionnumber));
|
||||
$page= $this->getDataGenerator()->create_module('page', array('duedate' => time(),
|
||||
'course' => $course->id), array('section' => $sectionnumber));
|
||||
$modules = compact('forum', 'page');
|
||||
set_section_visible($course->id, $sectionnumber, 0);
|
||||
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
|
||||
$this->assertEquals($section_info->visible, 0);
|
||||
foreach ($modules as $mod) {
|
||||
$this->check_module_visibility($mod, 0, 1);
|
||||
}
|
||||
set_section_visible($course->id, $sectionnumber, 1);
|
||||
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
|
||||
$this->assertEquals($section_info->visible, 1);
|
||||
foreach ($modules as $mod) {
|
||||
$this->check_module_visibility($mod, 1, 1);
|
||||
}
|
||||
|
||||
// Testing a section with hidden modules, which should stay hidden.
|
||||
$sectionnumber = 3;
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id),
|
||||
array('section' => $sectionnumber));
|
||||
$page = $this->getDataGenerator()->create_module('page', array('duedate' => time(),
|
||||
'course' => $course->id), array('section' => $sectionnumber));
|
||||
$modules = compact('forum', 'page');
|
||||
foreach ($modules as $mod) {
|
||||
set_coursemodule_visible($mod->cmid, 0);
|
||||
$this->check_module_visibility($mod, 0, 0);
|
||||
}
|
||||
set_section_visible($course->id, $sectionnumber, 0);
|
||||
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
|
||||
$this->assertEquals($section_info->visible, 0);
|
||||
foreach ($modules as $mod) {
|
||||
$this->check_module_visibility($mod, 0, 0);
|
||||
}
|
||||
set_section_visible($course->id, $sectionnumber, 1);
|
||||
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
|
||||
$this->assertEquals($section_info->visible, 1);
|
||||
foreach ($modules as $mod) {
|
||||
$this->check_module_visibility($mod, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to assert that a module has correctly been made visible, or hidden.
|
||||
*
|
||||
* @param stdClass $mod module information
|
||||
* @param int $visibility the current state of the module
|
||||
* @param int $visibleold the current state of the visibleold property
|
||||
* @return void
|
||||
*/
|
||||
public function check_module_visibility($mod, $visibility, $visibleold) {
|
||||
global $DB;
|
||||
|
||||
rebuild_course_cache($mod->course);
|
||||
$course = $DB->get_record('course', array('id' => $mod->course));
|
||||
$cm = get_fast_modinfo($course)->get_cm($mod->cmid);
|
||||
|
||||
$this->assertEquals($visibility, $cm->visible);
|
||||
$this->assertEquals($visibleold, $cm->visibleold);
|
||||
|
||||
// Check the module grade items.
|
||||
$grade_items = grade_item::fetch_all(array('itemtype' => 'mod', 'itemmodule' => $cm->modname,
|
||||
'iteminstance' => $cm->instance, 'courseid' => $cm->course));
|
||||
if ($grade_items) {
|
||||
foreach ($grade_items as $grade_item) {
|
||||
if ($visibility) {
|
||||
$this->assertFalse($grade_item->is_hidden(), "$cm->modname grade_item not visible");
|
||||
} else {
|
||||
$this->assertTrue($grade_item->is_hidden(), "$cm->modname grade_item not hidden");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check the events visibility.
|
||||
if ($events = $DB->get_records('event', array('instance' => $cm->instance, 'modulename' => $cm->modname))) {
|
||||
foreach ($events as $event) {
|
||||
$calevent = new calendar_event($event);
|
||||
$this->assertEquals($visibility, $calevent->visible, "$cm->modname calendar_event visibility");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests moving a module between hidden/visible sections and
|
||||
* verifies that the course/module visiblity seettings are
|
||||
* retained.
|
||||
*/
|
||||
public function test_moveto_module_between_hidden_sections() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
$course = $this->getDataGenerator()->create_course(array('numsections' => 4), array('createsections' => true));
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id));
|
||||
$page = $this->getDataGenerator()->create_module('page', array('course' => $course->id));
|
||||
$quiz= $this->getDataGenerator()->create_module('quiz', array('course' => $course->id));
|
||||
|
||||
// Set the page as hidden
|
||||
set_coursemodule_visible($page->cmid, 0);
|
||||
|
||||
// Set sections 3 as hidden.
|
||||
set_section_visible($course->id, 3, 0);
|
||||
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
|
||||
$hiddensection = $modinfo->get_section_info(3);
|
||||
// New section is definitely not visible:
|
||||
$this->assertEquals($hiddensection->visible, 0);
|
||||
|
||||
$forumcm = $modinfo->cms[$forum->cmid];
|
||||
$pagecm = $modinfo->cms[$page->cmid];
|
||||
|
||||
// Move the forum and the page to a hidden section.
|
||||
moveto_module($forumcm, $hiddensection);
|
||||
moveto_module($pagecm, $hiddensection);
|
||||
|
||||
// Reset modinfo cache.
|
||||
$reset = 'reset';
|
||||
get_fast_modinfo($reset);
|
||||
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
|
||||
// Verify that forum and page have been moved to the hidden section and quiz has not.
|
||||
$this->assertContains($forum->cmid, $modinfo->sections[3]);
|
||||
$this->assertContains($page->cmid, $modinfo->sections[3]);
|
||||
$this->assertNotContains($quiz->cmid, $modinfo->sections[3]);
|
||||
|
||||
// Verify that forum has been made invisible.
|
||||
$forumcm = $modinfo->cms[$forum->cmid];
|
||||
$this->assertEquals($forumcm->visible, 0);
|
||||
// Verify that old state has been retained.
|
||||
$this->assertEquals($forumcm->visibleold, 1);
|
||||
|
||||
// Verify that page has stayed invisible.
|
||||
$pagecm = $modinfo->cms[$page->cmid];
|
||||
$this->assertEquals($pagecm->visible, 0);
|
||||
// Verify that old state has been retained.
|
||||
$this->assertEquals($pagecm->visibleold, 0);
|
||||
|
||||
// Verify that quiz has been unaffected.
|
||||
$quizcm = $modinfo->cms[$quiz->cmid];
|
||||
$this->assertEquals($quizcm->visible, 1);
|
||||
|
||||
// Move forum and page back to visible section.
|
||||
$visiblesection = $modinfo->get_section_info(2);
|
||||
moveto_module($forumcm, $visiblesection);
|
||||
moveto_module($pagecm, $visiblesection);
|
||||
|
||||
// Reset modinfo cache.
|
||||
$reset = 'reset';
|
||||
get_fast_modinfo($reset);
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
|
||||
// Verify that forum has been made visible.
|
||||
$forumcm = $modinfo->cms[$forum->cmid];
|
||||
$this->assertEquals($forumcm->visible, 1);
|
||||
|
||||
// Verify that page has stayed invisible.
|
||||
$pagecm = $modinfo->cms[$page->cmid];
|
||||
$this->assertEquals($pagecm->visible, 0);
|
||||
|
||||
// Move the page in the same section (this is what mod duplicate does_
|
||||
moveto_module($pagecm, $visiblesection, $forumcm);
|
||||
|
||||
// Reset modinfo cache.
|
||||
$reset = 'reset';
|
||||
get_fast_modinfo($reset);
|
||||
|
||||
// Verify that the the page is still hidden
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
$pagecm = $modinfo->cms[$page->cmid];
|
||||
$this->assertEquals($pagecm->visible, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests moving a module around in the same section. moveto_module()
|
||||
* is called this way in modduplicate.
|
||||
*/
|
||||
public function test_moveto_module_in_same_section() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
$course = $this->getDataGenerator()->create_course(array('numsections' => 3), array('createsections' => true));
|
||||
$page = $this->getDataGenerator()->create_module('page', array('course' => $course->id));
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id));
|
||||
|
||||
// Simulate inconsistent visible/visibleold values (MDL-38713).
|
||||
$cm = $DB->get_record('course_modules', array('id' => $page->cmid), '*', MUST_EXIST);
|
||||
$cm->visible = 0;
|
||||
$cm->visibleold = 1;
|
||||
$DB->update_record('course_modules', $cm);
|
||||
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
$forumcm = $modinfo->cms[$forum->cmid];
|
||||
$pagecm = $modinfo->cms[$page->cmid];
|
||||
|
||||
// Verify that page is hidden.
|
||||
$this->assertEquals($pagecm->visible, 0);
|
||||
|
||||
// Verify section 0 is where all mods added.
|
||||
$section = $modinfo->get_section_info(0);
|
||||
$this->assertEquals($section->id, $forumcm->section);
|
||||
$this->assertEquals($section->id, $pagecm->section);
|
||||
|
||||
|
||||
// Move the forum and the page to a hidden section.
|
||||
moveto_module($pagecm, $section, $forumcm);
|
||||
|
||||
// Reset modinfo cache.
|
||||
$reset = 'reset';
|
||||
get_fast_modinfo($reset);
|
||||
|
||||
// Verify that the the page is still hidden
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
$pagecm = $modinfo->cms[$page->cmid];
|
||||
$this->assertEquals($pagecm->visible, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,12 @@
|
||||
|
||||
$PAGE->set_pagelayout('course');
|
||||
$PAGE->set_pagetype('course-view-' . $course->format);
|
||||
$PAGE->set_other_editing_capability('moodle/course:update');
|
||||
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
|
||||
$PAGE->set_other_editing_capability('moodle/course:activityvisibility');
|
||||
if (course_format_uses_sections($course->format)) {
|
||||
$PAGE->set_other_editing_capability('moodle/course:sectionvisibility');
|
||||
}
|
||||
|
||||
if ($reset_user_allowed_editing) {
|
||||
// ugly hack
|
||||
|
||||
Vendored
+4
-1
@@ -508,7 +508,9 @@ YUI.add('moodle-course-toolboxes', function(Y) {
|
||||
.setAttrs({
|
||||
'name' : 'title',
|
||||
'value' : titletext,
|
||||
'autocomplete' : 'off'
|
||||
'autocomplete' : 'off',
|
||||
'aria-describedby' : 'id_editinstructions',
|
||||
'maxLength' : '255'
|
||||
})
|
||||
.addClass('titleeditor');
|
||||
var editform = Y.Node.create('<form />')
|
||||
@@ -518,6 +520,7 @@ YUI.add('moodle-course-toolboxes', function(Y) {
|
||||
|
||||
var editinstructions = Y.Node.create('<span />')
|
||||
.addClass('editinstructions')
|
||||
.setAttrs({'id' : 'id_editinstructions'})
|
||||
.set('innerHTML', M.util.get_string('edittitleinstructions', 'moodle'));
|
||||
|
||||
// Clear the existing content and put the editor in
|
||||
|
||||
@@ -87,7 +87,7 @@ class core_enrol_external extends external_api {
|
||||
}
|
||||
|
||||
list($enrolledsqlselect, $enrolledparams) = get_enrolled_sql($context);
|
||||
$enrolledsql = "SELECT COUNT(*) FROM ($enrolledsqlselect) AS enrolleduserids";
|
||||
$enrolledsql = "SELECT COUNT('x') FROM ($enrolledsqlselect) enrolleduserids";
|
||||
$enrolledusercount = $DB->count_records_sql($enrolledsql, $enrolledparams);
|
||||
|
||||
$result[] = array('id'=>$course->id, 'shortname'=>$course->shortname, 'fullname'=>$course->fullname, 'idnumber'=>$course->idnumber,'visible'=>$course->visible, 'enrolledusercount'=>$enrolledusercount);
|
||||
|
||||
@@ -514,13 +514,19 @@ function process_person_tag($tagcontents){
|
||||
|
||||
|
||||
// Now if the recstatus is 3, we should delete the user if-and-only-if the setting for delete users is turned on
|
||||
// In the "users" table we can do this by setting deleted=1
|
||||
if($recstatus==3){
|
||||
|
||||
if($imsdeleteusers){ // If we're allowed to delete user records
|
||||
// Make sure their "deleted" field is set to one
|
||||
$DB->set_field('user', 'deleted', 1, array('username'=>$person->username));
|
||||
$this->log_line("Marked user record for user '$person->username' (ID number $person->idnumber) as deleted.");
|
||||
// Do not dare to hack the user.deleted field directly in database!!!
|
||||
if ($user = $DB->get_record('user', array('username'=>$person->username, 'mnethostid'=>$CFG->mnet_localhost_id, 'deleted'=>0))) {
|
||||
if (delete_user($user)) {
|
||||
$this->log_line("Deleted user '$person->username' (ID number $person->idnumber).");
|
||||
} else {
|
||||
$this->log_line("Error deleting '$person->username' (ID number $person->idnumber).");
|
||||
}
|
||||
} else {
|
||||
$this->log_line("Can not delete user '$person->username' (ID number $person->idnumber) - user does not exist.");
|
||||
}
|
||||
}else{
|
||||
$this->log_line("Ignoring deletion request for user '$person->username' (ID number $person->idnumber).");
|
||||
}
|
||||
@@ -539,8 +545,10 @@ function process_person_tag($tagcontents){
|
||||
} else {
|
||||
|
||||
// If they don't exist and they have a defined username, and $createnewusers == true, we create them.
|
||||
$person->lang = 'manual'; //TODO: this needs more work due tu multiauth changes
|
||||
$person->auth = $CFG->auth;
|
||||
$person->lang = $CFG->lang;
|
||||
$auth = explode(',', $CFG->auth); //TODO: this needs more work due tu multiauth changes, use first auth for now
|
||||
$auth = reset($auth);
|
||||
$person->auth = $auth;
|
||||
$person->confirmed = 1;
|
||||
$person->timemodified = time();
|
||||
$person->mnethostid = $CFG->mnet_localhost_id;
|
||||
@@ -568,8 +576,8 @@ function process_person_tag($tagcontents){
|
||||
} elseif ($createnewusers) {
|
||||
$this->log_line("User record already exists for user '$person->username' (ID number $person->idnumber).");
|
||||
|
||||
// Make sure their "deleted" field is set to zero.
|
||||
$DB->set_field('user', 'deleted', 0, array('idnumber'=>$person->idnumber));
|
||||
// It is totally wrong to mess with deleted users flag directly in database!!!
|
||||
// There is no official way to undelete user, sorry..
|
||||
}else{
|
||||
$this->log_line("No user record found for '$person->username' (ID number $person->idnumber).");
|
||||
}
|
||||
|
||||
@@ -93,15 +93,13 @@ class enrol_paypal_edit_form extends moodleform {
|
||||
|
||||
list($instance, $plugin, $context) = $this->_customdata;
|
||||
|
||||
if ($data['status'] == ENROL_INSTANCE_ENABLED) {
|
||||
if (!empty($data['enrolenddate']) and $data['enrolenddate'] < $data['enrolstartdate']) {
|
||||
$errors['enrolenddate'] = get_string('enrolenddaterror', 'enrol_paypal');
|
||||
}
|
||||
if (!empty($data['enrolenddate']) and $data['enrolenddate'] < $data['enrolstartdate']) {
|
||||
$errors['enrolenddate'] = get_string('enrolenddaterror', 'enrol_paypal');
|
||||
}
|
||||
|
||||
if (!is_numeric($data['cost'])) {
|
||||
$errors['cost'] = get_string('costerror', 'enrol_paypal');
|
||||
if (!is_numeric($data['cost'])) {
|
||||
$errors['cost'] = get_string('costerror', 'enrol_paypal');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return $errors;
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
<?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/>.
|
||||
|
||||
|
||||
/**
|
||||
* PHPunit tests for external files API.
|
||||
*
|
||||
* @package core_files
|
||||
* @category external
|
||||
* @copyright 2013 Ankit Agarwal
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @since Moodle 2.6
|
||||
*/
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
global $CFG;
|
||||
|
||||
require_once($CFG->dirroot . '/webservice/tests/helpers.php');
|
||||
require_once($CFG->dirroot . '/files/externallib.php');
|
||||
|
||||
class test_external_files extends advanced_testcase {
|
||||
|
||||
/*
|
||||
* Test core_files_external::upload().
|
||||
*/
|
||||
|
||||
public function test_upload() {
|
||||
global $USER;
|
||||
|
||||
$this->resetAfterTest();
|
||||
$this->setAdminUser();
|
||||
$context = context_user::instance($USER->id);
|
||||
$contextid = $context->id;
|
||||
$component = "user";
|
||||
$filearea = "private";
|
||||
$itemid = 0;
|
||||
$filepath = "/";
|
||||
$filename = "Simple.txt";
|
||||
$filecontent = base64_encode("Let us create a nice simple file");
|
||||
$browser = get_file_browser();
|
||||
|
||||
// Make sure no file exists.
|
||||
$file = $browser->get_file_info($context, $component, $filearea, $itemid, $filepath, $filename);
|
||||
$this->assertEmpty($file);
|
||||
|
||||
// Call the api to create a file.
|
||||
core_files_external::upload($contextid, $component, $filearea, $itemid, $filepath, $filename, $filecontent);
|
||||
|
||||
// Make sure the file was created.
|
||||
$file = $browser->get_file_info($context, $component, $filearea, $itemid, $filepath, $filename);
|
||||
$this->assertNotEmpty($file);
|
||||
|
||||
// Make sure no file exists.
|
||||
$itemid = 2;
|
||||
$filename = "Simple2.txt";
|
||||
$file = $browser->get_file_info($context, $component, $filearea, $itemid, $filepath, $filename);
|
||||
$this->assertEmpty($file);
|
||||
|
||||
// Call the api to create a file.
|
||||
$fileinfo = core_files_external::upload($contextid, $component, $filearea, $itemid, $filepath, $filename, $filecontent);
|
||||
|
||||
// Make sure itemid is always set to 0.
|
||||
$this->assertEquals(0, $fileinfo['itemid']);
|
||||
|
||||
// Make sure the same file cannot be created again.
|
||||
$this->setExpectedException("moodle_exception");
|
||||
core_files_external::upload($contextid, $component, $filearea, $itemid, $filepath, $filename, $filecontent);
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure only user component is allowed in core_files_external::upload().
|
||||
*/
|
||||
public function test_upload_param_component() {
|
||||
global $USER;
|
||||
|
||||
$this->resetAfterTest();
|
||||
$this->setAdminUser();
|
||||
$context = context_user::instance($USER->id);
|
||||
$contextid = $context->id;
|
||||
$component = "backup";
|
||||
$filearea = "private";
|
||||
$itemid = 0;
|
||||
$filepath = "/";
|
||||
$filename = "Simple3.txt";
|
||||
$filecontent = base64_encode("Let us create a nice simple file");
|
||||
|
||||
// Make sure exception is thrown.
|
||||
$this->setExpectedException("coding_exception");
|
||||
core_files_external::upload($contextid, $component, $filearea, $itemid, $filepath, $filename, $filecontent);
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure only private area is allowed in core_files_external::upload().
|
||||
*/
|
||||
public function test_upload_param_area() {
|
||||
global $USER;
|
||||
|
||||
$this->resetAfterTest();
|
||||
$this->setAdminUser();
|
||||
$context = context_user::instance($USER->id);
|
||||
$contextid = $context->id;
|
||||
$component = "user";
|
||||
$filearea = "draft";
|
||||
$itemid = 0;
|
||||
$filepath = "/";
|
||||
$filename = "Simple4.txt";
|
||||
$filecontent = base64_encode("Let us create a nice simple file");
|
||||
|
||||
// Make sure exception is thrown.
|
||||
$this->setExpectedException("coding_exception");
|
||||
core_files_external::upload($contextid, $component, $filearea, $itemid, $filepath, $filename, $filecontent);
|
||||
}
|
||||
|
||||
}
|
||||
+18
-11
@@ -122,19 +122,26 @@ class filter_urltolink extends moodle_text_filter {
|
||||
$unicoderegexp = @preg_match('/\pL/u', 'a'); // This will fail silently, returning false,
|
||||
}
|
||||
|
||||
//todo: MDL-21296 - use of unicode modifiers may cause a timeout
|
||||
if ($unicoderegexp) { //We can use unicode modifiers
|
||||
$text = preg_replace('#(?<!=["\'])(((http(s?))://)(((([\pLl0-9]([\pLl0-9]|-)*[\pLl0-9]|[\pLl0-9])\.)+([\pLl]([\pLl0-9]|-)*[\pLl0-9]|[\pLl]))|(([0-9]{1,3}\.){3}[0-9]{1,3}))(:[\pL0-9]*)?(/([\pLl0-9\.!$&\'\(\)*+,;=_~:@-]|%[a-fA-F0-9]{2})*)*(\?([\pLl0-9\.!$&\'\(\)*+,;=_~:@/?-]|%[a-fA-F0-9]{2})*)?(\#[\pLl0-9\.!$&\'\(\)*+,;=_~:@/?-]*)?)(?<![,.;])#iu',
|
||||
'<a href="\\1" class="_blanktarget">\\1</a>', $text);
|
||||
$text = preg_replace('#(?<!=["\']|//)((www\.([\pLl0-9]([\pLl0-9]|-)*[\pLl0-9]|[\pLl0-9])\.)+([\pLl]([\pLl0-9]|-)*[\pLl0-9]|[\pLl])(:[\pL0-9]*)?(/([\pLl0-9\.!$&\'\(\)*+,;=_~:@-]|%[a-fA-F0-9]{2})*)*(\?([\pLl0-9\.!$&\'\(\)*+,;=_~:@/?-]|%[a-fA-F0-9]{2})*)?(\#[\pLl0-9\.!$&\'\(\)*+,;=_~:@/?-]*)?)(?<![,.;])#iu',
|
||||
'<a href="http://\\1" class="_blanktarget">\\1</a>', $text);
|
||||
} else { //We cannot use unicode modifiers
|
||||
$text = preg_replace('#(?<!=["\'])(((http(s?))://)(((([a-z0-9]([a-z0-9]|-)*[a-z0-9]|[a-z0-9])\.)+([a-z]([a-z0-9]|-)*[a-z0-9]|[a-z]))|(([0-9]{1,3}\.){3}[0-9]{1,3}))(:[a-zA-Z0-9]*)?(/([a-z0-9\.!$&\'\(\)*+,;=_~:@-]|%[a-f0-9]{2})*)*(\?([a-z0-9\.!$&\'\(\)*+,;=_~:@/?-]|%[a-fA-F0-9]{2})*)?(\#[a-z0-9\.!$&\'\(\)*+,;=_~:@/?-]*)?)(?<![,.;])#i',
|
||||
'<a href="\\1" class="_blanktarget">\\1</a>', $text);
|
||||
$text = preg_replace('#(?<!=["\']|//)((www\.([a-z0-9]([a-z0-9]|-)*[a-z0-9]|[a-z0-9])\.)+([a-z]([a-z0-9]|-)*[a-z0-9]|[a-z])(:[a-zA-Z0-9]*)?(/([a-z0-9\.!$&\'\(\)*+,;=_~:@-]|%[a-f0-9]{2})*)*(\?([a-z0-9\.!$&\'\(\)*+,;=_~:@/?-]|%[a-fA-F0-9]{2})*)?(\#[a-z0-9\.!$&\'\(\)*+,;=_~:@/?-]*)?)(?<![,.;])#i',
|
||||
'<a href="http://\\1" class="_blanktarget">\\1</a>', $text);
|
||||
// TODO MDL-21296 - use of unicode modifiers may cause a timeout
|
||||
$urlstart = '(?:http(s)?://|(?<!://)(www\.))';
|
||||
$domainsegment = '(?:[\pLl0-9][\pLl0-9-]*[\pLl0-9]|[\pLl0-9])';
|
||||
$numericip = '(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})';
|
||||
$port = '(?::\d*)';
|
||||
$pathchar = '(?:[\pL0-9\.!$&\'\(\)*+,;=_~:@-]|%[a-f0-9]{2})';
|
||||
$path = "(?:/$pathchar*)*";
|
||||
$querystring = '(?:\?(?:[\pL0-9\.!$&\'\(\)*+,;=_~:@/?-]|%[a-fA-F0-9]{2})*)';
|
||||
$fragment = '(?:\#(?:[\pL0-9\.!$&\'\(\)*+,;=_~:@/?-]|%[a-fA-F0-9]{2})*)';
|
||||
|
||||
$regex = "(?<!=[\"'])$urlstart((?:$domainsegment\.)+$domainsegment|$numericip)" .
|
||||
"($port?$path$querystring?$fragment?)(?<![]),.;])";
|
||||
if ($unicoderegexp) {
|
||||
$regex = '#' . $regex . '#ui';
|
||||
} else {
|
||||
$regex = '#' . preg_replace(array('\pLl', '\PL'), 'a-z', $regex) . '#i';
|
||||
}
|
||||
|
||||
$text = preg_replace($regex, '<a href="http$1://$2$3$4" class="_blanktarget">$0</a>', $text);
|
||||
|
||||
if (!empty($ignoretags)) {
|
||||
$ignoretags = array_reverse($ignoretags); /// Reversed so "progressive" str_replace() will solve some nesting problems.
|
||||
$text = str_replace(array_keys($ignoretags),$ignoretags,$text);
|
||||
|
||||
@@ -44,7 +44,7 @@ class filter_urltolink_testcase extends basic_testcase {
|
||||
'$1<a href="http://www.$2$3" target="_blank">www.$2$3</a>', $text);
|
||||
}
|
||||
|
||||
function test_convert_urls_into_links() {
|
||||
function get_convert_urls_into_links_test_cases() {
|
||||
$texts = array (
|
||||
//just a url
|
||||
'http://moodle.org - URL' => '<a href="http://moodle.org" class="_blanktarget">http://moodle.org</a> - URL',
|
||||
@@ -57,13 +57,26 @@ class filter_urltolink_testcase extends basic_testcase {
|
||||
'URL: https://moodle.org/s/i=1&j=2' => 'URL: <a href="https://moodle.org/s/i=1&j=2" class="_blanktarget">https://moodle.org/s/i=1&j=2</a>',
|
||||
//url with port and params
|
||||
'URL: http://moodle.org:8080/s/i=1' => 'URL: <a href="http://moodle.org:8080/s/i=1" class="_blanktarget">http://moodle.org:8080/s/i=1</a>',
|
||||
//url in brackets
|
||||
// URL with complex fragment.
|
||||
'Most voted issues: https://tracker.moodle.org/browse/MDL#selectedTab=com.atlassian.jira.plugin.system.project%3Apopularissues-panel' => 'Most voted issues: <a href="https://tracker.moodle.org/browse/MDL#selectedTab=com.atlassian.jira.plugin.system.project%3Apopularissues-panel" class="_blanktarget">https://tracker.moodle.org/browse/MDL#selectedTab=com.atlassian.jira.plugin.system.project%3Apopularissues-panel</a>',
|
||||
// Domain with more parts
|
||||
'URL: www.bbc.co.uk.' => 'URL: <a href="http://www.bbc.co.uk" class="_blanktarget">www.bbc.co.uk</a>.',
|
||||
// URL in brackets.
|
||||
'(http://moodle.org) - URL' => '(<a href="http://moodle.org" class="_blanktarget">http://moodle.org</a>) - URL',
|
||||
'(www.moodle.org) - URL' => '(<a href="http://www.moodle.org" class="_blanktarget">www.moodle.org</a>) - URL',
|
||||
//url in square brackets
|
||||
// URL in brackets with a path.
|
||||
'(http://example.com/index.html) - URL' => '(<a href="http://example.com/index.html" class="_blanktarget">http://example.com/index.html</a>) - URL',
|
||||
'(www.example.com/index.html) - URL' => '(<a href="http://www.example.com/index.html" class="_blanktarget">www.example.com/index.html</a>) - URL',
|
||||
// URL in brackets with anchor.
|
||||
'(http://moodle.org/main#anchor) - URL' => '(<a href="http://moodle.org/main#anchor" class="_blanktarget">http://moodle.org/main#anchor</a>) - URL',
|
||||
'(www.moodle.org/main#anchor) - URL' => '(<a href="http://www.moodle.org/main#anchor" class="_blanktarget">www.moodle.org/main#anchor</a>) - URL',
|
||||
// URL in square brackets.
|
||||
'[http://moodle.org] - URL' => '[<a href="http://moodle.org" class="_blanktarget">http://moodle.org</a>] - URL',
|
||||
'[www.moodle.org] - URL' => '[<a href="http://www.moodle.org" class="_blanktarget">www.moodle.org</a>] - URL',
|
||||
//url in brackets with anchor
|
||||
// URL in square brackets with a path.
|
||||
'[http://example.com/index.html] - URL' => '[<a href="http://example.com/index.html" class="_blanktarget">http://example.com/index.html</a>] - URL',
|
||||
'[www.example.com/index.html] - URL' => '[<a href="http://www.example.com/index.html" class="_blanktarget">www.example.com/index.html</a>] - URL',
|
||||
// URL in square brackets with anchor.
|
||||
'[http://moodle.org/main#anchor] - URL' => '[<a href="http://moodle.org/main#anchor" class="_blanktarget">http://moodle.org/main#anchor</a>] - URL',
|
||||
'[www.moodle.org/main#anchor] - URL' => '[<a href="http://www.moodle.org/main#anchor" class="_blanktarget">www.moodle.org/main#anchor</a>] - URL',
|
||||
//brackets within the url
|
||||
@@ -71,7 +84,8 @@ class filter_urltolink_testcase extends basic_testcase {
|
||||
'URL: www.cc.org/url_(withpar)_go/?i=2' => 'URL: <a href="http://www.cc.org/url_(withpar)_go/?i=2" class="_blanktarget">www.cc.org/url_(withpar)_go/?i=2</a>',
|
||||
'URL: http://cc.org/url_(with)_(par)_go/?i=2' => 'URL: <a href="http://cc.org/url_(with)_(par)_go/?i=2" class="_blanktarget">http://cc.org/url_(with)_(par)_go/?i=2</a>',
|
||||
'URL: www.cc.org/url_(with)_(par)_go/?i=2' => 'URL: <a href="http://www.cc.org/url_(with)_(par)_go/?i=2" class="_blanktarget">www.cc.org/url_(with)_(par)_go/?i=2</a>',
|
||||
'http://en.wikipedia.org/wiki/Slash_(punctuation)'=>'<a href="http://en.wikipedia.org/wiki/Slash_(punctuation)" class="_blanktarget">http://en.wikipedia.org/wiki/Slash_(punctuation)</a>',
|
||||
// URL legitimately ending in a bracket. Commented out as part of MDL-22390. See next tests for work-arounds.
|
||||
// 'http://en.wikipedia.org/wiki/Slash_(punctuation)'=>'<a href="http://en.wikipedia.org/wiki/Slash_(punctuation)" class="_blanktarget">http://en.wikipedia.org/wiki/Slash_(punctuation)</a>',
|
||||
'http://en.wikipedia.org/wiki/%28#Parentheses_.28_.29 - URL' => '<a href="http://en.wikipedia.org/wiki/%28#Parentheses_.28_.29" class="_blanktarget">http://en.wikipedia.org/wiki/%28#Parentheses_.28_.29</a> - URL',
|
||||
'http://en.wikipedia.org/wiki/(#Parentheses_.28_.29 - URL' => '<a href="http://en.wikipedia.org/wiki/(#Parentheses_.28_.29" class="_blanktarget">http://en.wikipedia.org/wiki/(#Parentheses_.28_.29</a> - URL',
|
||||
//escaped brackets in url
|
||||
@@ -94,8 +108,6 @@ class filter_urltolink_testcase extends basic_testcase {
|
||||
'URL: www.moodle.org?u=1.23' => 'URL: <a href="http://www.moodle.org?u=1.23" class="_blanktarget">www.moodle.org?u=1.23</a>',
|
||||
//escaped space in url
|
||||
'URL: www.moodle.org?u=test+param&' => 'URL: <a href="http://www.moodle.org?u=test+param&" class="_blanktarget">www.moodle.org?u=test+param&</a>',
|
||||
//odd characters in url param
|
||||
'URL: www.moodle.org?param=:)' => 'URL: <a href="http://www.moodle.org?param=:)" class="_blanktarget">www.moodle.org?param=:)</a>',
|
||||
//multiple urls
|
||||
'URL: http://moodle.org www.moodle.org'
|
||||
=> 'URL: <a href="http://moodle.org" class="_blanktarget">http://moodle.org</a> <a href="http://www.moodle.org" class="_blanktarget">www.moodle.org</a>',
|
||||
@@ -125,11 +137,13 @@ class filter_urltolink_testcase extends basic_testcase {
|
||||
'<br />This is some text. www.moodle.com then some more text<br />' => '<br />This is some text. <a href="http://www.moodle.com" class="_blanktarget">www.moodle.com</a> then some more text<br />',
|
||||
//check we aren't modifying img tags
|
||||
'image<img src="http://moodle.org/logo/logo-240x60.gif" />' => 'image<img src="http://moodle.org/logo/logo-240x60.gif" />',
|
||||
'image<img src="www.moodle.org/logo/logo-240x60.gif" />' => 'image<img src="www.moodle.org/logo/logo-240x60.gif" />',
|
||||
'image<img src="www.moodle.org/logo/logo-240x60.gif" />' => 'image<img src="www.moodle.org/logo/logo-240x60.gif" />',
|
||||
'image<img src="http://www.example.com/logo.gif" />' => 'image<img src="http://www.example.com/logo.gif" />',
|
||||
//and another url within one tag
|
||||
'<td background="http://moodle.org"> </td>' => '<td background="http://moodle.org"> </td>',
|
||||
'<td background="www.moodle.org"> </td>' => '<td background="www.moodle.org"> </td>',
|
||||
'<form name="input" action="http://moodle.org/submit.asp" method="get">'=>'<form name="input" action="http://moodle.org/submit.asp" method="get">',
|
||||
'<td background="https://www.moodle.org"> </td>' => '<td background="https://www.moodle.org"> </td>',
|
||||
//partially escaped img tag
|
||||
'partially escaped img tag <img src="http://moodle.org/logo/logo-240x60.gif" />' => 'partially escaped img tag <img src="http://moodle.org/logo/logo-240x60.gif" />',
|
||||
//fully escaped img tag. Commented out as part of MDL-21183
|
||||
@@ -151,17 +165,25 @@ class filter_urltolink_testcase extends basic_testcase {
|
||||
//'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd">'=>'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd">'
|
||||
);
|
||||
|
||||
$data = array();
|
||||
foreach ($texts as $text => $correctresult) {
|
||||
$data[] = array($text, $correctresult);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider get_convert_urls_into_links_test_cases
|
||||
*/
|
||||
function test_convert_urls_into_links($text, $correctresult) {
|
||||
$testablefilter = new testable_filter_urltolink();
|
||||
$testablefilter->convert_urls_into_links($text);
|
||||
$this->assertEquals($correctresult, $text);
|
||||
}
|
||||
|
||||
function test_convert_urls_into_links_performance() {
|
||||
$testablefilter = new testable_filter_urltolink();
|
||||
|
||||
foreach ($texts as $text => $correctresult) {
|
||||
$msg = "Testing text: ". str_replace('%', '%%', $text) . ": %s"; // Escape original '%' so sprintf() wont get confused
|
||||
|
||||
$testablefilter->convert_urls_into_links($text);
|
||||
|
||||
$this->assertEquals($text, $correctresult, $msg);
|
||||
}
|
||||
|
||||
//performance testing
|
||||
$reps = 1000;
|
||||
$text = file_get_contents(__DIR__ . '/fixtures/sample.txt');
|
||||
$time_start = microtime(true);
|
||||
|
||||
@@ -30,7 +30,7 @@ require_once 'calculation_form.php';
|
||||
$courseid = required_param('courseid', PARAM_INT);
|
||||
$id = required_param('id', PARAM_INT);
|
||||
$section = optional_param('section', 'calculation', PARAM_ALPHA);
|
||||
$idnumbers = optional_param('idnumbers', null, PARAM_RAW);
|
||||
$idnumbers = optional_param_array('idnumbers', null, PARAM_RAW);
|
||||
|
||||
$url = new moodle_url('/grade/edit/tree/calculation.php', array('id'=>$id, 'courseid'=>$courseid));
|
||||
if ($section !== 'calculation') {
|
||||
|
||||
@@ -200,6 +200,18 @@ if ($mform->is_cancelled()) {
|
||||
$data->feedback = $old_grade_grade->feedback;
|
||||
$data->feedbackformat = $old_grade_grade->feedbackformat;
|
||||
}
|
||||
|
||||
// Only log a grade override if they actually changed the student grade.
|
||||
if ($data->finalgrade != $old_grade_grade->finalgrade) {
|
||||
$url = '/report/grader/index.php?id=' . $course->id;
|
||||
|
||||
$user = $DB->get_record('user', array('id'=>$data->userid), '*', MUST_EXIST);
|
||||
$fullname = fullname($user);
|
||||
|
||||
$info = "{$grade_item->itemname}: $fullname";
|
||||
add_to_log($course->id, 'grade', 'update', $url, $info);
|
||||
}
|
||||
|
||||
// update final grade or feedback
|
||||
// when we set override grade the first time, it happens here
|
||||
$grade_item->update_final_grade($data->userid, $data->finalgrade, 'editgrade', $data->feedback, $data->feedbackformat);
|
||||
@@ -213,6 +225,19 @@ if ($mform->is_cancelled()) {
|
||||
$data->overridden = 0; // checkbox unticked
|
||||
}
|
||||
$grade_grade->set_overridden($data->overridden);
|
||||
|
||||
if ($data->overridden == 0 && $data->overridden != $old_grade_grade->overridden) {
|
||||
// Log removing an override.
|
||||
// The addition of an override is logged above.
|
||||
// One or the other will happen but never both.
|
||||
$url = '/report/grader/index.php?id=' . $course->id;
|
||||
|
||||
$user = $DB->get_record('user', array('id'=>$data->userid), '*', MUST_EXIST);
|
||||
$fullname = fullname($user);
|
||||
|
||||
$info = "{$grade_item->itemname}: $fullname";
|
||||
add_to_log($course->id, 'grade', 'update', $url, $info);
|
||||
}
|
||||
}
|
||||
|
||||
if (has_capability('moodle/grade:manage', $context) or has_capability('moodle/grade:hide', $context)) {
|
||||
|
||||
@@ -406,3 +406,13 @@ class grade_export_update_buffer {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify that there is a valid set of grades to export.
|
||||
* @param $courseid int The course being exported
|
||||
*/
|
||||
function export_verify_grades($courseid) {
|
||||
$regraderesult = grade_regrade_final_grades($courseid);
|
||||
if (is_array($regraderesult)) {
|
||||
throw new moodle_exception('gradecantregrade', 'error', '', implode(', ', array_unique($regraderesult)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ require_capability('moodle/grade:export', $context);
|
||||
require_capability('gradeexport/ods:view', $context);
|
||||
|
||||
print_grade_page_head($COURSE->id, 'export', 'ods', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_ods'));
|
||||
export_verify_grades($COURSE->id);
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeexport/ods:publish', $context);
|
||||
|
||||
@@ -34,6 +34,7 @@ require_capability('moodle/grade:export', $context);
|
||||
require_capability('gradeexport/txt:view', $context);
|
||||
|
||||
print_grade_page_head($COURSE->id, 'export', 'txt', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_txt'));
|
||||
export_verify_grades($COURSE->id);
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeexport/txt:publish', $context);
|
||||
|
||||
@@ -34,6 +34,7 @@ require_capability('moodle/grade:export', $context);
|
||||
require_capability('gradeexport/xls:view', $context);
|
||||
|
||||
print_grade_page_head($COURSE->id, 'export', 'xls', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_xls'));
|
||||
export_verify_grades($COURSE->id);
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeexport/xls:publish', $context);
|
||||
|
||||
@@ -34,6 +34,7 @@ require_capability('moodle/grade:export', $context);
|
||||
require_capability('gradeexport/xml:view', $context);
|
||||
|
||||
print_grade_page_head($COURSE->id, 'export', 'xml', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_xml'));
|
||||
export_verify_grades($COURSE->id);
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeexport/xml:publish', $context);
|
||||
|
||||
@@ -36,7 +36,7 @@ $string['criterionmovedown'] = 'Move down';
|
||||
$string['criterionmoveup'] = 'Move up';
|
||||
$string['definerubric'] = 'Define rubric';
|
||||
$string['description'] = 'Description';
|
||||
$string['enableremarks'] = 'Allow grader to add text remarks for each criteria';
|
||||
$string['enableremarks'] = 'Allow grader to add text remarks for each criterion';
|
||||
$string['err_mintwolevels'] = 'Each criterion must have at least two levels';
|
||||
$string['err_nocriteria'] = 'Rubric must contain at least one criterion';
|
||||
$string['err_nodefinition'] = 'Level definition can not be empty';
|
||||
|
||||
+15
-10
@@ -393,16 +393,21 @@ if ($formdata = $mform->get_data()) {
|
||||
$newgrade->finalgrade = $value;
|
||||
} else {
|
||||
if ($value === '' or $value == '-') {
|
||||
$value = null; // no grade
|
||||
|
||||
} else if (!is_numeric($value)) {
|
||||
// non numeric grade value supplied, possibly mapped wrong column
|
||||
echo "<br/>t0 is $t0";
|
||||
echo "<br/>grade is $value";
|
||||
$status = false;
|
||||
import_cleanup($importcode);
|
||||
echo $OUTPUT->notification(get_string('badgrade', 'grades'));
|
||||
break 3;
|
||||
$value = null; // No grade.
|
||||
} else {
|
||||
// If the value has a local decimal or can correctly be unformatted, do it.
|
||||
$validvalue = unformat_float($value, true);
|
||||
if ($validvalue !== false) {
|
||||
$value = $validvalue;
|
||||
} else {
|
||||
// Non numeric grade value supplied, possibly mapped wrong column.
|
||||
echo "<br/>t0 is $t0";
|
||||
echo "<br/>grade is $value";
|
||||
$status = false;
|
||||
import_cleanup($importcode);
|
||||
echo $OUTPUT->notification(get_string('badgrade', 'grades'));
|
||||
break 3;
|
||||
}
|
||||
}
|
||||
$newgrade->finalgrade = $value;
|
||||
}
|
||||
|
||||
+4
-3
@@ -22,7 +22,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
require_once $CFG->libdir.'/gradelib.php';
|
||||
require_once($CFG->libdir . '/gradelib.php');
|
||||
require_once($CFG->dirroot . '/grade/export/lib.php');
|
||||
|
||||
/**
|
||||
* This class iterates over all users that are graded in a course.
|
||||
@@ -123,7 +124,7 @@ class graded_users_iterator {
|
||||
|
||||
$this->close();
|
||||
|
||||
grade_regrade_final_grades($this->course->id);
|
||||
export_verify_grades($this->course->id);
|
||||
$course_item = grade_item::fetch_course_item($this->course->id);
|
||||
if ($course_item->needsupdate) {
|
||||
// can not calculate all final grades - sorry
|
||||
@@ -2424,7 +2425,7 @@ abstract class grade_helper {
|
||||
return self::$managesetting;
|
||||
}
|
||||
$context = get_context_instance(CONTEXT_COURSE, $courseid);
|
||||
if (has_capability('moodle/course:update', $context)) {
|
||||
if (has_capability('moodle/grade:manage', $context)) {
|
||||
self::$managesetting = new grade_plugin_info('coursesettings', new moodle_url('/grade/edit/settings/index.php', array('id'=>$courseid)), get_string('course'));
|
||||
} else {
|
||||
self::$managesetting = false;
|
||||
|
||||
@@ -118,6 +118,14 @@ switch ($action) {
|
||||
echo json_encode($json_object);
|
||||
die();
|
||||
} else {
|
||||
$url = '/report/grader/index.php?id=' . $course->id;
|
||||
|
||||
$user = $DB->get_record('user', array('id'=>$userid), '*', MUST_EXIST);
|
||||
$fullname = fullname($user);
|
||||
|
||||
$info = "{$grade_item->itemname}: $fullname";
|
||||
add_to_log($course->id, 'grade', 'update', $url, $info);
|
||||
|
||||
$json_object->gradevalue = $finalvalue;
|
||||
|
||||
if ($grade_item->update_final_grade($userid, $finalgrade, 'gradebook', $feedback, FORMAT_MOODLE)) {
|
||||
|
||||
@@ -297,6 +297,12 @@ class grade_report_grader extends grade_report {
|
||||
}
|
||||
}
|
||||
|
||||
$url = '/report/grader/index.php?id=' . $this->course->id;
|
||||
$fullname = fullname($this->users[$userid]);
|
||||
|
||||
$info = "{$gradeitem->itemname}: $fullname";
|
||||
add_to_log($this->course->id, 'grade', 'update', $url, $info);
|
||||
|
||||
$gradeitem->update_final_grade($userid, $finalgrade, 'gradebook', $feedback, FORMAT_MOODLE);
|
||||
|
||||
// We can update feedback without reloading the grade item as it doesn't affect grade calculations
|
||||
|
||||
@@ -357,7 +357,12 @@ abstract class grade_report {
|
||||
// If we're dealing with multiple courses we need to know when we've moved on to a new course.
|
||||
static $previous_courseid = null;
|
||||
|
||||
if( $this->showtotalsifcontainhidden==GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN ) {
|
||||
if (!is_array($this->showtotalsifcontainhidden)) {
|
||||
debugging('showtotalsifcontainhidden should be an array', DEBUG_DEVELOPER);
|
||||
$this->showtotalsifcontainhidden = array($courseid => $this->showtotalsifcontainhidden);
|
||||
}
|
||||
|
||||
if ($this->showtotalsifcontainhidden[$courseid] == GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN) {
|
||||
return $finalgrade;
|
||||
}
|
||||
|
||||
@@ -395,7 +400,7 @@ abstract class grade_report {
|
||||
|
||||
//if the item definitely depends on a hidden item
|
||||
if (array_key_exists($course_item->id, $hiding_affected['altered'])) {
|
||||
if( !$this->showtotalsifcontainhidden ) {
|
||||
if( !$this->showtotalsifcontainhidden[$courseid] ) {
|
||||
//hide the grade
|
||||
$finalgrade = null;
|
||||
}
|
||||
@@ -405,7 +410,7 @@ abstract class grade_report {
|
||||
}
|
||||
} else if (!empty($hiding_affected['unknown'][$course_item->id])) {
|
||||
//not sure whether or not this item depends on a hidden item
|
||||
if( !$this->showtotalsifcontainhidden ) {
|
||||
if( !$this->showtotalsifcontainhidden[$courseid] ) {
|
||||
//hide the grade
|
||||
$finalgrade = null;
|
||||
}
|
||||
|
||||
@@ -71,8 +71,6 @@ class grade_report_overview extends grade_report {
|
||||
global $CFG, $COURSE, $DB;
|
||||
parent::__construct($COURSE->id, $gpr, $context);
|
||||
|
||||
$this->showtotalsifcontainhidden = grade_get_setting($this->courseid, 'report_overview_showtotalsifcontainhidden', $CFG->grade_report_overview_showtotalsifcontainhidden);
|
||||
|
||||
// Get the user (for full name).
|
||||
$this->user = $DB->get_record('user', array('id' => $userid));
|
||||
|
||||
@@ -81,12 +79,17 @@ class grade_report_overview extends grade_report {
|
||||
|
||||
$this->showrank = array();
|
||||
$this->showrank['any'] = false;
|
||||
|
||||
$this->showtotalsifcontainhidden = array();
|
||||
|
||||
if ($this->courses) {
|
||||
foreach ($this->courses as $course) {
|
||||
$this->showrank[$course->id] = grade_get_setting($course->id, 'report_overview_showrank', !empty($CFG->grade_report_overview_showrank));
|
||||
if ($this->showrank[$course->id]) {
|
||||
$this->showrank['any'] = true;
|
||||
}
|
||||
|
||||
$this->showtotalsifcontainhidden[$course->id] = grade_get_setting($course->id, 'report_overview_showtotalsifcontainhidden', $CFG->grade_report_overview_showtotalsifcontainhidden);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
This files describes API changes in /grade/report/*,
|
||||
information provided here is intended especially for developers.
|
||||
|
||||
|
||||
=== 2.3.5, 2.4.2 ===
|
||||
* class_grade_report::showtotalsifcontainhidden has been switched from a single integer value to an array.
|
||||
The array keys are course IDs while the array values are the value of the course setting "report_overview_showtotalsifcontainhidden".
|
||||
@@ -165,7 +165,7 @@ class grade_report_user extends grade_report {
|
||||
$this->showrank = grade_get_setting($this->courseid, 'report_user_showrank', $CFG->grade_report_user_showrank);
|
||||
$this->showpercentage = grade_get_setting($this->courseid, 'report_user_showpercentage', $CFG->grade_report_user_showpercentage);
|
||||
$this->showhiddenitems = grade_get_setting($this->courseid, 'report_user_showhiddenitems', $CFG->grade_report_user_showhiddenitems);
|
||||
$this->showtotalsifcontainhidden = grade_get_setting($this->courseid, 'report_user_showtotalsifcontainhidden', $CFG->grade_report_user_showtotalsifcontainhidden);
|
||||
$this->showtotalsifcontainhidden = array($this->courseid => grade_get_setting($this->courseid, 'report_user_showtotalsifcontainhidden', $CFG->grade_report_user_showtotalsifcontainhidden));
|
||||
|
||||
$this->showgrade = grade_get_setting($this->courseid, 'report_user_showgrade', !empty($CFG->grade_report_user_showgrade));
|
||||
$this->showrange = grade_get_setting($this->courseid, 'report_user_showrange', !empty($CFG->grade_report_user_showrange));
|
||||
|
||||
@@ -120,15 +120,15 @@ class gradereportlib_testcase extends advanced_testcase {
|
||||
$report = new grade_report_test($course->id, $gpr, $coursecontext, $student);
|
||||
|
||||
// Should return the supplied student total grade regardless of hiding.
|
||||
$report->showtotalsifcontainhidden = GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN;
|
||||
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN);
|
||||
$this->assertEquals($datagrade + $forumgrade, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
|
||||
|
||||
// Should blank the student total as course grade depends on a hidden item.
|
||||
$report->showtotalsifcontainhidden = GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN;
|
||||
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN);
|
||||
$this->assertEquals(null, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
|
||||
|
||||
// Should return the course total minus the hidden database activity grade.
|
||||
$report->showtotalsifcontainhidden = GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN;
|
||||
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN);
|
||||
$this->assertEquals($forumgrade, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
|
||||
|
||||
// Note: we cannot simply hide modules and call $report->blank_hidden_total() again.
|
||||
@@ -182,16 +182,16 @@ class gradereportlib_testcase extends advanced_testcase {
|
||||
$report = new grade_report_test($course->id, $gpr, $coursecontext, $student);
|
||||
|
||||
// Should return the supplied student total grade regardless of hiding.
|
||||
$report->showtotalsifcontainhidden = GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN;
|
||||
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN);
|
||||
$this->assertEquals($datagrade + $forumgrade, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
|
||||
|
||||
// Should blank the student total as course grade depends on a hidden item.
|
||||
$report->showtotalsifcontainhidden = GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN;
|
||||
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN);
|
||||
$this->assertEquals(null, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
|
||||
|
||||
// Should return the course total minus the hidden activity grades.
|
||||
// They are both hidden so should return null.
|
||||
$report->showtotalsifcontainhidden = GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN;
|
||||
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN);
|
||||
$this->assertEquals(null, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
|
||||
}
|
||||
}
|
||||
|
||||
+3
-5
@@ -56,14 +56,12 @@ $PAGE->set_url($url);
|
||||
// Make sure that the user has permissions to manage groups.
|
||||
require_login($course);
|
||||
|
||||
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
require_capability('moodle/course:managegroups', $context);
|
||||
|
||||
$PAGE->requires->yui2_lib('connection');
|
||||
$PAGE->requires->js('/group/clientlib.js');
|
||||
|
||||
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
if (!has_capability('moodle/course:managegroups', $context)) {
|
||||
redirect('/course/view.php', array('id'=>$course->id)); // Not allowed to manage all groups
|
||||
}
|
||||
|
||||
// Check for multiple/no group errors
|
||||
if (!$singlegroup) {
|
||||
switch($action) {
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
}
|
||||
$PAGE->set_url('/', $urlparams);
|
||||
$PAGE->set_course($SITE);
|
||||
$PAGE->set_other_editing_capability('moodle/course:update');
|
||||
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
|
||||
$PAGE->set_other_editing_capability('moodle/course:activityvisibility');
|
||||
|
||||
// Prevent caching of this page to stop confusion when changing page after making AJAX changes
|
||||
$PAGE->set_cacheable(false);
|
||||
@@ -89,7 +92,6 @@
|
||||
}
|
||||
|
||||
$PAGE->set_pagetype('site-index');
|
||||
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
|
||||
$PAGE->set_docs_path('');
|
||||
$PAGE->set_pagelayout('frontpage');
|
||||
$editing = $PAGE->user_is_editing();
|
||||
@@ -136,7 +138,7 @@
|
||||
|
||||
echo format_text($summarytext, $section->summaryformat, $summaryformatoptions);
|
||||
|
||||
if ($editing) {
|
||||
if ($editing && has_capability('moodle/course:update', $context)) {
|
||||
$streditsummary = get_string('editsummary');
|
||||
echo "<a title=\"$streditsummary\" ".
|
||||
" href=\"course/editsection.php?id=$section->id\"><img src=\"" . $OUTPUT->pix_url('t/edit') . "\" ".
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatelangdir'] = 'lang ডিরেক্টরি তৈরি করতে পারে না';
|
||||
$string['cannotcreatetempdir'] = 'টেম্প ডিরেক্টরি তৈরি করতে পারে না';
|
||||
$string['cannotdownloadcomponents'] = 'কম্পোনেন্ট ডাউনলোড করা যায় না';
|
||||
$string['cannotdownloadzipfile'] = 'ZIP ফাইল ডাউনলোড করা যায়না';
|
||||
$string['cannotfindcomponent'] = 'কম্পোনেন্ট খুঁজে পাওয়া যায় না';
|
||||
$string['cannotsavemd5file'] = 'md5 ফাইল সংরক্ষণ করতে পারেনা';
|
||||
$string['cannotsavezipfile'] = 'ZIP ফাইল সংরক্ষণ করতে পারেনা';
|
||||
$string['cannotunzipfile'] = 'ফাইল আনজিপ করতে পারে না';
|
||||
$string['componentisuptodate'] = 'কম্পোনেন্ট হালনাগাদ করা নেই';
|
||||
$string['downloadedfilecheckfailed'] = 'ফাইল ডাউনলোড পরীক্ষা ব্যর্থ';
|
||||
$string['invalidmd5'] = 'পরীক্ষন ভেরিয়েবল ভুল ছিল - পুনরায় চেষ্টা';
|
||||
$string['missingrequiredfield'] = 'কিছু আবশ্যক ক্ষেত্র অনুপস্থিত';
|
||||
$string['remotedownloaderror'] = 'আপনার সার্ভারে কম্পোনেন্ট ডাউনলোড ব্যর্থ, অনুগ্রহ করে প্রক্সি সেটিং পরীক্ষা, PHP cURL এক্সটেনশন খুব ভালোভাবে সুপারিশ করা হয়েছে।<br /><br />আপনার উচিত ফাইলটি নিজহাতে <a href="{$a->url}">{$a->url}</a> থেকে ডাউনলোড করে, আপনার সার্ভারে "{$a->dest}" এ এটা অনুলিপি এবং এটা এখানে আনজিপ করুন।';
|
||||
$string['wrongdestpath'] = 'ভুল গন্তব্য পাথ';
|
||||
$string['wrongsourcebase'] = 'ভুল সোর্স URL বেস';
|
||||
$string['wrongzipfilename'] = 'ভুল ZIP ফাইল নাম';
|
||||
@@ -30,4 +30,71 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'অ্যাডমিন ডিরেক্টরিটি';
|
||||
$string['availablelangs'] = 'যে সমস্ত ভাষা ব্যাবহার করতে পারেন';
|
||||
$string['chooselanguagehead'] = 'একটি ভাষা নির্বাচন';
|
||||
$string['chooselanguagesub'] = 'ইনস্টলেশনের জন্য একটি ভাষা নির্বাচন। এই ভাষাই সাইটের জন্য নির্ধারিত ভাষা হিসাবে ব্যবহৃত হবে এবং এটা পরে যেকোনো সময় পরিবর্তন করা হতে পারে।';
|
||||
$string['cliinstallheader'] = 'মুডল {$a} কমান্ড লাইন ইনস্টলেশন প্রোগ্রাম';
|
||||
$string['databasehost'] = 'ডাটাবেস হোস্ট';
|
||||
$string['databasename'] = 'ডাটাবেস নাম';
|
||||
$string['databasetypehead'] = 'ডাটাবেস ড্রাইভার নির্বাচন';
|
||||
$string['dataroot'] = 'ডাটাবেস ডিরেক্টরি';
|
||||
$string['dbprefix'] = 'টেবিল প্রেফিক্স';
|
||||
$string['dirroot'] = 'মুডল ডিরেক্টরি';
|
||||
$string['environmenthead'] = 'এনভায়রনমেন্ট পরীক্ষা করা হচ্ছে ...';
|
||||
$string['environmentsub2'] = 'প্রত্যেক মুডল রিলিজের PHP সংস্করণের কিছু নূন্যতম শর্ত এবং কিছু অত্যাবশ্যক PHP এক্সটেনশন রয়েছে।
|
||||
ইনস্টল ও আপগ্রেডের পূর্বেই সম্পূর্ন এনভায়রনমেন্ট পরীক্ষা করা হয়েছে। নতুন সংস্করনটা ইনস্টল করতে বা PHP এক্সটেনশন সক্রিয় করতে না পারলে অনুগ্রহ করে সার্ভার প্রশাসন এর সাথে যোগাযোগ।';
|
||||
$string['errorsinenvironment'] = 'এনভায়রনমেন্ট পরীক্ষা ব্যর্থ!';
|
||||
$string['installation'] = 'ইনস্টলেশন';
|
||||
$string['langdownloaderror'] = 'দূর্ভাগ্যবশত "{$a}" ভাষা ডাউনলোড করা যাচ্ছে না। ইনস্টলেশন প্রক্রিয়া ইংরেজী ভাষাতেই চলবে।';
|
||||
$string['memorylimithelp'] = '<p>আপনার সার্ভারের PHP মেমরি সীমা বর্তমানে {$a} এ নির্ধারণ করা হয়েছে।</p>
|
||||
|
||||
<p>ফলে মুডলে পরবর্তীতে মেমরি সংক্রান্ত সমস্যা দেখা দিতে পারে, বিশেষ করে অনেকগুলো মুডল সক্রিয় করা থাকলে/বেশিসংখ্যক ব্যবহারকারী থাকলে। </p>
|
||||
|
||||
<p>এজন্য আমরা সুপারিশ করি উচ্চসীমার, যেমন ৪০M মেমরি সহ PHP কমপাইল করতে।
|
||||
এটা করার অনেকগুলো উপায় রয়েছে:</p>
|
||||
<ol>
|
||||
<li>আপনি যদি <i>--enable-memory-limit</i> দ্বারা PHP কমপাইল করতে পারেন তবে।
|
||||
ফলে মুডল নিজে মেমরি সীমা নির্ধারণ করে নিবে।</li>
|
||||
<li>আপনি php.ini ফাইল ব্যবহার করতে পারলে <b>memory_limit</b>
|
||||
পরিবর্তন করে ৪০M এর মত করা যেত। আপনি যদি নিজে ব্যবহার করতে না পারেন তবে আপনার অ্যাডমিনিস্ট্রেশন আপনার জন্য এ কাজ করে দিবে।</li>
|
||||
<li>কিছু PHP সার্ভারে মুডল ডিরেক্টরিতে:
|
||||
<blockquote><div>php_value memory_limit 40M</div></blockquote>
|
||||
লাইনটিসহ .htaccess ফাইল তৈরি করে নিতে পারেন
|
||||
<p>কিছু সার্ভারে <b>সকল</b> PHP পৃষ্ঠা কাজ নাও করতে পারে
|
||||
(পৃষ্ঠায় আপনার কিছু ত্রুটি চোখে পড়বে) সুতরাং আপনাকে .htaccess ফাইল অপসারন করতে হবে।</p></li>
|
||||
</ol>';
|
||||
$string['paths'] = 'পাথ';
|
||||
$string['pathserrcreatedataroot'] = 'ইনস্টলারের সাহায্যে ডাটা ডিরেক্টরি ({$a->dataroot}) তৈরি করা যায় না';
|
||||
$string['pathshead'] = 'পাথ নিশ্চিত';
|
||||
$string['pathsrodataroot'] = 'ডাটারুট ডিরেক্টরি লেখার মত নয়।';
|
||||
$string['pathsroparentdataroot'] = 'প্যারেন্ট ডিরেক্টরি ({$a->parent}) লেখার যোগ্য নয়। ইনস্টলারের সাহায্যে ডাটা ডিরেক্টরি ({$a->dataroot}) তৈরি করা যায় না।';
|
||||
$string['pathssubadmindir'] = 'খুব কম সংখ্যক ওয়েবহোস্ট কন্ট্রোল প্যানেল বা এই ধরনের কিছু ব্যবহার করতে /admin কে বিশেষ URL হিসাবে ব্যবহার করে। দূর্ভাগ্যবশত এর সাথে মুডল এডমিন পৃষ্টার স্ট্যান্ডার্ড স্থান নিয়ে ঝামেলা হয়। ইনস্টলেশনে অ্যাডমিন ডিরেক্টরির
|
||||
নাম পরিবর্তন করে নতুন নাম দিয়ে এ সমস্যার সমাধান করতে পারেন। যেমন: <em>moodleadmin</em>। এর ফলে মডুলে অ্যাডমিনে লিঙ্কগুলো নির্ধারণ করে দিবে।';
|
||||
$string['pathssubdataroot'] = 'মুডলের ফাইল সংরক্ষণের জন্য জায়গা প্রয়োজন। ওয়েব সার্ভার ব্যবহারকারী
|
||||
(সাধরনত কেউই না বা apache) যাতে অবশ্যই এই ডিরেক্টরি পড়তে ও লিখতে পারে, কিন্তু যাতে ওয়েবের সাহায্যে এটা সরাসরি ব্যবহার করা না যায়। ডিরেক্টরি না থাকলে, ইনস্টলার এটা তৈরি করে নেয়ার চেষ্টা করবে।';
|
||||
$string['pathssubdirroot'] = 'মুডল ইন্সটলেশনের সম্পূর্ন ডিরেক্টরি পাথ।';
|
||||
$string['pathssubwwwroot'] = 'মুডল ব্যবহার করার সম্পূর্ন ওয়েব ঠিকানা।
|
||||
একাধিক ঠিকানা ব্যবহার করে মুডল ব্যবহার করা সম্ভব নয়।
|
||||
আপনার সাইটের যদি একাধিক পাবলিক ঠিকানা থাকে তবে এই ঠিকানাটা ছাড়া বাকি সবগুলো ঠিকানার জন্য আপনাকে অবশ্যই স্থায়ী রিডিরেক্ট নির্ধারণ করতে হবে।';
|
||||
$string['pathsunsecuredataroot'] = 'ডাটারুট এর স্থান নিরাপদ নয়';
|
||||
$string['pathswrongadmindir'] = 'অ্যাডমিন ডিরেক্টরি নাই';
|
||||
$string['phpextension'] = '{$a} PHP এক্সটেনশন';
|
||||
$string['phpversion'] = 'PHP সংস্করণ';
|
||||
$string['phpversionhelp'] = '<p>মুডলের জন্য PHP এর কমপক্ষে 4.3.0 or 5.1.0সংস্করণ প্রয়োজন (5.0.x এ অবগত সমস্যার সংখ্যাগতমান দেয়া থাকে)।</p>
|
||||
<p>আপনি বর্তমানে {$a} সংস্করণটি চালাচ্ছেন</p>
|
||||
<p>PHP সংস্করন অবশ্যই আপগ্রেড করতে হবে বা PHP এর নতুন সংস্করনসহ হোস্ট ব্যবহার করতে হবে!<br />
|
||||
(5.0.x এর ক্ষেত্রে আপনি 4.4.x সংস্করনেও ডাউনগ্রেড করতে পারেন)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'আপনি সফলভাবে
|
||||
আপনার কম্পিউটারে <strong>{$a->packname} {$a->packversion}</strong> প্যাকেজ ইনস্টল করে চালু করেছেন বলেই এই পৃষ্ঠাটি দেখতে পাচ্ছেন। অভিনন্দন!';
|
||||
$string['welcomep30'] = 'অ্যাপ্লিকেশনসহ <strong>{$a->installername}</strong> রিলিজের ফলে একটি এনভায়রনমেন্ট তৈরি করা হয় যেখানে <strong>মুডল</strong> কাজ করবে, যেমন:';
|
||||
$string['welcomep40'] = 'প্যাকেজে <strong>মুডল {$a->moodlerelease} ({$a->moodleversion})</strong> ও থাকে।';
|
||||
$string['welcomep50'] = 'এই প্যাকেজের সকল অ্যাপ্লিকেশন তাদের মূল্যবান
|
||||
লাইসেন্স অনুসরন করে। সম্পূর্ন <strong>{$a->installername}</strong> প্যাকেজ <a href="http://www.opensource.org/docs/definition_plain.html">ওপেন সোর্স</a> এবং <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> লাইসেন্সের আওতায়
|
||||
বন্টিত।';
|
||||
$string['welcomep60'] = 'নিম্নোক্ত পৃষ্ঠায় আপনার কম্পিউটারে <strong>মুডল</strong>
|
||||
কনফিগার করে নির্ধারন করার জন্য কিছু সহজ উপায় দেয়া আছে। আপনি পূর্বনির্ধারিত
|
||||
সেটিং গ্রহন করতে পারেন অথবা ঐচ্ছিকভাবে তাদেরকে আপনার প্রয়োজনানুসারে সংশোধন করে নিতে পারেন।';
|
||||
$string['welcomep70'] = '<strong>মুডল</strong> সেট আপের সাহায্যে অগ্রসর হওয়ার জন্য "পরবর্তী" বোতামে ক্লিক।';
|
||||
$string['wwwroot'] = 'ওয়েব ঠিকানা';
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['clianswerno'] = 'n';
|
||||
$string['cliansweryes'] = 'y';
|
||||
$string['cliincorrectvalueerror'] = 'Greška, neispravna vrijednost "{$a->value}" za "{$a->option}"';
|
||||
$string['cliincorrectvalueretry'] = 'Neispravna vrijednost, molim pokušajte ponovo';
|
||||
$string['clitypevalue'] = 'otkucaj vrijednost';
|
||||
$string['clitypevaluedefault'] = 'otkucaj vrijednost, pritisni "Enter" da biste upotrebili zadanu vrijednost ({$a})';
|
||||
$string['cliunknowoption'] = 'Neprepoznate opcije:
|
||||
{$a}
|
||||
Molimo iskoristite opciju za pomoć.';
|
||||
$string['cliyesnoprompt'] = 'otkucaj y (znači DA) ili n (znači NE)';
|
||||
$string['environmentrequireinstall'] = 'mora biti instaliran i omogućen';
|
||||
$string['environmentrequireversion'] = 'neophodna verzija je {$a->needed} a Vi trenutno koristite verziju {$a->current}';
|
||||
@@ -0,0 +1,48 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatelangdir'] = 'Nije moguće kreirati direktorij jezika';
|
||||
$string['cannotcreatetempdir'] = 'Nije moguće kreirati privremeni direktorij';
|
||||
$string['cannotdownloadcomponents'] = 'Nije moguće preuzeti komponente';
|
||||
$string['cannotdownloadzipfile'] = 'Nije moguće preuzeti ZIP arhivu';
|
||||
$string['cannotfindcomponent'] = 'Nije moguće pronaći komponentu.';
|
||||
$string['cannotsavemd5file'] = 'Nije moguće sačuvati md5 datoteku.';
|
||||
$string['cannotsavezipfile'] = 'Nije moguće sačuvati ZIP arhivu.';
|
||||
$string['cannotunzipfile'] = 'Nije moguće raspakovati ZIP datoteku.';
|
||||
$string['componentisuptodate'] = 'Komponenta je dostupna u svojoj najnovijoj verziji';
|
||||
$string['downloadedfilecheckfailed'] = 'Nije uspjela provjera preuzete datoteke';
|
||||
$string['invalidmd5'] = 'Provjerena varijabla (md5 datoteka) je pogrešna - pokušajte ponovo';
|
||||
$string['missingrequiredfield'] = 'Nedostaje neko obavezno polje';
|
||||
$string['remotedownloaderror'] = 'Preuzimanje komponente na Vaš server nije uspjelo. Provjerite podešavanja proksi servera. PHP cURL ekstenzija se preporučuje.<br /><br />Morate da preuzmete <a href="{$a->url}">{$a->url}</a> datoteku ručno, kopirate je u direktorij "{$a->dest}" na svom sereveru i tamo je raspakovati.';
|
||||
$string['wrongdestpath'] = 'Pogrešna odredišna putanja';
|
||||
$string['wrongsourcebase'] = 'Pogrešna baza izvornog URL-a';
|
||||
$string['wrongzipfilename'] = 'Pogrešan naziv arhive';
|
||||
+36
-13
@@ -31,21 +31,44 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'Administratorski direktorij';
|
||||
$string['availablelangs'] = 'Popis dostupnih jezika';
|
||||
$string['chooselanguagehead'] = 'Izaberite jezik';
|
||||
$string['chooselanguagesub'] = 'Molimo izaberite jezik koji će se koristiti tokom instalacije. Ovaj jezik će, također, biti korišten na nivou stranice kao zadani, mada to naknadno može biti promijenjeno.';
|
||||
$string['clialreadyconfigured'] = 'Datoteka config.php već postoji. Molimo, koristite admin/cli/install_database.php ako želite da instalirate ovu stranicu.';
|
||||
$string['clialreadyinstalled'] = 'Datoteka config.php već postoji. Upotrebite komandu admin/cli/upgrade.php ako želite da nadogradite ovu stranicu.';
|
||||
$string['cliinstallheader'] = 'Moodle {$a} program za instaliranje iz komandne linije';
|
||||
$string['databasehost'] = 'Server baze podataka';
|
||||
$string['databasename'] = 'Ime baze podataka';
|
||||
$string['databasetypehead'] = 'Izaberite driver baze podataka';
|
||||
$string['dataroot'] = 'Direktorij podataka';
|
||||
$string['datarootpermission'] = 'Ovlaštenja nad direktorijom podataka';
|
||||
$string['dbprefix'] = 'Lista prefiksa';
|
||||
$string['dirroot'] = 'Direktorij Moodla';
|
||||
$string['dirroot'] = 'Moodle direktorij';
|
||||
$string['environmenthead'] = 'Provjeravanje Vašeg okruženja...';
|
||||
$string['environmentsub2'] = 'Svaka verzija Moodlea ima minimum zahtjeva po pitanju odgovarajuće PHP verzije i nekoliko obaveznih PHP ekstenzija. Puna provjera okruženja se vrši prije svakog instaliranja ili ažuriranja postojeće verzije. Ukoliko ne znate kako da instalirate novu verziju ili omogućite PHP ekstenzije kontaktirajte Vašeg server administratora.';
|
||||
$string['errorsinenvironment'] = 'Provjera okruženja nije prošla!';
|
||||
$string['installation'] = 'Instalacija';
|
||||
$string['memorylimithelp'] = '<p>PHP ograničenje memorije za Vaš server je trenutno podešeno na {$a}.</p>
|
||||
|
||||
<p>Ovo možda prouzrokuje Moodlu da kasnije ima problema sa memorijom, posebno ako imate mnogo dozvoljenih modula i /ili mnogo korisnika.</p>
|
||||
|
||||
<p>Preporučujemo Vam da konfigurišete PHP sa visokim ograničenjem ako je moguće, kao 40M. Čineći ovo tamo je nekoliko načina pa možete pokušati: </p><ol>
|
||||
<li>Ako ste, opet kompajlisati PHP sa <i>--dostupnim-memorijskim-ograničenjem</i>. Ovo će dozvoliti Moodle da postavi memorijsko ograničenje sam za sebe.</li>
|
||||
<li>Ako imate pristup na Vašu php.ini datoteku, možete promijeniti <b>memorijsko_ograničenje</b> podešavanje u nešto kao ovo 40M. Ako nemate pristup možete pitati svog administratora da to uradi za Vas.</li>
|
||||
<li>Na nekim PHP serverima možete kreirati a.ht pristupnu datoteku u Moodle direktoriju koji se sadrži na ovoj liniji:<br /><blockquote>php_vrijednost memorijskog_ograničenja 40M</blockquote></li>
|
||||
<br />Kakogod, na istom serveru ovo izbjegavajte <b>sve</b> PHP stranice za rad (vidjet ćete grešku prilkom pregleda stranice) ćete na njima morati izbrisati .htpristupnu datoteku. </li></ol>';
|
||||
$string['langdownloaderror'] = 'Nažalost, jezik "{$a}" se ne može preuzeti. Proces instaliranja biće nastavljen na engleskom jeziku.';
|
||||
$string['memorylimithelp'] = '<p>PHP ograničenje memorije za Vaš server je trenutno podešeno na {$a}.</p> <p>Ovo podešavanje može kasnije da prouzrokuje da Moodle ima problema sa memorijom, posebno ako imate mnogo aktiviranih modula i/ili mnogo korisnika.</p> <p>Preporučujemo da konfigurišete PHP sa višim ograničenjem ako je moguće, recimo 40M. Postoji nekoliko načina na koje to može da se to uradi:</p><ol> <li>Ako možete, rekompajlirajte PHP sa <i>--enable-memory-limit</i>. Ovo će omogućiti Moodle sistemu da sam postavi memorijsko ograničenje.</li> <li>Ako imate pristup svojoj php.ini datoteci, možete promijeniti vrijednost za <b>memory_limit</b> na, recimo, 40M. Ako nemate pristup toj datoteci možete pitati svog administratora da to uradi umjesto Vas.</li> <li>Na nekim PHP serverima možete da kreirate .htaccess datoteku u Moodle direktoriju koja sadrži red: <blockquote><div>php_value memory_limit 40M</div></blockquote> <p>Međutim, na nekim serverima to će spriječiti prikazivanje <b>svih</b> PHP stranica (vidjećete poruku o grešci kada budete gledali stranice), pa ćete sa tih servera morati da uklonite .htaccess datoteku.</p></li> </ol>';
|
||||
$string['paths'] = 'Putanje';
|
||||
$string['pathserrcreatedataroot'] = 'Instalaciona procedura ne može da kreira direktorij baze podataka ({$a->dataroot}).';
|
||||
$string['pathshead'] = 'Potvrdi putanje';
|
||||
$string['pathsrodataroot'] = 'U direktorij za podatke nije moguć upis';
|
||||
$string['pathsroparentdataroot'] = 'Nije moguć upis u nadređeni direktorij ({$a->parent}). Instalacioni program ne može da kreira direktorij za podatke ({$a->dataroot}).';
|
||||
$string['pathssubadmindir'] = 'Vrlo mali broj web servera koristi /admin kao specijalni URL za pristup raznim podešavanjima (kontrolni panel i sl.). Nažalost, to dovodi do konflikta sa standardnom lokacijom za administratorske stranice u Moodleu. Ovaj problem možete riješiti tako što ćete promijeniti ime administratorskog direktoriju u Vašoj instalaciji, i ovdje upisati to novo ime. Na primjer <em>moodleadmin</em>. Ovo podešavanje će prepraviti administratorske linkove u Moodle sistemu.';
|
||||
$string['pathssubdataroot'] = 'Potreban Vam je prostor gdje će Moodle čuvati postavljene datoteke. Ovaj direktorij treba da bude podešen tako da se može čitati i u njega upisivati od strane korisnika web servera (obično \'nobody\' ili \'apache\'), ali istovremeno mora biti dostupan direktno preko weba. Ukoliko ovaj direktorij ne postoji Moodle će pokušati da ga kreira tokom instalacije.';
|
||||
$string['pathssubdirroot'] = 'Puna putanja do direktotija za instaliranje Moodlea.';
|
||||
$string['pathssubwwwroot'] = 'Puna web adresa putem koje će se pristupati Moodleu. Nije moguće pristupati Moodleu koristeći više adresa. Ako Vaša stranica ima više javnih adresa onda na svima morate da podesite permanentne redirekcije osim na ovoj. Ako je Vaša stranica dostupna sa interneta ali i iz intranet okruženja ovdje upotrijebite javnu adresu i podesite DNS tako da i intranet korisnici mogu da koriste javnu adresu. Ako je adresa netačna promijenite URL u svom web čitaču da biste ponovo pokrenuli instalaciju sa drugačijom vrijednošću.';
|
||||
$string['pathsunsecuredataroot'] = 'Dataroot lokacija nije bezbjedna';
|
||||
$string['pathswrongadmindir'] = 'Admin direktorij ne postoji';
|
||||
$string['phpextension'] = '{$a} PHP ekstenѕija';
|
||||
$string['phpversion'] = 'PHP verzija';
|
||||
$string['phpversionhelp'] = '<p>Moodle zahtijeva najmanju PHP verziju 4.1.0.</p>
|
||||
<p>Trenutno pokrećete verziju {$a}</p>
|
||||
<p>Možete nadograditi PHP ili premjestiti na glavnu sa novijom verzijom PHP!</p>';
|
||||
$string['phpversionhelp'] = '<p>Moodle zahtijeva najmanje PHP verziju 4.3.0 ili 5.1.0 (5.0.x ima brojne uočene probleme).</p> <p>Trenutno koristite verziju {$a}</p> <p>Morate nadograditi PHP ili premjestiti Moodle na web server sa novijom verzijom PHP-a!</br> (U slučaju verzije 5.0.x možete, također, da se vratite na 4.4.x verziju)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Ovu stranicu vidite zato što ste uspješno instalirali i pokrenuli <strong>{$a->packname} {$a->packversion}</strong> paket na svom serveru. Čestitamo!';
|
||||
$string['welcomep30'] = 'Ovo izdanje <strong>{$a->installername}</strong> uključuje aplikacije za kreiranje okruženja u kojem će <strong>Moodle</strong> uspješno funkcionisati, konkretno:';
|
||||
$string['welcomep40'] = 'Ovaj paket obuhvata i <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Korištenje svih aplikacija ovog paketa je uređeno njihovim licencama. Kompletan<strong>{$a->installername}</strong> paket je <a href="http://www.opensource.org/docs/definition_plain.html">otvorenog koda</a> i distribuira se pod <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> licencom.';
|
||||
$string['welcomep60'] = 'Naredne stranice će vas provesti kroz nekoliko jednostavnih koraka tokom kojih ćete konfigurisati i podesiti <strong>Moodle</strong> na svom računaru. Možete prihvatiti zadano podešavanja ili ih, opciono, prilagoditi vlastitim potrebama.';
|
||||
$string['welcomep70'] = 'Kliknite na dugme za nastavak da biste dalje podešavali <strong>Moodle</strong>.';
|
||||
$string['wwwroot'] = 'Web adresa';
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['language'] = 'Jezik';
|
||||
$string['next'] = 'Sljedeći';
|
||||
$string['previous'] = 'Prethodni';
|
||||
$string['reload'] = 'Učitaj ponovo';
|
||||
@@ -30,5 +30,5 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotsavemd5file'] = 'No s\'ha pogut alçar el fitxer md5';
|
||||
$string['cannotsavezipfile'] = 'No s\'ha pogut alçar el fitxer zip';
|
||||
$string['cannotsavemd5file'] = 'No s\'ha pogut guardar el fitxer md5';
|
||||
$string['cannotsavezipfile'] = 'No s\'ha pogut guardar el fitxer zip';
|
||||
|
||||
@@ -30,7 +30,10 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['langdownloaderror'] = 'Dissortadament l\'idioma "{$a}" no està instal·lat. La instal·lació prosseguirà en anglés.';
|
||||
$string['clialreadyconfigured'] = 'El fitxer config.php ja existeix, feu servir dmin/cli/install_database.php si voleu instal·lar este lloc web.';
|
||||
$string['clialreadyinstalled'] = 'El fitxer config.php ja existeix, feu servir admin/cli/upgrade.php si voleu actualitzar este lloc web.';
|
||||
$string['cliinstallheader'] = 'Programa d\'instal·lació de línia d\'ordes de Moodle {$a}';
|
||||
$string['langdownloaderror'] = 'Dissortadament l\'idioma "{$a}" no es pot baixar. La instal·lació prosseguirà en anglés.';
|
||||
$string['memorylimithelp'] = '<p>El límit de memòria del PHP del vostre servidor actualment està definit en {$a}.</p>
|
||||
|
||||
<p>Això pot causar que Moodle tinga problemes de memòria més avant, especialment si teniu molts mòduls habilitats i/o molts usuaris.</p>
|
||||
@@ -41,14 +44,20 @@ $string['memorylimithelp'] = '<p>El límit de memòria del PHP del vostre servid
|
||||
<li>Si teniu accés al fitxer php.ini, podeu canviar el paràmetre <b>memory_limit</b> a 40 MB. Si no hi teniu accés podeu demanar al vostre administrador que ho faça ell.</li>
|
||||
<li>En alguns servidors PHP podeu crear un fitxer .htaccess dins del directori de Moodle amb esta línia:
|
||||
<p><blockquote>php_value memory_limit 40M</blockquote></p>
|
||||
<p>Tanmateix, en alguns servidors això farà que no funcioni <b>cap</b> pàgina PHP (es visualitzaran errors) en el qual cas hauríeu de suprimir el fitxer .htaccess.</p></li>
|
||||
<p>Tanmateix, en alguns servidors això farà que no funcione <b>cap</b> pàgina PHP (es visualitzaran errors) en el qual cas hauríeu de suprimir el fitxer .htaccess.</p></li>
|
||||
</ol>';
|
||||
$string['pathssubdataroot'] = 'Necessiteu un espai on Moodle puga alçar els fitxers penjats. Este directori hauria de tindre permisos de lectura I ESCRIPTURA per a l\'usuari del servidor web (normalment \'nobody\' o \'apache\'), però no cal que siga accessible directament via web. L\'instal·lador provarà de crear-lo si no existeix.';
|
||||
$string['phpversionhelp'] = '<p>Moodle necessita la versió de PHP 4.1.0 o posterior.</p>
|
||||
$string['pathssubadmindir'] = 'Alguns serveis d\'allotjament web (pocs) utilitzen un URL especial /admin p. ex. per a accedir a un tauler de control o quelcom paregut. Malauradament això entra en conflicte amb la ubicació estàndard de les pàgines d\'administració de Moodle. Podeu arreglar este problema canviant el nom del directori d\'administració de Moodle en la vostra instal·lació i posant el nou nom ací. Per exemple <em>moodleadmin</em>. Això modificarà els enllaços d\'administració de Moodle.';
|
||||
$string['pathssubdataroot'] = 'Necessiteu un espai on Moodle puga guardar els fitxers penjats. Este directori hauria de tindre permisos de lectura I ESCRIPTURA per a l\'usuari del servidor web (normalment \'nobody\' o \'apache\'), però no cal que siga accessible directament via web. L\'instal·lador provarà de crear-lo si no existeix.';
|
||||
$string['pathssubwwwroot'] = 'L\'adreça web completa on s\'accedirà a Moodle.
|
||||
No és possible accedir a Moodle en diferents adreces.
|
||||
Si el vostre lloc té múltiples adreces públiques haureu de configurar redireccions permanents per a totes excepte esta.
|
||||
Si el vostre lloc és accessible tant des d\'Internet com des d\'una intranet, utilitzeu ací l\'adreça pública i configureu el DNS de manera que els usuaris de la intranet puguen utilitzar també l\'adreça pública.
|
||||
Si l\'adreça no és correcta, canvieu l\'URL en el vostre navegador per reiniciar la instal·lació amb un altre valor.';
|
||||
$string['phpversionhelp'] = '<p>Moodle necessita una versió de PHP 4.3.0 o 5.1.0 (les versions 5.0.x tenien uns quants problemes coneguts).</p>
|
||||
<p>A hores d\'ara esteu utilitzant la versió {$a}.</p>
|
||||
<p>Vos caldrà actualitzar el PHP o traslladar Moodle a un ordinador amb una versió de PHP més recent.</p>';
|
||||
$string['welcomep20'] = 'Esteu veient esta pàgina perquè heu instal·lat amb èxit i heu executat el paquet <strong>{$a->packname} {$a->packversion}</strong>. Felicitacions!';
|
||||
$string['welcomep30'] = 'Esta versió de <strong>{$a->installername}</strong> inclou les aplicacions necessàries per crear un entorn en el qual funcioni <strong>Moodle</strong>:';
|
||||
<p>Vos cal actualitzar el PHP o traslladar Moodle a un ordinador amb una versió de PHP més recent.<br />(Si esteu utilitzant la versió 5.0.x, alternativament també podríeu tornar arrere a la 4.4.x)</p>';
|
||||
$string['welcomep20'] = 'Esteu veient esta pàgina perquè heu instal·lat amb èxit i heu executat el paquet <strong>{$a->packname} {$a->packversion}</strong>. Felicitacions.';
|
||||
$string['welcomep30'] = 'Esta versió de <strong>{$a->installername}</strong> inclou les aplicacions necessàries per crear un entorn en el qual funcione <strong>Moodle</strong>:';
|
||||
$string['welcomep50'] = 'L\'ús de totes les aplicacions d\'este paquet és governat per les seues llicències respectives. El paquet <strong>{$a->installername}</strong> complet és
|
||||
<a href="http://www.opensource.org/docs/definition_plain.html">codi font obert</a> i es distribueix
|
||||
sota llicència <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
|
||||
@@ -32,4 +32,4 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = 'ca';
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Valencià (Català meridional)';
|
||||
$string['thislanguage'] = 'Català (Valencià)';
|
||||
|
||||
@@ -30,4 +30,5 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thisdirection'] = 'rtl';
|
||||
$string['thislanguage'] = 'سۆرانی';
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['language'] = 'زمان';
|
||||
$string['next'] = 'دواتر';
|
||||
$string['reload'] = 'بارکردنەوە';
|
||||
@@ -30,5 +30,15 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['clianswerno'] = 'n';
|
||||
$string['cliansweryes'] = 'i';
|
||||
$string['cliincorrectvalueerror'] = 'Gwall, gwerth anghywir "{$a->value}" ar gyfer "{$a->option}"';
|
||||
$string['cliincorrectvalueretry'] = 'Gwerth anghywir, rhowch gynnig arall arni';
|
||||
$string['clitypevalue'] = 'math o werth';
|
||||
$string['clitypevaluedefault'] = 'math o werth, pwyswch Enter i ddefnyddio\'r gwerth diofyn ({$a})';
|
||||
$string['cliunknowoption'] = 'Dewisiadau dieithr:
|
||||
{$a}
|
||||
Defnyddiwch y dewis --help.';
|
||||
$string['cliyesnoprompt'] = 'mae teipio i (yn golygu iawn) neu n (yn golygu na)';
|
||||
$string['environmentrequireinstall'] = 'angen ei osod/ei alluogi.';
|
||||
$string['environmentrequireversion'] = 'Mae angen fersiwn {$a->needed} ac rydych yn defnyddio {$a->current}';
|
||||
|
||||
@@ -40,8 +40,9 @@ $string['cannotsavezipfile'] = 'Does dim modd cadw ffeil ZIP';
|
||||
$string['cannotunzipfile'] = 'Does dim modd dadzipio\'r ffeil';
|
||||
$string['componentisuptodate'] = 'Mae\'r gydran wedi\'i diweddaru';
|
||||
$string['downloadedfilecheckfailed'] = 'Heb lwyddo i wirio\'r ffeil a lwythwyd i lawr';
|
||||
$string['invalidmd5'] = 'md5 annilys';
|
||||
$string['invalidmd5'] = 'Roedd y newidyn gwirio yn anghywir - rhowch gynnig arall arni';
|
||||
$string['missingrequiredfield'] = 'Mae maes gofynnol ar goll';
|
||||
$string['wrongdestpath'] = 'Llwybr cyrchfan anghywir.';
|
||||
$string['wrongsourcebase'] = 'Bôn URL ffynhonnell anghywir.';
|
||||
$string['wrongzipfilename'] = 'Enw ffeil ZIP anghywir.';
|
||||
$string['remotedownloaderror'] = 'Wedi methu llwytho cydran ar eich gweinydd, gwiriwch osodiadau\'r dirprwy, argymhellir yr estyniad PHP cURL yn gryf.<br /><br />Mae\'n rhaid i chi lwytho\'r ffeil <a href="{$a->url}">{$a->url}</a> eich hun, ei chopïo i "{$a->dest}" ar eich gweinydd, a\'i dad-zipio yno.';
|
||||
$string['wrongdestpath'] = 'Llwybr cyrchfan anghywir';
|
||||
$string['wrongsourcebase'] = 'Bôn URL ffynhonnell anghywir';
|
||||
$string['wrongzipfilename'] = 'Enw ffeil ZIP anghywir';
|
||||
|
||||
@@ -30,14 +30,24 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'Cyfeiriadur y Gweinyddwr';
|
||||
$string['admindirname'] = 'Cyfeiriadur y gweinyddwr';
|
||||
$string['availablelangs'] = 'Y pecynnau iaith sydd ar gael';
|
||||
$string['chooselanguagehead'] = 'Dewis iaith';
|
||||
$string['chooselanguagesub'] = 'Dewiswch iaith ar gyfer y broses osod YN UNIG. Gallwch ddewis yr iaith ar gyfer y safle ac ar gyfer defnyddwyr yn nes ymlaen ar sgrin arall.';
|
||||
$string['dataroot'] = 'Cyfeiriadur Data';
|
||||
$string['chooselanguagesub'] = 'Dewiswch iaith ar gyfer y broses osod. Bydd yr iaith hon yn cael ei defnyddio fel yr iaith ddiofyn ar gyfer y safle, ond gellir ei newid yn nes ymlaen.';
|
||||
$string['clialreadyconfigured'] = 'Mae\'r ffeil config.php yn bodoli eisoes, defnyddiwch admin/cli/install_database.php os ydych chi am osod y safle hwn.';
|
||||
$string['clialreadyinstalled'] = 'Mae\'r ffeil config.php yn bodoli eisoes, defnyddiwch admin/cli/upgrade.php os ydych chi am uwchraddio eich safle.';
|
||||
$string['cliinstallheader'] = 'Rhaglen gosod llinell gorchymyn Moodle {$a}';
|
||||
$string['databasehost'] = 'Gwesteiwr y gronfa ddata';
|
||||
$string['databasename'] = 'Enw\'r gronfa ddata';
|
||||
$string['databasetypehead'] = 'Dewis gyrrwr ar gyfer y gronfa ddata';
|
||||
$string['dataroot'] = 'Cyfeiriadur data';
|
||||
$string['datarootpermission'] = 'Hawliau ar gyfer cyfeiriaduron data';
|
||||
$string['dbprefix'] = 'Llythrennau Blaen Tablau';
|
||||
$string['dirroot'] = 'Cyfeiriadur Moodle';
|
||||
$string['environmenthead'] = 'Wrthi\'n profi eich amgylchedd ...';
|
||||
$string['environmentsub2'] = 'Mae gan bob fersiwn Moodle ofyniad fersiwn PHP sylfaenol ac amryw o estyniadau PHP gorfodol.
|
||||
Bydd yr amgylchedd yn cael ei brofi\'n llawn cyn pob proses osod a diweddaru. Cysylltwch â gweinyddwr y gweinydd os nad ydych chi\'n gwybod sut mae gosod fersiwn newydd neu alluogi estyniadau PHP.';
|
||||
$string['errorsinenvironment'] = 'Wedi methu profi\'r amgylchedd!';
|
||||
$string['installation'] = 'Gosod';
|
||||
$string['langdownloaderror'] = 'Yn anffodus, ni osodwyd yr iaith ganlynol: "{$a}". Bydd y broses osod yn cario ymlaen yn Saesneg.';
|
||||
$string['memorylimithelp'] = '<p>Mae maint y cof PHP yn eich gweinydd ar hyn o bryd yn {$a}.</p>
|
||||
@@ -59,6 +69,22 @@ $string['memorylimithelp'] = '<p>Mae maint y cof PHP yn eich gweinydd ar hyn o b
|
||||
<p>Fodd bynnag, ar rai gweinyddion bydd hyn yn atal <b>pob</b> tudalen PHP rhag gweithio
|
||||
(bydd gwallau\'n ymddangos pan fyddwch yn edrych ar dudalennau) felly bydd rhaid i chi dynnu\'r ffeil .htaccess file.</p></li>
|
||||
</ol>';
|
||||
$string['paths'] = 'Llwybrau';
|
||||
$string['pathserrcreatedataroot'] = 'Dydy\'r rhaglen osod ddim yn gallu creu\'r cyfeiriadur data ({$a->dataroot}).';
|
||||
$string['pathshead'] = 'Cadarnhau llwybrau';
|
||||
$string['pathsrodataroot'] = 'Does dim modd ysgrifennu ar y cyfeiriadur gwraidd data.';
|
||||
$string['pathsroparentdataroot'] = 'Does dim modd ysgrifennu ar y cyfeiriadur rhiant ({$a->parent}). Dydy\'r rhaglen osod ddim yn gallu creu\'r cyfeiriadur data ({$a->dataroot}).';
|
||||
$string['pathssubadmindir'] = 'Nifer fach iawn o westeiwyr gwe sy\'n defnyddio /admin fel URL arbennig i chi gael mynd i mewn i\'r panel rheoli neu beth bynnag. Yn anffodus, mae hyn yn gwrthdaro â lleoliad safonol tudalennau gweinyddol Moodle. Gallwch drwsio hyn drwy ailenwi cyfeiriadur y gweinyddwr wrth osod y rhaglen, a rhoi\'r enw newydd yma. Er enghraifft: <em>gweinyddmoodle</em>. Bydd hyn yn trwsio\'r dolenni gweinyddol yn Moodle';
|
||||
$string['pathssubdataroot'] = 'Mae Moodle angen lle ar gyfer cadw ffeiliau sy\'n cael eu llwytho i fyny. Dylai defnyddiwr gweinydd y we (fel arfer \'neb\' neu \'apache\') allu darllen ac YSGRIFENNU ar y cyfeiriadur hwn, ond ni ddylid gallu mynd i mewn iddo\'n uniongyrchol drwy\'r we. Bydd y rhaglen osod yn ceisio ei greu os nad yw\'n bodoli.';
|
||||
$string['pathssubdirroot'] = 'Llwybr cyfeiriadur llawn i raglen Moodle.';
|
||||
$string['pathssubwwwroot'] = 'Y cyfeiriad gwe llawn a ddefnyddir i fynd i mewn i Moodle.
|
||||
Nid yw\'n bosibl mynd i mewn i Moodle wrth ddefnyddio amryw o gyfeiriadau.
|
||||
Os oes gan eich safle amryw o gyfeiriadau cyhoeddus, bydd rhaid i chi sefydlu llwybrau ailgyfeirio parhaol ar gyfer pob un ohonynt ar wahân i hwn.
|
||||
Os gellir mynd i mewn i\'ch safle o\'r Rhyngrwyd a\'r Fewnrwyd, defnyddiwch y cyfeiriad cyhoeddus yma a sefydlu DNS er mwyn i ddefnyddwyr y Fewnrwyd allu defnyddio\'r cyfeiriad cyhoeddus hefyd.
|
||||
Os nad yw\'r cyfeiriad yn gywir, newidiwch yr URL yn eich porwr i ailddechrau\'r rhaglen osod gyda gwerth gwahanol.';
|
||||
$string['pathsunsecuredataroot'] = 'Dydy lleoliad y data gwraidd ddim yn ddiogel';
|
||||
$string['pathswrongadmindir'] = 'Cyfeiriadur y gweinyddwr';
|
||||
$string['phpextension'] = 'Estyniad PHP {$a}';
|
||||
$string['phpversion'] = 'Fersiwn PHP';
|
||||
$string['phpversionhelp'] = '<p>Mae angen o leiaf fersiwn PHP 4.3.0 neu 5.1.0 ar Moodle (mae llawer o broblemau gyda 5.0.x).</p>
|
||||
<p>Ar hyn o bryd, rydych yn rhedeg fersiwn {$a}</p>
|
||||
|
||||
@@ -45,7 +45,7 @@ $string['datarootpermission'] = 'Zugriffsrechte zum Datenverzeichnis';
|
||||
$string['dbprefix'] = 'Tabellen-Prefix';
|
||||
$string['dirroot'] = 'Moodle-Verzeichnis';
|
||||
$string['environmenthead'] = 'Installationsvoraussetzungen werden geprüft ...';
|
||||
$string['environmentsub2'] = 'Jede Moodle-Version hat Mindestvoraussetzungen für der PHP-Version und für verbindliche PHP-Extensions. Vor einer Installation oder einer Aktualisierung wird eine vollständige Prüfung durchgeführt. Bitte fragen Sie den Server-Administrator, wenn Sie mit der Installation einer neuen Version oder mit der Aktivierung von PHP-Extensions nicht weiterkommen.';
|
||||
$string['environmentsub2'] = 'Jede Version hat Mindestvoraussetzungen für der PHP-Version und für verbindliche PHP-Extensions. Vor einer Installation oder einer Aktualisierung wird eine vollständige Prüfung durchgeführt. Bitte fragen Sie den Administrator des Servers, wenn Sie mit der Installation einer neuen Version oder mit der Aktivierung von PHP-Extensions nicht weiterkommen.';
|
||||
$string['errorsinenvironment'] = 'Fehler bei der Prüfung der Systemvoraussetzungen!';
|
||||
$string['installation'] = 'Installation';
|
||||
$string['langdownloaderror'] = 'Leider konnte das Sprachpaket \'{$a}\' nicht heruntergeladen werden. Die Installation wird in englischer Sprache fortgesetzt.';
|
||||
@@ -83,6 +83,6 @@ $string['welcomep30'] = 'Diese Version von <strong>{$a->installername}</strong>
|
||||
$string['welcomep40'] = 'Das Paket enthält: <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Die Nutzung dieser Anwendungen ist lizenzrechtlich geprüft. Alle Anwendungen von <strong>{$a->installername}</strong> sind
|
||||
<a href="http://www.opensource.org/docs/definition_plain.html"> Open Source </a> und unterliegen der <a href="http://www.gnu.org/copyleft/gpl.html"> GPL</a> Lizenz.';
|
||||
$string['welcomep60'] = 'Die folgenden Webseiten führen Sie in einfachen Schritten durch die Konfiguration und Installation von <strong>Moodle</strong> auf Ihrem Computer. Sie können die vorgeschlagenen Einstellungen übernehmen oder an Ihre Bedürfnisse anpassen.';
|
||||
$string['welcomep60'] = 'Die folgenden Webseiten führen Sie in einfachen Schritten durch die Installation von <strong>Moodle</strong> auf Ihrem Computer. Sie können die vorgeschlagenen Einstellungen übernehmen oder an eigene Bedürfnisse anpassen.';
|
||||
$string['welcomep70'] = 'Klicken Sie auf die Taste \'Weiter\', um mit der Installation von Moodle fortzufahren.';
|
||||
$string['wwwroot'] = 'Webadresse';
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['clianswerno'] = 'n';
|
||||
$string['cliansweryes'] = 'y';
|
||||
$string['cliincorrectvalueerror'] = 'ནོར་བ། "{$a->option}"དོན་ལུ་ འཛོལ་འཛོལ་བའི་གནས་ཚད "{$a->value}"';
|
||||
$string['cliincorrectvalueretry'] = 'འཛོལ་འཛོལ་བའི་གནད་ཚད་ནང་འདུག སླར་རྩོལ།';
|
||||
$string['clitypevalue'] = 'གནས་ཚད་དབྱེ་བ།';
|
||||
$string['clitypevaluedefault'] = 'གནས་ཚད་དབྱེ་བ། Enter ཨེབ་སྟེ་སྔོན་སྒྲིག་གི་ཨང་({$a})';
|
||||
$string['cliunknowoption'] = 'ངོས་འཛིན་འབད་མ་ཚུགས་པའི་གདམ་ཁ་འདུག: {$a} གྲོགས་རམ་གྱི་གདམ་ཁ་འདི་ལག་ལེན་འཐབ་ད།';
|
||||
$string['cliyesnoprompt'] = 'y ཟེར་འབྲི་བ་ཅིན་ཨིནཟེརཝ་དང་ n ཟེར་འབྲི་བ་ཅིན་མིན་)';
|
||||
$string['environmentrequireinstall'] = 'གཞི་བཙུགས་འབད་དི་ལྕོགས་ཅན་བཟོ་དགོ།';
|
||||
$string['environmentrequireversion'] = 'ཐོན་རིམ་ {$a->needed}དགོས་མཁོ་ཡོདཔ་ལས་ ཁྱོད་ཀྱི་ {$a->current}གཡོག་བཀོལ་བའི་བསྒང་ཡོད།';
|
||||
@@ -0,0 +1,48 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatelangdir'] = 'སྐད་ཡིག་སྣོད་ཐོ་ གསར་བསྐྲུན་འབད་མི་བཏུབ།';
|
||||
$string['cannotcreatetempdir'] = 'གནས་སྐབས་ཀྱི་སྣོད་ཐོ་ གསར་བསྐྲུན་འབད་མི་བཏུབ།';
|
||||
$string['cannotdownloadcomponents'] = 'ཆ་ཤས་ཚུ་ཕབ་ལེན་འབད་མི་བཏུབ།';
|
||||
$string['cannotdownloadzipfile'] = 'ZIP ཡིག་སྣོད་ཕབ་ལེན་འབད་མི་བཏུབ།';
|
||||
$string['cannotfindcomponent'] = 'ཆ་ཤས་མི་ཐོབ།';
|
||||
$string['cannotsavemd5file'] = 'md5 ཡིག་སྣོད་ སྲུངས་མི་བཏུབ།';
|
||||
$string['cannotsavezipfile'] = 'ZIP ཡིག་སྣོད་ སྲུངས་མི་བཏུབ།';
|
||||
$string['cannotunzipfile'] = 'ཡིག་སྣོད་ unzip འབད་མི་བཏུབ།';
|
||||
$string['componentisuptodate'] = 'ཆ་ཤས་འདི་ དུས་མཐུན་སྦེ་ཡོད།';
|
||||
$string['downloadedfilecheckfailed'] = 'ཕབ་ལེན་འབད་ཡོད་པའི་ཡིག་སྣོད་ཞིབ་དཔྱད་འཐུས་ཤོར་བྱུང་ཡོདཔ།';
|
||||
$string['invalidmd5'] = 'check འགྱུར་ཅནའདི་ཕྱི་འགྱུར་ཨིན་མས་ - ལོག་འབད་གནང་།';
|
||||
$string['missingrequiredfield'] = 'དགོ་པའི་ས་སྒོ་འདི་མིན་འདུག';
|
||||
$string['remotedownloaderror'] = 'ཁྱོད་ཀྱི་server ་ལུ་ཆ་ཤས་ཕབ་ལེན་འབདཝ་ད་འཛོལ་བ་བྱུང་ཡོདཔ་ལས་ པོརོག་སི་སྒྲིག་སྟངས་ཚུ་བདེན་སྦྱོར་འབད་དགོ་པའི་ཁར་ PHP cURLརྒྱ་བསྐྱེད་འདི་འོས་སྦྱོར་འབད་ཡོདཔ་ཨིན། <br /><br />ཁྱོད་ཀྱིས་ ལག་ཐོག་ལས་ <a href="{$a->url}">{$a->url}</a>་ཕབ་ལེན་འབད་ཞིནམ་ལས་ ཁྱོད་རའི་སར་བར་ "{$a->dest}" ནང་འདྲ་བཤུས་བརྐྱབ་ཞིནམ་ལས་ དེ་ཁར་ཛིབ་འབད་བཤོལ།';
|
||||
$string['wrongdestpath'] = 'བཞག་སྣོད་རྒྱུ་ལམ་འཛོལ་བ།';
|
||||
$string['wrongsourcebase'] = 'འབྱུང་ས་URLགཞི་རྟེན་འཛོལ་བ།';
|
||||
$string['wrongzipfilename'] = 'ZIP་ཡིག་སྣོད་མིང་འཛོལ་བ།';
|
||||
@@ -0,0 +1,75 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'བདག་སྐྱོང་ སྣོད་ཐོ་';
|
||||
$string['availablelangs'] = 'ཐོབ་ཡོད་པའི་སྐད་ཡིག་ཚུ་གྱི་ཐོ་བཀོད།';
|
||||
$string['chooselanguagehead'] = 'སྐད་ཡིག་ སེལ་འཐུ་འབད།';
|
||||
$string['chooselanguagesub'] = 'གཞི་བཙུགས་ཀྱི་དོན་ལུ་རྐྱངམ་ཅིག་ སྐད་ཡིག་གཅིག་སེལ་འཐུ་འབད། ཁྱོད་ཀྱིས་ ས་ཁོངས་དང་ ལག་ལེན་པའི་སྐད་ཡིག་ཚུ་ ཤུལ་མམ་གྱི་ གསལ་གཞི་ནང་ སེལ་འཐུ་འབད་ཚུགས།';
|
||||
$string['clialreadyconfigured'] = 'ཡིག་སྣོད་config.php་འདི་ཧེ་མ་ལས་འདུག།ཁྱོད་ཨ་ནཱི་ས་ཁོངས་གཞི་བཙུགས་འབད་བ་ཅིན་admin/cli/install_database.php་དེ་ལག་ལོན་འཐབ་གནང།';
|
||||
$string['clialreadyinstalled'] = 'ཡིག་སྣོད་config.php་འདི་ཧེ་མ་ལས་འདུག།ཁྱོད་ཨ་ནཱི་ས་ཁོངས་ཡར་བསྐྱེད་འབད་བ་ཅིན་admin/cli/upgrade.php་དེ་ལག་ལོན་འཐབ་གནང།';
|
||||
$string['cliinstallheader'] = 'Moodle {$a} command line installation program';
|
||||
$string['databasehost'] = 'གནས་སྡུད་གཞི་རྟེན་host';
|
||||
$string['databasename'] = 'གནས་སྡུད་གཞི་རྟེན་ མིང་།';
|
||||
$string['databasetypehead'] = 'Choose database driver';
|
||||
$string['dataroot'] = 'གནས་སྡུད་ སྣོད་ཐོ་';
|
||||
$string['datarootpermission'] = 'Data directories permission';
|
||||
$string['dbprefix'] = 'Tables prefix';
|
||||
$string['dirroot'] = 'Moodle སྣོད་ཐོ།';
|
||||
$string['environmenthead'] = 'ཁྱོད་རའི་ མཐའ་འཁོར་ཞིབ་དཔྱད་འབད་དོ་་་';
|
||||
$string['environmentsub2'] = 'Moodleའཛིན་གྲོལ་རེ་རེ་གྱི་PHP་འཛིན་གྲོལ་དག་པ་ཅིག་དང་PHP extensionsངེས་མཁོ་དགོཔ་ཨིན།གཞི་བཙུགས་དང་ཡར་བསྐྱེད་་མ་བཟོ་བའི་ཧེ་མFull environmentཞིབ་དཔྱད་འབད་འོང་།';
|
||||
$string['errorsinenvironment'] = 'Environment check failed!';
|
||||
$string['installation'] = 'གཞི་བཙུགས།';
|
||||
$string['langdownloaderror'] = 'སྐད་ཡིག་ "{$a}"འདི་ གཞི་བཙུགས་འབད་དེ་མིན་ནུག། གཞི་བཙུགས་འདི་ ཨིན་སྐད་ནང་ འཕྲོ་མཐུད་དེ་འབད་ནི་ཨིན།';
|
||||
$string['memorylimithelp'] = '<p>ད་ལྟོ་ཁྱོད་ཀྱི་སར་བར་གྱི་དོན་ལུ་ PHP དྲན་ཚད་དེ་ $a ལུ་གཞི་སྒྲིག་འབད་དེ་འདུག།</p> <p> འདི་གིས་ཤུལ་ལས་ མུ་ཌལ་ལུ་ དྲན་ཚད་ཀྱི་དཀའ་ངལ་ཚུ་འབྱུང་བཅུག་འོང་ཝ། འདི་གི་ནང་ལས་ཡང་ ཁྱོད་ཀྱི་མུ་ཌལ་དང་ལག་ལེན་པ་ལོ་ཤ་ལྕོགས་ཅན་བཟོ་ཡོད་པ་ཅིན་ དཀའ་ངལ་འབྱུང་འོང་།</p> <p> ཁྱོད་ཀྱིས་ 40M བཟུམ་གྱི་ PHP དྲན་ཚད་ མང་སུ་ཡོད་མི་ རིམ་སྒྲིག་འབད་བ་ཅིན་ ལེགས་ཤོམ་འོང་། འདི་འབད་ནི་གི་དོན་ལུ་ ཐབས་ཤེས་ ལེ་ཤ་ཡོད་:</p> <ol> <li> ཁྱོད་ཀྱིས་ <i>--enable-memory-limit</i> དང་གཅིག་ཁར་ PHP ལོག་ཕྱོགས་སྒྲིག་འབད་ཚུགས་པ་ཅིན་ འདི་གི་ས་ མུ་ཌལ་གི་དྲན་ཚད་ཁོ་ར་གིས་སྦེ་ གཞི་སྒྲིག་འབད་ཚུགས།</li> <li>ཁྱོད་རའི་ php.ini ཡིག་སྣོད་ནང་འཛུལ་སྤྱོད་འབད་ཚུགས་པ་ཅིན་ ཁྱོད་ཀྱི་ <b>memory_limit</b>སྒྲིག་སྟངས་འདི་ 40M བཟུམ་གཅིག་ལུ་ བསྒྱུར་བཅོས་འབད་ཚུགས། ག་དེམ་ཅིག་སྦེ་འཛུལ་སྤྱོད་འབད་མ་ཚུགས་པ་ཅིན་ ཁྱོད་རའི་བདག་སྐྱོང་པ་ལུ་ འབད་བཅུག། <li> PHP སར་བར་ ལ་ལོ་གཅིག་ནང་ འོག་གི་གྲལ་ཐིག་ཚུ་ཡོད་མི་ མུ་ཌལ་སྣོད་ཐོ་ནང་ཁྱོད་ཀྱིས་ .htaccess ཡིག་སྣོད་གསར་བསྐྲུན་འབད་ཚུགས། <blockquote><div>php_value memory_limit 40M</div></blockquote> <p> དེ་འབདཝ་ད་ལུ་ སར་བར་ལ་ལོ་གཅིག་ནང་ འདི་གིས་ <b>all</b> PHP ཤོག་ལེབ་ཚུ་ གཡོག་བཀོལ་ནི་ལུ་སྔོན་བཀག་འབདཝ་ཨིན། (ཤོག་ལེབ་ཚུ་ནང་བལྟ་བའི་སྐབས་ འཛོལ་བ་ཚུ་མཐོང་འོང་) དེ་འབདཝ་ལས་ .htaccess ཡིག་སྣོད་་རྩ་བསྐྲད་གཏང་དགོ།</p></li> </ol>';
|
||||
$string['paths'] = 'Paths';
|
||||
$string['pathserrcreatedataroot'] = 'Data directory ({$a->dataroot}) cannot be created by the installer.';
|
||||
$string['pathshead'] = 'Confirm paths';
|
||||
$string['pathsrodataroot'] = 'Dataroot directory is not writable.';
|
||||
$string['pathsroparentdataroot'] = 'Parent directory ({$a->parent}) is not writeable. Data directory ({$a->dataroot}) cannot be created by the installer.';
|
||||
$string['pathssubadmindir'] = 'webhostsདག་པ་ཅིག་ /admin ལག་ལེན་འཐབ་འབད་དམིགས་བསལ་ URL འདི་control panel or somethingའཛུལ་སྤྱོད་འབདཝ་ཨིན། ཁ་རྗེ་མེད་པར་ Moodleབདག་སྐྱོང་ཤོག་ལེབ་ཚུ་གྱི་ཚད་ལྡན་གནས་ཁོངས་གཅིག་ཁར་མི་མཐུན་ཨིན། ཁྱོད་ཀྱི་དཀའ་ངལ་དེ་ བདག་སྐྱོང་ཀྱི་སྣོད་ཐོ་ གཞི་བཙུགས་འབད་བའི་གང་བསྐྱར་མིང་བཏགས་སྦེ་སེལ་ཚུགས། དཔེར་ན: <em>moodleadmin</em>. འདི་གྱི་Moodle ནང་ན་བདག་སྐྱོང་འབྲེལ་ལམ་ཚུ་གྱི་དཀའ་ངལ་་སེལ་ཚུགས་ཨིན།';
|
||||
$string['pathssubdataroot'] = 'སྐྱེལ་བཙུགས་ཚར་མི་ཡིག་སྣོད་ཚུ་Moodleགྱི་སྲུངས་བཞག་ནི་གྱི་དོན་ལུ་ས་གནས་དགོ།ཨ་ནི་སྣོད་ཐོ(ས་གནས་)དི་web serverལག་ལེན་པ་(usually \'nobody\' or \'apache\')གྱི་readable AND WRITEABLE དགོ འདི་འབདཝ་ད་ web ལས་འཛུལ་སྤྱོད་ཐད་ཀར་འབད་ནི་མེད་འོང་།་The installer will try to create it if doesn\'t exist.';
|
||||
$string['pathssubdirroot'] = 'Moodle installation ལུ་སྣོད་ཐོ་གི་འགྲུལ་ལམ་ག་ར་བྱིན་།';
|
||||
$string['pathssubwwwroot'] = 'Moodleའཛུལ་སྤྱོད་འབད་ནི་དོན་ལུ་Web གྱི་ཁ་བྱང་ག་ར་བྱིན་དགོ། སྣ་མང་ཁ་བྱང་ཚུ་གྱི་Moodleའཛུལ་སྤྱོད་འབད་མི་ཚུགས། ག་དེམ་ཅིག་འབད་ཁྱོད་ཀྱི་སྣ་མང་མི་མང་གི་ཁ་བྱང་ཚུ་ཡོད་པ་ཅིན་ འདི་མ་གཏོགས་གཞན་ག་ར་གུ་རྟག་བརྟན་སླར་ལོག་གཏང་ནི་དོན་ལུ་གཞི་སྒྲིག་འབད་དགོ། Intranet and Internet་གཉིས་ལས་ཁྱོད་ཀྱི་ས་ཁོངས་དེ་འཛུལ་སྤྱོད་འབད་བ་ཅིན་ མི་མང་གི་ཁ་བྱང་ལག་ལེན་འཐབ་དི་འབདཝ་ལས་Intranetལག་ལེན་པ་ཚུ་གྱི་ཡང་མི་མང་གི་ཁ་བྱང་ལག་ལེན་འཐབ་ཚུགས།
|
||||
ག་དེམ་ཅིག་འབད་ཁྱོད་ཀྱི་ཁ་བྱང་ངེས་བདེན་མེན་བ་ཅིན་ཁྱོད་ཀྱི་browserནང་ན་URL་དེ་བསྒྱུར་བཅོས་འབད་སྦེ་ ལོག་installation with a different value.འགོ་བཙུགས།';
|
||||
$string['pathsunsecuredataroot'] = 'Dataroot location is not secure';
|
||||
$string['pathswrongadmindir'] = 'Admin directory does not exist';
|
||||
$string['phpextension'] = '{$a} PHP extension';
|
||||
$string['phpversion'] = 'PHP ཐོན་རིམ།';
|
||||
$string['phpversionhelp'] = '<p>Moodle་ལུ་ ཐོན་རིམ་འདི་ ཉུང་མཐའ་ལུ་ 4.3.0 ཡང་ན་ 5.1.0 དགོ། (5.0.x ལུ་ ཤེས་ཚུགས་པའི་དཀའ་ངལ་ ལེ་ཤ་འདུག་)</p> <p>ཁྱོད་ད་ལྟོ་ཐོན་རིམ་$a གཡོག་བཀོལ་དོ་</p> <p>PHP ཡར་བསྐྱེད་འབད་དགོ་ ཡང་ན་ PHP ཐོན་རིམ་གསརཔ་ཡོད་མི་ ཧོསིཊ་གཅིག་དང་གཅིག་ཁར་ སྤོ་བཤུད་འབད།!<br /> (5.0.x ནང་ལུ་ ཁྱོད་ཀྱིས་ ཐོན་རིམ་ 4.4.x ལུ་ མར་ཕབ་འབད་ཚུགས།)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'ཁྱོད་རའི་ གློག་རིག་ནང་ <strong>{$a->packname} {$a->packversion}</strong> package འདི་ མཐའ་འཁྱོལཅན་སྦེ་ གཞི་བཙུགས་དང་ གསར་བཙུགས་འབད་ཡོདཔ་ལས་བརྟེན་ ཁྱོད་ཀྱིས་འ་ནི་ ཤོག་ལེབ་འདི་བལྟ་ཚུགསཔ་ཨིན། བཀྲིས་བདེ་ལེགས་!';
|
||||
$string['welcomep30'] = '<strong>{$a->installername}</strong> གསར་བཏོན་འབད་མི་ནང་ <strong>Moodle</strong> བཀོལ་སྤྱོད་འབད་བཏུབ་མི་ མཐའ་འཁོར་གསར་བསྐྲུན་འབད་མི་གློག་རིམ་ཚུ་ཡང་ཚུདཔ་ཨིན།';
|
||||
$string['welcomep40'] = 'ཐུམ་སྒྲིལ་འདི་ནང་ལུ་ <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong> ཡང་ ཚུདཔ་ཨིན།';
|
||||
$string['welcomep50'] = 'ཐུམ་སྒྲིལ་འདི་ནང་ལུ་ གློག་རིམ་ཆ་མཉམ་གྱི་ལག་ལེན་ཚུ་ ཁོང་རའི་ ཆོག་ཐམ་ལུ་ དབང་ཚད་ཡོདཔ་ཨིན། <strong>{$a->installername}</strong> ཐུམ་སྒྲིལ་ཆ་ཚང་འདི་ <a href="http://www.opensource.org/docs/definition_plain.html">open source</a> ཨིནམ་དང་ <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> ཆོག་ཐམ་དང་འཁྲིལ་ཏེ་ བགོ་བཀྲམ་འབད་འབདཝ་ཨིན།';
|
||||
$string['welcomep60'] = 'འོག་གི་ཤོག་ལེབ་ཚུ་གིས་ ཁྱོད་རའི་གློག་རིག་ནང<strong>Moodle</strong> རིམ་སྒྲིག་འབད་ནིའི་ ཐབས་ལམ་ འཇམ་ཏོང་ཏོ་ཚུ་སྟོན་འོང་། སྔོན་སྒྲིག་ སྒྲིག་སྟངས་ཚུ་ དང་ལེན་འབད་ ཡང་ན་ ཁྱོད་རའི་དགོས་མཁོ་དང་བསྟུན་ཏེ་ འདི་ཚུ་ བསྒྱུར་བཅོས་འབད།';
|
||||
$string['welcomep70'] = '<strong>Moodle</strong> གཞི་སྒྲིག་ འཕྲོ་མཐུད་དེ་འབད་ནིའི་དོན་ལུ་ "Next" ཨེབ་རྟ་གུ་ ཨེབ་གཏང་འབད།';
|
||||
$string['wwwroot'] = 'Web ཁ་བྱང་ཚུ་';
|
||||
@@ -30,6 +30,5 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = 'es';
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Español - España';
|
||||
$string['thislanguage'] = 'རྫོང་ཁ';
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['language'] = 'སྐད་ཡིག།';
|
||||
$string['next'] = 'ཤུལ་མམ';
|
||||
$string['previous'] = 'ཧེ་མམ';
|
||||
$string['reload'] = 'ཡང་བསྐྱར་མངོན་གསལ་འབད';
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['environmentrequireversion'] = 'version {$a->needed} is required and ye are running {$a->current}';
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['remotedownloaderror'] = 'Download of component to yer server failed, please verify proxy settings, PHP cURL extension is highly recommended.<br /><br />Ye must download the <a href="{$a->url}">{$a->url}</a> file manually, copy it to "{$a->dest}" in yer server and unzip it there.';
|
||||
@@ -0,0 +1,75 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['clialreadyconfigured'] = 'File config.php already exists, please use admin/cli/install_database.php if ye want to install this site.';
|
||||
$string['clialreadyinstalled'] = 'File config.php already exists, please use admin/cli/upgrade.php if ye want to upgrade this site.';
|
||||
$string['environmenthead'] = 'Checking yer environment ...';
|
||||
$string['environmentsub2'] = 'Each Moodle release has some minimum PHP version requirement and a number of mandatory PHP extensions.
|
||||
Full environment check is done before each install and upgrade. Please contact server administrator if ye do not know how to install new version or enable PHP extensions.';
|
||||
$string['memorylimithelp'] = '<p>The PHP memory limit for yer server is currently set to {$a}.</p>
|
||||
|
||||
<p>This may cause Moodle to have memory problems later on, especially
|
||||
if ye have a lot of modules enabled and/or a lot of users.</p>
|
||||
|
||||
<p>We recommend that ye configure PHP with a higher limit if possible, like 40M.
|
||||
There are several ways of doing this that ye can try:</p>
|
||||
<ol>
|
||||
<li>If ye are able to, recompile PHP with <i>--enable-memory-limit</i>.
|
||||
This will allow Moodle to set the memory limit itself.</li>
|
||||
<li>If ye have access to yer php.ini file, ye can change the <b>memory_limit</b>
|
||||
setting in there to something like 40M. If ye don\'t have access ye might
|
||||
be able to ask yer administrator to do this for you.</li>
|
||||
<li>On some PHP servers ye can create a .htaccess file in the Moodle directory
|
||||
containing this line:
|
||||
<blockquote><div>php_value memory_limit 40M</div></blockquote>
|
||||
<p>However, on some servers this will prevent <b>all</b> PHP pages from working
|
||||
(you will see errors when ye look at pages) so you\'ll have to remove the .htaccess file.</p></li>
|
||||
</ol>';
|
||||
$string['pathssubadmindir'] = 'A very few webhosts use /admin as a special URL for ye to access a
|
||||
control panel or something. Unfortunately this conflicts with the standard location for the Moodle admin pages. Ye can fix this by
|
||||
renaming the admin directory in yer installation, and putting that new name here. For example: <em>moodleadmin</em>. This will fix admin links in Moodle.';
|
||||
$string['pathssubdataroot'] = 'Ye need a place where Moodle can save uploaded files. This directory should be readable AND WRITEABLE by the web server user
|
||||
(usually \'nobody\' or \'apache\'), but it must not be accessible directly via the web. The installer will try to create it if doesn\'t exist.';
|
||||
$string['pathssubwwwroot'] = 'Full web address where Moodle will be accessed.
|
||||
It\'s not possible to access Moodle using multiple addresses.
|
||||
If yer site has multiple public addresses ye must set up permanent redirects on all of them except this one.
|
||||
If yer site is accessible both from Intranet and Internet use the public address here and set up DNS so that the Intranet users may use the public address too.
|
||||
If the address is not correct please change the URL in yer browser to restart installation with a different value.';
|
||||
$string['phpversionhelp'] = '<p>Moodle requires a PHP version of at least 4.3.0 or 5.1.0 (5.0.x has a number of known problems).</p>
|
||||
<p>Ye are currently running version {$a}</p>
|
||||
<p>Ye must upgrade PHP or move to a host with a newer version of PHP!<br />
|
||||
(In case of 5.0.x ye could also downgrade to 4.4.x version)</p>';
|
||||
$string['welcomep20'] = 'Ye are seeing this page because ye have successfully installed and
|
||||
launched the <strong>{$a->packname} {$a->packversion}</strong> package in yer computer. Congratulations!';
|
||||
$string['welcomep60'] = 'The following pages will lead ye through some easy to follow steps to
|
||||
configure and set up <strong>Moodle</strong> on yer computer. Ye may accept the default
|
||||
settings or, optionally, amend them to suit yer own needs.';
|
||||
@@ -30,4 +30,5 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = 'en';
|
||||
$string['thislanguage'] = 'English for kids';
|
||||
|
||||
@@ -33,7 +33,9 @@ defined('MOODLE_INTERNAL') || die();
|
||||
$string['admindirname'] = 'Admin direktorioa';
|
||||
$string['availablelangs'] = 'Hizkuntza eskuragarrien zerrenda';
|
||||
$string['chooselanguagehead'] = 'Aukeratu hizkuntza bat';
|
||||
$string['chooselanguagesub'] = 'Instalazio-prozesurako hizkuntza aukeratu, mesedez.';
|
||||
$string['chooselanguagesub'] = 'Mesedez, aukeratu instalaziorako hizkuntza bat. Hizkuntza hori erabiliko da gunearen berezko hizkuntza gisa, baina aurrerago alda daiteke.';
|
||||
$string['clialreadyconfigured'] = 'File config.php fitxategia badago, mesedez erabili admin/cli/install_database.php gune hau instalatu nahi baduzu.';
|
||||
$string['clialreadyinstalled'] = 'File config.php fitxategia badago, mesedez erabili admin/cli/upgrade.php zure gunea eguneratu nahi baduzu.';
|
||||
$string['databasehost'] = 'Datu-basearen ostalaria';
|
||||
$string['databasename'] = 'Datu-basearen izena';
|
||||
$string['dataroot'] = 'Datu-direktorioa';
|
||||
|
||||
@@ -30,5 +30,15 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['clianswerno'] = 'خ';
|
||||
$string['cliansweryes'] = 'ب';
|
||||
$string['cliincorrectvalueerror'] = 'خطا، مقدار نامناسب «{$a->value}» برای «{$a->option}»';
|
||||
$string['cliincorrectvalueretry'] = 'مقدار نامناسب، لطفا دوباره تلاش کنید';
|
||||
$string['clitypevalue'] = 'مقدار را وارد کنید';
|
||||
$string['clitypevaluedefault'] = 'مقدار را وارد کنید، برای استفاده از مقدار پیشفرض ({$a}) کلید Enter را فشار دهید';
|
||||
$string['cliunknowoption'] = 'گزینههای شناخته نشده:
|
||||
{$a}
|
||||
لطفا از گزینه <span style="direction:ltr">--help</span> استفاده کنید.';
|
||||
$string['cliyesnoprompt'] = 'یکی از گزینههای ب (به معنای بلی) یا خ (به نشانه خیر) را تایپ کنید';
|
||||
$string['environmentrequireinstall'] = 'باید نصب و فعال باشد';
|
||||
$string['environmentrequireversion'] = 'نسخهٔ {$a->needed} لازم است و شما نسخهٔ {$a->current} را دارید';
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cliincorrectvalueretry'] = 'E cala, tovolea tale';
|
||||
$string['clitypevalue'] = 'Tabaka na lewena';
|
||||
$string['cliyesnoprompt'] = 'tabaka \'y\'';
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user