Compare commits
575 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c4f6df5a1a | |||
| 8d1423bf46 | |||
| 453e17a159 | |||
| 41ed41908a | |||
| 34ea5d0249 | |||
| 70bc0513df | |||
| 6326180bc4 | |||
| 5aba6e506d | |||
| bf4980480a | |||
| ba22fd2f1b | |||
| b7ab2a33f9 | |||
| c84541467c | |||
| 0735b8b5e2 | |||
| 600b0a6153 | |||
| 35693a4c67 | |||
| 335ded3169 | |||
| 4e5c38b864 | |||
| 5d6b483d1b | |||
| 1c84aa80cc | |||
| 02a78e34e9 | |||
| c2eaf6e2c1 | |||
| c8eaf3a606 | |||
| 3c487457e5 | |||
| 2b8387bd1e | |||
| 1b8d5cf1a3 | |||
| b506964761 | |||
| 426dd99f8d | |||
| 42fe1f5e07 | |||
| 944a250663 | |||
| 8e78a8143f | |||
| 18d81b3c79 | |||
| 7863f71ae7 | |||
| c2c10bb222 | |||
| d152957e3c | |||
| 4a6ddf7882 | |||
| 31cd679990 | |||
| b9043a5d7b | |||
| 9f012f8968 | |||
| 85bc8378bb | |||
| 078c5f62ad | |||
| b8b5f4f0cc | |||
| 7f459d6015 | |||
| f1cdf71eb6 | |||
| b88311824f | |||
| ad25762b7f | |||
| 4b80f54a02 | |||
| 7a7287ef28 | |||
| 0efa998340 | |||
| f12f0b3a87 | |||
| 67079752ef | |||
| 6bbe47031b | |||
| 1a39706377 | |||
| 5356317a41 | |||
| 5af958a918 | |||
| 58580498fb | |||
| 7f48f85547 | |||
| efdf99dbee | |||
| 3b6675ef8c | |||
| 83eeba2692 | |||
| 1ec1c9d9af | |||
| dcbe6a30ff | |||
| 29de085aec | |||
| 1194a6b485 | |||
| 00b339ce3c | |||
| 7f8e21310b | |||
| d4359bed48 | |||
| 5dfa747163 | |||
| 44fd4487d6 | |||
| 29cbfe7838 | |||
| eb9d996576 | |||
| 2d06cfc163 | |||
| 2023684b2a | |||
| 406db74fe8 | |||
| 3978e0570e | |||
| 9e22735765 | |||
| 620274a38b | |||
| 26e3a274ff | |||
| 2ffdfadb8c | |||
| a9c2245574 | |||
| e9e0dac4b7 | |||
| 056463ffe9 | |||
| 760fefa473 | |||
| 2d39e161dc | |||
| 150869ac1f | |||
| 3c666bb0cf | |||
| aea6ab88da | |||
| 3cb30adbad | |||
| f7ff0f6d17 | |||
| 5a6d40d28b | |||
| a280d409ad | |||
| 2e2305ed79 | |||
| 1cd62bf815 | |||
| 657db60a99 | |||
| 3a14100d8d | |||
| f436d12c60 | |||
| a3b60b4186 | |||
| 79537435e0 | |||
| 1829acb057 | |||
| 123d4f1d27 | |||
| 3b598069b9 | |||
| be2c20217e | |||
| f571d4cd41 | |||
| 2151dfa877 | |||
| c6e7d27caf | |||
| 39ff06cbb5 | |||
| a892654fbc | |||
| bd10bc353d | |||
| 8aa9119cfa | |||
| 8ef54b14bc | |||
| 92f1ef65b9 | |||
| d182f64877 | |||
| a0c01a2146 | |||
| f25d9a9f4d | |||
| 0e2a80c97b | |||
| 2a7e913ee3 | |||
| f194dcf46a | |||
| 6360fe62d3 | |||
| 0c9edc985c | |||
| 41b3dbec5b | |||
| da27633d02 | |||
| c4e4b6adee | |||
| df249cee86 | |||
| e96b76e5ee | |||
| 32db89aa11 | |||
| 131e9f7fb9 | |||
| 9cd9d4cd24 | |||
| 548485d09f | |||
| 2ff7800ae8 | |||
| fa9c1c5cab | |||
| 4846d332dd | |||
| c3e22b17e7 | |||
| cb8da175b7 | |||
| a0469ddb43 | |||
| b7c7260e44 | |||
| 5b421fa5e2 | |||
| 4b294caaac | |||
| 4f3b7b7df3 | |||
| d900d4d3e0 | |||
| c8d4379649 | |||
| e3ab559f4e | |||
| 774ad5d6ae | |||
| e5817028fb | |||
| 88b28b7c41 | |||
| ebcb6e5eff | |||
| 85cb510aba | |||
| 6e0ef17c71 | |||
| 33927a74b1 | |||
| 7f68eb8e2c | |||
| 9de39056a6 | |||
| 573123929d | |||
| 3445e85104 | |||
| 69fd20dc19 | |||
| 67e79df3e2 | |||
| 098b24da52 | |||
| 50100cb313 | |||
| 82b2ffaed1 | |||
| 6dcb3f9a8f | |||
| e98e4d41a0 | |||
| e6723832fb | |||
| 9ab7b290df | |||
| 2b19ed8945 | |||
| a287c32d73 | |||
| 2e91e1ae9d | |||
| b1945c7923 | |||
| 6e6b7544f0 | |||
| b5f59f54da | |||
| 4f51befe7f | |||
| 38f9d1b6b8 | |||
| 3e26be86df | |||
| f7e02420da | |||
| d4626cf646 | |||
| 2d5dc5fbbe | |||
| 4c82d2b547 | |||
| 37555d5d01 | |||
| ca58cd28b0 | |||
| e8848eb612 | |||
| 508a8cabfc | |||
| 7b39e39632 | |||
| 739e444c39 | |||
| dcbd731743 | |||
| 15e4b8b2fe | |||
| 0364409f8e | |||
| 8676f75000 | |||
| a1384605c7 | |||
| 0acd60f75d | |||
| dd10768155 | |||
| 11e24ca055 | |||
| b5c2f4d339 | |||
| 032d7039fd | |||
| 4c519f313f | |||
| a4478cd677 | |||
| 9238b568c5 | |||
| 4b1634259a | |||
| e9d36fd552 | |||
| 256f77ef94 | |||
| fdb2313376 | |||
| 5a72f96843 | |||
| 63601aa655 | |||
| 464ad0a47e | |||
| 8a99b2a116 | |||
| 5697227dd9 | |||
| b23d738cde | |||
| b562573aa2 | |||
| 3cd88ea638 | |||
| 0b537fd64f | |||
| 91af0d8431 | |||
| 06f9aecbcf | |||
| cac3efc3e2 | |||
| 183550216e | |||
| dcaea2b744 | |||
| 834bcfa664 | |||
| 139ce28030 | |||
| e97f24ea91 | |||
| 834082292a | |||
| 9f78a33c7b | |||
| ffcc16f52a | |||
| b337e7be55 | |||
| 359f84eeac | |||
| 0958a64834 | |||
| 43269b8442 | |||
| 41a535e3e7 | |||
| 71b908e52f | |||
| c40e59f1c6 | |||
| 7f3b9f0e31 | |||
| 90f345d02f | |||
| e460b8846d | |||
| a4ffe6c993 | |||
| e922d9a90b | |||
| 2ef91b5b55 | |||
| 7e01298b8f | |||
| a3c0ea64af | |||
| ac9ee6a834 | |||
| 694bf2fa3b | |||
| 51ea2ffa7e | |||
| 6ec9004b69 | |||
| 2a6811bb9d | |||
| b11d9dc595 | |||
| 3a4e0dd4d3 | |||
| 4a0b3e2a62 | |||
| 0293b62ebb | |||
| 1b8755325a | |||
| 1114c49f51 | |||
| 9a45c1e1f0 | |||
| 54c5b28e69 | |||
| cc2a5ff65e | |||
| 8f86e3a2ad | |||
| da1bee2cb9 | |||
| 2be846fd31 | |||
| 442f0b10ae | |||
| 7ef2840ffa | |||
| 38e32f6ddb | |||
| bdfd90b105 | |||
| 87690ba756 | |||
| cbda44bca4 | |||
| 96cd18c261 | |||
| 2876f41409 | |||
| c4a91d0670 | |||
| b07c46d077 | |||
| 784a6f3132 | |||
| 8c70ac0eb6 | |||
| ff6a1ffdbe | |||
| 9217c1aa87 | |||
| 6c91ae7d99 | |||
| a79d228de6 | |||
| 30b29a5cfa | |||
| 2baa09dd5f | |||
| 3b1a4a0d55 | |||
| 8f51baa885 | |||
| 88ade60cf4 | |||
| 2316dcf0a8 | |||
| ea3c021a86 | |||
| ad679f47ac | |||
| 8eaf6d689b | |||
| 7217ca7d93 | |||
| 88ec670c50 | |||
| d183cb5d85 | |||
| 6def225efa | |||
| c21932e739 | |||
| 6b7fca5e7f | |||
| 4828564296 | |||
| dd154420ee | |||
| 85197c3d6c | |||
| eba115041c | |||
| a6da7bde9b | |||
| 17d339ea8e | |||
| 28ab88e130 | |||
| 4137a8c195 | |||
| 6b04aaad26 | |||
| 133a23e130 | |||
| 5738c51982 | |||
| ebaa82b5da | |||
| 0e1cdd9e43 | |||
| cfd9db2b8f | |||
| bca26d231d | |||
| 10c8f7e601 | |||
| 24354adc3a | |||
| 088b648ccc | |||
| bd87b71c4d | |||
| 6c5ba86e35 | |||
| 57e47cc33a | |||
| 10c502480b | |||
| fd5cee8ce9 | |||
| 4d49d71f19 | |||
| a0380d65e9 | |||
| cf1fa9497d | |||
| f3052cca98 | |||
| 471af8c6c7 | |||
| 8de624b8e1 | |||
| cebd1bce58 | |||
| de8b419b60 | |||
| dc558d2882 | |||
| c65ce8ed3c | |||
| 027961fcf4 | |||
| a9767e2d01 | |||
| e5a3ba18f4 | |||
| 1785306187 | |||
| 04b1bdffdb | |||
| aafb430115 | |||
| 7231e48c27 | |||
| d8c7d0999c | |||
| c42caf06ac | |||
| d98fbf5108 | |||
| 0fef954f39 | |||
| 7bfc00a71a | |||
| f9a0759eec | |||
| 0ce2d140b7 | |||
| 02ba9aba00 | |||
| 879b36fe31 | |||
| 487b07bcc1 | |||
| 779085b75d | |||
| 4ad8c6e350 | |||
| e16d680905 | |||
| 34292e766b | |||
| 2bf6056b4a | |||
| 06cb4cbaee | |||
| 103fc0ec44 | |||
| e0475260c6 | |||
| 433248cc8d | |||
| 0c8697540c | |||
| 3342f9278b | |||
| d616497a0e | |||
| b7bb9c0f6c | |||
| 8bf9c37f0e | |||
| b40a326061 | |||
| e1a236015c | |||
| 11e45d05f8 | |||
| c99142aa86 | |||
| 4e3676afef | |||
| 8815d83999 | |||
| 032ca9883e | |||
| 2a71a2648e | |||
| 0c6182c125 | |||
| 25641ce2da | |||
| 8a2ac4cb74 | |||
| 8c10f16d34 | |||
| ad4ac9daa5 | |||
| c60b224fbc | |||
| 6b7080c841 | |||
| 2232cbb2b5 | |||
| 1fee8759bc | |||
| c172ee6210 | |||
| 54d7e72ddd | |||
| 3ee4fb3f95 | |||
| e6155dfa67 | |||
| ec4b3cbcae | |||
| d112ae914f | |||
| 1ee341b3d1 | |||
| d019d13ea1 | |||
| 866e90c3d4 | |||
| 731e021f9c | |||
| e88330b84c | |||
| 39009f1633 | |||
| ce5ee449e3 | |||
| d53fd52df8 | |||
| d31ebf3462 | |||
| 31550708b4 | |||
| b25603680e | |||
| f50e703e21 | |||
| f68144c177 | |||
| f129c975b9 | |||
| b7867ebe98 | |||
| 63526f3e9b | |||
| 2f4fe2f195 | |||
| cf4b3493e2 | |||
| 71dda1f97d | |||
| e239fd37b8 | |||
| 6c5fe9f7e9 | |||
| 36d22219bc | |||
| f7aef5c648 | |||
| 26303bd017 | |||
| 50f0c58e69 | |||
| 689a6891bf | |||
| fef14d0fc8 | |||
| 878ff40575 | |||
| 0d52d3366c | |||
| fcf11d558a | |||
| 23e7302a9e | |||
| 905617c12f | |||
| f28832d5c0 | |||
| 05b49c8b6d | |||
| 5acc2fba63 | |||
| da7ab34762 | |||
| 4dd114b834 | |||
| 797e49da80 | |||
| 165e476948 | |||
| 991ee3344a | |||
| 5174eeebe3 | |||
| 96b7f2d7db | |||
| 6eaf677b26 | |||
| fc73d9e7b4 | |||
| ed39308f60 | |||
| 2450fc50ed | |||
| 9fdd6c8bc8 | |||
| d7a7519fd4 | |||
| c0e1de9b00 | |||
| 94846c2e39 | |||
| 06b4c6e13a | |||
| 036b35f682 | |||
| 98ea2e451a | |||
| 794e40ec36 | |||
| eff6d318ff | |||
| 327120be6a | |||
| 483f992801 | |||
| 7ba8da8a13 | |||
| 4342686ce6 | |||
| c8a5dfe0bd | |||
| 1739fe7331 | |||
| d83c73053d | |||
| f6d6e5446d | |||
| 3d99c7ef99 | |||
| 81a95b0185 | |||
| cc13ca3111 | |||
| 14db36e6d1 | |||
| 6733ba320d | |||
| 41752c58bc | |||
| e293df9442 | |||
| 1803769098 | |||
| 94eaa78a25 | |||
| 3cbecebfa4 | |||
| bca9d87c4e | |||
| 52a29f890e | |||
| 8935486dc4 | |||
| 2eb04f8ad3 | |||
| ce8e567302 | |||
| 3fa32485c9 | |||
| 3555da1d3c | |||
| d90316ff6c | |||
| 7352bbbc6a | |||
| d9f049c913 | |||
| 7f5380be08 | |||
| d3826329f6 | |||
| 35271f566f | |||
| b062b305f1 | |||
| 0737e258b6 | |||
| fb3bf9a0d2 | |||
| 7b1009233f | |||
| 57b290b458 | |||
| 15f5066c93 | |||
| 562c3f715f | |||
| 0d7887f554 | |||
| 93661834d8 | |||
| 7946da5f3c | |||
| 537114c6cc | |||
| d153f01a53 | |||
| 2b2fd42abc | |||
| 3709584065 | |||
| 602c77f68c | |||
| ce77d3ea8c | |||
| 9e232387f5 | |||
| a3bee9b1d3 | |||
| 919e659ba6 | |||
| 8a79a37526 | |||
| 3db86da7bb | |||
| a4276fe096 | |||
| 494268cd48 | |||
| d14031e9ae | |||
| ace896cda7 | |||
| 16d1e22c10 | |||
| 9fee0258a4 | |||
| 3a7d4b4b3d | |||
| 2b7b20dea9 | |||
| d555b33e55 | |||
| 0bc3cbc276 | |||
| 4b25984a20 | |||
| 25713708d6 | |||
| 230c61f562 | |||
| 44aba13a35 | |||
| f909700aff | |||
| 11fd3b45bb | |||
| 306beb581d | |||
| 6cedec7615 | |||
| f672031f54 | |||
| 27a8ee7404 | |||
| eb4e049654 | |||
| e4829fa696 | |||
| 1fd94ee7d7 | |||
| 7704977132 | |||
| ae7cc577b7 | |||
| e3b2cd8543 | |||
| a944c3dc97 | |||
| 9a5d24911b | |||
| a6887331c2 | |||
| 3be42c9e85 | |||
| e1fe0c5189 | |||
| 46fe9a9701 | |||
| 8167bfc973 | |||
| 512d5310db | |||
| 5c5dbec7de | |||
| d6261cf8c6 | |||
| 9485c9e4df | |||
| a558511b85 | |||
| 4d5dc3104b | |||
| abd481c63e | |||
| 88507c0063 | |||
| 7a03cfd525 | |||
| 9ccf5668e7 | |||
| 9bec13184c | |||
| 2db9576147 | |||
| 1e898eefe3 | |||
| 647153cd4f | |||
| 3765f9a4bc | |||
| fe6d0cf80d | |||
| b216ddbe68 | |||
| e6aebbff8d | |||
| 22df4905ca | |||
| 150c09677c | |||
| 885ce5ff89 | |||
| 87187e0ef9 | |||
| 537cfab964 | |||
| 2092307aba | |||
| 64696ae4cc | |||
| 13df91ba6d | |||
| d951bc52ac | |||
| 9bb0bf92ab | |||
| 14c31e1829 | |||
| fcc0927953 | |||
| 8558498fb4 | |||
| beb0f4a229 | |||
| bfe60efbb7 | |||
| ff6c9d2f86 | |||
| b629bbec9f | |||
| 3065bfa1e1 | |||
| a1195a463d | |||
| 4a50c000ab | |||
| b9edb6a853 | |||
| 456a4de803 | |||
| 694e29989f | |||
| 503581b5d0 | |||
| 93149694d8 | |||
| 9cdadbcad4 | |||
| 79175f2019 | |||
| f36e320c7e | |||
| 5775674f8c | |||
| 2f92290515 | |||
| 422d1ed274 | |||
| c868308b89 | |||
| a2f5969b3d | |||
| 787fc502ad | |||
| 3974508f3f | |||
| 27d0976f6c | |||
| 1a7541517c | |||
| 9f46908ac4 | |||
| dbd95c2aca | |||
| d783eff54b | |||
| 470e0cea2b | |||
| bcc892d151 | |||
| d86419ad87 | |||
| 00cc7f5cc9 | |||
| 8f24208eb9 | |||
| 5458ff4d23 | |||
| becf8f8a23 | |||
| 0b45720b6e | |||
| 2c600c42fa | |||
| 739328d149 | |||
| 95fa6fddca |
@@ -265,7 +265,7 @@ if ($interactive) {
|
||||
$chmod = octdec(clean_param($options['chmod'], PARAM_INT));
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading('Data directories permission'); // todo localize
|
||||
cli_heading(get_string('datarootpermission', 'install'));
|
||||
$prompt = get_string('clitypevaluedefault', 'admin', decoct($chmod));
|
||||
$error = '';
|
||||
do {
|
||||
|
||||
+220
-8
@@ -214,11 +214,7 @@
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mysql" version="5.0.25">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="mysql416required" />
|
||||
</FEEDBACK>
|
||||
</VENDOR>
|
||||
<VENDOR name="mysql" version="5.0.25" />
|
||||
<VENDOR name="postgres" version="8.3" />
|
||||
<VENDOR name="mssql" version="9.0" />
|
||||
<VENDOR name="odbc_mssql" version="9.0" />
|
||||
@@ -335,11 +331,227 @@
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mysql" version="5.0.25">
|
||||
<VENDOR name="mysql" version="5.0.25" />
|
||||
<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.2" level="required">
|
||||
</PHP>
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="mysql416required" />
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</VENDOR>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="mbstringrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK 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="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="gdrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK 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_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.2" requires="1.9">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mysql" version="5.0.25" />
|
||||
<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.2" level="required">
|
||||
</PHP>
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK 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_CHECK 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="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="gdrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK 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_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.3" 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" />
|
||||
|
||||
+19
-13
@@ -38,9 +38,10 @@ class mnet_simple_host_form extends moodleform {
|
||||
|
||||
$mform = $this->_form;
|
||||
|
||||
$mform->addElement('text', 'wwwroot', get_string('hostname', 'mnet'));
|
||||
$mform->addElement('text', 'wwwroot', get_string('hostname', 'mnet'), array('maxlength' => 255, 'size' => 50));
|
||||
$mform->setType('wwwroot', PARAM_URL);
|
||||
$mform->addRule('wwwroot', null, 'required', null, 'client');
|
||||
$mform->addRule('wwwroot', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
|
||||
$mform->addElement('select', 'applicationid', get_string('applicationtype', 'mnet'),
|
||||
$DB->get_records_menu('mnet_application', array(), 'id,display_name'));
|
||||
@@ -81,11 +82,13 @@ class mnet_review_host_form extends moodleform {
|
||||
$mform->addElement('hidden', 'applicationid');
|
||||
$mform->addElement('hidden', 'oldpublickey');
|
||||
|
||||
$mform->addElement('text', 'name', get_string('site'));
|
||||
$mform->addElement('text', 'name', get_string('site'), array('maxlength' => 80, 'size' => 50));
|
||||
$mform->setType('name', PARAM_NOTAGS);
|
||||
$mform->addRule('name', get_string('maximumchars', '', 80), 'maxlength', 80, 'client');
|
||||
|
||||
$mform->addElement('text', 'wwwroot', get_string('hostname', 'mnet'));
|
||||
$mform->addElement('text', 'wwwroot', get_string('hostname', 'mnet'), array('maxlength' => 255, 'size' => 50));
|
||||
$mform->setType('wwwroot', PARAM_URL);
|
||||
$mform->addRule('wwwroot', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
|
||||
$themes = array('' => get_string('forceno'));
|
||||
foreach (array_keys(get_plugin_list('theme')) as $themename) {
|
||||
@@ -96,15 +99,6 @@ class mnet_review_host_form extends moodleform {
|
||||
$mform->addElement('textarea', 'public_key', get_string('publickey', 'mnet'), array('rows' => 17, 'cols' => 100, 'class' => 'smalltext'));
|
||||
$mform->setType('public_key', PARAM_PEM);
|
||||
|
||||
if ($mnet_peer && !empty($mnet_peer->deleted)) {
|
||||
$radioarray = array();
|
||||
$radioarray[] = MoodleQuickForm::createElement('radio', 'deleted', '', get_string('yes'), 1);
|
||||
$radioarray[] = MoodleQuickForm::createElement('radio', 'deleted', '', get_string('no'), 0);
|
||||
$mform->addGroup($radioarray, 'radioar', get_string('deleted'), array(' '), false);
|
||||
} else {
|
||||
$mform->addElement('hidden', 'deleted');
|
||||
}
|
||||
|
||||
// finished with form controls, now the static informational stuff
|
||||
if ($mnet_peer && !empty($mnet_peer->bootstrapped)) {
|
||||
$expires = '';
|
||||
@@ -140,7 +134,19 @@ class mnet_review_host_form extends moodleform {
|
||||
}
|
||||
}
|
||||
|
||||
$mform->addElement('static', 'certdetails', get_string('certdetails', 'mnet'), $OUTPUT->box('<pre>' . $credstr . '</pre>'));
|
||||
$mform->addElement('static', 'certdetails', get_string('certdetails', 'mnet'),
|
||||
$OUTPUT->box('<pre>' . $credstr . '</pre>', 'generalbox certdetails'));
|
||||
}
|
||||
|
||||
if ($mnet_peer && !empty($mnet_peer->deleted)) {
|
||||
$radioarray = array();
|
||||
$radioarray[] = MoodleQuickForm::createElement('static', 'deletedinfo', '',
|
||||
$OUTPUT->container(get_string('deletedhostinfo', 'mnet'), 'deletedhostinfo'));
|
||||
$radioarray[] = MoodleQuickForm::createElement('radio', 'deleted', '', get_string('yes'), 1);
|
||||
$radioarray[] = MoodleQuickForm::createElement('radio', 'deleted', '', get_string('no'), 0);
|
||||
$mform->addGroup($radioarray, 'radioar', get_string('deleted'), array(' ', ' '), false);
|
||||
} else {
|
||||
$mform->addElement('hidden', 'deleted');
|
||||
}
|
||||
|
||||
// finished with static stuff, print save button
|
||||
|
||||
+19
-4
@@ -190,7 +190,7 @@ if ($formdata = $reviewform->get_data()) {
|
||||
|
||||
// normal flow - just display all hosts with links
|
||||
echo $OUTPUT->header();
|
||||
$hosts = mnet_get_hosts();
|
||||
$hosts = mnet_get_hosts(true);
|
||||
|
||||
// print the table to display the register all hosts setting
|
||||
$table = new html_table();
|
||||
@@ -231,28 +231,43 @@ $table->head = array(
|
||||
);
|
||||
$table->wrap = array('nowrap', 'nowrap', 'nowrap', 'nowrap');
|
||||
$baseurl = new moodle_url('/admin/mnet/peers.php');
|
||||
$deleted = array();
|
||||
foreach($hosts as $host) {
|
||||
$hosturl = new moodle_url($baseurl, array('hostid' => $host->id));
|
||||
if (trim($host->name) === '') {
|
||||
// should not happen but...
|
||||
$host->name = '???';
|
||||
}
|
||||
// process all hosts first since it's the easiest
|
||||
if ($host->id == $CFG->mnet_all_hosts_id) {
|
||||
$table->data[] = array(html_writer::tag('a', $host->name, array('href'=>$hosturl)), '', '', '');
|
||||
$table->data[] = array(html_writer::link($hosturl, get_string('allhosts', 'core_mnet')), '*', '', '');
|
||||
continue;
|
||||
}
|
||||
|
||||
// populate the list of deleted hosts
|
||||
if ($host->deleted) {
|
||||
$deleted[] = html_writer::link($hosturl, $host->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($host->last_connect_time == 0) {
|
||||
$last_connect = get_string('never');
|
||||
} else {
|
||||
$last_connect = date('H:i:s d/m/Y', $host->last_connect_time);
|
||||
$last_connect = userdate($host->last_connect_time, get_string('strftimedatetime', 'core_langconfig'));
|
||||
}
|
||||
$table->data[] = array(
|
||||
html_writer::link($hosturl, $host->name),
|
||||
html_writer::link($hosturl, $host->wwwroot),
|
||||
html_writer::link($host->wwwroot, $host->wwwroot),
|
||||
$last_connect,
|
||||
$OUTPUT->single_button(new moodle_url('/admin/mnet/delete.php', array('hostid' => $host->id)), get_string('delete'))
|
||||
);
|
||||
}
|
||||
echo html_writer::table($table);
|
||||
|
||||
if ($deleted) {
|
||||
echo $OUTPUT->box(get_string('deletedhosts', 'core_mnet', join(', ', $deleted)), 'deletedhosts');
|
||||
}
|
||||
|
||||
// finally, print the initial form to add a new host
|
||||
echo $OUTPUT->box_start();
|
||||
echo $OUTPUT->heading(get_string('addnewhost', 'mnet'), 3);
|
||||
|
||||
+266
-251
@@ -1,293 +1,308 @@
|
||||
<?php
|
||||
// Allows the admin to manage question types.
|
||||
// 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/>.
|
||||
|
||||
require_once(dirname(__FILE__) . '/../config.php');
|
||||
require_once($CFG->libdir . '/questionlib.php');
|
||||
require_once($CFG->libdir . '/adminlib.php');
|
||||
require_once($CFG->libdir . '/tablelib.php');
|
||||
/**
|
||||
* Allows the admin to manage question types.
|
||||
*
|
||||
* @package moodlecore
|
||||
* @subpackage questionbank
|
||||
* @copyright 2008 Tim Hunt
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/// Check permissions.
|
||||
require_login();
|
||||
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
require_capability('moodle/question:config', $systemcontext);
|
||||
$canviewreports = has_capability('report/questioninstances:view', $systemcontext);
|
||||
|
||||
admin_externalpage_setup('manageqtypes');
|
||||
require_once(dirname(__FILE__) . '/../config.php');
|
||||
require_once($CFG->libdir . '/questionlib.php');
|
||||
require_once($CFG->libdir . '/adminlib.php');
|
||||
require_once($CFG->libdir . '/tablelib.php');
|
||||
|
||||
/// Get some data we will need - question counts and which types are needed.
|
||||
$counts = $DB->get_records_sql("
|
||||
SELECT qtype, COUNT(1) as numquestions, SUM(hidden) as numhidden
|
||||
FROM {question} GROUP BY qtype", array());
|
||||
$needed = array();
|
||||
foreach ($QTYPES as $qtypename => $qtype) {
|
||||
if (!isset($counts[$qtypename])) {
|
||||
$counts[$qtypename] = new stdClass;
|
||||
$counts[$qtypename]->numquestions = 0;
|
||||
$counts[$qtypename]->numhidden = 0;
|
||||
}
|
||||
$needed[$qtypename] = $counts[$qtypename]->numquestions > 0;
|
||||
$counts[$qtypename]->numquestions -= $counts[$qtypename]->numhidden;
|
||||
// Check permissions.
|
||||
require_login();
|
||||
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
require_capability('moodle/question:config', $systemcontext);
|
||||
$canviewreports = has_capability('report/questioninstances:view', $systemcontext);
|
||||
|
||||
admin_externalpage_setup('manageqtypes');
|
||||
$thispageurl = new moodle_url('/admin/qtypes.php');
|
||||
|
||||
// Get some data we will need - question counts and which types are needed.
|
||||
$counts = $DB->get_records_sql("
|
||||
SELECT qtype, COUNT(1) as numquestions, SUM(hidden) as numhidden
|
||||
FROM {question} GROUP BY qtype", array());
|
||||
$needed = array();
|
||||
foreach ($QTYPES as $qtypename => $qtype) {
|
||||
if (!isset($counts[$qtypename])) {
|
||||
$counts[$qtypename] = new stdClass;
|
||||
$counts[$qtypename]->numquestions = 0;
|
||||
$counts[$qtypename]->numhidden = 0;
|
||||
}
|
||||
$needed['missingtype'] = true; // The system needs the missing question type.
|
||||
foreach ($QTYPES as $qtypename => $qtype) {
|
||||
foreach ($qtype->requires_qtypes() as $reqtype) {
|
||||
$needed[$reqtype] = true;
|
||||
}
|
||||
$needed[$qtypename] = $counts[$qtypename]->numquestions > 0;
|
||||
$counts[$qtypename]->numquestions -= $counts[$qtypename]->numhidden;
|
||||
}
|
||||
$needed['missingtype'] = true; // The system needs the missing question type.
|
||||
foreach ($QTYPES as $qtypename => $qtype) {
|
||||
foreach ($qtype->requires_qtypes() as $reqtype) {
|
||||
$needed[$reqtype] = true;
|
||||
}
|
||||
foreach ($counts as $qtypename => $count) {
|
||||
if (!isset($QTYPES[$qtypename])) {
|
||||
$counts['missingtype']->numquestions += $count->numquestions - $count->numhidden;
|
||||
$counts['missingtype']->numhidden += $count->numhidden;
|
||||
}
|
||||
}
|
||||
foreach ($counts as $qtypename => $count) {
|
||||
if (!isset($QTYPES[$qtypename])) {
|
||||
$counts['missingtype']->numquestions += $count->numquestions - $count->numhidden;
|
||||
$counts['missingtype']->numhidden += $count->numhidden;
|
||||
}
|
||||
}
|
||||
|
||||
// Work of the correct sort order.
|
||||
$config = get_config('question');
|
||||
$sortedqtypes = array();
|
||||
foreach ($QTYPES as $qtypename => $qtype) {
|
||||
$sortedqtypes[$qtypename] = $qtype->local_name();
|
||||
}
|
||||
$sortedqtypes = question_sort_qtype_array($sortedqtypes, $config);
|
||||
|
||||
// Process actions ============================================================
|
||||
|
||||
// Disable.
|
||||
if (($disable = optional_param('disable', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
|
||||
if (!isset($QTYPES[$disable])) {
|
||||
print_error('unknownquestiontype', 'question', $thispageurl, $disable);
|
||||
}
|
||||
|
||||
/// Work of the correct sort order.
|
||||
$config = get_config('question');
|
||||
$sortedqtypes = array();
|
||||
foreach ($QTYPES as $qtypename => $qtype) {
|
||||
$sortedqtypes[$qtypename] = $qtype->local_name();
|
||||
}
|
||||
$sortedqtypes = question_sort_qtype_array($sortedqtypes, $config);
|
||||
set_config($disable . '_disabled', 1, 'question');
|
||||
redirect($thispageurl);
|
||||
}
|
||||
|
||||
/// Process actions ============================================================
|
||||
|
||||
// Disable.
|
||||
if (($disable = optional_param('disable', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
|
||||
if (!isset($QTYPES[$disable])) {
|
||||
print_error('unknownquestiontype', 'question', admin_url('qtypes.php'), $disable);
|
||||
}
|
||||
|
||||
set_config($disable . '_disabled', 1, 'question');
|
||||
redirect(admin_url('qtypes.php'));
|
||||
// Enable.
|
||||
if (($enable = optional_param('enable', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
|
||||
if (!isset($QTYPES[$enable])) {
|
||||
print_error('unknownquestiontype', 'question', $thispageurl, $enable);
|
||||
}
|
||||
|
||||
// Enable.
|
||||
if (($enable = optional_param('enable', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
|
||||
if (!isset($QTYPES[$enable])) {
|
||||
print_error('unknownquestiontype', 'question', admin_url('qtypes.php'), $enable);
|
||||
}
|
||||
|
||||
if (!$QTYPES[$enable]->menu_name()) {
|
||||
print_error('cannotenable', 'question', admin_url('qtypes.php'), $enable);
|
||||
}
|
||||
|
||||
unset_config($enable . '_disabled', 'question');
|
||||
redirect(admin_url('qtypes.php'));
|
||||
if (!$QTYPES[$enable]->menu_name()) {
|
||||
print_error('cannotenable', 'question', $thispageurl, $enable);
|
||||
}
|
||||
|
||||
// Move up in order.
|
||||
if (($up = optional_param('up', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
|
||||
if (!isset($QTYPES[$up])) {
|
||||
print_error('unknownquestiontype', 'question', admin_url('qtypes.php'), $up);
|
||||
}
|
||||
unset_config($enable . '_disabled', 'question');
|
||||
redirect($thispageurl);
|
||||
}
|
||||
|
||||
$neworder = question_reorder_qtypes($sortedqtypes, $up, -1);
|
||||
question_save_qtype_order($neworder, $config);
|
||||
redirect(admin_url('qtypes.php'));
|
||||
// Move up in order.
|
||||
if (($up = optional_param('up', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
|
||||
if (!isset($QTYPES[$up])) {
|
||||
print_error('unknownquestiontype', 'question', $thispageurl, $up);
|
||||
}
|
||||
|
||||
// Move down in order.
|
||||
if (($down = optional_param('down', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
|
||||
if (!isset($QTYPES[$down])) {
|
||||
print_error('unknownquestiontype', 'question', admin_url('qtypes.php'), $down);
|
||||
}
|
||||
$neworder = question_reorder_qtypes($sortedqtypes, $up, -1);
|
||||
question_save_qtype_order($neworder, $config);
|
||||
redirect($thispageurl);
|
||||
}
|
||||
|
||||
$neworder = question_reorder_qtypes($sortedqtypes, $down, +1);
|
||||
question_save_qtype_order($neworder, $config);
|
||||
redirect(admin_url('qtypes.php'));
|
||||
// Move down in order.
|
||||
if (($down = optional_param('down', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
|
||||
if (!isset($QTYPES[$down])) {
|
||||
print_error('unknownquestiontype', 'question', $thispageurl, $down);
|
||||
}
|
||||
|
||||
// Delete.
|
||||
if (($delete = optional_param('delete', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
|
||||
// Check it is OK to delete this question type.
|
||||
if ($delete == 'missingtype') {
|
||||
print_error('cannotdeletemissingqtype', 'admin', admin_url('qtypes.php'));
|
||||
}
|
||||
$neworder = question_reorder_qtypes($sortedqtypes, $down, +1);
|
||||
question_save_qtype_order($neworder, $config);
|
||||
redirect($thispageurl);
|
||||
}
|
||||
|
||||
if (!isset($QTYPES[$delete])) {
|
||||
print_error('unknownquestiontype', 'question', admin_url('qtypes.php'), $delete);
|
||||
}
|
||||
// Delete.
|
||||
if (($delete = optional_param('delete', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
|
||||
// Check it is OK to delete this question type.
|
||||
if ($delete == 'missingtype') {
|
||||
print_error('cannotdeletemissingqtype', 'admin', $thispageurl);
|
||||
}
|
||||
|
||||
if (!isset($QTYPES[$delete])) {
|
||||
print_error('unknownquestiontype', 'question', $thispageurl, $delete);
|
||||
}
|
||||
|
||||
$qtypename = $QTYPES[$delete]->local_name();
|
||||
if ($counts[$delete]->numquestions + $counts[$delete]->numhidden > 0) {
|
||||
print_error('cannotdeleteqtypeinuse', 'admin', $thispageurl, $qtypename);
|
||||
}
|
||||
|
||||
if ($needed[$delete] > 0) {
|
||||
print_error('cannotdeleteqtypeneeded', 'admin', $thispageurl, $qtypename);
|
||||
}
|
||||
|
||||
// If not yet confirmed, display a confirmation message.
|
||||
if (!optional_param('confirm', '', PARAM_BOOL)) {
|
||||
$qtypename = $QTYPES[$delete]->local_name();
|
||||
if ($counts[$delete]->numquestions + $counts[$delete]->numhidden > 0) {
|
||||
print_error('cannotdeleteqtypeinuse', 'admin', admin_url('qtypes.php'), $qtypename);
|
||||
}
|
||||
|
||||
if ($needed[$delete] > 0) {
|
||||
print_error('cannotdeleteqtypeneeded', 'admin', admin_url('qtypes.php'), $qtypename);
|
||||
}
|
||||
|
||||
// If not yet confirmed, display a confirmation message.
|
||||
if (!optional_param('confirm', '', PARAM_BOOL)) {
|
||||
$qtypename = $QTYPES[$delete]->local_name();
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('deleteqtypeareyousure', 'admin', $qtypename));
|
||||
echo $OUTPUT->confirm(get_string('deleteqtypeareyousuremessage', 'admin', $qtypename),
|
||||
admin_url('qtypes.php?delete=' . $delete . '&confirm=1'),
|
||||
admin_url('qtypes.php'));
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
}
|
||||
|
||||
// Do the deletion.
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('deletingqtype', 'admin', $qtypename));
|
||||
|
||||
// Delete any configuration records.
|
||||
if (!unset_all_config_for_plugin('qtype_' . $delete)) {
|
||||
echo $OUTPUT->notification(get_string('errordeletingconfig', 'admin', 'qtype_' . $delete));
|
||||
}
|
||||
unset_config($delete . '_disabled', 'question');
|
||||
unset_config($delete . '_sortorder', 'question');
|
||||
|
||||
// Then the tables themselves
|
||||
drop_plugin_tables($delete, $QTYPES[$delete]->plugin_dir() . '/db/install.xml', false);
|
||||
|
||||
// Remove event handlers and dequeue pending events
|
||||
events_uninstall('qtype/' . $delete);
|
||||
|
||||
$a->qtype = $qtypename;
|
||||
$a->directory = $QTYPES[$delete]->plugin_dir();
|
||||
echo $OUTPUT->box(get_string('qtypedeletefiles', 'admin', $a), 'generalbox', 'notice');
|
||||
echo $OUTPUT->continue_button(admin_url('qtypes.php'));
|
||||
echo $OUTPUT->heading(get_string('deleteqtypeareyousure', 'admin', $qtypename));
|
||||
echo $OUTPUT->confirm(get_string('deleteqtypeareyousuremessage', 'admin', $qtypename),
|
||||
new moodle_url($thispageurl, array('delete' => $delete, 'confirm' => 1)),
|
||||
$thispageurl);
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
}
|
||||
|
||||
// End of process actions ==================================================
|
||||
|
||||
/// Print the page heading.
|
||||
// Do the deletion.
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('manageqtypes', 'admin'));
|
||||
echo $OUTPUT->heading(get_string('deletingqtype', 'admin', $qtypename));
|
||||
|
||||
/// Set up the table.
|
||||
$table = new flexible_table('qtypeadmintable');
|
||||
$table->define_columns(array('questiontype', 'numquestions', 'version', 'requires',
|
||||
'availableto', 'delete', 'settings'));
|
||||
$table->define_headers(array(get_string('questiontype', 'admin'), get_string('numquestions', 'admin'),
|
||||
get_string('version'), get_string('requires', 'admin'), get_string('availableq', 'question'),
|
||||
get_string('delete'), get_string('settings')));
|
||||
$table->set_attribute('id', 'qtypes');
|
||||
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
|
||||
$table->setup();
|
||||
|
||||
/// Add a row for each question type.
|
||||
$createabletypes = question_type_menu();
|
||||
foreach ($sortedqtypes as $qtypename => $localname) {
|
||||
$qtype = $QTYPES[$qtypename];
|
||||
$row = array();
|
||||
|
||||
// Question icon and name.
|
||||
$fakequestion = new stdClass;
|
||||
$fakequestion->qtype = $qtypename;
|
||||
$icon = print_question_icon($fakequestion, true);
|
||||
$row[] = $icon . ' ' . $localname;
|
||||
|
||||
// Number of questions of this type.
|
||||
if ($counts[$qtypename]->numquestions + $counts[$qtypename]->numhidden > 0) {
|
||||
if ($counts[$qtypename]->numhidden > 0) {
|
||||
$strcount = get_string('numquestionsandhidden', 'admin', $counts[$qtypename]);
|
||||
} else {
|
||||
$strcount = $counts[$qtypename]->numquestions;
|
||||
}
|
||||
if ($canviewreports) {
|
||||
$row[] = '<a href="' . admin_url('/report/questioninstances/index.php?qtype=' . $qtypename) .
|
||||
'" title="' . get_string('showdetails', 'admin') . '">' . $strcount . '</a>';
|
||||
} else {
|
||||
$strcount;
|
||||
}
|
||||
} else {
|
||||
$row[] = 0;
|
||||
}
|
||||
|
||||
// Question version number.
|
||||
$version = get_config('qtype_' . $qtypename, 'version');
|
||||
if ($version) {
|
||||
$row[] = $version;
|
||||
} else {
|
||||
$row[] = '<span class="disabled">' . get_string('nodatabase', 'admin') . '</span>';
|
||||
}
|
||||
|
||||
// Other question types required by this one.
|
||||
$requiredtypes = $qtype->requires_qtypes();
|
||||
$strtypes = array();
|
||||
if (!empty($requiredtypes)) {
|
||||
foreach ($requiredtypes as $required) {
|
||||
$strtypes[] = $QTYPES[$required]->local_name();
|
||||
}
|
||||
$row[] = implode(', ', $strtypes);
|
||||
} else {
|
||||
$row[] = '';
|
||||
}
|
||||
|
||||
// Are people allowed to create new questions of this type?
|
||||
$rowclass = '';
|
||||
if ($qtype->menu_name()) {
|
||||
$createable = isset($createabletypes[$qtypename]);
|
||||
$icons = enable_disable_button($qtypename, $createable);
|
||||
if (!$createable) {
|
||||
$rowclass = 'dimmed_text';
|
||||
}
|
||||
} else {
|
||||
$icons = '<img src="' . $OUTPUT->pix_url('spacer') . '" alt="" class="spacer" />';
|
||||
}
|
||||
|
||||
// Move icons.
|
||||
$icons .= icon_html('up', $qtypename, 't/up', get_string('up'), '');
|
||||
$icons .= icon_html('down', $qtypename, 't/down', get_string('down'), '');
|
||||
$row[] = $icons;
|
||||
|
||||
// Delete link, if available.
|
||||
if ($needed[$qtypename]) {
|
||||
$row[] = '';
|
||||
} else {
|
||||
$row[] = '<a href="' . admin_url('qtypes.php?delete=' . $qtypename .
|
||||
'&sesskey=' . sesskey()) . '" title="' .
|
||||
get_string('uninstallqtype', 'admin') . '">' . get_string('delete') . '</a>';
|
||||
}
|
||||
|
||||
// Settings link, if available.
|
||||
$settings = admin_get_root()->locate('qtypesetting' . $qtypename);
|
||||
if ($settings instanceof admin_externalpage) {
|
||||
$row[] = '<a href="' . $settings->url .
|
||||
'">' . get_string('settings') . '</a>';
|
||||
} else if ($settings instanceof admin_settingpage) {
|
||||
$row[] = '<a href="' . admin_url('settings.php?section=qtypesetting' . $qtypename) .
|
||||
'">' . get_string('settings') . '</a>';
|
||||
} else {
|
||||
$row[] = '';
|
||||
}
|
||||
|
||||
$table->add_data($row, $rowclass);
|
||||
// Delete any configuration records.
|
||||
if (!unset_all_config_for_plugin('qtype_' . $delete)) {
|
||||
echo $OUTPUT->notification(get_string('errordeletingconfig', 'admin', 'qtype_' . $delete));
|
||||
}
|
||||
unset_config($delete . '_disabled', 'question');
|
||||
unset_config($delete . '_sortorder', 'question');
|
||||
|
||||
$table->finish_output();
|
||||
// Then the tables themselves
|
||||
drop_plugin_tables($delete, $QTYPES[$delete]->plugin_dir() . '/db/install.xml', false);
|
||||
|
||||
// Remove event handlers and dequeue pending events
|
||||
events_uninstall('qtype/' . $delete);
|
||||
|
||||
$a->qtype = $qtypename;
|
||||
$a->directory = $QTYPES[$delete]->plugin_dir();
|
||||
echo $OUTPUT->box(get_string('qtypedeletefiles', 'admin', $a), 'generalbox', 'notice');
|
||||
echo $OUTPUT->continue_button($thispageurl);
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
function admin_url($endbit) {
|
||||
global $CFG;
|
||||
return $CFG->wwwroot . '/' . $CFG->admin . '/' . $endbit;
|
||||
exit;
|
||||
}
|
||||
|
||||
function enable_disable_button($qtypename, $createable) {
|
||||
if ($createable) {
|
||||
return icon_html('disable', $qtypename, 'i/hide', get_string('enabled', 'question'), get_string('disable'));
|
||||
// End of process actions ==================================================
|
||||
|
||||
// Print the page heading.
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('manageqtypes', 'admin'));
|
||||
|
||||
// Set up the table.
|
||||
$table = new flexible_table('qtypeadmintable');
|
||||
$table->define_baseurl($thispageurl);
|
||||
$table->define_columns(array('questiontype', 'numquestions', 'version', 'requires',
|
||||
'availableto', 'delete', 'settings'));
|
||||
$table->define_headers(array(get_string('questiontype', 'admin'), get_string('numquestions', 'admin'),
|
||||
get_string('version'), get_string('requires', 'admin'), get_string('availableq', 'question'),
|
||||
get_string('delete'), get_string('settings')));
|
||||
$table->set_attribute('id', 'qtypes');
|
||||
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
|
||||
$table->setup();
|
||||
|
||||
// Add a row for each question type.
|
||||
$createabletypes = question_type_menu();
|
||||
foreach ($sortedqtypes as $qtypename => $localname) {
|
||||
$qtype = $QTYPES[$qtypename];
|
||||
$row = array();
|
||||
|
||||
// Question icon and name.
|
||||
$fakequestion = new stdClass;
|
||||
$fakequestion->qtype = $qtypename;
|
||||
$icon = print_question_icon($fakequestion, true);
|
||||
$row[] = $icon . ' ' . $localname;
|
||||
|
||||
// Number of questions of this type.
|
||||
if ($counts[$qtypename]->numquestions + $counts[$qtypename]->numhidden > 0) {
|
||||
if ($counts[$qtypename]->numhidden > 0) {
|
||||
$strcount = get_string('numquestionsandhidden', 'admin', $counts[$qtypename]);
|
||||
} else {
|
||||
$strcount = $counts[$qtypename]->numquestions;
|
||||
}
|
||||
if ($canviewreports) {
|
||||
$row[] = html_writer::link(new moodle_url('/admin/report/questioninstances/index.php',
|
||||
array('qtype' => $qtypename)), $strcount, array('title' => get_string('showdetails', 'admin')));
|
||||
} else {
|
||||
$strcount;
|
||||
}
|
||||
} else {
|
||||
return icon_html('enable', $qtypename, 'i/show', get_string('disabled', 'question'), get_string('enable'));
|
||||
$row[] = 0;
|
||||
}
|
||||
|
||||
// Question version number.
|
||||
$version = get_config('qtype_' . $qtypename, 'version');
|
||||
if ($version) {
|
||||
$row[] = $version;
|
||||
} else {
|
||||
$row[] = html_writer::tag('span', get_string('nodatabase', 'admin'), array('class' => 'disabled'));
|
||||
}
|
||||
|
||||
// Other question types required by this one.
|
||||
$requiredtypes = $qtype->requires_qtypes();
|
||||
$strtypes = array();
|
||||
if (!empty($requiredtypes)) {
|
||||
foreach ($requiredtypes as $required) {
|
||||
$strtypes[] = $QTYPES[$required]->local_name();
|
||||
}
|
||||
$row[] = implode(', ', $strtypes);
|
||||
} else {
|
||||
$row[] = '';
|
||||
}
|
||||
|
||||
// Are people allowed to create new questions of this type?
|
||||
$rowclass = '';
|
||||
if ($qtype->menu_name()) {
|
||||
$createable = isset($createabletypes[$qtypename]);
|
||||
$icons = question_types_enable_disable_icons($qtypename, $createable);
|
||||
if (!$createable) {
|
||||
$rowclass = 'dimmed_text';
|
||||
}
|
||||
} else {
|
||||
$icons = $OUTPUT->spacer() . ' ';
|
||||
}
|
||||
|
||||
// Move icons.
|
||||
$icons .= question_type_icon_html('up', $qtypename, 't/up', get_string('up'), '');
|
||||
$icons .= question_type_icon_html('down', $qtypename, 't/down', get_string('down'), '');
|
||||
$row[] = $icons;
|
||||
|
||||
// Delete link, if available.
|
||||
if ($needed[$qtypename]) {
|
||||
$row[] = '';
|
||||
} else {
|
||||
$row[] = html_writer::link(new moodle_url($thispageurl,
|
||||
array('delete' => $qtypename, 'sesskey' => sesskey())), get_string('delete'),
|
||||
array('title' => get_string('uninstallqtype', 'admin')));
|
||||
}
|
||||
|
||||
// Settings link, if available.
|
||||
$settings = admin_get_root()->locate('qtypesetting' . $qtypename);
|
||||
if ($settings instanceof admin_externalpage) {
|
||||
$row[] = html_writer::link($settings->url, get_string('settings'));
|
||||
} else if ($settings instanceof admin_settingpage) {
|
||||
$row[] = html_writer::link(new moodle_url('/admin/settings.php',
|
||||
array('section' => 'qtypesetting' . $qtypename)), get_string('settings'));
|
||||
} else {
|
||||
$row[] = '';
|
||||
}
|
||||
|
||||
$table->add_data($row, $rowclass);
|
||||
}
|
||||
|
||||
$table->finish_output();
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
function question_types_enable_disable_icons($qtypename, $createable) {
|
||||
if ($createable) {
|
||||
return question_type_icon_html('disable', $qtypename, 'i/hide',
|
||||
get_string('enabled', 'question'), get_string('disable'));
|
||||
} else {
|
||||
return question_type_icon_html('enable', $qtypename, 'i/show',
|
||||
get_string('disabled', 'question'), get_string('enable'));
|
||||
}
|
||||
}
|
||||
|
||||
function icon_html($action, $qtypename, $icon, $alt, $tip) {
|
||||
function question_type_icon_html($action, $qtypename, $icon, $alt, $tip) {
|
||||
global $OUTPUT;
|
||||
if ($tip) {
|
||||
$tip = 'title="' . $tip . '" ';
|
||||
}
|
||||
$html = ' <form action="' . admin_url('qtypes.php') . '" method="post"><div>';
|
||||
$html .= '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
|
||||
$html .= '<input type="image" name="' . $action . '" value="' . $qtypename .
|
||||
'" src="' . $OUTPUT->pix_url($icon) . '" alt="' . $alt . '" ' . $tip . '/>';
|
||||
$html .= '</div></form>';
|
||||
return $html;
|
||||
return $OUTPUT->action_icon(new moodle_url('/admin/qtypes.php',
|
||||
array($action => $qtypename, 'sesskey' => sesskey())),
|
||||
new pix_icon($icon, $alt, 'moodle', array('title' => '')),
|
||||
null, array('title' => $tip)) . ' ';
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
$courseid = optional_param('courseid', 0, PARAM_INT);
|
||||
|
||||
admin_externalpage_setup('reportbackups');
|
||||
admin_externalpage_setup('reportbackups', '', null, '', array('pagelayout'=>'report'));
|
||||
echo $OUTPUT->header();
|
||||
|
||||
/// Automated backups aren't active by the site admin
|
||||
|
||||
@@ -9,7 +9,7 @@ $perpage = optional_param('perpage', 30, PARAM_INT); // how many per page
|
||||
$sort = optional_param('sort', 'timemodified', PARAM_ALPHA);
|
||||
$dir = optional_param('dir', 'DESC', PARAM_ALPHA);
|
||||
|
||||
admin_externalpage_setup('reportconfiglog');
|
||||
admin_externalpage_setup('reportconfiglog', '', null, '', array('pagelayout'=>'report'));
|
||||
echo $OUTPUT->header();
|
||||
|
||||
echo $OUTPUT->heading(get_string('configlog', 'report_configlog'));
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
admin_externalpage_setup('reportcourseoverview');
|
||||
admin_externalpage_setup('reportcourseoverview', '', null, '', array('pagelayout'=>'report'));
|
||||
echo $OUTPUT->header();
|
||||
|
||||
$course = get_site();
|
||||
|
||||
@@ -15,7 +15,7 @@ require_once($CFG->libdir.'/questionlib.php');
|
||||
$requestedqtype = optional_param('qtype', '', PARAM_SAFEDIR);
|
||||
|
||||
// Print the header & check permissions.
|
||||
admin_externalpage_setup('reportquestioninstances');
|
||||
admin_externalpage_setup('reportquestioninstances', '', null, '', array('pagelayout'=>'report'));
|
||||
echo $OUTPUT->header();
|
||||
|
||||
// Log.
|
||||
|
||||
@@ -45,7 +45,7 @@ raise_memory_limit(MEMORY_EXTRA);
|
||||
@set_time_limit(0);
|
||||
|
||||
// Print the header.
|
||||
admin_externalpage_setup('reportsecurity');
|
||||
admin_externalpage_setup('reportsecurity', '', null, '', array('pagelayout'=>'report'));
|
||||
echo $OUTPUT->header();
|
||||
|
||||
echo $OUTPUT->heading(get_string('pluginname', 'report_security'));
|
||||
|
||||
@@ -40,7 +40,7 @@ $reset = optional_param('reset', '', PARAM_RAW);
|
||||
$id = optional_param('id', '', PARAM_INT);
|
||||
|
||||
require_login();
|
||||
admin_externalpage_setup('reportspamcleaner');
|
||||
admin_externalpage_setup('reportspamcleaner', '', null, '', array('pagelayout'=>'report'));
|
||||
|
||||
// Delete one user
|
||||
if (!empty($del) && confirm_sesskey() && ($id != $USER->id)) {
|
||||
|
||||
@@ -50,8 +50,10 @@ if ($course) {
|
||||
|
||||
// security first
|
||||
require_login($course, false, $cm);
|
||||
$safeoverridesonly = false;
|
||||
if (!has_capability('moodle/role:override', $context)) {
|
||||
require_capability('moodle/role:safeoverride', $context);
|
||||
$safeoverridesonly = true;
|
||||
}
|
||||
$PAGE->set_url($url);
|
||||
$PAGE->set_context($context);
|
||||
@@ -119,7 +121,7 @@ if (empty($overridableroles[$roleid])) {
|
||||
}
|
||||
|
||||
// If we are actually overriding a role, create the table object, and save changes if appropriate.
|
||||
$overridestable = new override_permissions_table_advanced($context, $roleid, false);
|
||||
$overridestable = new override_permissions_table_advanced($context, $roleid, $safeoverridesonly);
|
||||
$overridestable->read_submitted_permissions();
|
||||
|
||||
if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey()) {
|
||||
|
||||
@@ -54,8 +54,16 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
6 => get_string('saturday', 'calendar')
|
||||
)));
|
||||
$temp->add(new admin_setting_special_calendar_weekend());
|
||||
$temp->add(new admin_setting_configtext('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,PARAM_INT));
|
||||
$temp->add(new admin_setting_configtext('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,PARAM_INT));
|
||||
$options = array();
|
||||
for ($i=1; $i<=99; $i++) {
|
||||
$options[$i] = $i;
|
||||
}
|
||||
$temp->add(new admin_setting_configselect('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,$options));
|
||||
$options = array();
|
||||
for ($i=1; $i<=20; $i++) {
|
||||
$options[$i] = $i;
|
||||
}
|
||||
$temp->add(new admin_setting_configselect('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,$options));
|
||||
$temp->add(new admin_setting_configcheckbox('enablecalendarexport', get_string('enablecalendarexport', 'admin'), get_string('configenablecalendarexport','admin'), 1));
|
||||
$temp->add(new admin_setting_configtext('calendar_exportsalt', get_string('calendarexportsalt','admin'), get_string('configcalendarexportsalt', 'admin'), random_string(60)));
|
||||
$ADMIN->add('appearance', $temp);
|
||||
|
||||
@@ -97,7 +97,6 @@ if ($hassiteconfig
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_users', get_string('generalusers','backup'), get_string('configgeneralusers','backup'), array('value'=>1, 'locked'=>0)));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_anonymize', get_string('generalanonymize','backup'), get_string('configgeneralanonymize','backup'), array('value'=>0, 'locked'=>0)));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_role_assignments', get_string('generalroleassignments','backup'), get_string('configgeneralroleassignments','backup'), array('value'=>1, 'locked'=>0)));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_user_files', get_string('generaluserfiles','backup'), get_string('configgeneraluserfiles','backup'), array('value'=>1, 'locked'=>0)));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_activities', get_string('generalactivities','backup'), get_string('configgeneralactivities','backup'), array('value'=>1, 'locked'=>0)));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_blocks', get_string('generalblocks','backup'), get_string('configgeneralblocks','backup'), array('value'=>1, 'locked'=>0)));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_filters', get_string('generalfilters','backup'), get_string('configgeneralfilters','backup'), array('value'=>1, 'locked'=>0)));
|
||||
@@ -144,7 +143,6 @@ if ($hassiteconfig
|
||||
$temp->add(new admin_setting_heading('automatedsettings', get_string('automatedsettings','backup'), ''));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_users', get_string('generalusers', 'backup'), get_string('configgeneralusers', 'backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_role_assignments', get_string('generalroleassignments','backup'), get_string('configgeneralroleassignments','backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_user_files', get_string('generaluserfiles', 'backup'), get_string('configgeneraluserfiles','backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_activities', get_string('generalactivities','backup'), get_string('configgeneralactivities','backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_blocks', get_string('generalblocks','backup'), get_string('configgeneralblocks','backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_filters', get_string('generalfilters','backup'), get_string('configgeneralfilters','backup'), 1));
|
||||
|
||||
@@ -22,6 +22,9 @@ if (isset($CFG->mnet_dispatcher_mode) and $CFG->mnet_dispatcher_mode !== 'off')
|
||||
|
||||
$hosts = mnet_get_hosts();
|
||||
foreach ($hosts as $host) {
|
||||
if ($host->id == $CFG->mnet_all_hosts_id) {
|
||||
$host->name = get_string('allhosts', 'core_mnet');
|
||||
}
|
||||
$ADMIN->add('mnetpeercat',
|
||||
new admin_externalpage(
|
||||
'mnetpeer' . $host->id,
|
||||
|
||||
@@ -16,6 +16,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
$temp->add(new admin_setting_configcheckbox('protectusernames', get_string('protectusernames', 'admin'), get_string('configprotectusernames', 'admin'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('forcelogin', get_string('forcelogin', 'admin'), get_string('configforcelogin', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('forceloginforprofiles', get_string('forceloginforprofiles', 'admin'), get_string('configforceloginforprofiles', 'admin'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('forceloginforprofileimage', get_string('forceloginforprofileimage', 'admin'), get_string('forceloginforprofileimage_help', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('opentogoogle', get_string('opentogoogle', 'admin'), get_string('configopentogoogle', 'admin'), 0));
|
||||
$temp->add(new admin_setting_pickroles('profileroles',
|
||||
get_string('profileroles','admin'),
|
||||
@@ -83,6 +84,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
$temp->add(new admin_setting_configcheckbox('cookiesecure', get_string('cookiesecure', 'admin'), get_string('configcookiesecure', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('cookiehttponly', get_string('cookiehttponly', 'admin'), get_string('configcookiehttponly', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configtext('excludeoldflashclients', get_string('excludeoldflashclients', 'admin'), get_string('configexcludeoldflashclients', 'admin'), '10.0.12', PARAM_TEXT));
|
||||
$temp->add(new admin_setting_configcheckbox('loginpasswordautocomplete', get_string('loginpasswordautocomplete', 'admin'), get_string('loginpasswordautocomplete_help', 'admin'), 0));
|
||||
$ADMIN->add('security', $temp);
|
||||
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ class external_service_form extends moodleform {
|
||||
|
||||
$mform->addElement('text', 'name', get_string('name'));
|
||||
$mform->addRule('name', get_string('required'), 'required', null, 'client');
|
||||
$mform->setType('name', PARAM_TEXT);
|
||||
$mform->addElement('advcheckbox', 'enabled', get_string('enabled', 'webservice'));
|
||||
$mform->addElement('advcheckbox', 'restrictedusers',
|
||||
get_string('restrictedusers', 'webservice'));
|
||||
@@ -174,7 +175,7 @@ class external_service_functions_form extends moodleform {
|
||||
class web_service_token_form extends moodleform {
|
||||
|
||||
function definition() {
|
||||
global $USER, $DB;
|
||||
global $USER, $DB, $CFG;
|
||||
|
||||
$mform = $this->_form;
|
||||
$data = $this->_customdata;
|
||||
@@ -183,10 +184,12 @@ class web_service_token_form extends moodleform {
|
||||
|
||||
if (empty($data->nouserselection)) {
|
||||
//user searchable selector - get all users (admin and guest included)
|
||||
//user must be confirmed, not deleted, not suspended, not guest
|
||||
$sql = "SELECT u.id, u.firstname, u.lastname
|
||||
FROM {user} u
|
||||
WHERE u.deleted = 0 AND u.confirmed = 1 AND u.suspended = 0 AND u.id != ?
|
||||
ORDER BY u.lastname";
|
||||
$users = $DB->get_records_sql($sql, array());
|
||||
$users = $DB->get_records_sql($sql, array($CFG->siteguest));
|
||||
$options = array();
|
||||
foreach ($users as $userid => $user) {
|
||||
$options[$userid] = $user->firstname . " " . $user->lastname;
|
||||
|
||||
@@ -71,6 +71,12 @@ switch ($action) {
|
||||
}
|
||||
}
|
||||
|
||||
//check if the user is deleted. unconfirmed, suspended or guest
|
||||
$user = $DB->get_record('user', array('id' => $data->user));
|
||||
if ($user->id == $CFG->siteguest or $user->deleted or !$user->confirmed or $user->suspended) {
|
||||
throw new moodle_exception('forbiddenwsuser', 'webservice');
|
||||
}
|
||||
|
||||
//process the creation
|
||||
if (empty($errormsg)) {
|
||||
//TODO improvement: either move this function from externallib.php to webservice/lib.php
|
||||
|
||||
@@ -33,8 +33,9 @@ $PAGE->set_title("$site->fullname: $loginsite");
|
||||
$PAGE->set_heading($site->fullname);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
// $PAGE->https_required() up above takes care of what $CFG->httpswwwroot should be.
|
||||
$msg = '<p>'.get_string('ntlmsso_attempting', 'auth_ldap').'</p>'
|
||||
. '<img width="1", height="1" '
|
||||
. ' src="' . $CFG->wwwroot . '/auth/ldap/ntlmsso_magic.php?sesskey='
|
||||
. ' src="' . $CFG->httpswwwroot . '/auth/ldap/ntlmsso_magic.php?sesskey='
|
||||
. $sesskey . '" />';
|
||||
redirect($CFG->wwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);
|
||||
redirect($CFG->httpswwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);
|
||||
|
||||
@@ -29,7 +29,8 @@ $file = $CFG->dirroot.'/pix/spacer.gif';
|
||||
if ($authplugin->ntlmsso_magic($sesskey) && file_exists($file)) {
|
||||
if (!empty($authplugin->config->ntlmsso_ie_fastpath)) {
|
||||
if (check_browser_version('MSIE')) {
|
||||
redirect($CFG->wwwroot.'/auth/ldap/ntlmsso_finish.php');
|
||||
// $PAGE->https_required() up above takes care of what $CFG->httpswwwroot should be.
|
||||
redirect($CFG->httpswwwroot.'/auth/ldap/ntlmsso_finish.php');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,6 +132,10 @@ class auth_plugin_mnet extends auth_plugin_base {
|
||||
global $CFG, $USER, $DB;
|
||||
require_once $CFG->dirroot . '/mnet/xmlrpc/client.php';
|
||||
|
||||
if (session_is_loggedinas()) {
|
||||
print_error('notpermittedtojumpas', 'mnet');
|
||||
}
|
||||
|
||||
// check remote login permissions
|
||||
if (! has_capability('moodle/site:mnetlogintoremote', get_system_context())
|
||||
or is_mnet_remote_user($USER)
|
||||
|
||||
@@ -37,6 +37,13 @@ if (!is_enabled_auth('mnet')) {
|
||||
|
||||
// If hostid hasn't been specified, try getting it using wwwroot
|
||||
if (!$hostid) {
|
||||
$hostwwwroot = trim($hostwwwroot);
|
||||
$hostwwwroot = rtrim($hostwwwroot, '/');
|
||||
|
||||
// ensure the wwwroot starts with a http or https prefix
|
||||
if (strtolower(substr($hostwwwroot, 0, 4)) != 'http') {
|
||||
$hostwwwroot = 'http://'.$hostwwwroot;
|
||||
}
|
||||
$hostid = $DB->get_field('mnet_host', 'id', array('wwwroot' => $hostwwwroot));
|
||||
}
|
||||
|
||||
|
||||
@@ -44,17 +44,17 @@ $PAGE->https_required();
|
||||
// Redirect to SessionInitiator with entityID as argument
|
||||
if (isset($IdPs[$selectedIdP][1]) && !empty($IdPs[$selectedIdP][1])){
|
||||
// For Shibbolet 1.x Service Providers
|
||||
header('Location: '.$IdPs[$selectedIdP][1].'?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
|
||||
header('Location: '.$IdPs[$selectedIdP][1].'?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
|
||||
|
||||
// For Shibbolet 2.x Service Providers
|
||||
// header('Location: '.$IdPs[$selectedIdP][1].'?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
|
||||
// For Shibbolet 2.x Service Providers
|
||||
// header('Location: '.$IdPs[$selectedIdP][1].'?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
|
||||
|
||||
} else {
|
||||
// For Shibbolet 1.x Service Providers
|
||||
header('Location: /Shibboleth.sso?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
|
||||
header('Location: /Shibboleth.sso?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
|
||||
|
||||
// For Shibboleth 2.x Service Providers
|
||||
// header('Location: /Shibboleth.sso/DS?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
|
||||
// header('Location: /Shibboleth.sso/DS?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
|
||||
}
|
||||
} elseif (isset($_POST['idp']) && !isset($IdPs[$_POST['idp']])) {
|
||||
$errormsg = get_string('auth_shibboleth_errormsg', 'auth_shibboleth');
|
||||
|
||||
@@ -313,7 +313,7 @@ class cc2moodle {
|
||||
if (!empty($CFG->defaultblocks)) {
|
||||
$blocknames = $CFG->defaultblocks;
|
||||
} else {
|
||||
$blocknames = 'participants,activity_modules,search_forums,admin,course_list:news_items,calendar_upcoming,recent_activity';
|
||||
$blocknames = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -293,6 +293,14 @@ class backup_controller extends backup implements loggable {
|
||||
// Basic/initial prevention against time/memory limits
|
||||
set_time_limit(1 * 60 * 60); // 1 hour for 1 course initially granted
|
||||
raise_memory_limit(MEMORY_EXTRA);
|
||||
// If this is not a course backup, inform the plan we are not
|
||||
// including all the activities for sure. This will affect any
|
||||
// task/step executed conditionally to stop including information
|
||||
// for section and activity backup. MDL-28180.
|
||||
if ($this->get_type() !== backup::TYPE_1COURSE) {
|
||||
$this->log('notifying plan about excluded activities by type', backup::LOG_DEBUG);
|
||||
$this->plan->set_excluding_activities();
|
||||
}
|
||||
return $this->plan->execute();
|
||||
}
|
||||
|
||||
|
||||
@@ -299,6 +299,14 @@ class restore_controller extends backup implements loggable {
|
||||
// Basic/initial prevention against time/memory limits
|
||||
set_time_limit(1 * 60 * 60); // 1 hour for 1 course initially granted
|
||||
raise_memory_limit(MEMORY_EXTRA);
|
||||
// If this is not a course restore, inform the plan we are not
|
||||
// including all the activities for sure. This will affect any
|
||||
// task/step executed conditionally to stop processing information
|
||||
// for section and activity restore. MDL-28180.
|
||||
if ($this->get_type() !== backup::TYPE_1COURSE) {
|
||||
$this->log('notifying plan about excluded activities by type', backup::LOG_DEBUG);
|
||||
$this->plan->set_excluding_activities();
|
||||
}
|
||||
return $this->plan->execute();
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ class backup_final_task extends backup_task {
|
||||
// done in a single pass
|
||||
$this->add_step(new backup_annotate_all_question_files('question_files'));
|
||||
|
||||
// Annotate all the user files (conditionally) (private, profile and icon files)
|
||||
// Annotate all the user files (conditionally) (profile and icon files)
|
||||
// Because each user has its own context, we need a separate/specialised step here
|
||||
// This step also ensures that the contexts for all the users exist, so next
|
||||
// step can be safely executed (join between users and contexts)
|
||||
|
||||
@@ -69,13 +69,6 @@ class backup_root_task extends backup_task {
|
||||
$this->add_setting($roleassignments);
|
||||
$users->add_dependency($roleassignments);
|
||||
|
||||
// Define user_files (dependent of users and anonymize)
|
||||
$userfiles = new backup_user_files_setting('user_files', base_setting::IS_BOOLEAN, true);
|
||||
$userfiles->set_ui(new backup_setting_ui_checkbox($userfiles, get_string('rootsettinguserfiles', 'backup')));
|
||||
$this->add_setting($userfiles);
|
||||
$users->add_dependency($userfiles);
|
||||
$anonymize->add_dependency($userfiles, setting_dependency::DISABLED_TRUE);
|
||||
|
||||
// Define activities
|
||||
$activities = new backup_activities_setting('activities', base_setting::IS_BOOLEAN, true);
|
||||
$activities->set_ui(new backup_setting_ui_checkbox($activities, get_string('rootsettingactivities', 'backup')));
|
||||
|
||||
@@ -68,13 +68,6 @@ class backup_activities_setting extends backup_generic_setting {}
|
||||
*/
|
||||
class backup_anonymize_setting extends root_backup_setting {}
|
||||
|
||||
/**
|
||||
* root setting to control if backup will include
|
||||
* user files or no (images, local storage), depends of @backup_users_setting
|
||||
* exactly in the same way than @backup_anonymize_setting so we extend from it
|
||||
*/
|
||||
class backup_user_files_setting extends backup_anonymize_setting {}
|
||||
|
||||
/**
|
||||
* root setting to control if backup will include
|
||||
* role assignments or no (any level), depends of @backup_users_setting
|
||||
|
||||
@@ -1748,10 +1748,6 @@ class backup_annotate_all_user_files extends backup_execution_step {
|
||||
// List of fileareas we are going to annotate
|
||||
$fileareas = array('profile', 'icon');
|
||||
|
||||
if ($this->get_setting_value('user_files')) { // private files only if enabled in settings
|
||||
$fileareas[] = 'private';
|
||||
}
|
||||
|
||||
// Fetch all annotated (final) users
|
||||
$rs = $DB->get_recordset('backup_ids_temp', array(
|
||||
'backupid' => $this->get_backupid(), 'itemname' => 'userfinal'));
|
||||
|
||||
@@ -117,19 +117,6 @@ class restore_root_task extends restore_task {
|
||||
$this->add_setting($roleassignments);
|
||||
$users->add_dependency($roleassignments);
|
||||
|
||||
// Define user_files (dependent of users)
|
||||
$defaultvalue = false; // Safer default
|
||||
$changeable = false;
|
||||
if (isset($rootsettings['user_files']) && $rootsettings['user_files']) { // Only enabled when available
|
||||
$defaultvalue = true;
|
||||
$changeable = true;
|
||||
}
|
||||
$userfiles = new restore_user_files_setting('user_files', base_setting::IS_BOOLEAN, $defaultvalue);
|
||||
$userfiles->set_ui(new backup_setting_ui_checkbox($userfiles, get_string('rootsettinguserfiles', 'backup')));
|
||||
$userfiles->get_ui()->set_changeable($changeable);
|
||||
$this->add_setting($userfiles);
|
||||
$users->add_dependency($userfiles);
|
||||
|
||||
// Define activitites
|
||||
$defaultvalue = false; // Safer default
|
||||
$changeable = false;
|
||||
|
||||
@@ -44,13 +44,6 @@ class restore_users_setting extends restore_generic_setting {}
|
||||
*/
|
||||
class restore_role_assignments_setting extends root_backup_setting {}
|
||||
|
||||
/**
|
||||
* root setting to control if restore will create
|
||||
* user files or no (images, local storage), depends of @restore_users_setting
|
||||
* exactly in the same way than @restore_role_assignments_setting so we extend from it
|
||||
*/
|
||||
class restore_user_files_setting extends restore_role_assignments_setting {}
|
||||
|
||||
/**
|
||||
* root setting to control if restore will create activities
|
||||
* A lot of other settings (_included at activity levels)
|
||||
|
||||
@@ -236,6 +236,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
|
||||
//get the already created course level grade category
|
||||
$category = new stdclass();
|
||||
$category->courseid = $this->get_courseid();
|
||||
$category->parent = null;
|
||||
|
||||
$coursecategory = $DB->get_record('grade_categories', (array)$category);
|
||||
if (!empty($coursecategory)) {
|
||||
@@ -678,7 +679,7 @@ class restore_create_included_users extends restore_execution_step {
|
||||
|
||||
protected function define_execution() {
|
||||
|
||||
restore_dbops::create_included_users($this->get_basepath(), $this->get_restoreid(), $this->get_setting_value('user_files'), $this->task->get_userid());
|
||||
restore_dbops::create_included_users($this->get_basepath(), $this->get_restoreid(), $this->task->get_userid());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -792,7 +793,14 @@ class restore_groups_structure_step extends restore_structure_step {
|
||||
|
||||
$data->groupingid = $this->get_new_parentid('grouping'); // Use new parentid
|
||||
$data->groupid = $this->get_mappingid('group', $data->groupid); // Get from mappings
|
||||
$DB->insert_record('groupings_groups', $data); // No need to set this mapping (no child info nor files)
|
||||
|
||||
$params = array();
|
||||
$params['groupingid'] = $data->groupingid;
|
||||
$params['groupid'] = $data->groupid;
|
||||
|
||||
if (!$DB->record_exists('groupings_groups', $params)) {
|
||||
$DB->insert_record('groupings_groups', $data); // No need to set this mapping (no child info nor files)
|
||||
}
|
||||
}
|
||||
|
||||
protected function after_execute() {
|
||||
@@ -1089,7 +1097,6 @@ class restore_course_structure_step extends restore_structure_step {
|
||||
global $CFG, $DB;
|
||||
|
||||
$data = (object)$data;
|
||||
$oldid = $data->id; // We'll need this later
|
||||
|
||||
$fullname = $this->get_setting_value('course_fullname');
|
||||
$shortname = $this->get_setting_value('course_shortname');
|
||||
@@ -1102,7 +1109,13 @@ class restore_course_structure_step extends restore_structure_step {
|
||||
$data->id = $this->get_courseid();
|
||||
$data->fullname = $fullname;
|
||||
$data->shortname= $shortname;
|
||||
$data->idnumber = '';
|
||||
|
||||
$context = get_context_instance_by_id($this->task->get_contextid());
|
||||
if (has_capability('moodle/course:changeidnumber', $context, $this->task->get_userid())) {
|
||||
$data->idnumber = '';
|
||||
} else {
|
||||
unset($data->idnumber);
|
||||
}
|
||||
|
||||
// Only restrict modules if original course was and target site too for new courses
|
||||
$data->restrictmodules = $data->restrictmodules && !empty($CFG->restrictmodulesfor) && $CFG->restrictmodulesfor == 'all';
|
||||
@@ -1729,15 +1742,20 @@ class restore_course_completion_structure_step extends restore_structure_step {
|
||||
|
||||
$data->course = $this->get_courseid();
|
||||
|
||||
$params = array(
|
||||
'course' => $data->course,
|
||||
'criteriatype' => $data->criteriatype,
|
||||
'method' => $data->method,
|
||||
'value' => $data->value,
|
||||
);
|
||||
$DB->insert_record('course_completion_aggr_methd', $params);
|
||||
// Only create the course_completion_aggr_methd records if
|
||||
// the target course has not them defined. MDL-28180
|
||||
if (!$DB->record_exists('course_completion_aggr_methd', array(
|
||||
'course' => $data->course,
|
||||
'criteriatype' => $data->criteriatype))) {
|
||||
$params = array(
|
||||
'course' => $data->course,
|
||||
'criteriatype' => $data->criteriatype,
|
||||
'method' => $data->method,
|
||||
'value' => $data->value,
|
||||
);
|
||||
$DB->insert_record('course_completion_aggr_methd', $params);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2259,7 +2277,20 @@ class restore_userscompletion_structure_step extends restore_structure_step {
|
||||
$data->userid = $this->get_mappingid('user', $data->userid);
|
||||
$data->timemodified = $this->apply_date_offset($data->timemodified);
|
||||
|
||||
$DB->insert_record('course_modules_completion', $data);
|
||||
// Check we didn't already insert one for this cmid and userid
|
||||
$existing = $DB->get_record('course_modules_completion', array(
|
||||
'coursemoduleid' => $data->coursemoduleid,
|
||||
'userid' => $data->userid), 'id, timemodified');
|
||||
if ($existing) {
|
||||
// Update it to these new values, but only if the time is newer
|
||||
if ($existing->timemodified < $data->timemodified) {
|
||||
$data->id = $existing->id;
|
||||
$DB->update_record('course_modules_completion', $data);
|
||||
}
|
||||
} else {
|
||||
// Normal entry where it doesn't exist already
|
||||
$DB->insert_record('course_modules_completion', $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -440,7 +440,6 @@ abstract class backup_controller_dbops extends backup_dbops {
|
||||
'backup_general_users' => 'users',
|
||||
'backup_general_anonymize' => 'anonymize',
|
||||
'backup_general_role_assignments' => 'role_assignments',
|
||||
'backup_general_user_files' => 'user_files',
|
||||
'backup_general_activities' => 'activities',
|
||||
'backup_general_blocks' => 'blocks',
|
||||
'backup_general_filters' => 'filters',
|
||||
|
||||
@@ -730,7 +730,7 @@ abstract class restore_dbops {
|
||||
* ready to be created. Also, annotate their newids
|
||||
* once created for later reference
|
||||
*/
|
||||
public static function create_included_users($basepath, $restoreid, $userfiles, $userid) {
|
||||
public static function create_included_users($basepath, $restoreid, $userid) {
|
||||
global $CFG, $DB;
|
||||
|
||||
$authcache = array(); // Cache to get some bits from authentication plugins
|
||||
@@ -824,54 +824,54 @@ abstract class restore_dbops {
|
||||
$newuserid = $DB->insert_record('user', $user);
|
||||
self::set_backup_ids_record($restoreid, 'user', $recuser->itemid, $newuserid);
|
||||
// Let's create the user context and annotate it (we need it for sure at least for files)
|
||||
$newuserctxid = get_context_instance(CONTEXT_USER, $newuserid)->id;
|
||||
self::set_backup_ids_record($restoreid, 'context', $recuser->parentitemid, $newuserctxid);
|
||||
// but for deleted users that don't have a context anymore (MDL-30192). We are done for them
|
||||
// and nothing else (custom fields, prefs, tags, files...) will be created.
|
||||
if (empty($user->deleted)) {
|
||||
$newuserctxid = $user->deleted ? 0 : get_context_instance(CONTEXT_USER, $newuserid)->id;
|
||||
self::set_backup_ids_record($restoreid, 'context', $recuser->parentitemid, $newuserctxid);
|
||||
|
||||
// Process custom fields
|
||||
if (isset($user->custom_fields)) { // if present in backup
|
||||
foreach($user->custom_fields['custom_field'] as $udata) {
|
||||
$udata = (object)$udata;
|
||||
// If the profile field has data and the profile shortname-datatype is defined in server
|
||||
if ($udata->field_data) {
|
||||
if ($field = $DB->get_record('user_info_field', array('shortname'=>$udata->field_name, 'datatype'=>$udata->field_type))) {
|
||||
/// Insert the user_custom_profile_field
|
||||
$rec = new stdClass();
|
||||
$rec->userid = $newuserid;
|
||||
$rec->fieldid = $field->id;
|
||||
$rec->data = $udata->field_data;
|
||||
$DB->insert_record('user_info_data', $rec);
|
||||
// Process custom fields
|
||||
if (isset($user->custom_fields)) { // if present in backup
|
||||
foreach($user->custom_fields['custom_field'] as $udata) {
|
||||
$udata = (object)$udata;
|
||||
// If the profile field has data and the profile shortname-datatype is defined in server
|
||||
if ($udata->field_data) {
|
||||
if ($field = $DB->get_record('user_info_field', array('shortname'=>$udata->field_name, 'datatype'=>$udata->field_type))) {
|
||||
/// Insert the user_custom_profile_field
|
||||
$rec = new stdClass();
|
||||
$rec->userid = $newuserid;
|
||||
$rec->fieldid = $field->id;
|
||||
$rec->data = $udata->field_data;
|
||||
$DB->insert_record('user_info_data', $rec);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Process tags
|
||||
if (!empty($CFG->usetags) && isset($user->tags)) { // if enabled in server and present in backup
|
||||
$tags = array();
|
||||
foreach($user->tags['tag'] as $usertag) {
|
||||
$usertag = (object)$usertag;
|
||||
$tags[] = $usertag->rawname;
|
||||
// Process tags
|
||||
if (!empty($CFG->usetags) && isset($user->tags)) { // if enabled in server and present in backup
|
||||
$tags = array();
|
||||
foreach($user->tags['tag'] as $usertag) {
|
||||
$usertag = (object)$usertag;
|
||||
$tags[] = $usertag->rawname;
|
||||
}
|
||||
tag_set('user', $newuserid, $tags);
|
||||
}
|
||||
tag_set('user', $newuserid, $tags);
|
||||
}
|
||||
|
||||
// Process preferences
|
||||
if (isset($user->preferences)) { // if present in backup
|
||||
foreach($user->preferences['preference'] as $preference) {
|
||||
$preference = (object)$preference;
|
||||
// Prepare the record and insert it
|
||||
$preference->userid = $newuserid;
|
||||
$status = $DB->insert_record('user_preferences', $preference);
|
||||
// Process preferences
|
||||
if (isset($user->preferences)) { // if present in backup
|
||||
foreach($user->preferences['preference'] as $preference) {
|
||||
$preference = (object)$preference;
|
||||
// Prepare the record and insert it
|
||||
$preference->userid = $newuserid;
|
||||
$status = $DB->insert_record('user_preferences', $preference);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create user files in pool (profile, icon, private) by context
|
||||
restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'icon', $recuser->parentitemid, $userid);
|
||||
restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'profile', $recuser->parentitemid, $userid);
|
||||
if ($userfiles) { // private files only if enabled in settings
|
||||
restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'private', $recuser->parentitemid, $userid);
|
||||
// Create user files in pool (profile, icon, private) by context
|
||||
restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'icon', $recuser->parentitemid, $userid);
|
||||
restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'profile', $recuser->parentitemid, $userid);
|
||||
}
|
||||
|
||||
}
|
||||
$rs->close();
|
||||
}
|
||||
@@ -951,7 +951,7 @@ abstract class restore_dbops {
|
||||
AND mnethostid = ?
|
||||
AND deleted = 1
|
||||
AND (
|
||||
username LIKE ?
|
||||
UPPER(username) LIKE UPPER(?)
|
||||
OR (
|
||||
".$DB->sql_isnotempty('user', 'email', false, false)."
|
||||
AND email = ?
|
||||
@@ -973,7 +973,7 @@ abstract class restore_dbops {
|
||||
FROM {user} u
|
||||
WHERE id = ?
|
||||
AND mnethostid = ?
|
||||
AND email = ?",
|
||||
AND UPPER(email) = UPPER(?)",
|
||||
array($user->id, $user->mnethostid, $trimemail))) {
|
||||
return $rec; // Matching user, deleted in backup file found, return it
|
||||
}
|
||||
@@ -996,7 +996,7 @@ abstract class restore_dbops {
|
||||
WHERE username = ?
|
||||
AND mnethostid = ?
|
||||
AND (
|
||||
email = ?
|
||||
UPPER(email) = UPPER(?)
|
||||
OR (
|
||||
firstaccess != 0
|
||||
AND firstaccess = ?
|
||||
@@ -1020,7 +1020,7 @@ abstract class restore_dbops {
|
||||
AND ".$DB->sql_isnotempty('user', 'email', false, false)."
|
||||
AND email = ?
|
||||
AND (
|
||||
username LIKE ?
|
||||
UPPER(username) LIKE UPPER(?)
|
||||
OR (
|
||||
firstaccess != 0
|
||||
AND firstaccess = ?
|
||||
@@ -1038,7 +1038,7 @@ abstract class restore_dbops {
|
||||
FROM {user} u
|
||||
WHERE mnethostid = ?
|
||||
AND deleted = 1
|
||||
AND username LIKE ?
|
||||
AND UPPER(username) LIKE UPPER(?)
|
||||
AND firstaccess != 0
|
||||
AND firstaccess = ?",
|
||||
array($user->mnethostid, $user->email.'.%', $user->firstaccess))) {
|
||||
@@ -1056,7 +1056,7 @@ abstract class restore_dbops {
|
||||
if ($rec = $DB->get_record_sql("SELECT *
|
||||
FROM {user} u
|
||||
WHERE mnethostid = ?
|
||||
AND email = ?
|
||||
AND UPPER(email) = UPPER(?)
|
||||
AND firstaccess != 0
|
||||
AND firstaccess = ?",
|
||||
array($user->mnethostid, $trimemail, $user->firstaccess))) {
|
||||
@@ -1070,7 +1070,7 @@ abstract class restore_dbops {
|
||||
WHERE username = ?
|
||||
AND mnethostid = ?
|
||||
AND NOT (
|
||||
email = ?
|
||||
UPPER(email) = UPPER(?)
|
||||
OR (
|
||||
firstaccess != 0
|
||||
AND firstaccess = ?
|
||||
|
||||
@@ -323,7 +323,6 @@ abstract class backup_cron_automated_helper {
|
||||
$settings = array(
|
||||
'users' => 'backup_auto_users',
|
||||
'role_assignments' => 'backup_auto_role_assignments',
|
||||
'user_files' => 'backup_auto_user_files',
|
||||
'activities' => 'backup_auto_activities',
|
||||
'blocks' => 'backup_auto_blocks',
|
||||
'filters' => 'backup_auto_filters',
|
||||
@@ -460,6 +459,11 @@ abstract class backup_cron_automated_helper {
|
||||
$storage = $config->backup_auto_storage;
|
||||
$dir = $config->backup_auto_destination;
|
||||
|
||||
if ($keep == 0) {
|
||||
// means keep all backup files
|
||||
return true;
|
||||
}
|
||||
|
||||
$backupword = str_replace(' ', '_', moodle_strtolower(get_string('backupfilename')));
|
||||
$backupword = trim(clean_filename($backupword), '_');
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ class backup_plan extends base_plan implements loggable {
|
||||
}
|
||||
$this->controller = $controller;
|
||||
$this->basepath = $CFG->dataroot . '/temp/backup/' . $controller->get_backupid();
|
||||
$this->excludingdactivities = false;
|
||||
parent::__construct('backup_plan');
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,9 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
$html .= html_writer::start_tag('div', array('class'=>'backup-section settings-section'));
|
||||
$html .= $this->output->heading(get_string('backupsettings', 'backup'), 2, array('class'=>'header'));
|
||||
foreach ($details->root_settings as $label=>$value) {
|
||||
if ($label == 'filename') continue;
|
||||
if ($label == 'filename' or $label == 'user_files') {
|
||||
continue;
|
||||
}
|
||||
$html .= $this->backup_detail_pair(get_string('rootsetting'.str_replace('_','',$label), 'backup'), $value?$yestick:$notick);
|
||||
}
|
||||
$html .= html_writer::end_tag('div');
|
||||
|
||||
@@ -74,7 +74,7 @@ class block_comments extends block_base {
|
||||
$args->linktext = get_string('showcomments');
|
||||
$args->notoggle = true;
|
||||
$args->autostart = true;
|
||||
$args->displaycancel = true;
|
||||
$args->displaycancel = false;
|
||||
$comment = new comment($args);
|
||||
$comment->set_view_permission(true);
|
||||
|
||||
|
||||
@@ -193,6 +193,8 @@ class block_community_renderer extends plugin_renderer_base {
|
||||
|
||||
|
||||
//Create course content html
|
||||
$blocks = get_plugin_list('block');
|
||||
$activities = get_plugin_list('mod');
|
||||
if (!empty($course->contents)) {
|
||||
$activitieshtml = '';
|
||||
$blockhtml = '';
|
||||
@@ -202,14 +204,22 @@ class block_community_renderer extends plugin_renderer_base {
|
||||
if (!empty($blockhtml)) {
|
||||
$blockhtml .= ' - ';
|
||||
}
|
||||
$blockhtml .= get_string('pluginname', 'block_' . $content->modulename)
|
||||
. " (" . $content->contentcount . ")";
|
||||
if (array_key_exists($content->modulename, $blocks)) {
|
||||
$blockname = get_string('pluginname', 'block_' . $content->modulename);
|
||||
} else {
|
||||
$blockname = $content->modulename;
|
||||
}
|
||||
$blockhtml .= $blockname . " (" . $content->contentcount . ")";
|
||||
} else {
|
||||
if (!empty($activitieshtml)) {
|
||||
$activitieshtml .= ' - ';
|
||||
}
|
||||
$activitieshtml .= get_string('modulename', $content->modulename)
|
||||
. " (" . $content->contentcount . ")";
|
||||
if (array_key_exists($content->modulename, $activities)) {
|
||||
$activityname = get_string('modulename', $content->modulename);
|
||||
} else {
|
||||
$activityname = $content->modulename;
|
||||
}
|
||||
$activitieshtml .= $activityname . " (" . $content->contentcount . ")";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ if (is_file($CFG->dirroot.'/mod/feedback/lib.php')) {
|
||||
define('FEEDBACK_BLOCK_LIB_IS_OK', true);
|
||||
}
|
||||
|
||||
class block_feedback extends block_base {
|
||||
class block_feedback extends block_list {
|
||||
|
||||
function init() {
|
||||
$this->title = get_string('feedback', 'block_feedback');
|
||||
@@ -21,10 +21,13 @@ class block_feedback extends block_base {
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
$this->content = new stdClass;
|
||||
$this->content->items = array();
|
||||
$this->content->icons = array();
|
||||
$this->content->footer = '';
|
||||
|
||||
if (!defined('FEEDBACK_BLOCK_LIB_IS_OK')) {
|
||||
$this->content = new stdClass;
|
||||
$this->content->text = get_string('missing_feedback_module', 'block_feedback');
|
||||
$this->content->footer = '';
|
||||
$this->content->items = array(get_string('missing_feedback_module', 'block_feedback'));
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
@@ -33,9 +36,7 @@ class block_feedback extends block_base {
|
||||
$courseid = SITEID;
|
||||
}
|
||||
|
||||
$this->content = new stdClass;
|
||||
$this->content->text = '';
|
||||
$this->content->footer = '';
|
||||
$icon = '<img src="'.$OUTPUT->pix_url('icon', 'feedback') . '" class="icon" alt="" />';
|
||||
|
||||
|
||||
if (empty($this->instance->pageid)) {
|
||||
@@ -47,8 +48,7 @@ class block_feedback extends block_base {
|
||||
foreach ($feedbacks as $feedback) {
|
||||
$url = new moodle_url($baseurl);
|
||||
$url->params(array('id'=>$feedback->cmid, 'courseid'=>$courseid));
|
||||
$icon = '<img src="'.$OUTPUT->pix_url('icon', 'feedback') . '" class="icon" alt="" /> ';
|
||||
$this->content->text = ' <a href="'.$url->out().'">'.$icon.$feedback->name.'</a>';
|
||||
$this->content->items[] = '<a href="'.$url->out().'">'.$icon.$feedback->name.'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -121,4 +121,14 @@ class block_html extends block_base {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The block should only be dockable when the title of the block is not empty
|
||||
* and when parent allows docking.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function instance_can_be_docked() {
|
||||
return (!empty($this->config->title) && parent::instance_can_be_docked());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,12 @@ class block_login extends block_base {
|
||||
// TODO: now that we have multiauth it is hard to find out if there is a way to change password
|
||||
$forgot = $wwwroot . '/login/forgot_password.php';
|
||||
|
||||
if (empty($CFG->xmlstrictheaders) and !empty($CFG->loginpasswordautocomplete)) {
|
||||
$autocomplete = 'autocomplete="off"';
|
||||
} else {
|
||||
$autocomplete = '';
|
||||
}
|
||||
|
||||
$username = get_moodle_cookie();
|
||||
|
||||
$this->content->footer = '';
|
||||
@@ -42,13 +48,14 @@ class block_login extends block_base {
|
||||
|
||||
if (!isloggedin() or isguestuser()) { // Show the block
|
||||
|
||||
$this->content->text .= "\n".'<form class="loginform" id="login" method="post" action="'.get_login_url().'">';
|
||||
$this->content->text .= "\n".'<form class="loginform" id="login" method="post" action="'.get_login_url().'" '.$autocomplete.'>';
|
||||
|
||||
$this->content->text .= '<div class="c1 fld username"><label for="login_username">'.get_string('username').'</label>';
|
||||
$this->content->text .= '<input type="text" name="username" id="login_username" value="'.s($username).'" /></div>';
|
||||
|
||||
$this->content->text .= '<div class="c1 fld password"><label for="login_password">'.get_string('password').'</label>';
|
||||
$this->content->text .= '<input type="password" name="password" id="login_password" value="" /></div>';
|
||||
|
||||
$this->content->text .= '<input type="password" name="password" id="login_password" value="" '.$autocomplete.' /></div>';
|
||||
|
||||
$this->content->text .= '<div class="c1 btn"><input type="submit" value="'.get_string('login').'" /></div>';
|
||||
|
||||
|
||||
@@ -25,6 +25,13 @@ class block_mnet_hosts extends block_list {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (session_is_loggedinas()) {
|
||||
$this->content = new stdClass();
|
||||
$this->content->footer = html_writer::tag('span',
|
||||
get_string('notpermittedtojumpas', 'mnet'));
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
// according to start_jump_session,
|
||||
// remote users can't on-jump
|
||||
// so don't show this block to them
|
||||
|
||||
@@ -62,11 +62,10 @@ class block_online_users extends block_base {
|
||||
GROUP BY $userfields
|
||||
ORDER BY lastaccess DESC ";
|
||||
|
||||
$csql = "SELECT COUNT(u.id), u.id
|
||||
$csql = "SELECT COUNT(u.id)
|
||||
FROM {user} u $groupmembers
|
||||
WHERE u.lastaccess > $timefrom
|
||||
$groupselect
|
||||
GROUP BY u.id";
|
||||
$groupselect";
|
||||
|
||||
} else {
|
||||
// Course level - show only enrolled users for now
|
||||
@@ -85,14 +84,13 @@ class block_online_users extends block_base {
|
||||
GROUP BY $userfields
|
||||
ORDER BY lastaccess DESC";
|
||||
|
||||
$csql = "SELECT u.id
|
||||
$csql = "SELECT COUNT(u.id)
|
||||
FROM {user_lastaccess} ul $groupmembers, {user} u
|
||||
JOIN ($esqljoin) euj ON euj.id = u.id
|
||||
WHERE ul.timeaccess > $timefrom
|
||||
AND u.id = ul.userid
|
||||
AND ul.courseid = :courseid
|
||||
$groupselect
|
||||
GROUP BY u.id";
|
||||
$groupselect";
|
||||
|
||||
$params['courseid'] = $this->page->course->id;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ class block_section_links extends block_base {
|
||||
}
|
||||
function before_delete() {
|
||||
global $DB;
|
||||
$DB->delete_records('config_plugins', 'plugin', 'blocks/section_links');
|
||||
$DB->delete_records('config_plugins', array('plugin' => 'blocks/section_links'));
|
||||
}
|
||||
|
||||
function has_config() {
|
||||
|
||||
+6
-2
@@ -212,9 +212,13 @@ if (empty($entryid) && empty($modid) && empty($groupid)) {
|
||||
}
|
||||
|
||||
if ($CFG->enablerssfeeds) {
|
||||
$rsscontext = $filtertype = $thingid = null;
|
||||
$rsscontext = null;
|
||||
$filtertype = null;
|
||||
$thingid = null;
|
||||
list($thingid, $rsscontext, $filtertype) = blog_rss_get_params($blogheaders['filters']);
|
||||
|
||||
if (empty($rsscontext)) {
|
||||
$rsscontext = get_system_context();
|
||||
}
|
||||
$rsstitle = $blogheaders['heading'];
|
||||
|
||||
//check we haven't started output by outputting an error message
|
||||
|
||||
@@ -479,6 +479,13 @@ function blog_get_options_for_user(stdClass $user=null) {
|
||||
);
|
||||
}
|
||||
}
|
||||
if ($canview && $CFG->enablerssfeeds) {
|
||||
$options['rss'] = array(
|
||||
'string' => get_string('rssfeed', 'blog'),
|
||||
'link' => new moodle_url(rss_get_url($sitecontext->id, $USER->id, 'blog', 'user/'.$user->id))
|
||||
);
|
||||
}
|
||||
|
||||
// Cache the options
|
||||
$useroptions[$user->id] = $options;
|
||||
// Return the options
|
||||
|
||||
+14
-3
@@ -55,6 +55,8 @@ $action = optional_param('action', '', PARAM_ALPHA);
|
||||
$day = optional_param('cal_d', 0, PARAM_INT);
|
||||
$mon = optional_param('cal_m', 0, PARAM_INT);
|
||||
$yr = optional_param('cal_y', 0, PARAM_INT);
|
||||
$generateurl = optional_param('generateurl', 0, PARAM_BOOL);
|
||||
|
||||
if ($courseid = optional_param('course', 0, PARAM_INT)) {
|
||||
$course = $DB->get_record('course', array('id'=>$courseid));
|
||||
} else {
|
||||
@@ -142,8 +144,7 @@ switch($action) {
|
||||
break;
|
||||
case '':
|
||||
default:
|
||||
$username = $USER->username;
|
||||
$authtoken = sha1($USER->username . $USER->password . $CFG->calendar_exportsalt);
|
||||
$authtoken = sha1($USER->id . $USER->password . $CFG->calendar_exportsalt);
|
||||
// Let's populate some vars to let "common tasks" be somewhat smart...
|
||||
// If today it's weekend, give the "next week" option
|
||||
$allownextweek = CALENDAR_WEEKEND & (1 << $now['wday']);
|
||||
@@ -151,7 +152,17 @@ switch($action) {
|
||||
$allownextmonth = calendar_days_in_month($now['mon'], $now['year']) - $now['mday'] < 7;
|
||||
// If today it's weekend but tomorrow it isn't, do NOT give the "this week" option
|
||||
$allowthisweek = !((CALENDAR_WEEKEND & (1 << $now['wday'])) && !(CALENDAR_WEEKEND & (1 << (($now['wday'] + 1) % 7))));
|
||||
echo $renderer->basic_export_form($allowthisweek, $allownextweek, $allownextmonth, $username, $authtoken);
|
||||
echo $renderer->basic_export_form($allowthisweek, $allownextweek, $allownextmonth, $USER->id, $authtoken);
|
||||
}
|
||||
|
||||
if (!empty($generateurl)) {
|
||||
$params['userid'] = optional_param('userid', 0, PARAM_INT);
|
||||
$params['authtoken'] = optional_param('authtoken', '', PARAM_ALPHANUM);
|
||||
$params['preset_what'] = optional_param('preset_what', 'all', PARAM_ALPHA);
|
||||
$params['preset_time'] = optional_param('preset_time', 'weeknow', PARAM_ALPHA);
|
||||
$link = new moodle_url('/calendar/export_execute.php', $params);
|
||||
print html_writer::tag('div', get_string('calendarurl', 'calendar', $link->out()), array('class' => 'generalbox calendarurl'));
|
||||
}
|
||||
|
||||
echo $renderer->complete_layout();
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
@@ -5,27 +5,48 @@ require_once('../config.php');
|
||||
require_once($CFG->dirroot.'/calendar/lib.php');
|
||||
require_once($CFG->libdir.'/bennu/bennu.inc.php');
|
||||
|
||||
$username = required_param('username', PARAM_TEXT);
|
||||
$userid = optional_param('userid', 0, PARAM_INT);
|
||||
$username = optional_param('username', '', PARAM_TEXT);
|
||||
$authtoken = required_param('authtoken', PARAM_ALPHANUM);
|
||||
$generateurl = optional_param('generateurl', '', PARAM_TEXT);
|
||||
|
||||
if (empty($CFG->enablecalendarexport)) {
|
||||
die('no export');
|
||||
}
|
||||
|
||||
//Fetch user information
|
||||
if (!$user = $DB->get_record('user', array('username' => $username), 'id,password')) {
|
||||
//No such user
|
||||
$checkuserid = !empty($userid) && $user = $DB->get_record('user', array('id' => $userid), 'id,password');
|
||||
//allowing for fallback check of old url - MDL-27542
|
||||
$checkusername = !empty($username) && $user = $DB->get_record('user', array('username' => $username), 'id,password');
|
||||
if (!$checkuserid && !$checkusername) {
|
||||
//No such user
|
||||
die('Invalid authentication');
|
||||
}
|
||||
|
||||
//Check authentication token
|
||||
if ($authtoken != sha1($username . $user->password . $CFG->calendar_exportsalt)) {
|
||||
$authuserid = !empty($userid) && $authtoken == sha1($userid . $user->password . $CFG->calendar_exportsalt);
|
||||
//allowing for fallback check of old url - MDL-27542
|
||||
$authusername = !empty($username) && $authtoken == sha1($username . $user->password . $CFG->calendar_exportsalt);
|
||||
if (!$authuserid && !$authusername) {
|
||||
die('Invalid authentication');
|
||||
}
|
||||
|
||||
$what = optional_param('preset_what', 'all', PARAM_ALPHA);
|
||||
$time = optional_param('preset_time', 'weeknow', PARAM_ALPHA);
|
||||
|
||||
if (!empty($generateurl)) {
|
||||
$authtoken = sha1($userid . $user->password . $CFG->calendar_exportsalt);
|
||||
$params = array();
|
||||
$params['preset_what'] = $what;
|
||||
$params['preset_time'] = $time;
|
||||
$params['userid'] = $userid;
|
||||
$params['authtoken'] = $authtoken;
|
||||
$params['generateurl'] = true;
|
||||
$link = new moodle_url('/calendar/export.php', $params);
|
||||
redirect($link->out());
|
||||
die;
|
||||
}
|
||||
|
||||
$now = usergetdate(time());
|
||||
// Let's see if we have sufficient and correct data
|
||||
$allowed_what = array('all', 'courses');
|
||||
|
||||
+2
-1
@@ -1633,6 +1633,7 @@ function calendar_get_allowed_types(&$allowed) {
|
||||
if(!empty($SESSION->cal_course_referer) && $SESSION->cal_course_referer != SITEID) {
|
||||
$course = $DB->get_record('course', array('id'=>$SESSION->cal_course_referer));
|
||||
$coursecontext = get_context_instance(CONTEXT_COURSE, $SESSION->cal_course_referer);
|
||||
$allowed->user = has_capability('moodle/calendar:manageownentries', $coursecontext);
|
||||
|
||||
if(has_capability('moodle/calendar:manageentries', $coursecontext)) {
|
||||
$allowed->courses = array($course->id => 1);
|
||||
@@ -1884,7 +1885,7 @@ class calendar_event {
|
||||
$group = $DB->get_record('groups', array('id'=>$data->groupid));
|
||||
$context = get_context_instance(CONTEXT_COURSE, $group->courseid);
|
||||
} else if (isset($data->userid) && $data->userid > 0 && $data->userid == $USER->id) {
|
||||
$context = get_context_instance(CONTEXT_USER);
|
||||
$context = get_context_instance(CONTEXT_USER, $data->userid);
|
||||
} else if (isset($data->userid) && $data->userid > 0 && $data->userid != $USER->id &&
|
||||
isset($data->instance) && $data->instance > 0) {
|
||||
$cm = get_coursemodule_from_instance($data->modulename, $data->instance, 0, false, MUST_EXIST);
|
||||
|
||||
@@ -71,7 +71,7 @@ class calendar_preferences_form extends moodleform {
|
||||
$mform->addHelpButton('maxevents', 'pref_maxevents', 'calendar');
|
||||
|
||||
$options = array();
|
||||
for ($i=1; $i<=20; $i++) {
|
||||
for ($i=1; $i<=99; $i++) {
|
||||
$options[$i] = $i;
|
||||
}
|
||||
$mform->addElement('select', 'lookahead', get_string('pref_lookahead', 'calendar'), $options);
|
||||
|
||||
@@ -34,11 +34,11 @@ class core_calendar_renderer extends plugin_renderer_base {
|
||||
* @param bool $allowthisweek
|
||||
* @param bool $allownextweek
|
||||
* @param bool $allownextmonth
|
||||
* @param string $username
|
||||
* @param int $userid
|
||||
* @param string $authtoken
|
||||
* @return string
|
||||
*/
|
||||
public function basic_export_form($allowthisweek, $allownextweek, $allownextmonth, $username, $authtoken) {
|
||||
public function basic_export_form($allowthisweek, $allownextweek, $allownextmonth, $userid, $authtoken) {
|
||||
|
||||
$output = html_writer::tag('div', get_string('export', 'calendar'), array('class'=>'header'));
|
||||
$output .= html_writer::start_tag('fieldset');
|
||||
@@ -86,10 +86,10 @@ class core_calendar_renderer extends plugin_renderer_base {
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'cal_d', 'value'=>''));
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'cal_m', 'value'=>''));
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'cal_y', 'value'=>''));
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'username', 'value'=>$username));
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'userid', 'value'=>$userid));
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'authtoken', 'value'=>$authtoken));
|
||||
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'button', 'id'=>'generateurl', 'value'=>get_string('generateurlbutton', 'calendar')));
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'submit', 'name' => 'generateurl', 'id'=>'generateurl', 'value'=>get_string('generateurlbutton', 'calendar')));
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('exportbutton', 'calendar')));
|
||||
|
||||
$output .= html_writer::end_tag('div');
|
||||
@@ -102,8 +102,6 @@ class core_calendar_renderer extends plugin_renderer_base {
|
||||
$output .= html_writer::tag('div', '', array('id'=>'url', 'style'=>'overflow:scroll;width:650px;'));
|
||||
$output .= html_writer::end_tag('div');
|
||||
|
||||
$this->page->requires->yui_module('moodle-calendar-eventmanager', 'M.core_calendar.init_basic_export', array($allowthisweek, $allownextweek, $allownextmonth, $username, $authtoken));
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -183,8 +183,8 @@ echo $OUTPUT->container_start('bottom');
|
||||
if (!empty($CFG->enablecalendarexport)) {
|
||||
echo $OUTPUT->single_button(new moodle_url('export.php', array('course'=>$courseid)), get_string('exportcalendar', 'calendar'));
|
||||
if (isloggedin()) {
|
||||
$authtoken = sha1($USER->username . $USER->password . $CFG->calendar_exportsalt);
|
||||
$link = new moodle_url('/calendar/export_execute.php', array('preset_what'=>'all', 'preset_time'=>'recentupcoming', 'username'=>$USER->username, 'authtoken'=>$authtoken));
|
||||
$authtoken = sha1($USER->id . $USER->password . $CFG->calendar_exportsalt);
|
||||
$link = new moodle_url('/calendar/export_execute.php', array('preset_what'=>'all', 'preset_time'=>'recentupcoming', 'userid' => $USER->id, 'authtoken'=>$authtoken));
|
||||
$icon = html_writer::empty_tag('img', array('src'=>$OUTPUT->pix_url('i/ical'), 'height'=>'14', 'width'=>'36', 'alt'=>get_string('ical', 'calendar'), 'title'=>get_string('quickdownloadcalendar', 'calendar')));
|
||||
echo html_writer::tag('a', $icon, array('href'=>$link));
|
||||
}
|
||||
|
||||
-20
@@ -120,26 +120,6 @@ YUI.add('moodle-calendar-eventmanager', function(Y) {
|
||||
var EVENTMANAGER = {
|
||||
add_event : function(config) {
|
||||
new EVENT(config);
|
||||
},
|
||||
init_basic_export : function(allowthisweek, allownextweek, allownextmonth, username, authtoken) {
|
||||
var params = {
|
||||
preset_what : (Y.one('#pw_course').get('checked'))?'courses':'all',
|
||||
preset_time : 'recentupcoming',
|
||||
username : username,
|
||||
authtoken : authtoken
|
||||
|
||||
}
|
||||
if (allowthisweek && Y.one('#pt_wknow').get('checked')) {
|
||||
params.presettime = 'weeknow';
|
||||
} else if (allownextweek && Y.one('#pt_wknext').get('checked')) {
|
||||
params.presettime = 'weeknext';
|
||||
} else if (allownextmonth && Y.one('#pt_monnext').get('checked')) {
|
||||
params.presettime = 'monthnext';
|
||||
} else if (Y.one('#pt_monnow').get('checked')) {
|
||||
params.presettime = 'monthnow';
|
||||
}
|
||||
Y.one('#url').setContent(M.cfg.wwwroot+'/calendar/export_execute.php?'+build_querystring(params));
|
||||
Y.one('#urlbox').setStyle('display', 'block');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class cohort_edit_form extends moodleform {
|
||||
$mform->addElement('select', 'contextid', get_string('context', 'role'), $options);
|
||||
|
||||
$mform->addElement('text', 'idnumber', get_string('idnumber', 'cohort'), 'maxlength="254" size="50"');
|
||||
$mform->setType('name', PARAM_RAW);
|
||||
$mform->setType('idnumber', PARAM_RAW); // idnumbers are plain text, must not be changed
|
||||
|
||||
$mform->addElement('editor', 'description_editor', get_string('description', 'cohort'), null, $editoroptions);
|
||||
$mform->setType('description_editor', PARAM_RAW);
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ $data = array();
|
||||
foreach($cohorts as $cohort) {
|
||||
$line = array();
|
||||
$line[] = format_string($cohort->name);
|
||||
$line[] = $cohort->idnumber;
|
||||
$line[] = s($cohort->idnumber); // plain text
|
||||
$line[] = format_text($cohort->description, $cohort->descriptionformat);
|
||||
|
||||
$line[] = $DB->count_records('cohort_members', array('cohortid'=>$cohort->id));
|
||||
|
||||
+3
-2
@@ -71,8 +71,9 @@ function cohort_add_cohort($cohort) {
|
||||
*/
|
||||
function cohort_update_cohort($cohort) {
|
||||
global $DB;
|
||||
if (isset($cohort->component) and empty($cohort->component)) {
|
||||
$cohort->component = NULL;
|
||||
if (property_exists($cohort, 'component') and empty($cohort->component)) {
|
||||
// prevent NULLs
|
||||
$cohort->component = '';
|
||||
}
|
||||
$cohort->timemodified = time();
|
||||
$DB->update_record('cohort', $cohort);
|
||||
|
||||
@@ -58,6 +58,7 @@ M.core_comment = {
|
||||
return false;
|
||||
}, this);
|
||||
}
|
||||
scope.toggle_textarea(false);
|
||||
CommentHelper.confirmoverlay = new Y.Overlay({
|
||||
bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-'+this.client_id+'">'+M.str.moodle.yes+'</a> <a href="#" id="canceldelete-'+this.client_id+'">'+M.str.moodle.no+'</a></div>',
|
||||
visible: false
|
||||
@@ -79,6 +80,7 @@ bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-
|
||||
var cid = scope.client_id;
|
||||
var ta = Y.one('#dlg-content-'+cid);
|
||||
ta.set('value', '');
|
||||
scope.toggle_textarea(false);
|
||||
var container = Y.one('#comment-list-'+cid);
|
||||
var result = scope.render([obj], true);
|
||||
var newcomment = Y.Node.create(result.html);
|
||||
|
||||
+6
-6
@@ -196,17 +196,17 @@ $CFG->admin = 'admin';
|
||||
//
|
||||
// These variables define DEFAULT block variables for new courses
|
||||
// If this one is set it overrides all others and is the only one used.
|
||||
// $CFG->defaultblocks_override = 'participants,activity_modules,search_forums,admin,course_list:news_items,calendar_upcoming,recent_activity';
|
||||
// $CFG->defaultblocks_override = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
|
||||
//
|
||||
// These variables define the specific settings for defined course formats.
|
||||
// They override any settings defined in the formats own config file.
|
||||
// $CFG->defaultblocks_site = 'site_main_menu,admin,course_list:course_summary,calendar_month';
|
||||
// $CFG->defaultblocks_social = 'participants,search_forums,calendar_month,calendar_upcoming,social_activities,recent_activity,admin,course_list';
|
||||
// $CFG->defaultblocks_topics = 'participants,activity_modules,search_forums,admin,course_list:news_items,calendar_upcoming,recent_activity';
|
||||
// $CFG->defaultblocks_weeks = 'participants,activity_modules,search_forums,admin,course_list:news_items,calendar_upcoming,recent_activity';
|
||||
// $CFG->defaultblocks_site = 'site_main_menu,course_list:course_summary,calendar_month';
|
||||
// $CFG->defaultblocks_social = 'participants,search_forums,calendar_month,calendar_upcoming,social_activities,recent_activity,course_list';
|
||||
// $CFG->defaultblocks_topics = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
|
||||
// $CFG->defaultblocks_weeks = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
|
||||
//
|
||||
// These blocks are used when no other default setting is found.
|
||||
// $CFG->defaultblocks = 'participants,activity_modules,search_forums,admin,course_list:news_items,calendar_upcoming,recent_activity';
|
||||
// $CFG->defaultblocks = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
|
||||
//
|
||||
// You can specify a different class to be created for the $PAGE global, and to
|
||||
// compute which blocks appear on each page. However, I cannot think of any good
|
||||
|
||||
@@ -311,6 +311,35 @@ abstract class moodleform_mod extends moodleform {
|
||||
$errors['availablefrom'] = get_string('badavailabledates', 'condition');
|
||||
}
|
||||
|
||||
// Conditions: Verify that the grade conditions are numbers, and make sense.
|
||||
if (array_key_exists('conditiongradegroup', $data)) {
|
||||
foreach ($data['conditiongradegroup'] as $i => $gradedata) {
|
||||
if ($gradedata['conditiongrademin'] !== '' && !is_numeric($gradedata['conditiongrademin'])) {
|
||||
$errors["conditiongradegroup[{$i}]"] = get_string('gradesmustbenumeric', 'condition');
|
||||
continue;
|
||||
}
|
||||
if ($gradedata['conditiongrademax'] !== '' && !is_numeric($gradedata['conditiongrademax'])) {
|
||||
$errors["conditiongradegroup[{$i}]"] = get_string('gradesmustbenumeric', 'condition');
|
||||
continue;
|
||||
}
|
||||
if ($gradedata['conditiongrademin'] !== '' && $gradedata['conditiongrademax'] !== '' &&
|
||||
$gradedata['conditiongrademax'] < $gradedata['conditiongrademin']) {
|
||||
$errors["conditiongradegroup[{$i}]"] = get_string('badgradelimits', 'condition');
|
||||
continue;
|
||||
}
|
||||
if ($gradedata['conditiongrademin'] === '' && $gradedata['conditiongrademax'] === '' &&
|
||||
$gradedata['conditiongradeitemid']) {
|
||||
$errors["conditiongradegroup[{$i}]"] = get_string('gradeitembutnolimits', 'condition');
|
||||
continue;
|
||||
}
|
||||
if (($gradedata['conditiongrademin'] !== '' || $gradedata['conditiongrademax'] !== '') &&
|
||||
!$gradedata['conditiongradeitemid']) {
|
||||
$errors["conditiongradegroup[{$i}]"] = get_string('gradelimitsbutnoitem', 'condition');
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
@@ -456,8 +485,6 @@ abstract class moodleform_mod extends moodleform {
|
||||
$grouparray[] =& $mform->createElement('static', '', '','% '.get_string('grade_upto','condition').' ');
|
||||
$grouparray[] =& $mform->createElement('text', 'conditiongrademax','',array('size'=>3));
|
||||
$grouparray[] =& $mform->createElement('static', '', '','%');
|
||||
$mform->setType('conditiongrademin',PARAM_FLOAT);
|
||||
$mform->setType('conditiongrademax',PARAM_FLOAT);
|
||||
$group = $mform->createElement('group','conditiongradegroup',
|
||||
get_string('gradecondition', 'condition'),$grouparray);
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ if(!$csv) {
|
||||
|
||||
// Print criteria group names
|
||||
print PHP_EOL.'<tr style="vertical-align: top">';
|
||||
print '<th scope="row" class="rowheader">'.get_string('criteriagroup', 'completion').'</th>';
|
||||
print '<th scope="row" colspan="'.($idnumbers ? 2 : 1).'" class="rowheader">'.get_string('criteriagroup', 'completion').'</th>';
|
||||
|
||||
$current_group = false;
|
||||
$col_count = 0;
|
||||
@@ -357,7 +357,7 @@ if(!$csv) {
|
||||
|
||||
// Print aggregation methods
|
||||
print PHP_EOL.'<tr style="vertical-align: top">';
|
||||
print '<th scope="row" class="rowheader">'.get_string('aggregationmethod', 'completion').'</th>';
|
||||
print '<th scope="row" colspan="'.($idnumbers ? 2: 1).'" class="rowheader">'.get_string('aggregationmethod', 'completion').'</th>';
|
||||
|
||||
$current_group = false;
|
||||
$col_count = 0;
|
||||
@@ -416,7 +416,7 @@ if(!$csv) {
|
||||
if (COMPLETION_REPORT_COL_TITLES) {
|
||||
|
||||
print PHP_EOL.'<tr>';
|
||||
print '<th scope="row" class="rowheader">'.get_string('criteria', 'completion').'</th>';
|
||||
print '<th scope="row" colspan="'.($idnumbers ? 2 : 1).'" class="rowheader">'.get_string('criteria', 'completion').'</th>';
|
||||
|
||||
foreach ($criteria as $criterion) {
|
||||
// Get criteria details
|
||||
|
||||
@@ -350,7 +350,12 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate='today'
|
||||
// Get all the possible users
|
||||
$users = array();
|
||||
|
||||
$courseusers = get_enrolled_users($context, '', $selectedgroup, 'u.id, u.firstname, u.lastname, u.idnumber', 'lastname ASC, firstname ASC');
|
||||
// Define limitfrom and limitnum for queries below
|
||||
// If $showusers is enabled... don't apply limitfrom and limitnum
|
||||
$limitfrom = empty($showusers) ? 0 : '';
|
||||
$limitnum = empty($showusers) ? COURSE_MAX_USERS_PER_DROPDOWN + 1 : '';
|
||||
|
||||
$courseusers = get_enrolled_users($context, '', $selectedgroup, 'u.id, u.firstname, u.lastname', 'lastname ASC, firstname ASC', $limitfrom, $limitnum);
|
||||
|
||||
if (count($courseusers) < COURSE_MAX_USERS_PER_DROPDOWN && !$showusers) {
|
||||
$showusers = 1;
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
$reportrow->cells[] = $numviewscell;
|
||||
|
||||
if ($CFG->useblogassociations) {
|
||||
require_once($CFG->dirroot.'/blog/lib.php');
|
||||
$blogcell = new html_table_cell();
|
||||
$blogcell->attributes['class'] = 'blog';
|
||||
if ($blogcount = blog_get_associated_count($course->id, $cm->id)) {
|
||||
|
||||
@@ -223,6 +223,7 @@
|
||||
|
||||
$countsql = "SELECT COUNT(DISTINCT(ra.userid))
|
||||
FROM {role_assignments} ra
|
||||
JOIN {user} u ON u.id = ra.userid
|
||||
WHERE ra.contextid $relatedcontexts AND ra.roleid = :roleid";
|
||||
|
||||
$totalcount = $DB->count_records_sql($countsql, $params);
|
||||
|
||||
+9
-1
@@ -270,6 +270,7 @@ switch ($mode) {
|
||||
case "complete" :
|
||||
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);
|
||||
$sections = get_all_sections($course->id);
|
||||
$itemsprinted = false;
|
||||
|
||||
for ($i=0; $i<=$course->numsections; $i++) {
|
||||
|
||||
@@ -279,8 +280,10 @@ switch ($mode) {
|
||||
$showsection = (has_capability('moodle/course:viewhiddensections', $coursecontext) or $section->visible or !$course->hiddensections);
|
||||
|
||||
if ($showsection) { // prevent hidden sections in user activity. Thanks to Geoff Wilbert!
|
||||
|
||||
// Check the section has a sequence. This is the sequence of modules/resources.
|
||||
// If there is no sequence there is nothing to display.
|
||||
if ($section->sequence) {
|
||||
$itemsprinted = true;
|
||||
echo '<div class="section">';
|
||||
echo '<h2>';
|
||||
echo get_section_name($course, $section);
|
||||
@@ -352,6 +355,11 @@ switch ($mode) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$itemsprinted) {
|
||||
echo $OUTPUT->notification(get_string('nothingtodisplay'));
|
||||
}
|
||||
|
||||
break;
|
||||
case "coursecompletion":
|
||||
case "coursecompletions":
|
||||
|
||||
@@ -183,7 +183,7 @@ class enrol_database_plugin extends enrol_plugin {
|
||||
|
||||
$existing = array();
|
||||
foreach ($current as $r) {
|
||||
if (in_array($r->id, $roles)) {
|
||||
if (in_array($r->roleid, $roles)) {
|
||||
$existing[$r->roleid] = $r->roleid;
|
||||
} else {
|
||||
role_unassign($r->roleid, $user->id, $context->id, 'enrol_database', $instance->id);
|
||||
|
||||
@@ -271,6 +271,10 @@ class enrol_guest_plugin extends enrol_plugin {
|
||||
}
|
||||
}
|
||||
$this->add_instance($course, $fields);
|
||||
} else {
|
||||
if ($this->get_config('defaultenrol')) {
|
||||
$this->add_default_instance($course);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$instances = $DB->get_records('enrol', array('courseid'=>$course->id, 'enrol'=>'guest'));
|
||||
|
||||
@@ -394,6 +394,10 @@ function process_group_tag($tagcontents){
|
||||
|
||||
$courseid = $DB->insert_record('course', $course);
|
||||
|
||||
// Setup default enrolment plugins
|
||||
$course->id = $courseid;
|
||||
enrol_course_updated(true, $course, null);
|
||||
|
||||
// Setup the blocks
|
||||
$course = $DB->get_record('course', array('id' => $courseid));
|
||||
blocks_add_default_course_blocks($course);
|
||||
|
||||
@@ -59,9 +59,9 @@ class enrol_self_edit_form extends moodleform {
|
||||
$mform->setDefault('customint1', $plugin->get_config('groupkey'));
|
||||
|
||||
if ($instance->id) {
|
||||
$roles = get_default_enrol_roles($context, $instance->roleid);
|
||||
$roles = $this->extend_assignable_roles($context, $instance->roleid);
|
||||
} else {
|
||||
$roles = get_default_enrol_roles($context, $plugin->get_config('roleid'));
|
||||
$roles = $this->extend_assignable_roles($context, $plugin->get_config('roleid'));
|
||||
}
|
||||
$mform->addElement('select', 'roleid', get_string('role', 'enrol_self'), $roles);
|
||||
$mform->setDefault('roleid', $plugin->get_config('roleid'));
|
||||
@@ -156,4 +156,24 @@ class enrol_self_edit_form extends moodleform {
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of roles that this user can assign for the course as the default for self-enrolment
|
||||
*
|
||||
* @param context $context the context.
|
||||
* @param integer $defaultrole the id of the role that is set as the default for self-enrolement
|
||||
* @return array index is the role id, value is the role name
|
||||
*/
|
||||
function extend_assignable_roles($context, $defaultrole) {
|
||||
global $DB;
|
||||
$roles = get_assignable_roles($context);
|
||||
$sql = "SELECT r.id, r.name
|
||||
FROM {role} r
|
||||
WHERE r.id = $defaultrole";
|
||||
$results = $DB->get_record_sql($sql);
|
||||
if (isset($results->name)) {
|
||||
$roles[$results->id] = $results->name;
|
||||
}
|
||||
return $roles;
|
||||
}
|
||||
}
|
||||
@@ -59,7 +59,7 @@ $string['pluginname'] = 'Self enrolment';
|
||||
$string['pluginname_desc'] = 'The self enrolment plugin allows users to choose which courses they want to participate in. The courses may be protected by an enrolment key. Internally the enrolment is done via the manual enrolment plugin which has to be enabled in the same course.';
|
||||
$string['requirepassword'] = 'Require enrolment key';
|
||||
$string['requirepassword_desc'] = 'Require enrolment key in new courses and prevent removing of enrolment key from existing courses.';
|
||||
$string['role'] = 'Assign role';
|
||||
$string['role'] = 'Default assigned role';
|
||||
$string['self:config'] = 'Configure self enrol instances';
|
||||
$string['self:manage'] = 'Manage enrolled users';
|
||||
$string['self:unenrol'] = 'Unenrol users from course';
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
$supportuser->email = $CFG->supportemail ? $CFG->supportemail : $admin->email;
|
||||
$supportuser->firstname = $CFG->supportname ? $CFG->supportname : $admin->firstname;
|
||||
$supportuser->lastname = $CFG->supportname ? '' : $admin->lastname;
|
||||
//emailstop could be hard coded "false" to ensure error reports are sent
|
||||
//but then admin's would have to alter their messaging preferences to temporarily stop them
|
||||
$supportuser->emailstop = $admin->emailstop;
|
||||
$supportuser->maildisplay = true;
|
||||
|
||||
/// Send the message and redirect
|
||||
|
||||
@@ -171,10 +171,32 @@ class filter_mediaplugin extends moodle_text_filter {
|
||||
///===========================
|
||||
/// utility functions
|
||||
|
||||
/**
|
||||
* Get mimetype of given url, useful for # alternative urls.
|
||||
*
|
||||
* @private
|
||||
* @param string $url
|
||||
* @return string $mimetype
|
||||
*/
|
||||
function filter_mediaplugin_get_mimetype($url) {
|
||||
$matches = null;
|
||||
if (preg_match("|^(.*)/[a-z]*file.php(\?file=)?(/[^&\?#]*)|", $url, $matches)) {
|
||||
// remove the special moodle file serving hacks so that the *file.php is ignored
|
||||
$url = $matches[1].$matches[3];
|
||||
} else {
|
||||
$url = preg_replace('/[#\?].*$/', '', $url);
|
||||
}
|
||||
|
||||
$mimetype = mimeinfo('type', $url);
|
||||
|
||||
return $mimetype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse list of alternative URLs
|
||||
* @param string $url urls separated with '#', size specified as ?d=640x480 or #d=640x480
|
||||
* @param int $defaultwidth
|
||||
* @param int $defaultheight
|
||||
* @return array (urls, width, height)
|
||||
*/
|
||||
function filter_mediaplugin_parse_alternatives($url, $defaultwidth = 0, $defaultheight = 0) {
|
||||
@@ -252,7 +274,7 @@ function filter_mediaplugin_html5audio_callback(array $link) {
|
||||
$fallbacklink = null;
|
||||
|
||||
foreach ($urls as $url) {
|
||||
$mimetype = mimeinfo('type', $url);
|
||||
$mimetype = filter_mediaplugin_get_mimetype($url);
|
||||
if (strpos($mimetype, 'audio/') !== 0) {
|
||||
continue;
|
||||
}
|
||||
@@ -344,7 +366,7 @@ function filter_mediaplugin_html5video_callback(array $link) {
|
||||
$fallbacklink = null;
|
||||
|
||||
foreach ($urls as $url) {
|
||||
$mimetype = mimeinfo('type', $url);
|
||||
$mimetype = filter_mediaplugin_get_mimetype($url);
|
||||
if (strpos($mimetype, 'video/') !== 0) {
|
||||
continue;
|
||||
}
|
||||
@@ -546,7 +568,7 @@ function filter_mediaplugin_flv_callback($link) {
|
||||
$sources = array();
|
||||
|
||||
foreach ($urls as $url) {
|
||||
$mimetype = mimeinfo('type', $url);
|
||||
$mimetype = filter_mediaplugin_get_mimetype($url);
|
||||
if (strpos($mimetype, 'video/') !== 0) {
|
||||
continue;
|
||||
}
|
||||
@@ -559,7 +581,7 @@ function filter_mediaplugin_flv_callback($link) {
|
||||
}
|
||||
|
||||
if ($flashurl === null) {
|
||||
$flashurl = str_replace('&', '&', $url);
|
||||
$flashurl = $url;
|
||||
}
|
||||
}
|
||||
if (!$sources) {
|
||||
@@ -592,7 +614,7 @@ OET;
|
||||
// note: no need to print "this is flv link" because it is printed automatically if JS or Flash not available
|
||||
|
||||
$output = html_writer::tag('span', $printlink, array('id'=>$id, 'class'=>'mediaplugin mediaplugin_flv'));
|
||||
$output .= html_writer::script(js_writer::function_call('M.util.add_video_player', array($id, $flashurl, $width, $height, $autosize))); // we can not use standard JS init because this may be cached
|
||||
$output .= html_writer::script(js_writer::function_call('M.util.add_video_player', array($id, rawurlencode($flashurl), $width, $height, $autosize))); // we can not use standard JS init because this may be cached
|
||||
|
||||
return $output;
|
||||
}
|
||||
@@ -799,7 +821,7 @@ function filter_mediaplugin_wmp_callback($link) {
|
||||
$mpsize = 'width="'.$link[4].'" height="'.($link[5] + 64).'"';
|
||||
$autosize = 'false';
|
||||
}
|
||||
$mimetype = mimeinfo('type', $url);
|
||||
$mimetype = filter_mediaplugin_get_mimetype($url);
|
||||
|
||||
|
||||
|
||||
@@ -861,7 +883,7 @@ function filter_mediaplugin_qt_callback($link) {
|
||||
} else {
|
||||
$size = 'width="'.$link[4].'" height="'.($link[5]+15).'"';
|
||||
}
|
||||
$mimetype = mimeinfo('type', $url);
|
||||
$mimetype = filter_mediaplugin_get_mimetype($url);
|
||||
|
||||
// this is the safest fallback for incomplete or missing browser support for this format
|
||||
return <<<OET
|
||||
|
||||
@@ -92,7 +92,6 @@ class filter_mediaplugin_test extends UnitTestCase {
|
||||
'<a >test test</a>',
|
||||
'<ahref="http://moodle.org/testfile/test.mp3">sample</a>',
|
||||
'<a href="" test></a>',
|
||||
'<a class="_blanktarget" href="http://moodle.org/testfile/test.flv?d=100x">test flv</a>',
|
||||
'<a href="http://www.moodle.com/path/to?#param=29">test</a>',
|
||||
'<a href="http://moodle.org/testfile/test.mp3">test mp3',
|
||||
'<a href="http://moodle.org/testfile/test.mp3"test</a>',
|
||||
|
||||
@@ -108,6 +108,7 @@ if ($grade = $DB->get_record('grade_grades', array('itemid' => $grade_item->id,
|
||||
$options->smiley = false;
|
||||
$options->filter = false;
|
||||
$options->noclean = false;
|
||||
$options->para = false;
|
||||
$grade->feedback = format_text($grade->feedback, $grade->feedbackformat, $options);
|
||||
}
|
||||
$grade->feedbackformat = FORMAT_HTML;
|
||||
|
||||
@@ -32,7 +32,6 @@ class grade_import_form extends moodleform {
|
||||
$mform->setType('id', PARAM_INT);
|
||||
|
||||
$mform->addElement('header', 'general', get_string('importfile', 'grades'));
|
||||
$mform->disabledIf('url', 'userfile', 'noteq', '');
|
||||
|
||||
$mform->addElement('advcheckbox', 'feedback', get_string('importfeedback', 'grades'));
|
||||
$mform->setDefault('feedback', 0);
|
||||
@@ -42,6 +41,7 @@ class grade_import_form extends moodleform {
|
||||
$mform->disabledIf('userfile', 'url', 'noteq', '');
|
||||
|
||||
$mform->addElement('text', 'url', get_string('fileurl', 'gradeimport_xml'), 'size="80"');
|
||||
$mform->disabledIf('url', 'userfile', 'noteq', '');
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$mform->addElement('header', 'publishing', get_string('publishing', 'grades'));
|
||||
|
||||
@@ -632,7 +632,7 @@ class grade_report_grader extends grade_report {
|
||||
$usercell->scope = 'row';
|
||||
|
||||
if ($showuserimage) {
|
||||
$usercell->text = $OUTPUT->container($OUTPUT->user_picture($user), 'userpic');
|
||||
$usercell->text = $OUTPUT->user_picture($user);
|
||||
}
|
||||
|
||||
$usercell->text .= html_writer::link(new moodle_url('/user/view.php', array('id' => $user->id, 'course' => $this->course->id)), fullname($user));
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
* Grader report namespace
|
||||
*/
|
||||
M.gradereport_grader = {
|
||||
/**
|
||||
* @param {String} the script we send ajax requests to
|
||||
*/
|
||||
api : M.cfg.wwwroot+'/grade/report/grader/ajax_callbacks.php',
|
||||
/**
|
||||
* @param {Array} reports An array of instantiated report objects
|
||||
*/
|
||||
@@ -519,58 +523,58 @@ M.gradereport_grader.classes.ajax.prototype.get_below_cell = function(cell) {
|
||||
*/
|
||||
M.gradereport_grader.classes.ajax.prototype.submit = function(properties, values) {
|
||||
|
||||
// Stop the IO queue so we can add to it
|
||||
this.report.Y.io.queue.stop();
|
||||
// If the grade has changed add an IO transaction to update it to the queue
|
||||
// If the grade has changed update it on the server
|
||||
if (values.grade !== values.oldgrade) {
|
||||
this.pendingsubmissions.push({transaction:this.report.Y.io.queue(M.cfg.wwwroot+'/grade/report/grader/ajax_callbacks.php', {
|
||||
method : 'POST',
|
||||
var cfg = {
|
||||
method: 'POST',
|
||||
data : 'id='+this.courseid+'&userid='+properties.userid+'&itemid='+properties.itemid+'&action=update&newvalue='+values.grade+'&type='+properties.itemtype+'&sesskey='+M.cfg.sesskey,
|
||||
on : {
|
||||
complete : this.submission_outcome
|
||||
on: {
|
||||
complete : this.submission_complete
|
||||
},
|
||||
context : this,
|
||||
arguments : {
|
||||
arguments: {
|
||||
properties : properties,
|
||||
values : values,
|
||||
type : 'grade'
|
||||
}
|
||||
}),complete:false,outcome:null});
|
||||
},
|
||||
headers: {
|
||||
},
|
||||
};
|
||||
this.report.Y.io(M.gradereport_grader.api, cfg);
|
||||
}
|
||||
// If feedback is editable and has changed add to the IO queue for it
|
||||
// If feedback is editable and has changed update it on the server
|
||||
if (values.editablefeedback && values.feedback !== values.oldfeedback) {
|
||||
this.pendingsubmissions.push({transaction:this.report.Y.io.queue(M.cfg.wwwroot+'/grade/report/grader/ajax_callbacks.php', {
|
||||
var cfg = {
|
||||
method : 'POST',
|
||||
data : 'id='+this.courseid+'&userid='+properties.userid+'&itemid='+properties.itemid+'&action=update&newvalue='+values.feedback+'&type=feedback&sesskey='+M.cfg.sesskey,
|
||||
on : {
|
||||
complete : this.submission_outcome
|
||||
complete : this.submission_complete
|
||||
},
|
||||
context : this,
|
||||
arguments : {
|
||||
properties : properties,
|
||||
values : values,
|
||||
type : 'feedback'
|
||||
}
|
||||
}),complete:false,outcome:null});
|
||||
},
|
||||
headers: {
|
||||
},
|
||||
};
|
||||
this.report.Y.io(M.gradereport_grader.api, cfg);
|
||||
}
|
||||
// Process the IO queue
|
||||
this.report.Y.io.queue.start();
|
||||
};
|
||||
/**
|
||||
* Callback function for IO transaction completions
|
||||
*
|
||||
* Uses a synchronous queue to ensure we maintain some sort of order
|
||||
* Callback function called after grade and feedback changes
|
||||
*
|
||||
* @function
|
||||
* @this {M.gradereport_grader.classes.ajax}
|
||||
* @param {Int} tid Transaction ID
|
||||
* @param {Object} outcome
|
||||
* @param {Int} transactionid Transaction ID
|
||||
* @param {Object} response
|
||||
* @param {Mixed} args
|
||||
*/
|
||||
M.gradereport_grader.classes.ajax.prototype.submission_outcome = function(tid, outcome, args) {
|
||||
M.gradereport_grader.classes.ajax.prototype.submission_complete = function(transactionid, response, args) {
|
||||
// Parse the response as JSON
|
||||
try {
|
||||
outcome = this.report.Y.JSON.parse(outcome.responseText);
|
||||
response = this.report.Y.JSON.parse(response.responseText);
|
||||
} catch(e) {
|
||||
var message = M.str.gradereport_grader.ajaxfailedupdate;
|
||||
message.replace(/\[1\]/, args.type);
|
||||
@@ -581,13 +585,13 @@ M.gradereport_grader.classes.ajax.prototype.submission_outcome = function(tid, o
|
||||
|
||||
// Quick reference for the grader report
|
||||
var i = null;
|
||||
// Check the outcome
|
||||
if (outcome.result == 'success') {
|
||||
// Check the response
|
||||
if (response.result == 'success') {
|
||||
// Iterate through each row in the result object
|
||||
for (i in outcome.row) {
|
||||
if (outcome.row[i] && outcome.row[i].userid && outcome.row[i].itemid) {
|
||||
for (i in response.row) {
|
||||
if (response.row[i] && response.row[i].userid && response.row[i].itemid) {
|
||||
// alias it, we use it quite a bit
|
||||
var r = outcome.row[i];
|
||||
var r = response.row[i];
|
||||
// Get the cell referred to by this result object
|
||||
var info = this.report.get_cell_info([r.userid, r.itemid]);
|
||||
if (!info) {
|
||||
@@ -639,24 +643,7 @@ M.gradereport_grader.classes.ajax.prototype.submission_outcome = function(tid, o
|
||||
} else if (args.type == 'feedback') {
|
||||
this.report.update_feedback(p.userid, p.itemid, args.values.oldfeedback);
|
||||
}
|
||||
this.display_submission_error(outcome.message, p.cell);
|
||||
}
|
||||
// Check if all IO transactions in the queue are complete yet
|
||||
var allcomplete = true;
|
||||
for (i in this.pendingsubmissions) {
|
||||
if (this.pendingsubmissions[i]) {
|
||||
if (this.pendingsubmissions[i].transaction.id == tid) {
|
||||
this.pendingsubmissions[i].complete = true;
|
||||
this.pendingsubmissions[i].outcome = outcome;
|
||||
this.report.Y.io.queue.remove(this.pendingsubmissions[i].transaction);
|
||||
}
|
||||
if (!this.pendingsubmissions[i].complete) {
|
||||
allcomplete = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (allcomplete) {
|
||||
this.pendingsubmissions = [];
|
||||
this.display_submission_error(response.message, p.cell);
|
||||
}
|
||||
};
|
||||
/**
|
||||
@@ -1197,4 +1184,4 @@ for (var i in M.gradereport_grader.classes.textfield.prototype) {
|
||||
if (!M.gradereport_grader.classes.scalefield.prototype[i]) {
|
||||
M.gradereport_grader.classes.scalefield.prototype[i] = M.gradereport_grader.classes.textfield.prototype[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,16 +269,12 @@ table#user-grades td.topleft {
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
.path-grade-report-grader div.userpic {
|
||||
margin-right:10px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.path-grade-report-grader div.userpic img {
|
||||
.path-grade-report-grader th.user img {
|
||||
border:3px double #cecece;
|
||||
vertical-align:middle;
|
||||
vertical-align:top;
|
||||
width:2.7em;
|
||||
height:2.7em;
|
||||
margin-right:10px;
|
||||
}
|
||||
|
||||
.path-grade-report-grader a.quickedit {
|
||||
|
||||
@@ -103,7 +103,7 @@ if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all
|
||||
|
||||
if ($user_selector) {
|
||||
$renderer = $PAGE->get_renderer('gradereport_user');
|
||||
echo $renderer->graded_users_selector('user', $course, $userid, $currentgroup, false);
|
||||
echo $renderer->graded_users_selector('user', $course, $userid, $currentgroup, true);
|
||||
}
|
||||
|
||||
while ($userdata = $gui->next_user()) {
|
||||
|
||||
@@ -650,7 +650,7 @@ class grade_report_user extends grade_report {
|
||||
// Then left join with grade_grades and look for rows with null final grade (which includes grade items with no grade_grade)
|
||||
$sql = "SELECT gi.id, COUNT(u.id) AS count
|
||||
FROM {grade_items} gi
|
||||
JOIN {user} u
|
||||
JOIN {user} u ON u.deleted = 0
|
||||
JOIN ($enrolledsql) je ON je.id = u.id
|
||||
JOIN (
|
||||
SELECT DISTINCT ra.userid
|
||||
@@ -659,10 +659,9 @@ class grade_report_user extends grade_report {
|
||||
AND ra.contextid " . get_related_contexts_string($this->context) . "
|
||||
) rainner ON rainner.userid = u.id
|
||||
LEFT JOIN {grade_grades} gg
|
||||
ON (gg.itemid = gi.id AND gg.userid = u.id AND gg.finalgrade IS NOT NULL AND gg.hidden = 0)
|
||||
ON (gg.itemid = gi.id AND gg.userid = u.id AND gg.finalgrade IS NOT NULL AND gg.hidden = 0)
|
||||
$groupsql
|
||||
WHERE gi.courseid = :courseid
|
||||
AND u.deleted = 0
|
||||
AND gg.finalgrade IS NULL
|
||||
$groupwheresql
|
||||
GROUP BY gi.id";
|
||||
|
||||
+1
-1
@@ -183,7 +183,7 @@ var createLoaderImg = function (elClass, parentId, wwwRoot) {
|
||||
}
|
||||
var loadingImg = document.createElement("img");
|
||||
|
||||
loadingImg.setAttribute("src", M.util.image_url('moodle', '/i/ajaxloader'));
|
||||
loadingImg.setAttribute("src", M.util.image_url('/i/ajaxloader', 'moodle'));
|
||||
loadingImg.setAttribute("class", elClass);
|
||||
loadingImg.setAttribute("alt", "Loading");
|
||||
loadingImg.setAttribute("id", "loaderImg");
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ $cancel = optional_param('cancel', false, PARAM_BOOL);
|
||||
$group = $DB->get_record('groups', array('id'=>$groupid), '*', MUST_EXIST);
|
||||
$course = $DB->get_record('course', array('id'=>$group->courseid), '*', MUST_EXIST);
|
||||
|
||||
$PAGE->set_url('/groups/members.php', array('id'=>$groupid));
|
||||
$PAGE->set_url('/group/members.php', array('group'=>$groupid));
|
||||
$PAGE->set_pagelayout('standard');
|
||||
|
||||
require_login($course);
|
||||
|
||||
@@ -40,23 +40,25 @@
|
||||
user_accesstime_log();
|
||||
}
|
||||
|
||||
$hassiteconfig = has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
|
||||
|
||||
$PAGE->set_url('/');
|
||||
$PAGE->set_course($SITE);
|
||||
|
||||
/// If the site is currently under maintenance, then print a message
|
||||
if (!empty($CFG->maintenance_enabled) and !has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
|
||||
if (!empty($CFG->maintenance_enabled) and !$hassiteconfig) {
|
||||
print_maintenance_message();
|
||||
}
|
||||
|
||||
if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
|
||||
if (moodle_needs_upgrading()) {
|
||||
redirect($CFG->wwwroot .'/'. $CFG->admin .'/index.php');
|
||||
}
|
||||
} else if (get_home_page() != HOMEPAGE_SITE) {
|
||||
if ($hassiteconfig && moodle_needs_upgrading()) {
|
||||
redirect($CFG->wwwroot .'/'. $CFG->admin .'/index.php');
|
||||
}
|
||||
|
||||
if (get_home_page() != HOMEPAGE_SITE) {
|
||||
// Redirect logged-in users to My Moodle overview if required
|
||||
if (optional_param('setdefaulthome', false, PARAM_BOOL)) {
|
||||
set_user_preference('user_home_page_preference', HOMEPAGE_SITE);
|
||||
} else if ($CFG->defaulthomepage == HOMEPAGE_MY && optional_param('redirect', true, PARAM_BOOL)) {
|
||||
} else if ($CFG->defaulthomepage == HOMEPAGE_MY && optional_param('redirect', 1, PARAM_BOOL) === 1) {
|
||||
redirect($CFG->wwwroot .'/my/');
|
||||
} else if (!empty($CFG->defaulthomepage) && $CFG->defaulthomepage == HOMEPAGE_USER) {
|
||||
$PAGE->settingsnav->get('usercurrentsettings')->add(get_string('makethismyhome'), new moodle_url('/', array('setdefaulthome'=>true)), navigation_node::TYPE_SETTING);
|
||||
@@ -184,12 +186,12 @@
|
||||
break;
|
||||
|
||||
case FRONTPAGECOURSELIST:
|
||||
if (isloggedin() and !has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)) and !isguestuser() and empty($CFG->disablemycourses)) {
|
||||
if (isloggedin() and !$hassiteconfig and !isguestuser() and empty($CFG->disablemycourses)) {
|
||||
echo html_writer::tag('a', get_string('skipa', 'access', moodle_strtolower(get_string('mycourses'))), array('href'=>'#skipmycourses', 'class'=>'skip-block'));
|
||||
echo $OUTPUT->heading(get_string('mycourses'), 2, 'headingblock header');
|
||||
print_my_moodle();
|
||||
echo html_writer::tag('span', '', array('class'=>'skip-block-to', 'id'=>'skipmycourses'));
|
||||
} else if ((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)) and !isguestuser()) or ($DB->count_records('course') <= FRONTPAGECOURSELIMIT)) {
|
||||
} else if ((!$hassiteconfig and !isguestuser()) or ($DB->count_records('course') <= FRONTPAGECOURSELIMIT)) {
|
||||
// admin should not see list of courses when there are too many of them
|
||||
echo html_writer::tag('a', get_string('skipa', 'access', moodle_strtolower(get_string('availablecourses'))), array('href'=>'#skipavailablecourses', 'class'=>'skip-block'));
|
||||
echo $OUTPUT->heading(get_string('availablecourses'), 2, 'headingblock header');
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,6 +28,8 @@
|
||||
* @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'] = 'Fout, verkeerde waarde "{$ a-> value}" vir "{$ a-> option}"';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,4 +28,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thislanguage'] = 'Afrikaans';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,4 +28,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['dirroot'] = 'Moodle ማውጫ';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,4 +28,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thislanguage'] = ' አማርኛ';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,6 +28,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['language'] = 'ቋንቋ';
|
||||
$string['next'] = 'ቀጣይ';
|
||||
$string['previous'] = 'ቀዳሚ';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,13 +28,15 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['clianswerno'] = 'لا';
|
||||
$string['cliansweryes'] = 'نعم';
|
||||
$string['cliincorrectvalueerror'] = 'خطأ، القيمة "{$a->value}" غير صحيحة من أجل "{$a->option}"';
|
||||
$string['cliincorrectvalueretry'] = 'قيمة غير صحيحة، حاول مرة أخرى';
|
||||
$string['clitypevalue'] = 'أدخل القيمة';
|
||||
$string['clitypevaluedefault'] = 'ادخل القيم أو اضغط انتر (Enter) لإستخدام القيم الأفتراضية ({$a})';
|
||||
$string['cliunknowoption'] = 'خيارات غير معروفة
|
||||
$string['cliunknowoption'] = 'خيارات غير معروفة
|
||||
{$a}
|
||||
الرجاء استخدام خيار المساعدة';
|
||||
$string['cliyesnoprompt'] = 'ادخل (Y) تعني نعم أو (N) تعني لأ';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,6 +28,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatelangdir'] = 'لا يمكن إنشاء مجلد اللغة';
|
||||
$string['cannotcreatetempdir'] = 'لا يمكن إنشاء المجلد المؤقت';
|
||||
$string['cannotdownloadcomponents'] = 'لم يتم تحميل العناصر';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,6 +28,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'مجلد الإدارة';
|
||||
$string['availablelangs'] = 'حزم اللغة المتوفره';
|
||||
$string['chooselanguagehead'] = 'اختر اللغة';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,5 +28,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thisdirection'] = 'rtl';
|
||||
$string['thislanguage'] = 'عربي';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,6 +28,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['language'] = 'اللغة';
|
||||
$string['next'] = 'التالي';
|
||||
$string['previous'] = 'السابق';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,5 +28,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['environmentrequireinstall'] = 'solicítase instalar y activar esto.';
|
||||
$string['environmentrequireversion'] = 'Solicítase la versión {$a->needed} y va executar la {$a->current}';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,6 +28,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatelangdir'] = 'Nun pue crear un direutoriu d\'idioma.';
|
||||
$string['cannotcreatetempdir'] = 'Nun pue crear un direutoriu de tiempu.';
|
||||
$string['cannotdownloadcomponents'] = 'Nun pue descargar componentes.';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,6 +28,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'Direutoriu d\'alministración';
|
||||
$string['availablelangs'] = 'Paquetes d\'idioma disponibles';
|
||||
$string['chooselanguagehead'] = 'Escueya idioma';
|
||||
@@ -42,10 +44,10 @@ $string['memorylimithelp'] = '<p>La llende de memoria del PHP del so servidor ta
|
||||
|
||||
<p>Esto va facer que Moodle tenga problemes de memoria más tarde, especialmente si tien munchos módulos y/o munchos usuarios.</p>
|
||||
|
||||
<p>Recomendamos que configure PHP con una llende más grande si ye posible, como por exemplu 40M.
|
||||
<p>Recomendamos que configure PHP con una llende más grande si ye posible, como por exemplu 40M.
|
||||
Esisten varies formes nes que pue intentar facer esta modificación:</p>
|
||||
<ol>
|
||||
<li>Si pue, recompile PHP con <i>--enable-memory-limit</i>.
|
||||
<li>Si pue, recompile PHP con <i>--enable-memory-limit</i>.
|
||||
Esto va permitir que\'l propiu Moodle modifique la llende de memoria.</li>
|
||||
<li>Si tien accesu al so ficheru php.ini pue modificar el valor de <b>memory_limit</b> a daqué paecío a 40M. Si nun tien accesu a esi ficheru igual pue pidir al alministrador del sistema que lo faiga.</li>
|
||||
<li>En dellos servidores PHP pue crear un ficheru .htaccess nel direutoriu Moodle cola ringlera que vien darréu:
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,5 +28,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Asturianu';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,6 +28,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['language'] = 'Idioma';
|
||||
$string['next'] = 'Siguiente';
|
||||
$string['previous'] = 'Anterior';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.0 installer
|
||||
* 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
|
||||
@@ -28,14 +28,16 @@
|
||||
* @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'] = 'Səhv, "{$a->option}" üçün səhv "{$a->value}" qiyməti';
|
||||
$string['cliincorrectvalueretry'] = 'Qiymət səhvdir, zəhmət olmasa yenidən cəhd edin';
|
||||
$string['clitypevalue'] = 'Qiyməti daxil edin';
|
||||
$string['clitypevaluedefault'] = 'Qiyməti daxil edin, ({$a}) qiymətindən avtomatik olaraq istifadə etmək üçün Enter düyməsini basın';
|
||||
$string['cliunknowoption'] = 'Təyin olunmayan parametrlər:
|
||||
{$a}
|
||||
$string['cliunknowoption'] = 'Təyin olunmayan parametrlər:
|
||||
{$a}
|
||||
Zəhmət olmasa help parametrindən istifadə edin';
|
||||
$string['cliyesnoprompt'] = 'y (bəli) və n (xeyr) düyməsini basın';
|
||||
$string['environmentrequireinstall'] = 'quraşdırılıb işə salınmalıdır';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user