Compare commits
311 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f0d8c53ae0 | |||
| f26acbbf5b | |||
| 25dba50b9d | |||
| c9827a9135 | |||
| 13a322f4b6 | |||
| 2e97c22310 | |||
| 05933e48dc | |||
| a2d06016f4 | |||
| c0f177f19c | |||
| 4a727367e7 | |||
| f6735ae534 | |||
| 48265a6549 | |||
| e4e1bd900a | |||
| 6185fa79e7 | |||
| ccc0b20a8f | |||
| ee87608e1a | |||
| cc2fb80742 | |||
| 50269914ce | |||
| be6281e2cb | |||
| 1fc34e37fd | |||
| 667eaec4d2 | |||
| 7f8cc6f777 | |||
| ce3fa5931d | |||
| 8aa12adcf2 | |||
| b26066bf68 | |||
| 9705bfa84f | |||
| 152a040acd | |||
| 6f9e83e892 | |||
| bf5f227817 | |||
| 700b5b679e | |||
| c6b1ff865f | |||
| 0edd01e943 | |||
| 4b5dcd72d5 | |||
| 28772fb9e7 | |||
| 14b536dd6f | |||
| d270524855 | |||
| ee439acb1e | |||
| b8401ee7ac | |||
| 955a081e3a | |||
| a035b96fd5 | |||
| 55157bfc2e | |||
| fc282e4ab3 | |||
| 3565867b4f | |||
| 100da2dcfb | |||
| b4eeee49cd | |||
| ed8772d0f5 | |||
| 6679bfdbd3 | |||
| 6d28ff14f0 | |||
| b67bb742a0 | |||
| b908e2fcd9 | |||
| fc9fedb375 | |||
| c8c3599cf4 | |||
| 0fabc84119 | |||
| c5602897c1 | |||
| 70d7e35499 | |||
| 76645b7e6c | |||
| 6f0a4b8f24 | |||
| 53095b7ebe | |||
| abd110f8f9 | |||
| ff198ea740 | |||
| c738cc946f | |||
| 6137bc9ca2 | |||
| 81c19f4d1f | |||
| f89ca0ea6e | |||
| 48c8137388 | |||
| b6bfe3b35c | |||
| 55d2126310 | |||
| 8617a082bb | |||
| c9b3e9eb23 | |||
| c1163a13fe | |||
| 7281117d6e | |||
| 10abf35eac | |||
| 6b8f82e412 | |||
| c594709cf4 | |||
| cfbf324052 | |||
| ff01692765 | |||
| ff6479d21c | |||
| 46295524d7 | |||
| 12091f27cf | |||
| fa15dda773 | |||
| 8cee951622 | |||
| 503630ed47 | |||
| de0917ef7f | |||
| b748564398 | |||
| d0fc4cf539 | |||
| 5ddfd45539 | |||
| e46515bd83 | |||
| e47a7b904c | |||
| dc67a0e9b6 | |||
| 81d6802709 | |||
| d3c575bd6f | |||
| 08a1a195b4 | |||
| e206f3ffcb | |||
| 5402f64623 | |||
| 70f7ea9327 | |||
| e1aaddef66 | |||
| 018e8a9ad4 | |||
| 2a6c9c1536 | |||
| 50590afe38 | |||
| 092f45148a | |||
| d9c557099c | |||
| 161f4e0d79 | |||
| 3c9175acb2 | |||
| c464052692 | |||
| 5e00b9a6e7 | |||
| 4b9ae9e997 | |||
| cddf19fccd | |||
| c8b33aa772 | |||
| f8028c2f30 | |||
| 6b59b89a1b | |||
| b5163c5132 | |||
| b4eb152f69 | |||
| 5312d1fbeb | |||
| 3c719fafc5 | |||
| c7f7ad249d | |||
| 9d34eba78d | |||
| 7d7824b0c1 | |||
| 54f03faba2 | |||
| ced8b30bd5 | |||
| 42f64a01c7 | |||
| cf473c2189 | |||
| 5c728f6303 | |||
| cbf837ce04 | |||
| 18646a683b | |||
| d519be4dab | |||
| 472ec72b2a | |||
| 8f6894b5f1 | |||
| 50a40aed52 | |||
| 8be4f7da65 | |||
| d56837de60 | |||
| dd8e2dde96 | |||
| cd8dbd11a2 | |||
| a5ce56011a | |||
| ce51cb98a6 | |||
| 32f2cceecc | |||
| ef8d4d590c | |||
| 534707ff8d | |||
| ec934409e6 | |||
| 387dc90072 | |||
| 17c980cc80 | |||
| 35c4301b2c | |||
| 770e8c02db | |||
| fd33a80fa1 | |||
| f7f4494fb7 | |||
| c7ed914077 | |||
| d84477702d | |||
| 7f96a4dffe | |||
| 1b08751cfa | |||
| 38b18a142c | |||
| 726e41abaa | |||
| d3b880b578 | |||
| 7bfe54c41c | |||
| 595ef991ee | |||
| 0b4c2c04f9 | |||
| d110758759 | |||
| dce8cb0576 | |||
| 7b9df2353c | |||
| 2a564dc2bf | |||
| bec7d18248 | |||
| bf944109f0 | |||
| 932d87f841 | |||
| f3d49933b0 | |||
| 557383cd94 | |||
| 3b89216c24 | |||
| b3e792b946 | |||
| ea6ef858f5 | |||
| c01f9e8bc1 | |||
| 7d042f6734 | |||
| 2967681e64 | |||
| aeacefdb19 | |||
| b93ca5a53d | |||
| 70c3c66943 | |||
| 59b50da6e9 | |||
| 650e0141fe | |||
| 112bb36c24 | |||
| e37db6dc17 | |||
| 1d05ecfd3e | |||
| fcb47c06b0 | |||
| 679620265a | |||
| 3848b9c8d5 | |||
| 0f16db943c | |||
| 0992cee1de | |||
| 7cfccbb148 | |||
| f3da6ac7aa | |||
| 1b9d0b9e3e | |||
| f80b096a5e | |||
| 75899ed480 | |||
| 39525889eb | |||
| a82871d4f7 | |||
| 0dec339211 | |||
| 2b705fc409 | |||
| c2217f57d0 | |||
| 7dc59651b0 | |||
| ad20106a0b | |||
| 68d6206d85 | |||
| d4aac8e4f6 | |||
| 7d253e0977 | |||
| 8318d25d49 | |||
| 927b7c29c8 | |||
| 3cee2ad262 | |||
| 3f8a77fb21 | |||
| a88b558c83 | |||
| f24fb2fec4 | |||
| 45d7974cc9 | |||
| 17dfe60da0 | |||
| 8cea78f500 | |||
| d82cef65c6 | |||
| d6868e54b8 | |||
| e53be83e10 | |||
| 772e6ab1bf | |||
| 2dc4d19f79 | |||
| 482823f2b6 | |||
| 8132e0f899 | |||
| c74325d17a | |||
| b4dcb723ff | |||
| ccf46ba2d9 | |||
| 13c708233e | |||
| 5a2c3ece38 | |||
| f6d596dd5d | |||
| 9efd33dc61 | |||
| 4984697c12 | |||
| e721f2dec8 | |||
| 4c31a15261 | |||
| aca26e0641 | |||
| 9821beacb6 | |||
| 642cbeec6b | |||
| 47b17f9123 | |||
| 470730c86b | |||
| 2ec0ba91b8 | |||
| 4c1689ba52 | |||
| ba7c052171 | |||
| 1a5d5334bf | |||
| 7e53f1a231 | |||
| c50107c847 | |||
| 97707318c3 | |||
| 1947345e42 | |||
| 4523bbba8f | |||
| 44ee5acee4 | |||
| 25e348d6aa | |||
| 3d2ec04484 | |||
| 8a95402f94 | |||
| e8eb6a1d50 | |||
| d196b17587 | |||
| 5320a265ab | |||
| 12b6eebf37 | |||
| eea80d257c | |||
| f54579f72a | |||
| e848bf1153 | |||
| 2e83fee85c | |||
| f466f71902 | |||
| 23149b2e13 | |||
| 8bb0c27f1b | |||
| 7c5fa92210 | |||
| 8dc10e915e | |||
| 3ea063fe7d | |||
| 4174fc1176 | |||
| 1fde603819 | |||
| 4f47ee6476 | |||
| 63308668d6 | |||
| 4b226f3b37 | |||
| d3a9460d57 | |||
| e004354787 | |||
| 4688b27ab3 | |||
| 417c261001 | |||
| e815163162 | |||
| 665f13c50c | |||
| 601054daca | |||
| a3a6b68ae9 | |||
| c2879b7db8 | |||
| 9146ab295d | |||
| 14742ceb73 | |||
| 7a4605ae62 | |||
| e250e9ae29 | |||
| a0b12848a4 | |||
| 07c65a6029 | |||
| 7849c44376 | |||
| e2c7333c2e | |||
| ecd68bf7b6 | |||
| b2b512671d | |||
| 6211a05866 | |||
| e24cb35c18 | |||
| dd8ec00067 | |||
| a3db3bfac0 | |||
| cf9b57d181 | |||
| 28896f12f7 | |||
| b100f948cb | |||
| 2de3def418 | |||
| 5a3ebd5ea6 | |||
| e40c3f7cc4 | |||
| 475ba4478d | |||
| 532c3d8803 | |||
| d312ce89e2 | |||
| 52a19fac1e | |||
| 682b737316 | |||
| b433c4cedf | |||
| 340cba5b22 | |||
| 2ffd3701f5 | |||
| e421b1524f | |||
| 0147d3da53 | |||
| d8a20b8828 | |||
| 77df5b724d | |||
| 951a9fcc67 | |||
| 95c7d1d076 | |||
| 831ecc9af3 | |||
| 42a42bcd46 | |||
| 1d19d5c219 | |||
| 14d6c90f81 | |||
| c1607b5378 | |||
| b5ef760c57 | |||
| f1192522c8 | |||
| 276d1134e2 |
+136
-20
@@ -227,7 +227,7 @@
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
@@ -237,7 +237,7 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="curlrequired" />
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
@@ -277,12 +277,12 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="splrequired" />
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
@@ -344,7 +344,7 @@
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
@@ -354,7 +354,7 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="curlrequired" />
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
@@ -394,12 +394,12 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="splrequired" />
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
@@ -454,7 +454,7 @@
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
@@ -464,7 +464,7 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="curlrequired" />
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
@@ -504,12 +504,12 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="splrequired" />
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
@@ -569,7 +569,7 @@
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
@@ -579,7 +579,7 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="curlrequired" />
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
@@ -619,12 +619,12 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="splrequired" />
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
@@ -685,7 +685,7 @@
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
@@ -695,7 +695,7 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="curlrequired" />
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
@@ -735,12 +735,128 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="splrequired" />
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="dom" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xml" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="intl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="intlrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="json" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="hash" level="required"/>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="40M" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="settingmemorylimit" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="safe_mode" value="0" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingsafemode" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="file_uploads" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingfileuploads" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
</PHP_SETTINGS>
|
||||
</MOODLE>
|
||||
<MOODLE version="2.5" requires="2.2">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mysql" version="5.1.33" />
|
||||
<VENDOR name="postgres" version="8.3" />
|
||||
<VENDOR name="mssql" version="9.0" />
|
||||
<VENDOR name="odbc_mssql" version="9.0" />
|
||||
<VENDOR name="mssql_n" version="9.0" />
|
||||
<VENDOR name="oracle" version="10.2" />
|
||||
<VENDOR name="sqlite" version="2.0" />
|
||||
</DATABASE>
|
||||
<PHP version="5.3.3" level="required">
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="pcreunicodewarning" />
|
||||
</FEEDBACK>
|
||||
</PCREUNICODE>
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="mbstringrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="opensslrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="tokenizer" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="tokenizerrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xmlrpc" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="xmlrpcrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="soap" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="soaprecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="ctype" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ctyperequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="zip" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ziprequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="gd" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="gdrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
|
||||
@@ -244,6 +244,8 @@ class site_registration_form extends moodleform {
|
||||
$questionsnumber = get_config('hub', 'site_questionsnumber_' . $cleanhuburl);
|
||||
$resourcesnumber = get_config('hub', 'site_resourcesnumber_' . $cleanhuburl);
|
||||
$mediancoursesize = get_config('hub', 'site_mediancoursesize_' . $cleanhuburl);
|
||||
$participantnumberaveragecfg = get_config('hub', 'site_participantnumberaverage_' . $cleanhuburl);
|
||||
$modulenumberaveragecfg = get_config('hub', 'site_modulenumberaverage_' . $cleanhuburl);
|
||||
|
||||
//hidden parameters
|
||||
$mform->addElement('hidden', 'huburl', $huburl);
|
||||
@@ -376,36 +378,36 @@ class site_registration_form extends moodleform {
|
||||
if (HUB_MOODLEORGHUBURL != $huburl) {
|
||||
$mform->addElement('checkbox', 'courses', get_string('sendfollowinginfo', 'hub'),
|
||||
" " . get_string('coursesnumber', 'hub', $coursecount));
|
||||
$mform->setDefault('courses', true);
|
||||
$mform->setDefault('courses', $coursesnumber != -1);
|
||||
$mform->addHelpButton('courses', 'sendfollowinginfo', 'hub');
|
||||
|
||||
$mform->addElement('checkbox', 'users', '',
|
||||
" " . get_string('usersnumber', 'hub', $usercount));
|
||||
$mform->setDefault('users', true);
|
||||
$mform->setDefault('users', $usersnumber != -1);
|
||||
|
||||
$mform->addElement('checkbox', 'roleassignments', '',
|
||||
" " . get_string('roleassignmentsnumber', 'hub', $roleassigncount));
|
||||
$mform->setDefault('roleassignments', true);
|
||||
$mform->setDefault('roleassignments', $roleassignmentsnumber != -1);
|
||||
|
||||
$mform->addElement('checkbox', 'posts', '',
|
||||
" " . get_string('postsnumber', 'hub', $postcount));
|
||||
$mform->setDefault('posts', true);
|
||||
$mform->setDefault('posts', $postsnumber != -1);
|
||||
|
||||
$mform->addElement('checkbox', 'questions', '',
|
||||
" " . get_string('questionsnumber', 'hub', $questioncount));
|
||||
$mform->setDefault('questions', true);
|
||||
$mform->setDefault('questions', $questionsnumber != -1);
|
||||
|
||||
$mform->addElement('checkbox', 'resources', '',
|
||||
" " . get_string('resourcesnumber', 'hub', $resourcecount));
|
||||
$mform->setDefault('resources', true);
|
||||
$mform->setDefault('resources', $resourcesnumber != -1);
|
||||
|
||||
$mform->addElement('checkbox', 'participantnumberaverage', '',
|
||||
" " . get_string('participantnumberaverage', 'hub', $participantnumberaverage));
|
||||
$mform->setDefault('participantnumberaverage', true);
|
||||
$mform->setDefault('participantnumberaverage', $participantnumberaveragecfg != -1);
|
||||
|
||||
$mform->addElement('checkbox', 'modulenumberaverage', '',
|
||||
" " . get_string('modulenumberaverage', 'hub', $modulenumberaverage));
|
||||
$mform->setDefault('modulenumberaverage', true);
|
||||
$mform->setDefault('modulenumberaverage', $modulenumberaveragecfg != -1);
|
||||
} else {
|
||||
$mform->addElement('static', 'courseslabel', get_string('sendfollowinginfo', 'hub'),
|
||||
" " . get_string('coursesnumber', 'hub', $coursecount));
|
||||
|
||||
@@ -62,7 +62,18 @@ $siteregistrationform = new site_registration_form('',
|
||||
$fromform = $siteregistrationform->get_data();
|
||||
|
||||
if (!empty($fromform) and confirm_sesskey()) {
|
||||
//save the settings
|
||||
|
||||
// Set to -1 all optional data marked as "don't send" by the admin.
|
||||
// The function get_site_info() will not calculate the optional data if config is set to -1.
|
||||
$inputnames = array('courses', 'users', 'roleassignments', 'posts', 'questions', 'resources',
|
||||
'modulenumberaverage', 'participantnumberaverage');
|
||||
foreach ($inputnames as $inputname) {
|
||||
if (empty($fromform->{$inputname})) {
|
||||
$fromform->{$inputname} = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Save the settings.
|
||||
$cleanhuburl = clean_param($huburl, PARAM_ALPHANUMEXT);
|
||||
set_config('site_name_' . $cleanhuburl, $fromform->name, 'hub');
|
||||
set_config('site_description_' . $cleanhuburl, $fromform->description, 'hub');
|
||||
@@ -113,6 +124,19 @@ if ($update and confirm_sesskey()) {
|
||||
if (!empty($fromform) and empty($update) and confirm_sesskey()) {
|
||||
|
||||
if (!empty($fromform) and confirm_sesskey()) { // if the register button has been clicked
|
||||
|
||||
// Retrieve the optional info (specially course number, user number, module number average...).
|
||||
$siteinfo = $registrationmanager->get_site_info($huburl);
|
||||
$fromform->courses = $siteinfo['courses'];
|
||||
$fromform->users = $siteinfo['users'];
|
||||
$fromform->enrolments = $siteinfo['enrolments'];
|
||||
$fromform->posts = $siteinfo['posts'];
|
||||
$fromform->questions = $siteinfo['questions'];
|
||||
$fromform->resources = $siteinfo['resources'];
|
||||
$fromform->modulenumberaverage = $siteinfo['modulenumberaverage'];
|
||||
$fromform->participantnumberaverage = $siteinfo['participantnumberaverage'];
|
||||
$fromform->street = $siteinfo['street'];
|
||||
|
||||
$params = (array) $fromform; //we are using the form input as the redirection parameters (token, url and name)
|
||||
|
||||
$unconfirmedhub = $registrationmanager->get_unconfirmedhub($huburl);
|
||||
|
||||
@@ -38,7 +38,7 @@ class core_register_renderer extends plugin_renderer_base {
|
||||
public function moodleorg_registration_message() {
|
||||
$moodleorgurl = html_writer::link('http://moodle.org', 'Moodle.org');
|
||||
$moodleorgstatsurl = html_writer::link('http://moodle.org/stats', get_string('statsmoodleorg', 'admin'));
|
||||
$moochurl = html_writer::link(HUB_MOODLEORGHUBURL, 'MOOCH');
|
||||
$moochurl = html_writer::link(HUB_MOODLEORGHUBURL, 'Moodle.net');
|
||||
$moodleorgregmsg = get_string('registermoodleorg', 'admin', $moodleorgurl);
|
||||
$items = array(get_string('registermoodleorgli1', 'admin'),
|
||||
get_string('registermoodleorgli2', 'admin', $moodleorgstatsurl),
|
||||
@@ -92,4 +92,4 @@ class core_register_renderer extends plugin_renderer_base {
|
||||
return html_writer::table($table);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,14 +47,16 @@ list($options, $unrecognized) = cli_get_params(
|
||||
)
|
||||
);
|
||||
|
||||
if (file_exists(__DIR__.'/../../../../vendor/autoload.php')) {
|
||||
if (file_exists(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/Autoload.php')) {
|
||||
// Composer packages present.
|
||||
require_once(__DIR__.'/../../../../vendor/autoload.php');
|
||||
}
|
||||
require_once(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/Autoload.php');
|
||||
|
||||
// Verify PHPUnit libs can be loaded.
|
||||
if (!include_once('PHPUnit/Autoload.php')) {
|
||||
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
|
||||
} else {
|
||||
// Verify PHPUnit PEAR libs can be loaded.
|
||||
if (!include('PHPUnit/Autoload.php')) {
|
||||
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
|
||||
}
|
||||
}
|
||||
|
||||
if ($options['run']) {
|
||||
|
||||
@@ -69,7 +69,7 @@ $string['showsearch'] = 'Show the search for test files.';
|
||||
$string['skip'] = 'Skip';
|
||||
$string['stacktrace'] = 'Stack trace:';
|
||||
$string['summary'] = '{$a->run}/{$a->total} test cases complete: <strong>{$a->passes}</strong> passes, <strong>{$a->fails}</strong> fails and <strong>{$a->exceptions}</strong> exceptions.';
|
||||
$string['tablesnotsetup'] = 'Unit test tables are not yet built. Do you want to build them now?.';
|
||||
$string['tablesnotsetup'] = 'Unit test tables are not yet built. Do you want to build them now?';
|
||||
$string['testdboperations'] = 'Test database operations';
|
||||
$string['testtablescsvfileunwritable'] = 'The test tables CSV file is not writable ({$a->filename})';
|
||||
$string['testtablesneedupgrade'] = 'The test DB tables need to be upgraded. Do you wish to proceed with the upgrade now?';
|
||||
|
||||
@@ -32,8 +32,9 @@
|
||||
//
|
||||
// hack by Vangelis Haniotakis to handle the absence of $_SERVER['REQUEST_URI'] in IIS
|
||||
//
|
||||
if (!isset($_SERVER['REQUEST_URI'])) {
|
||||
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
|
||||
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
|
||||
if (isset($_SERVER['QUERY_STRING'])) {
|
||||
$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -105,7 +105,7 @@ class auth_plugin_radius extends auth_plugin_base {
|
||||
}
|
||||
|
||||
$result = $rauth->send();
|
||||
if (PEAR::isError($result)) {
|
||||
if ($rauth->isError($result)) {
|
||||
printf("Radius send failed: %s<br/>\n", $result->getMessage());
|
||||
exit;
|
||||
} else if ($result === true) {
|
||||
|
||||
@@ -1764,6 +1764,10 @@ class backup_questions_structure_step extends backup_structure_step {
|
||||
$qhint = new backup_nested_element('question_hint', array('id'), array(
|
||||
'hint', 'hintformat', 'shownumcorrect', 'clearwrong', 'options'));
|
||||
|
||||
$tags = new backup_nested_element('tags');
|
||||
|
||||
$tag = new backup_nested_element('tag', array('id'), array('name', 'rawname'));
|
||||
|
||||
// Build the tree
|
||||
|
||||
$qcategories->add_child($qcategory);
|
||||
@@ -1772,6 +1776,9 @@ class backup_questions_structure_step extends backup_structure_step {
|
||||
$question->add_child($qhints);
|
||||
$qhints->add_child($qhint);
|
||||
|
||||
$question->add_child($tags);
|
||||
$tags->add_child($tag);
|
||||
|
||||
// Define the sources
|
||||
|
||||
$qcategory->set_source_sql("
|
||||
@@ -1791,6 +1798,12 @@ class backup_questions_structure_step extends backup_structure_step {
|
||||
ORDER BY id',
|
||||
array('questionid' => backup::VAR_PARENTID));
|
||||
|
||||
$tag->set_source_sql("SELECT t.id, t.name, t.rawname
|
||||
FROM {tag} t
|
||||
JOIN {tag_instance} ti ON ti.tagid = t.id
|
||||
WHERE ti.itemid = ?
|
||||
AND ti.itemtype = 'question'", array(backup::VAR_PARENTID));
|
||||
|
||||
// don't need to annotate ids nor files
|
||||
// (already done by {@link backup_annotate_all_question_files}
|
||||
|
||||
|
||||
@@ -74,6 +74,8 @@ class restore_course_task extends restore_task {
|
||||
// Restore course role assignments and overrides (internally will observe the role_assignments setting)
|
||||
$this->add_step(new restore_ras_and_caps_structure_step('course_ras_and_caps', 'roles.xml'));
|
||||
|
||||
$this->add_step(new restore_course_legacy_files_step('legacy_files'));
|
||||
|
||||
// Restore course enrolments (plugins and membership). Conditionally prevented for any IMPORT/HUB operation
|
||||
if ($this->plan->get_mode() != backup::MODE_IMPORT && $this->plan->get_mode() != backup::MODE_HUB) {
|
||||
$this->add_step(new restore_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
|
||||
|
||||
@@ -150,6 +150,11 @@ class restore_gradebook_structure_step extends restore_structure_step {
|
||||
if ($data->itemtype=='manual') {
|
||||
// manual grade items store category id in categoryid
|
||||
$data->categoryid = $this->get_mappingid('grade_category', $data->categoryid, NULL);
|
||||
// if mapping failed put in course's grade category
|
||||
if (NULL == $data->categoryid) {
|
||||
$coursecat = grade_category::fetch_course_category($this->get_courseid());
|
||||
$data->categoryid = $coursecat->id;
|
||||
}
|
||||
} else if ($data->itemtype=='course') {
|
||||
// course grade item stores their category id in iteminstance
|
||||
$coursecat = grade_category::fetch_course_category($this->get_courseid());
|
||||
@@ -1166,7 +1171,7 @@ class restore_section_structure_step extends restore_structure_step {
|
||||
// Otherwise, when you restore to an existing course, it will mess up
|
||||
// existing section availability entries.
|
||||
if (!$this->get_mappingid('course_sections_availability', $data->id, false)) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Update source cmid / grade id to new value.
|
||||
@@ -1179,7 +1184,12 @@ class restore_section_structure_step extends restore_structure_step {
|
||||
$data->gradeitemid = null;
|
||||
}
|
||||
|
||||
$DB->update_record('course_sections_availability', $data);
|
||||
// Delete the record if the condition wasn't found, otherwise update it.
|
||||
if ($data->sourcecmid === null && $data->gradeitemid === null) {
|
||||
$DB->delete_records('course_sections_availability', array('id' => $data->id));
|
||||
} else {
|
||||
$DB->update_record('course_sections_availability', $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1340,7 +1350,6 @@ class restore_course_structure_step extends restore_structure_step {
|
||||
|
||||
// Add course related files, without itemid to match
|
||||
$this->add_related_files('course', 'summary', null);
|
||||
$this->add_related_files('course', 'legacy', null);
|
||||
|
||||
// Deal with legacy allowed modules.
|
||||
if ($this->legacyrestrictmodules) {
|
||||
@@ -1367,6 +1376,29 @@ class restore_course_structure_step extends restore_structure_step {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Execution step that will migrate legacy files if present.
|
||||
*/
|
||||
class restore_course_legacy_files_step extends restore_execution_step {
|
||||
public function define_execution() {
|
||||
global $DB;
|
||||
|
||||
// Do a check for legacy files and skip if there are none.
|
||||
$sql = 'SELECT count(*)
|
||||
FROM {backup_files_temp}
|
||||
WHERE backupid = ?
|
||||
AND contextid = ?
|
||||
AND component = ?
|
||||
AND filearea = ?';
|
||||
$params = array($this->get_restoreid(), $this->task->get_old_contextid(), 'course', 'legacy');
|
||||
|
||||
if ($DB->count_records_sql($sql, $params)) {
|
||||
$DB->set_field('course', 'legacyfiles', 2, array('id' => $this->get_courseid()));
|
||||
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'course',
|
||||
'legacy', $this->task->get_old_contextid(), $this->task->get_userid());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Structure step that will read the roles.xml file (at course/activity/block levels)
|
||||
@@ -2843,10 +2875,13 @@ class restore_create_categories_and_questions extends restore_structure_step {
|
||||
$hint = new restore_path_element('question_hint',
|
||||
'/question_categories/question_category/questions/question/question_hints/question_hint');
|
||||
|
||||
$tag = new restore_path_element('tag',
|
||||
'/question_categories/question_category/questions/question/tags/tag');
|
||||
|
||||
// Apply for 'qtype' plugins optional paths at question level
|
||||
$this->add_plugin_structure('qtype', $question);
|
||||
|
||||
return array($category, $question, $hint);
|
||||
return array($category, $question, $hint, $tag);
|
||||
}
|
||||
|
||||
protected function process_question_category($data) {
|
||||
@@ -2993,6 +3028,29 @@ class restore_create_categories_and_questions extends restore_structure_step {
|
||||
$this->set_mapping('question_hint', $oldid, $newitemid);
|
||||
}
|
||||
|
||||
protected function process_tag($data) {
|
||||
global $CFG, $DB;
|
||||
|
||||
$data = (object)$data;
|
||||
$newquestion = $this->get_new_parentid('question');
|
||||
|
||||
if (!empty($CFG->usetags)) { // if enabled in server
|
||||
// TODO: This is highly inneficient. Each time we add one tag
|
||||
// we fetch all the existing because tag_set() deletes them
|
||||
// so everything must be reinserted on each call
|
||||
$tags = array();
|
||||
$existingtags = tag_get_tags('question', $newquestion);
|
||||
// Re-add all the existitng tags
|
||||
foreach ($existingtags as $existingtag) {
|
||||
$tags[] = $existingtag->rawname;
|
||||
}
|
||||
// Add the one being restored
|
||||
$tags[] = $data->rawname;
|
||||
// Send all the tags back to the question
|
||||
tag_set('question', $newquestion, $tags);
|
||||
}
|
||||
}
|
||||
|
||||
protected function after_execute() {
|
||||
global $DB;
|
||||
|
||||
|
||||
@@ -822,7 +822,7 @@ abstract class restore_dbops {
|
||||
* @return array of result object
|
||||
*/
|
||||
public static function send_files_to_pool($basepath, $restoreid, $component, $filearea, $oldcontextid, $dfltuserid, $itemname = null, $olditemid = null, $forcenewcontextid = null, $skipparentitemidctxmatch = false) {
|
||||
global $DB;
|
||||
global $DB, $CFG;
|
||||
|
||||
$results = array();
|
||||
|
||||
@@ -917,6 +917,12 @@ abstract class restore_dbops {
|
||||
|
||||
// create the file in the filepool if it does not exist yet
|
||||
if (!$fs->file_exists($newcontextid, $component, $filearea, $rec->newitemid, $file->filepath, $file->filename)) {
|
||||
|
||||
// If no license found, use default.
|
||||
if ($file->license == null){
|
||||
$file->license = $CFG->sitedefaultlicense;
|
||||
}
|
||||
|
||||
$file_record = array(
|
||||
'contextid' => $newcontextid,
|
||||
'component' => $component,
|
||||
|
||||
@@ -521,6 +521,15 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
$url = $component->get_url();
|
||||
|
||||
$output = html_writer::start_tag('div', array('class' => 'restore-course-search'));
|
||||
|
||||
$countstr = '';
|
||||
if ($component->has_more_results()) {
|
||||
$countstr = get_string('morecoursesearchresults', 'backup', $component->get_count());
|
||||
} else {
|
||||
$countstr = get_string('totalcoursesearchresults', 'backup', $component->get_count());
|
||||
}
|
||||
|
||||
$output .= html_writer::tag('div', $countstr, array('class'=>'rcs-totalresults'));
|
||||
$output .= html_writer::start_tag('div', array('class' => 'rcs-results'));
|
||||
|
||||
$table = new html_table();
|
||||
@@ -590,8 +599,14 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
return $output;
|
||||
}
|
||||
|
||||
$output .= html_writer::tag('div', get_string('totalcoursesearchresults', 'backup', $component->get_count()), array('class'=>'ics-totalresults'));
|
||||
$countstr = '';
|
||||
if ($component->has_more_results()) {
|
||||
$countstr = get_string('morecoursesearchresults', 'backup', $component->get_count());
|
||||
} else {
|
||||
$countstr = get_string('totalcoursesearchresults', 'backup', $component->get_count());
|
||||
}
|
||||
|
||||
$output .= html_writer::tag('div', $countstr, array('class'=>'ics-totalresults'));
|
||||
$output .= html_writer::start_tag('div', array('class' => 'ics-results'));
|
||||
|
||||
$table = new html_table();
|
||||
@@ -610,6 +625,14 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
);
|
||||
$table->data[] = $row;
|
||||
}
|
||||
if ($component->has_more_results()) {
|
||||
$cell = new html_table_cell(get_string('moreresults', 'backup'));
|
||||
$cell->colspan = 3;
|
||||
$cell->attributes['class'] = 'notifyproblem';
|
||||
$row = new html_table_row(array($cell));
|
||||
$row->attributes['class'] = 'rcs-course';
|
||||
$table->data[] = $row;
|
||||
}
|
||||
$output .= html_writer::table($table);
|
||||
$output .= html_writer::end_tag('div');
|
||||
|
||||
|
||||
@@ -65,6 +65,11 @@ abstract class restore_search_base implements renderable {
|
||||
* @var array
|
||||
*/
|
||||
private $requiredcapabilities = array();
|
||||
/**
|
||||
* Indicates if we have more than maxresults found.
|
||||
* @var boolean
|
||||
*/
|
||||
private $hasmoreresults = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -177,7 +182,7 @@ abstract class restore_search_base implements renderable {
|
||||
foreach ($this->requiredcapabilities as $cap) {
|
||||
$requiredcaps[] = $cap['capability'];
|
||||
}
|
||||
// Iterate while we have records and haven't reached MAXRESULTS
|
||||
// Iterate while we have records and haven't reached $this->maxresults.
|
||||
while ($totalcourses > $offs and $this->totalcount < self::$MAXRESULTS) {
|
||||
$resultset = $DB->get_records_sql($sql, $params, $offs, $blocksz);
|
||||
foreach ($resultset as $result) {
|
||||
@@ -188,11 +193,14 @@ abstract class restore_search_base implements renderable {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$this->results[$result->id] = $result;
|
||||
$this->totalcount++;
|
||||
if ($this->totalcount >= self::$MAXRESULTS) {
|
||||
// Check if we are over the limit.
|
||||
if ($this->totalcount+1 > self::$MAXRESULTS) {
|
||||
$this->hasmoreresults = true;
|
||||
break;
|
||||
}
|
||||
// If not, then continue.
|
||||
$this->totalcount++;
|
||||
$this->results[$result->id] = $result;
|
||||
}
|
||||
$offs += $blocksz;
|
||||
}
|
||||
@@ -201,7 +209,10 @@ abstract class restore_search_base implements renderable {
|
||||
}
|
||||
|
||||
final public function has_more_results() {
|
||||
return $this->get_count() >= self::$MAXRESULTS;
|
||||
if ($this->results === null) {
|
||||
$this->search();
|
||||
}
|
||||
return $this->hasmoreresults;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -216,9 +216,9 @@ if (empty($completions)) {
|
||||
echo '(<i>';
|
||||
|
||||
if ($agg == COMPLETION_AGGREGATION_ALL) {
|
||||
echo strtolower(get_string('aggregateall', 'completion'));
|
||||
echo strtolower(get_string('all', 'completion'));
|
||||
} else {
|
||||
echo strtolower(get_string('aggregateany', 'completion'));
|
||||
echo strtolower(get_string('any', 'completion'));
|
||||
}
|
||||
|
||||
echo '</i> '.strtolower(get_string('required')).')';
|
||||
|
||||
+1
-7
@@ -183,13 +183,7 @@ if (!empty($userid)) {
|
||||
print_error('donothaveblog', 'blog');
|
||||
}
|
||||
} else {
|
||||
$personalcontext = get_context_instance(CONTEXT_USER, $userid);
|
||||
|
||||
if (!has_capability('moodle/blog:view', $sitecontext) && !has_capability('moodle/user:readuserblogs', $personalcontext)) {
|
||||
print_error('cannotviewuserblog', 'blog');
|
||||
}
|
||||
|
||||
if (!blog_user_can_view_user_entry($userid)) {
|
||||
if (!has_capability('moodle/blog:view', $sitecontext) || !blog_user_can_view_user_entry($userid)) {
|
||||
print_error('cannotviewcourseblog', 'blog');
|
||||
}
|
||||
|
||||
|
||||
+38
-15
@@ -65,35 +65,36 @@ function blog_user_can_view_user_entry($targetuserid, $blogentry=null) {
|
||||
global $CFG, $USER, $DB;
|
||||
|
||||
if (empty($CFG->bloglevel)) {
|
||||
return false; // blog system disabled
|
||||
return false; // Blog system disabled.
|
||||
}
|
||||
|
||||
if (isloggedin() && $USER->id == $targetuserid) {
|
||||
return true; // can view own entries in any case
|
||||
return true; // Can view own entries in any case.
|
||||
}
|
||||
|
||||
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
if (has_capability('moodle/blog:manageentries', $sitecontext)) {
|
||||
return true; // can manage all entries
|
||||
return true; // Can manage all entries.
|
||||
}
|
||||
|
||||
// coming for 1 entry, make sure it's not a draft
|
||||
// If blog is in draft state, then make sure user have proper capability.
|
||||
if ($blogentry && $blogentry->publishstate == 'draft' && !has_capability('moodle/blog:viewdrafts', $sitecontext)) {
|
||||
return false; // can not view draft of others
|
||||
return false; // Can not view draft of others.
|
||||
}
|
||||
|
||||
// coming for 0 entry, make sure user is logged in, if not a public blog
|
||||
// If blog entry is not public, make sure user is logged in.
|
||||
if ($blogentry && $blogentry->publishstate != 'public' && !isloggedin()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If blogentry is not passed or all above checks pass, then check capability based on system config.
|
||||
switch ($CFG->bloglevel) {
|
||||
case BLOG_GLOBAL_LEVEL:
|
||||
return true;
|
||||
break;
|
||||
|
||||
case BLOG_SITE_LEVEL:
|
||||
if (isloggedin()) { // not logged in viewers forbidden
|
||||
if (isloggedin()) { // Not logged in viewers forbidden.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -101,6 +102,7 @@ function blog_user_can_view_user_entry($targetuserid, $blogentry=null) {
|
||||
|
||||
case BLOG_USER_LEVEL:
|
||||
default:
|
||||
// If user is viewing other user blog, then user should have user:readuserblogs capability.
|
||||
$personalcontext = get_context_instance(CONTEXT_USER, $targetuserid);
|
||||
return has_capability('moodle/user:readuserblogs', $personalcontext);
|
||||
break;
|
||||
@@ -1001,6 +1003,8 @@ function blog_get_associated_count($courseid, $cmid=null) {
|
||||
* may have switch to turn on/off comments option, this callback will
|
||||
* affect UI display, not like pluginname_comment_validate only throw
|
||||
* exceptions.
|
||||
* blog_comment_validate will be called before viewing/adding/deleting
|
||||
* comment, so don't repeat checks.
|
||||
* Capability check has been done in comment->check_permissions(), we
|
||||
* don't need to do it again here.
|
||||
*
|
||||
@@ -1017,7 +1021,17 @@ function blog_get_associated_count($courseid, $cmid=null) {
|
||||
* @return array
|
||||
*/
|
||||
function blog_comment_permissions($comment_param) {
|
||||
return array('post'=>true, 'view'=>true);
|
||||
global $DB;
|
||||
|
||||
// If blog is public and current usre is guest, then don't let him post comments.
|
||||
$blogentry = $DB->get_record('post', array('id' => $comment_param->itemid), 'publishstate', MUST_EXIST);
|
||||
|
||||
if ($blogentry->publishstate != 'public') {
|
||||
if (!isloggedin() || isguestuser()) {
|
||||
return array('post' => false, 'view' => true);
|
||||
}
|
||||
}
|
||||
return array('post' => true, 'view' => true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1036,16 +1050,21 @@ function blog_comment_permissions($comment_param) {
|
||||
* @return boolean
|
||||
*/
|
||||
function blog_comment_validate($comment_param) {
|
||||
global $DB;
|
||||
// validate comment itemid
|
||||
if (!$entry = $DB->get_record('post', array('id'=>$comment_param->itemid))) {
|
||||
throw new comment_exception('invalidcommentitemid');
|
||||
global $CFG, $DB, $USER;
|
||||
|
||||
// Check if blogs are enabled user can comment.
|
||||
if (empty($CFG->bloglevel) || empty($CFG->blogusecomments)) {
|
||||
throw new comment_exception('nopermissiontocomment');
|
||||
}
|
||||
// validate comment area
|
||||
|
||||
// Validate comment area.
|
||||
if ($comment_param->commentarea != 'format_blog') {
|
||||
throw new comment_exception('invalidcommentarea');
|
||||
}
|
||||
// validation for comment deletion
|
||||
|
||||
$blogentry = $DB->get_record('post', array('id' => $comment_param->itemid), '*', MUST_EXIST);
|
||||
|
||||
// Validation for comment deletion.
|
||||
if (!empty($comment_param->commentid)) {
|
||||
if ($record = $DB->get_record('comments', array('id'=>$comment_param->commentid))) {
|
||||
if ($record->commentarea != 'format_blog') {
|
||||
@@ -1061,7 +1080,11 @@ function blog_comment_validate($comment_param) {
|
||||
throw new comment_exception('invalidcommentid');
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
// Validate if user has blog view permission.
|
||||
$sitecontext = context_system::instance();
|
||||
return has_capability('moodle/blog:view', $sitecontext) &&
|
||||
blog_user_can_view_user_entry($blogentry->userid, $blogentry);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -520,7 +520,7 @@ class comment {
|
||||
$c->format = $u->cformat;
|
||||
$c->timecreated = $u->ctimecreated;
|
||||
$url = new moodle_url('/user/view.php', array('id'=>$u->id, 'course'=>$this->courseid));
|
||||
$c->profileurl = $url->out(false);
|
||||
$c->profileurl = $url->out(true);
|
||||
$c->fullname = fullname($u);
|
||||
$c->time = userdate($c->timecreated, get_string('strftimerecent', 'langconfig'));
|
||||
$c->content = format_text($c->content, $c->format, $formatoptions);
|
||||
|
||||
@@ -61,6 +61,12 @@ $context = $PAGE->context;
|
||||
// And the object has been loaded for us no need for another DB call
|
||||
$category = $PAGE->category;
|
||||
|
||||
// This needs to match caps checked in can_edit_in_category below.
|
||||
$PAGE->set_other_editing_capability(array(
|
||||
'moodle/category:manage',
|
||||
'moodle/course:create'
|
||||
));
|
||||
|
||||
$canedit = can_edit_in_category($category->id);
|
||||
if ($canedit) {
|
||||
if ($categoryedit !== -1) {
|
||||
|
||||
@@ -51,7 +51,7 @@ function dndupload_add_to_course($course, $modnames) {
|
||||
// Add the javascript to the page.
|
||||
$jsmodule = array(
|
||||
'name' => 'coursedndupload',
|
||||
'fullpath' => new moodle_url('/course/dndupload.js'),
|
||||
'fullpath' => '/course/dndupload.js',
|
||||
'strings' => array(
|
||||
array('addfilehere', 'moodle'),
|
||||
array('dndworkingfiletextlink', 'moodle'),
|
||||
|
||||
+56
-53
@@ -108,6 +108,7 @@ class core_course_external extends external_api {
|
||||
$sections = get_all_sections($course->id);
|
||||
|
||||
//for each sections (first displayed to last displayed)
|
||||
$modinfosections = $modinfo->get_sections();
|
||||
foreach ($sections as $key => $section) {
|
||||
|
||||
$showsection = (has_capability('moodle/course:viewhiddensections', $context) or $section->visible or !$course->hiddensections);
|
||||
@@ -126,62 +127,64 @@ class core_course_external extends external_api {
|
||||
$sectioncontents = array();
|
||||
|
||||
//for each module of the section
|
||||
foreach ($modinfo->sections[$section->section] as $cmid) { //matching /course/lib.php:print_section() logic
|
||||
$cm = $modinfo->cms[$cmid];
|
||||
if (!empty($modinfosections[$section->section])) {
|
||||
foreach ($modinfosections[$section->section] as $cmid) {
|
||||
$cm = $modinfo->cms[$cmid];
|
||||
|
||||
// stop here if the module is not visible to the user
|
||||
if (!$cm->uservisible) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$module = array();
|
||||
|
||||
//common info (for people being able to see the module or availability dates)
|
||||
$module['id'] = $cm->id;
|
||||
$module['name'] = format_string($cm->name, true);
|
||||
$module['modname'] = $cm->modname;
|
||||
$module['modplural'] = $cm->modplural;
|
||||
$module['modicon'] = $cm->get_icon_url()->out(false);
|
||||
$module['indent'] = $cm->indent;
|
||||
|
||||
$modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
if (!empty($cm->showdescription)) {
|
||||
$module['description'] = $cm->get_content();
|
||||
}
|
||||
|
||||
//url of the module
|
||||
$url = $cm->get_url();
|
||||
if ($url) { //labels don't have url
|
||||
$module['url'] = $cm->get_url()->out();
|
||||
}
|
||||
|
||||
$canviewhidden = has_capability('moodle/course:viewhiddenactivities',
|
||||
get_context_instance(CONTEXT_MODULE, $cm->id));
|
||||
//user that can view hidden module should know about the visibility
|
||||
$module['visible'] = $cm->visible;
|
||||
|
||||
//availability date (also send to user who can see hidden module when the showavailabilyt is ON)
|
||||
if ($canupdatecourse or ($CFG->enableavailability && $canviewhidden && $cm->showavailability)) {
|
||||
$module['availablefrom'] = $cm->availablefrom;
|
||||
$module['availableuntil'] = $cm->availableuntil;
|
||||
}
|
||||
|
||||
$baseurl = 'webservice/pluginfile.php';
|
||||
|
||||
//call $modulename_export_contents
|
||||
//(each module callback take care about checking the capabilities)
|
||||
require_once($CFG->dirroot . '/mod/' . $cm->modname . '/lib.php');
|
||||
$getcontentfunction = $cm->modname.'_export_contents';
|
||||
if (function_exists($getcontentfunction)) {
|
||||
if ($contents = $getcontentfunction($cm, $baseurl)) {
|
||||
$module['contents'] = $contents;
|
||||
// stop here if the module is not visible to the user
|
||||
if (!$cm->uservisible) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$module = array();
|
||||
|
||||
//common info (for people being able to see the module or availability dates)
|
||||
$module['id'] = $cm->id;
|
||||
$module['name'] = format_string($cm->name, true);
|
||||
$module['modname'] = $cm->modname;
|
||||
$module['modplural'] = $cm->modplural;
|
||||
$module['modicon'] = $cm->get_icon_url()->out(false);
|
||||
$module['indent'] = $cm->indent;
|
||||
|
||||
$modcontext = context_module::instance($cm->id);
|
||||
|
||||
if (!empty($cm->showdescription)) {
|
||||
$module['description'] = $cm->get_content();
|
||||
}
|
||||
|
||||
//url of the module
|
||||
$url = $cm->get_url();
|
||||
if ($url) { //labels don't have url
|
||||
$module['url'] = $cm->get_url()->out();
|
||||
}
|
||||
|
||||
$canviewhidden = has_capability('moodle/course:viewhiddenactivities',
|
||||
context_module::instance($cm->id));
|
||||
//user that can view hidden module should know about the visibility
|
||||
$module['visible'] = $cm->visible;
|
||||
|
||||
//availability date (also send to user who can see hidden module when the showavailabilyt is ON)
|
||||
if ($canupdatecourse or ($CFG->enableavailability && $canviewhidden && $cm->showavailability)) {
|
||||
$module['availablefrom'] = $cm->availablefrom;
|
||||
$module['availableuntil'] = $cm->availableuntil;
|
||||
}
|
||||
|
||||
$baseurl = 'webservice/pluginfile.php';
|
||||
|
||||
//call $modulename_export_contents
|
||||
//(each module callback take care about checking the capabilities)
|
||||
require_once($CFG->dirroot . '/mod/' . $cm->modname . '/lib.php');
|
||||
$getcontentfunction = $cm->modname.'_export_contents';
|
||||
if (function_exists($getcontentfunction)) {
|
||||
if ($contents = $getcontentfunction($cm, $baseurl)) {
|
||||
$module['contents'] = $contents;
|
||||
}
|
||||
}
|
||||
|
||||
//assign result to $sectioncontents
|
||||
$sectioncontents[] = $module;
|
||||
|
||||
}
|
||||
|
||||
//assign result to $sectioncontents
|
||||
$sectioncontents[] = $module;
|
||||
|
||||
}
|
||||
$sectionvalues['modules'] = $sectioncontents;
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
||||
* @param array $mods course modules indexed by id (from get_all_mods)
|
||||
* @return string HTML to output.
|
||||
*/
|
||||
private function section_activity_summary($section, $course, $mods) {
|
||||
protected function section_activity_summary($section, $course, $mods) {
|
||||
if (empty($section->sequence)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -44,6 +44,12 @@ $PAGE->set_url('/course/index.php');
|
||||
$PAGE->set_context($systemcontext);
|
||||
$PAGE->set_pagelayout('admin');
|
||||
|
||||
// This needs to match caps checked in can_edit_in_category below.
|
||||
$PAGE->set_other_editing_capability(array(
|
||||
'moodle/category:manage',
|
||||
'moodle/course:create'
|
||||
));
|
||||
|
||||
if (can_edit_in_category()) {
|
||||
if ($categoryedit !== -1) {
|
||||
$USER->editing = $categoryedit;
|
||||
|
||||
+33
-20
@@ -857,7 +857,9 @@ function print_overview($courses, array $remote_courses=array()) {
|
||||
foreach ($courses as $course) {
|
||||
$fullname = format_string($course->fullname, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id)));
|
||||
echo $OUTPUT->box_start('coursebox');
|
||||
$attributes = array('title' => s($fullname));
|
||||
// decode &'s. format_string above will have encoded them and html_writer will encode again when it processed the title
|
||||
// attribute leading to double encoding.
|
||||
$attributes = array('title' => str_replace('&', '&', $fullname));
|
||||
if (empty($course->visible)) {
|
||||
$attributes['class'] = 'dimmed';
|
||||
}
|
||||
@@ -1727,13 +1729,15 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
||||
'type' => 'hidden', 'name' => 'completionstate',
|
||||
'value' => $newstate));
|
||||
echo html_writer::empty_tag('input', array(
|
||||
'type' => 'image', 'src' => $imgsrc, 'alt' => $imgalt, 'title' => $imgtitle));
|
||||
'type' => 'image', 'src' => $imgsrc, 'alt' => $imgalt, 'title' => $imgtitle,
|
||||
'aria-live' => 'polite'));
|
||||
echo html_writer::end_tag('div');
|
||||
echo html_writer::end_tag('form');
|
||||
} else {
|
||||
// In auto mode, or when editing, the icon is just an image
|
||||
echo "<span class='autocompletion'>";
|
||||
echo "<img src='$imgsrc' alt='$imgalt' title='$imgalt' /></span>";
|
||||
// In auto mode, or when editing, the icon is just an image.
|
||||
echo html_writer::tag('span', html_writer::empty_tag('img', array(
|
||||
'src' => $imgsrc, 'alt' => $imgalt, 'title' => $imgalt)),
|
||||
array('class' => 'autocompletion'));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2916,16 +2920,23 @@ function set_coursemodule_visible($id, $visible, $prevstateoverrides=false) {
|
||||
}
|
||||
}
|
||||
|
||||
$cminfo = new stdClass();
|
||||
$cminfo->id = $id;
|
||||
$cminfo->visible = $visible;
|
||||
|
||||
if ($prevstateoverrides) {
|
||||
if ($visible == '0') {
|
||||
// Remember the current visible state so we can toggle this back.
|
||||
$DB->set_field('course_modules', 'visibleold', $cm->visible, array('id'=>$id));
|
||||
// If we making whole section visiblility change..
|
||||
if ($visible == 0) {
|
||||
// Retain previous visibility state.
|
||||
$cminfo->visibleold = $cm->visible;
|
||||
} else {
|
||||
// Get the previous saved visible states.
|
||||
return $DB->set_field('course_modules', 'visible', $cm->visibleold, array('id'=>$id));
|
||||
// Restore previous visibility state.
|
||||
$cminfo->visible = $cm->visibleold;
|
||||
}
|
||||
} else {
|
||||
$cminfo->visibleold = $visible;
|
||||
}
|
||||
return $DB->set_field("course_modules", "visible", $visible, array("id"=>$id));
|
||||
return $DB->update_record('course_modules', $cminfo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3166,15 +3177,17 @@ function moveto_module($mod, $section, $beforemod=NULL) {
|
||||
/// Update module itself if necessary
|
||||
|
||||
// If moving to a hidden section then hide module.
|
||||
if (!$section->visible && $mod->visible) {
|
||||
// Set this in the object because it is sent as a response to ajax calls.
|
||||
set_coursemodule_visible($mod->id, 0, true);
|
||||
$mod->visible = 0;
|
||||
}
|
||||
if ($section->visible && !$mod->visible) {
|
||||
set_coursemodule_visible($mod->id, 1, true);
|
||||
// Set this in the object because it is sent as a response to ajax calls.
|
||||
$mod->visible = $mod->visibleold;
|
||||
if ($mod->section != $section->id) {
|
||||
if (!$section->visible && $mod->visible) {
|
||||
// Set this in the object because it is sent as a response to ajax calls.
|
||||
set_coursemodule_visible($mod->id, 0, true);
|
||||
$mod->visible = 0;
|
||||
}
|
||||
if ($section->visible && !$mod->visible) {
|
||||
set_coursemodule_visible($mod->id, 1, true);
|
||||
// Set this in the object because it is sent as a response to ajax calls.
|
||||
$mod->visible = $mod->visibleold;
|
||||
}
|
||||
}
|
||||
|
||||
/// Add the module into the new section
|
||||
|
||||
+10
-7
@@ -4,13 +4,22 @@
|
||||
require_once('../config.php');
|
||||
require_once('lib.php');
|
||||
|
||||
$id = optional_param('id', SITEID, PARAM_INT); // course id
|
||||
$id = optional_param('id', SITEID, PARAM_INT); // course id
|
||||
$redirect = optional_param('redirect', 0, PARAM_BOOL);
|
||||
|
||||
$url = new moodle_url('/course/loginas.php', array('id'=>$id));
|
||||
$PAGE->set_url($url);
|
||||
|
||||
/// Reset user back to their real self if needed, for security reasons you need to log out and log in again
|
||||
if (session_is_loggedinas()) {
|
||||
require_sesskey();
|
||||
require_logout();
|
||||
|
||||
// We can not set wanted URL here because the session is closed.
|
||||
redirect(new moodle_url($url, array('redirect'=>1)));
|
||||
}
|
||||
|
||||
if ($redirect) {
|
||||
if ($id and $id != SITEID) {
|
||||
$SESSION->wantsurl = "$CFG->wwwroot/course/view.php?id=".$id;
|
||||
} else {
|
||||
@@ -25,12 +34,6 @@ if (session_is_loggedinas()) {
|
||||
|
||||
$userid = required_param('user', PARAM_INT); // login as this user
|
||||
|
||||
$url = new moodle_url('/course/loginas.php', array('user'=>$userid, 'sesskey'=>sesskey()));
|
||||
if ($id !== SITEID) {
|
||||
$url->param('id', $id);
|
||||
}
|
||||
$PAGE->set_url($url);
|
||||
|
||||
require_sesskey();
|
||||
$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
|
||||
|
||||
|
||||
+2
-2
@@ -335,7 +335,7 @@ if ($mform->is_cancelled()) {
|
||||
$cm->groupmembersonly = $fromform->groupmembersonly;
|
||||
|
||||
$completion = new completion_info($course);
|
||||
if ($completion->is_enabled()) {
|
||||
if ($completion->is_enabled() && !empty($fromform->completionunlocked)) {
|
||||
// Update completion settings
|
||||
$cm->completion = $fromform->completion;
|
||||
$cm->completiongradeitemnumber = $fromform->completiongradeitemnumber;
|
||||
@@ -412,6 +412,7 @@ if ($mform->is_cancelled()) {
|
||||
$newcm->module = $fromform->module;
|
||||
$newcm->instance = 0; // not known yet, will be updated later (this is similar to restore code)
|
||||
$newcm->visible = $fromform->visible;
|
||||
$newcm->visibleold = $fromform->visible;
|
||||
$newcm->groupmode = $fromform->groupmode;
|
||||
$newcm->groupingid = $fromform->groupingid;
|
||||
$newcm->groupmembersonly = $fromform->groupmembersonly;
|
||||
@@ -481,7 +482,6 @@ if ($mform->is_cancelled()) {
|
||||
// make sure visibility is set correctly (in particular in calendar)
|
||||
// note: allow them to set it even without moodle/course:activityvisibility
|
||||
set_coursemodule_visible($fromform->coursemodule, $fromform->visible);
|
||||
$DB->set_field('course_modules', 'visibleold', 1, array('id' => $fromform->coursemodule));
|
||||
|
||||
if (isset($fromform->cmidnumber)) { //label
|
||||
// set cm idnumber - uniqueness is already verified by form validation
|
||||
|
||||
@@ -303,8 +303,11 @@ abstract class moodleform_mod extends moodleform {
|
||||
}
|
||||
|
||||
// Completion: Don't let them choose automatic completion without turning
|
||||
// on some conditions
|
||||
if (array_key_exists('completion', $data) && $data['completion']==COMPLETION_TRACKING_AUTOMATIC) {
|
||||
// on some conditions. Ignore this check when completion settings are
|
||||
// locked, as the options are then disabled.
|
||||
if (array_key_exists('completion', $data) &&
|
||||
$data['completion'] == COMPLETION_TRACKING_AUTOMATIC &&
|
||||
!empty($data['completionunlocked'])) {
|
||||
if (empty($data['completionview']) && empty($data['completionusegrade']) &&
|
||||
!$this->completion_rule_enabled($data)) {
|
||||
$errors['completion'] = get_string('badautocompletion', 'completion');
|
||||
|
||||
+23
-6
@@ -30,6 +30,7 @@ require_once('recent_form.php');
|
||||
$id = required_param('id', PARAM_INT);
|
||||
|
||||
$PAGE->set_url('/course/recent.php', array('id'=>$id));
|
||||
$PAGE->set_pagelayout('report');
|
||||
|
||||
if (!$course = $DB->get_record('course', array('id'=>$id))) {
|
||||
print_error("That's an invalid course id");
|
||||
@@ -280,21 +281,37 @@ echo $OUTPUT->footer();
|
||||
|
||||
function compare_activities_by_time_desc($a, $b) {
|
||||
// make sure the activities actually have a timestamp property
|
||||
if ((!array_key_exists('timestamp', $a)) or (!array_key_exists('timestamp', $b))) {
|
||||
return 0;
|
||||
}
|
||||
if ($a->timestamp == $b->timestamp)
|
||||
if ((!array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
|
||||
return 0;
|
||||
}
|
||||
// We treat instances without timestamp as if they have a timestamp of 0.
|
||||
if ((!array_key_exists('timestamp', $a)) && (array_key_exists('timestamp', $b))) {
|
||||
return 1;
|
||||
}
|
||||
if ((array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
|
||||
return -1;
|
||||
}
|
||||
if ($a->timestamp == $b->timestamp) {
|
||||
return 0;
|
||||
}
|
||||
return ($a->timestamp > $b->timestamp) ? -1 : 1;
|
||||
}
|
||||
|
||||
function compare_activities_by_time_asc($a, $b) {
|
||||
// make sure the activities actually have a timestamp property
|
||||
if ((!array_key_exists('timestamp', $a)) or (!array_key_exists('timestamp', $b))) {
|
||||
if ((!array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
|
||||
return 0;
|
||||
}
|
||||
if ($a->timestamp == $b->timestamp)
|
||||
// We treat instances without timestamp as if they have a timestamp of 0.
|
||||
if ((!array_key_exists('timestamp', $a)) && (array_key_exists('timestamp', $b))) {
|
||||
return -1;
|
||||
}
|
||||
if ((array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
|
||||
return 1;
|
||||
}
|
||||
if ($a->timestamp == $b->timestamp) {
|
||||
return 0;
|
||||
}
|
||||
return ($a->timestamp < $b->timestamp) ? -1 : 1;
|
||||
}
|
||||
|
||||
|
||||
+2
-6
@@ -191,18 +191,14 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
$formcontent .= html_writer::start_tag('div', array('class' => 'alloptions'));
|
||||
|
||||
// Activities
|
||||
$activities = array_filter($modules, function($mod) {
|
||||
return ($mod->archetype !== MOD_ARCHETYPE_RESOURCE && $mod->archetype !== MOD_ARCHETYPE_SYSTEM);
|
||||
});
|
||||
$activities = array_filter($modules, create_function('$mod', 'return ($mod->archetype !== MOD_ARCHETYPE_RESOURCE && $mod->archetype !== MOD_ARCHETYPE_SYSTEM);'));
|
||||
if (count($activities)) {
|
||||
$formcontent .= $this->course_modchooser_title('activities');
|
||||
$formcontent .= $this->course_modchooser_module_types($activities);
|
||||
}
|
||||
|
||||
// Resources
|
||||
$resources = array_filter($modules, function($mod) {
|
||||
return ($mod->archetype === MOD_ARCHETYPE_RESOURCE);
|
||||
});
|
||||
$resources = array_filter($modules, create_function('$mod', 'return ($mod->archetype === MOD_ARCHETYPE_RESOURCE);'));
|
||||
if (count($resources)) {
|
||||
$formcontent .= $this->course_modchooser_title('resources');
|
||||
$formcontent .= $this->course_modchooser_module_types($resources);
|
||||
|
||||
@@ -290,4 +290,265 @@ class courselib_testcase extends advanced_testcase {
|
||||
// Check that the section number has been changed in the cm
|
||||
$this->assertEquals($newsection->id, $cm->section);
|
||||
}
|
||||
|
||||
public function test_module_visibility() {
|
||||
$this->setAdminUser();
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Create course and modules.
|
||||
$course = $this->getDataGenerator()->create_course(array('numsections' => 5));
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id));
|
||||
$page = $this->getDataGenerator()->create_module('page', array('duedate' => time(), 'course' => $course->id));
|
||||
$modules = compact('forum', 'page');
|
||||
|
||||
// Hiding the modules.
|
||||
foreach ($modules as $mod) {
|
||||
set_coursemodule_visible($mod->cmid, 0);
|
||||
$this->check_module_visibility($mod, 0, 0);
|
||||
}
|
||||
|
||||
// Showing the modules.
|
||||
foreach ($modules as $mod) {
|
||||
set_coursemodule_visible($mod->cmid, 1);
|
||||
$this->check_module_visibility($mod, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public function test_section_visibility() {
|
||||
$this->setAdminUser();
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Create course.
|
||||
$course = $this->getDataGenerator()->create_course(array('numsections' => 3), array('createsections' => true));
|
||||
|
||||
// Testing an empty section.
|
||||
$sectionnumber = 1;
|
||||
set_section_visible($course->id, $sectionnumber, 0);
|
||||
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
|
||||
$this->assertEquals($section_info->visible, 0);
|
||||
set_section_visible($course->id, $sectionnumber, 1);
|
||||
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
|
||||
$this->assertEquals($section_info->visible, 1);
|
||||
|
||||
// Testing a section with visible modules.
|
||||
$sectionnumber = 2;
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id),
|
||||
array('section' => $sectionnumber));
|
||||
$page= $this->getDataGenerator()->create_module('page', array('duedate' => time(),
|
||||
'course' => $course->id), array('section' => $sectionnumber));
|
||||
$modules = compact('forum', 'page');
|
||||
set_section_visible($course->id, $sectionnumber, 0);
|
||||
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
|
||||
$this->assertEquals($section_info->visible, 0);
|
||||
foreach ($modules as $mod) {
|
||||
$this->check_module_visibility($mod, 0, 1);
|
||||
}
|
||||
set_section_visible($course->id, $sectionnumber, 1);
|
||||
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
|
||||
$this->assertEquals($section_info->visible, 1);
|
||||
foreach ($modules as $mod) {
|
||||
$this->check_module_visibility($mod, 1, 1);
|
||||
}
|
||||
|
||||
// Testing a section with hidden modules, which should stay hidden.
|
||||
$sectionnumber = 3;
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id),
|
||||
array('section' => $sectionnumber));
|
||||
$page = $this->getDataGenerator()->create_module('page', array('duedate' => time(),
|
||||
'course' => $course->id), array('section' => $sectionnumber));
|
||||
$modules = compact('forum', 'page');
|
||||
foreach ($modules as $mod) {
|
||||
set_coursemodule_visible($mod->cmid, 0);
|
||||
$this->check_module_visibility($mod, 0, 0);
|
||||
}
|
||||
set_section_visible($course->id, $sectionnumber, 0);
|
||||
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
|
||||
$this->assertEquals($section_info->visible, 0);
|
||||
foreach ($modules as $mod) {
|
||||
$this->check_module_visibility($mod, 0, 0);
|
||||
}
|
||||
set_section_visible($course->id, $sectionnumber, 1);
|
||||
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
|
||||
$this->assertEquals($section_info->visible, 1);
|
||||
foreach ($modules as $mod) {
|
||||
$this->check_module_visibility($mod, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to assert that a module has correctly been made visible, or hidden.
|
||||
*
|
||||
* @param stdClass $mod module information
|
||||
* @param int $visibility the current state of the module
|
||||
* @param int $visibleold the current state of the visibleold property
|
||||
* @return void
|
||||
*/
|
||||
public function check_module_visibility($mod, $visibility, $visibleold) {
|
||||
global $DB;
|
||||
|
||||
rebuild_course_cache($mod->course);
|
||||
$course = $DB->get_record('course', array('id' => $mod->course));
|
||||
$cm = get_fast_modinfo($course)->get_cm($mod->cmid);
|
||||
|
||||
$this->assertEquals($visibility, $cm->visible);
|
||||
$this->assertEquals($visibleold, $cm->visibleold);
|
||||
|
||||
// Check the module grade items.
|
||||
$grade_items = grade_item::fetch_all(array('itemtype' => 'mod', 'itemmodule' => $cm->modname,
|
||||
'iteminstance' => $cm->instance, 'courseid' => $cm->course));
|
||||
if ($grade_items) {
|
||||
foreach ($grade_items as $grade_item) {
|
||||
if ($visibility) {
|
||||
$this->assertFalse($grade_item->is_hidden(), "$cm->modname grade_item not visible");
|
||||
} else {
|
||||
$this->assertTrue($grade_item->is_hidden(), "$cm->modname grade_item not hidden");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check the events visibility.
|
||||
if ($events = $DB->get_records('event', array('instance' => $cm->instance, 'modulename' => $cm->modname))) {
|
||||
foreach ($events as $event) {
|
||||
$calevent = new calendar_event($event);
|
||||
$this->assertEquals($visibility, $calevent->visible, "$cm->modname calendar_event visibility");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests moving a module between hidden/visible sections and
|
||||
* verifies that the course/module visiblity seettings are
|
||||
* retained.
|
||||
*/
|
||||
public function test_moveto_module_between_hidden_sections() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
$course = $this->getDataGenerator()->create_course(array('numsections' => 4), array('createsections' => true));
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id));
|
||||
$page = $this->getDataGenerator()->create_module('page', array('course' => $course->id));
|
||||
$quiz= $this->getDataGenerator()->create_module('quiz', array('course' => $course->id));
|
||||
|
||||
// Set the page as hidden
|
||||
set_coursemodule_visible($page->cmid, 0);
|
||||
|
||||
// Set sections 3 as hidden.
|
||||
set_section_visible($course->id, 3, 0);
|
||||
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
|
||||
$hiddensection = $modinfo->get_section_info(3);
|
||||
// New section is definitely not visible:
|
||||
$this->assertEquals($hiddensection->visible, 0);
|
||||
|
||||
$forumcm = $modinfo->cms[$forum->cmid];
|
||||
$pagecm = $modinfo->cms[$page->cmid];
|
||||
|
||||
// Move the forum and the page to a hidden section.
|
||||
moveto_module($forumcm, $hiddensection);
|
||||
moveto_module($pagecm, $hiddensection);
|
||||
|
||||
// Reset modinfo cache.
|
||||
$reset = 'reset';
|
||||
get_fast_modinfo($reset);
|
||||
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
|
||||
// Verify that forum and page have been moved to the hidden section and quiz has not.
|
||||
$this->assertContains($forum->cmid, $modinfo->sections[3]);
|
||||
$this->assertContains($page->cmid, $modinfo->sections[3]);
|
||||
$this->assertNotContains($quiz->cmid, $modinfo->sections[3]);
|
||||
|
||||
// Verify that forum has been made invisible.
|
||||
$forumcm = $modinfo->cms[$forum->cmid];
|
||||
$this->assertEquals($forumcm->visible, 0);
|
||||
// Verify that old state has been retained.
|
||||
$this->assertEquals($forumcm->visibleold, 1);
|
||||
|
||||
// Verify that page has stayed invisible.
|
||||
$pagecm = $modinfo->cms[$page->cmid];
|
||||
$this->assertEquals($pagecm->visible, 0);
|
||||
// Verify that old state has been retained.
|
||||
$this->assertEquals($pagecm->visibleold, 0);
|
||||
|
||||
// Verify that quiz has been unaffected.
|
||||
$quizcm = $modinfo->cms[$quiz->cmid];
|
||||
$this->assertEquals($quizcm->visible, 1);
|
||||
|
||||
// Move forum and page back to visible section.
|
||||
$visiblesection = $modinfo->get_section_info(2);
|
||||
moveto_module($forumcm, $visiblesection);
|
||||
moveto_module($pagecm, $visiblesection);
|
||||
|
||||
// Reset modinfo cache.
|
||||
$reset = 'reset';
|
||||
get_fast_modinfo($reset);
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
|
||||
// Verify that forum has been made visible.
|
||||
$forumcm = $modinfo->cms[$forum->cmid];
|
||||
$this->assertEquals($forumcm->visible, 1);
|
||||
|
||||
// Verify that page has stayed invisible.
|
||||
$pagecm = $modinfo->cms[$page->cmid];
|
||||
$this->assertEquals($pagecm->visible, 0);
|
||||
|
||||
// Move the page in the same section (this is what mod duplicate does_
|
||||
moveto_module($pagecm, $visiblesection, $forumcm);
|
||||
|
||||
// Reset modinfo cache.
|
||||
$reset = 'reset';
|
||||
get_fast_modinfo($reset);
|
||||
|
||||
// Verify that the the page is still hidden
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
$pagecm = $modinfo->cms[$page->cmid];
|
||||
$this->assertEquals($pagecm->visible, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests moving a module around in the same section. moveto_module()
|
||||
* is called this way in modduplicate.
|
||||
*/
|
||||
public function test_moveto_module_in_same_section() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
$course = $this->getDataGenerator()->create_course(array('numsections' => 3), array('createsections' => true));
|
||||
$page = $this->getDataGenerator()->create_module('page', array('course' => $course->id));
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id));
|
||||
|
||||
// Simulate inconsistent visible/visibleold values (MDL-38713).
|
||||
$cm = $DB->get_record('course_modules', array('id' => $page->cmid), '*', MUST_EXIST);
|
||||
$cm->visible = 0;
|
||||
$cm->visibleold = 1;
|
||||
$DB->update_record('course_modules', $cm);
|
||||
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
$forumcm = $modinfo->cms[$forum->cmid];
|
||||
$pagecm = $modinfo->cms[$page->cmid];
|
||||
|
||||
// Verify that page is hidden.
|
||||
$this->assertEquals($pagecm->visible, 0);
|
||||
|
||||
// Verify section 0 is where all mods added.
|
||||
$section = $modinfo->get_section_info(0);
|
||||
$this->assertEquals($section->id, $forumcm->section);
|
||||
$this->assertEquals($section->id, $pagecm->section);
|
||||
|
||||
|
||||
// Move the forum and the page to a hidden section.
|
||||
moveto_module($pagecm, $section, $forumcm);
|
||||
|
||||
// Reset modinfo cache.
|
||||
$reset = 'reset';
|
||||
get_fast_modinfo($reset);
|
||||
|
||||
// Verify that the the page is still hidden
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
$pagecm = $modinfo->cms[$page->cmid];
|
||||
$this->assertEquals($pagecm->visible, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+4
-1
@@ -508,7 +508,9 @@ YUI.add('moodle-course-toolboxes', function(Y) {
|
||||
.setAttrs({
|
||||
'name' : 'title',
|
||||
'value' : titletext,
|
||||
'autocomplete' : 'off'
|
||||
'autocomplete' : 'off',
|
||||
'aria-describedby' : 'id_editinstructions',
|
||||
'maxLength' : '255'
|
||||
})
|
||||
.addClass('titleeditor');
|
||||
var editform = Y.Node.create('<form />')
|
||||
@@ -518,6 +520,7 @@ YUI.add('moodle-course-toolboxes', function(Y) {
|
||||
|
||||
var editinstructions = Y.Node.create('<span />')
|
||||
.addClass('editinstructions')
|
||||
.setAttrs({'id' : 'id_editinstructions'})
|
||||
.set('innerHTML', M.util.get_string('edittitleinstructions', 'moodle'));
|
||||
|
||||
// Clear the existing content and put the editor in
|
||||
|
||||
@@ -87,7 +87,7 @@ class core_enrol_external extends external_api {
|
||||
}
|
||||
|
||||
list($enrolledsqlselect, $enrolledparams) = get_enrolled_sql($context);
|
||||
$enrolledsql = "SELECT COUNT(*) FROM ($enrolledsqlselect) AS enrolleduserids";
|
||||
$enrolledsql = "SELECT COUNT('x') FROM ($enrolledsqlselect) enrolleduserids";
|
||||
$enrolledusercount = $DB->count_records_sql($enrolledsql, $enrolledparams);
|
||||
|
||||
$result[] = array('id'=>$course->id, 'shortname'=>$course->shortname, 'fullname'=>$course->fullname, 'idnumber'=>$course->idnumber,'visible'=>$course->visible, 'enrolledusercount'=>$enrolledusercount);
|
||||
|
||||
@@ -406,3 +406,13 @@ class grade_export_update_buffer {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify that there is a valid set of grades to export.
|
||||
* @param $courseid int The course being exported
|
||||
*/
|
||||
function export_verify_grades($courseid) {
|
||||
$regraderesult = grade_regrade_final_grades($courseid);
|
||||
if (is_array($regraderesult)) {
|
||||
throw new moodle_exception('gradecantregrade', 'error', '', implode(', ', array_unique($regraderesult)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ require_capability('moodle/grade:export', $context);
|
||||
require_capability('gradeexport/ods:view', $context);
|
||||
|
||||
print_grade_page_head($COURSE->id, 'export', 'ods', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_ods'));
|
||||
export_verify_grades($COURSE->id);
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeexport/ods:publish', $context);
|
||||
|
||||
@@ -34,6 +34,7 @@ require_capability('moodle/grade:export', $context);
|
||||
require_capability('gradeexport/txt:view', $context);
|
||||
|
||||
print_grade_page_head($COURSE->id, 'export', 'txt', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_txt'));
|
||||
export_verify_grades($COURSE->id);
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeexport/txt:publish', $context);
|
||||
|
||||
@@ -34,6 +34,7 @@ require_capability('moodle/grade:export', $context);
|
||||
require_capability('gradeexport/xls:view', $context);
|
||||
|
||||
print_grade_page_head($COURSE->id, 'export', 'xls', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_xls'));
|
||||
export_verify_grades($COURSE->id);
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeexport/xls:publish', $context);
|
||||
|
||||
@@ -34,6 +34,7 @@ require_capability('moodle/grade:export', $context);
|
||||
require_capability('gradeexport/xml:view', $context);
|
||||
|
||||
print_grade_page_head($COURSE->id, 'export', 'xml', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_xml'));
|
||||
export_verify_grades($COURSE->id);
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeexport/xml:publish', $context);
|
||||
|
||||
@@ -36,7 +36,7 @@ $string['criterionmovedown'] = 'Move down';
|
||||
$string['criterionmoveup'] = 'Move up';
|
||||
$string['definerubric'] = 'Define rubric';
|
||||
$string['description'] = 'Description';
|
||||
$string['enableremarks'] = 'Allow grader to add text remarks for each criteria';
|
||||
$string['enableremarks'] = 'Allow grader to add text remarks for each criterion';
|
||||
$string['err_mintwolevels'] = 'Each criterion must have at least two levels';
|
||||
$string['err_nocriteria'] = 'Rubric must contain at least one criterion';
|
||||
$string['err_nodefinition'] = 'Level definition can not be empty';
|
||||
|
||||
+4
-3
@@ -22,7 +22,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
require_once $CFG->libdir.'/gradelib.php';
|
||||
require_once($CFG->libdir . '/gradelib.php');
|
||||
require_once($CFG->dirroot . '/grade/export/lib.php');
|
||||
|
||||
/**
|
||||
* This class iterates over all users that are graded in a course.
|
||||
@@ -123,7 +124,7 @@ class graded_users_iterator {
|
||||
|
||||
$this->close();
|
||||
|
||||
grade_regrade_final_grades($this->course->id);
|
||||
export_verify_grades($this->course->id);
|
||||
$course_item = grade_item::fetch_course_item($this->course->id);
|
||||
if ($course_item->needsupdate) {
|
||||
// can not calculate all final grades - sorry
|
||||
@@ -2424,7 +2425,7 @@ abstract class grade_helper {
|
||||
return self::$managesetting;
|
||||
}
|
||||
$context = get_context_instance(CONTEXT_COURSE, $courseid);
|
||||
if (has_capability('moodle/course:update', $context)) {
|
||||
if (has_capability('moodle/grade:manage', $context)) {
|
||||
self::$managesetting = new grade_plugin_info('coursesettings', new moodle_url('/grade/edit/settings/index.php', array('id'=>$courseid)), get_string('course'));
|
||||
} else {
|
||||
self::$managesetting = false;
|
||||
|
||||
@@ -357,7 +357,12 @@ abstract class grade_report {
|
||||
// If we're dealing with multiple courses we need to know when we've moved on to a new course.
|
||||
static $previous_courseid = null;
|
||||
|
||||
if( $this->showtotalsifcontainhidden==GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN ) {
|
||||
if (!is_array($this->showtotalsifcontainhidden)) {
|
||||
debugging('showtotalsifcontainhidden should be an array', DEBUG_DEVELOPER);
|
||||
$this->showtotalsifcontainhidden = array($courseid => $this->showtotalsifcontainhidden);
|
||||
}
|
||||
|
||||
if ($this->showtotalsifcontainhidden[$courseid] == GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN) {
|
||||
return $finalgrade;
|
||||
}
|
||||
|
||||
@@ -395,7 +400,7 @@ abstract class grade_report {
|
||||
|
||||
//if the item definitely depends on a hidden item
|
||||
if (array_key_exists($course_item->id, $hiding_affected['altered'])) {
|
||||
if( !$this->showtotalsifcontainhidden ) {
|
||||
if( !$this->showtotalsifcontainhidden[$courseid] ) {
|
||||
//hide the grade
|
||||
$finalgrade = null;
|
||||
}
|
||||
@@ -405,7 +410,7 @@ abstract class grade_report {
|
||||
}
|
||||
} else if (!empty($hiding_affected['unknown'][$course_item->id])) {
|
||||
//not sure whether or not this item depends on a hidden item
|
||||
if( !$this->showtotalsifcontainhidden ) {
|
||||
if( !$this->showtotalsifcontainhidden[$courseid] ) {
|
||||
//hide the grade
|
||||
$finalgrade = null;
|
||||
}
|
||||
|
||||
@@ -71,8 +71,6 @@ class grade_report_overview extends grade_report {
|
||||
global $CFG, $COURSE, $DB;
|
||||
parent::__construct($COURSE->id, $gpr, $context);
|
||||
|
||||
$this->showtotalsifcontainhidden = grade_get_setting($this->courseid, 'report_overview_showtotalsifcontainhidden', $CFG->grade_report_overview_showtotalsifcontainhidden);
|
||||
|
||||
// Get the user (for full name).
|
||||
$this->user = $DB->get_record('user', array('id' => $userid));
|
||||
|
||||
@@ -81,12 +79,17 @@ class grade_report_overview extends grade_report {
|
||||
|
||||
$this->showrank = array();
|
||||
$this->showrank['any'] = false;
|
||||
|
||||
$this->showtotalsifcontainhidden = array();
|
||||
|
||||
if ($this->courses) {
|
||||
foreach ($this->courses as $course) {
|
||||
$this->showrank[$course->id] = grade_get_setting($course->id, 'report_overview_showrank', !empty($CFG->grade_report_overview_showrank));
|
||||
if ($this->showrank[$course->id]) {
|
||||
$this->showrank['any'] = true;
|
||||
}
|
||||
|
||||
$this->showtotalsifcontainhidden[$course->id] = grade_get_setting($course->id, 'report_overview_showtotalsifcontainhidden', $CFG->grade_report_overview_showtotalsifcontainhidden);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
This files describes API changes in /grade/report/*,
|
||||
information provided here is intended especially for developers.
|
||||
|
||||
|
||||
=== 2.3.5, 2.4.2 ===
|
||||
* class_grade_report::showtotalsifcontainhidden has been switched from a single integer value to an array.
|
||||
The array keys are course IDs while the array values are the value of the course setting "report_overview_showtotalsifcontainhidden".
|
||||
@@ -165,7 +165,7 @@ class grade_report_user extends grade_report {
|
||||
$this->showrank = grade_get_setting($this->courseid, 'report_user_showrank', $CFG->grade_report_user_showrank);
|
||||
$this->showpercentage = grade_get_setting($this->courseid, 'report_user_showpercentage', $CFG->grade_report_user_showpercentage);
|
||||
$this->showhiddenitems = grade_get_setting($this->courseid, 'report_user_showhiddenitems', $CFG->grade_report_user_showhiddenitems);
|
||||
$this->showtotalsifcontainhidden = grade_get_setting($this->courseid, 'report_user_showtotalsifcontainhidden', $CFG->grade_report_user_showtotalsifcontainhidden);
|
||||
$this->showtotalsifcontainhidden = array($this->courseid => grade_get_setting($this->courseid, 'report_user_showtotalsifcontainhidden', $CFG->grade_report_user_showtotalsifcontainhidden));
|
||||
|
||||
$this->showgrade = grade_get_setting($this->courseid, 'report_user_showgrade', !empty($CFG->grade_report_user_showgrade));
|
||||
$this->showrange = grade_get_setting($this->courseid, 'report_user_showrange', !empty($CFG->grade_report_user_showrange));
|
||||
|
||||
@@ -120,15 +120,15 @@ class gradereportlib_testcase extends advanced_testcase {
|
||||
$report = new grade_report_test($course->id, $gpr, $coursecontext, $student);
|
||||
|
||||
// Should return the supplied student total grade regardless of hiding.
|
||||
$report->showtotalsifcontainhidden = GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN;
|
||||
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN);
|
||||
$this->assertEquals($datagrade + $forumgrade, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
|
||||
|
||||
// Should blank the student total as course grade depends on a hidden item.
|
||||
$report->showtotalsifcontainhidden = GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN;
|
||||
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN);
|
||||
$this->assertEquals(null, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
|
||||
|
||||
// Should return the course total minus the hidden database activity grade.
|
||||
$report->showtotalsifcontainhidden = GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN;
|
||||
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN);
|
||||
$this->assertEquals($forumgrade, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
|
||||
|
||||
// Note: we cannot simply hide modules and call $report->blank_hidden_total() again.
|
||||
@@ -182,16 +182,16 @@ class gradereportlib_testcase extends advanced_testcase {
|
||||
$report = new grade_report_test($course->id, $gpr, $coursecontext, $student);
|
||||
|
||||
// Should return the supplied student total grade regardless of hiding.
|
||||
$report->showtotalsifcontainhidden = GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN;
|
||||
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN);
|
||||
$this->assertEquals($datagrade + $forumgrade, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
|
||||
|
||||
// Should blank the student total as course grade depends on a hidden item.
|
||||
$report->showtotalsifcontainhidden = GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN;
|
||||
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN);
|
||||
$this->assertEquals(null, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
|
||||
|
||||
// Should return the course total minus the hidden activity grades.
|
||||
// They are both hidden so should return null.
|
||||
$report->showtotalsifcontainhidden = GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN;
|
||||
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN);
|
||||
$this->assertEquals(null, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ $string['datarootpermission'] = 'Zugriffsrechte zum Datenverzeichnis';
|
||||
$string['dbprefix'] = 'Tabellen-Prefix';
|
||||
$string['dirroot'] = 'Moodle-Verzeichnis';
|
||||
$string['environmenthead'] = 'Installationsvoraussetzungen werden geprüft ...';
|
||||
$string['environmentsub2'] = 'Jede Moodle-Version hat Mindestvoraussetzungen für der PHP-Version und für verbindliche PHP-Extensions. Vor einer Installation oder einer Aktualisierung wird eine vollständige Prüfung durchgeführt. Bitte fragen Sie den Server-Administrator, wenn Sie mit der Installation einer neuen Version oder mit der Aktivierung von PHP-Extensions nicht weiterkommen.';
|
||||
$string['environmentsub2'] = 'Jede Version hat Mindestvoraussetzungen für der PHP-Version und für verbindliche PHP-Extensions. Vor einer Installation oder einer Aktualisierung wird eine vollständige Prüfung durchgeführt. Bitte fragen Sie den Administrator des Servers, wenn Sie mit der Installation einer neuen Version oder mit der Aktivierung von PHP-Extensions nicht weiterkommen.';
|
||||
$string['errorsinenvironment'] = 'Fehler bei der Prüfung der Systemvoraussetzungen!';
|
||||
$string['installation'] = 'Installation';
|
||||
$string['langdownloaderror'] = 'Leider konnte das Sprachpaket \'{$a}\' nicht heruntergeladen werden. Die Installation wird in englischer Sprache fortgesetzt.';
|
||||
|
||||
@@ -41,7 +41,7 @@ $string['databasehost'] = 'Serveur de base de données';
|
||||
$string['databasename'] = 'Nom de la base de données';
|
||||
$string['databasetypehead'] = 'Sélectionner un pilote de base de données';
|
||||
$string['dataroot'] = 'Dossier de données';
|
||||
$string['datarootpermission'] = 'Permissions du dossier de données';
|
||||
$string['datarootpermission'] = 'Droits d\'accès au dossier de données';
|
||||
$string['dbprefix'] = 'Préfixe des tables';
|
||||
$string['dirroot'] = 'Dossier Moodle';
|
||||
$string['environmenthead'] = 'Vérification de l\'environnement...';
|
||||
|
||||
@@ -30,5 +30,15 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['environmentrequireinstall'] = 'é solicitada para ser instalada/activada.';
|
||||
$string['environmentrequireversion'] = 'Solicítase a versión {$a->needed} e está a executar a {$a->current}';
|
||||
$string['clianswerno'] = 'n';
|
||||
$string['cliansweryes'] = 's';
|
||||
$string['cliincorrectvalueerror'] = 'Erro, o valor «{$a->value}» é incorrecto para «{$a->option}»';
|
||||
$string['cliincorrectvalueretry'] = 'Valor incorrecto. Ténteo outra vez.';
|
||||
$string['clitypevalue'] = 'valor do tipo';
|
||||
$string['clitypevaluedefault'] = 'valor do tipo, prema Intro para empregar o valor predeterminado ({$a})';
|
||||
$string['cliunknowoption'] = 'Opcións non recoñecidas:
|
||||
{$a}
|
||||
Use a opción --help.';
|
||||
$string['cliyesnoprompt'] = 'escriba s (si) ou n (non)';
|
||||
$string['environmentrequireinstall'] = 'debe ser instalado e activado';
|
||||
$string['environmentrequireversion'] = 'requírese a versión {$a->needed} e está a executar a {$a->current}';
|
||||
|
||||
+10
-10
@@ -30,16 +30,16 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatelangdir'] = 'Non pode crear directorio de idioma';
|
||||
$string['cannotcreatetempdir'] = 'Non pode crear directorio de tempo';
|
||||
$string['cannotdownloadcomponents'] = 'Non pode descargar compoñentes.';
|
||||
$string['cannotdownloadzipfile'] = 'Non pode descargar ficheiros ZIP.';
|
||||
$string['cannotfindcomponent'] = 'Non pode encontrar compoñentes';
|
||||
$string['cannotsavemd5file'] = 'Non pode gardar o ficheiro md5.';
|
||||
$string['cannotsavezipfile'] = 'Non pode gardar un ficheiro ZIP.';
|
||||
$string['cannotunzipfile'] = 'Non pode descomprimir o ficheiro.';
|
||||
$string['componentisuptodate'] = 'O compoñente está actualizado.';
|
||||
$string['downloadedfilecheckfailed'] = 'Fallou a verificación do ficheiro descargado.';
|
||||
$string['cannotcreatelangdir'] = 'Non se pode crear o directorio de idioma';
|
||||
$string['cannotcreatetempdir'] = 'Non se pode crear un directorio temporal';
|
||||
$string['cannotdownloadcomponents'] = 'Non foi posíbel descargar compoñentes';
|
||||
$string['cannotdownloadzipfile'] = 'Non foi posíbel descargar o ficheiro ZIP';
|
||||
$string['cannotfindcomponent'] = 'Non foi posíbel atopar o compoñente';
|
||||
$string['cannotsavemd5file'] = 'Non é posíbel gardar o ficheiro md5';
|
||||
$string['cannotsavezipfile'] = 'Non é posíbel gardar o ficheiro ZIP';
|
||||
$string['cannotunzipfile'] = 'Non é posíbel descomprimir o ficheiro';
|
||||
$string['componentisuptodate'] = 'O compoñente está actualizado';
|
||||
$string['downloadedfilecheckfailed'] = 'A comprobación do ficheiro descargado non foi satisfactoria';
|
||||
$string['invalidmd5'] = 'md5 non válido';
|
||||
$string['missingrequiredfield'] = 'Falta algún campo obrigatorio';
|
||||
$string['wrongdestpath'] = 'Camiño de destino errado.';
|
||||
|
||||
+68
-28
@@ -30,41 +30,81 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'Directorio de administración';
|
||||
$string['availablelangs'] = 'Paquetes de idioma dispoñibles';
|
||||
$string['chooselanguagehead'] = 'Escolla idioma';
|
||||
$string['chooselanguagesub'] = 'Escolla un idioma SÓ para a instalación. Poderá escoller o idioma do sitio e o idioma de usuario en próximas pantallas.';
|
||||
$string['admindirname'] = 'Directorio Admin';
|
||||
$string['availablelangs'] = 'Lista de idiomas dispoñíbeis';
|
||||
$string['chooselanguagehead'] = 'Escolla un idioma';
|
||||
$string['chooselanguagesub'] = 'Escolla un idioma para o proceso de instalación. Este idioma empregarase tamén como idioma predeterminado do sitio, se ben pode cambiarse máis adiante.';
|
||||
$string['clialreadyconfigured'] = 'Xa existe o ficheiro config.php. Empregue admin/cli/install_database.php se quere actualizar o seu sitio web.';
|
||||
$string['clialreadyinstalled'] = 'Xa existe o ficheiro config.php. Empregue admin/cli/upgrade.php se quere actualizar o seu sitio web.';
|
||||
$string['cliinstallheader'] = 'Programa de instalación de Moodle en liña de ordes {$a}';
|
||||
$string['databasehost'] = 'Enderezo/máquina da base de datos';
|
||||
$string['databasename'] = 'Nome de base de datos';
|
||||
$string['databasetypehead'] = 'Escolla o controlador da base de datos';
|
||||
$string['dataroot'] = 'Directorio de datos';
|
||||
$string['datarootpermission'] = 'Permisos dos directorios de datos';
|
||||
$string['dbprefix'] = 'Prefixo das táboas';
|
||||
$string['dirroot'] = 'Directorio Moodle';
|
||||
$string['environmenthead'] = 'Verificando o seu ámbito ...';
|
||||
$string['dirroot'] = 'Directorio de Moodle';
|
||||
$string['environmenthead'] = 'Comprobando o seu entorno ...';
|
||||
$string['environmentsub2'] = 'Cada versión de Moodle ten algún requisito mínimo da versión de PHP e un número obrigatorio de extensións de PHP.
|
||||
Antes de cada instalación ou actualización faise unha comprobación completa do entorno . Póñase en contacto co administrador do servidor se non sabe como instalar a nova versión ou activar as extensións PHP.';
|
||||
$string['errorsinenvironment'] = 'A comprobación do entorno no foi satisfactoria!';
|
||||
$string['installation'] = 'Instalación';
|
||||
$string['langdownloaderror'] = 'Desafortunadamente o idioma "{$a}" non foi instalado. O proceso de instalación continuará en inglés.';
|
||||
$string['memorylimithelp'] = '<p>O límite de memoria para PHP do seu servidor está actualmente establecido en {$a}.</p>
|
||||
$string['langdownloaderror'] = 'Non foi posíbel descargar o idioma «{$a}». O proceso de instalación continuará en inglés.';
|
||||
$string['memorylimithelp'] = '<p>O límite de memoria PHP no seu servidor está estabelecido en {$a}.</p>
|
||||
|
||||
<p>Isto fará que Moodle teña problemas de memoria máis tarde, especialmente se ten un número de módulos significativo e/ou un gran número de usuarios.</p>
|
||||
<p>Isto pode facer que Moodle teña problemas de memoria máis adiante, especialmente
|
||||
se vostede ten activados un feixe de módulos e/ou unha gran cantidade de usuarios.</p>
|
||||
|
||||
<p>Recomendamos que configure PHP cun límite maior se é posible, como por exemplo 16M.
|
||||
Existen varias formas que pode tentar para facer esta modificación:</p>
|
||||
<p>Recomendámoslle que configure PHP co límite máis alto posíbel, p.ex. 40M.
|
||||
Hai varias maneiras de facer isto que vostede pode probar:</p>
|
||||
<ol>
|
||||
<li>Se pode, recompile PHP con <i>--enable-memory-limit</i>.
|
||||
Iso permitirá que o propio Moodle modifique o límite de memoria.</li>
|
||||
<li>Se ten acceso ao seu ficheiro php.ini pode modificar o valor de <b>memory_limit</b> para algo semellante a 16M. Se non ten acceso a ese ficheiro tal vez poida pedir ao administrador do sistema que o faga.</li>
|
||||
<li>Nalgúns servidores PHP servers pode crear un ficheiro .htaccess no directorio Moodle coa liña seguinte:
|
||||
<p><blockquote>php_value memory_limit 16M</blockquote></p>
|
||||
<p>Porén, nalgúns servidores provocará que <b>non funcione ningunha</b>páxina en PHP (verá erros cando tente visualizar as páxinas) polo que terá que eliminar o ficheiro .htaccess.</p></li>
|
||||
<li>Se vostede e quen de facelo, volva compilar PHP con <i>--enable-memory-limit</i>.
|
||||
Isto fai que sexa Moodle quen estabeleza o límite de memoria.</li>
|
||||
<li>Se vostede ten acceso ao ficheiro php.ini, pode cambiar o <b>memory_limit</b>
|
||||
estabelecéndoo en, digamos, 40M. Se vostede non ten acceso, podería
|
||||
solicitarlle ao administrador que o faga por vostede.</li>
|
||||
<li>Nalgúns servidores PHP, pode crear un ficheiro .htaccess no directorio Moodle
|
||||
que conteña a seguinte liña:
|
||||
<blockquote><div>php_value memory_limit 40M</div></blockquote>
|
||||
<p>Porén, nalgúns servidores isto impide que traballen <b>todas</b> as páxinas PHP
|
||||
(poderá ver os erros cando se miran as páxinas) de modo que terá que eliminar o ficheiro .htaccess.</p></li>
|
||||
</ol>';
|
||||
$string['paths'] = 'Rutas';
|
||||
$string['pathserrcreatedataroot'] = 'O directorio de datos ({$a->dataroot}) non puido ser creado polo instalador.';
|
||||
$string['pathshead'] = 'Confirme as rutas';
|
||||
$string['pathsrodataroot'] = 'O directorio dataroot non ten permisos de escritura.';
|
||||
$string['pathsroparentdataroot'] = 'O directorio principal ({$a->parent}) non ten permisos de escritura. O instalador non pode crear o directorio de datos ({$a->dataroot}).';
|
||||
$string['pathssubadmindir'] = 'Moi poucos enderezos web empregan /admin como URL especial para
|
||||
permitirlle acceder a un panel de control ou semellante. Desafortunadamente, isto entra en conflito coa localización estándar das páxinas de administración de Moodle. Vostede pode corrixir isto
|
||||
renomeando o directorio admin na súa instalación, e poñendo aquí ese novo nome. Por exemplo: <em>moodleadmin</em>. Iso corrixirá as ligazóns admin en Moodle.';
|
||||
$string['pathssubdataroot'] = 'Necesitase un lugar no que Moodle poida gardar os ficheiros enviados. Este directorio debe ser lexíbel E ESCRIBÍBEL polo usuario do servidor web
|
||||
(normalmente «nobody», «apache», «www-data»), mais non debería ser accesíbel directamente desde o web. Se non existe o instalador tentará crealo.';
|
||||
$string['pathssubdirroot'] = 'Ruta completa do directorio de instalación de Moodle.';
|
||||
$string['pathssubwwwroot'] = 'Enderezo web completo para acceder a Moodle.
|
||||
Non é posíbel acceder a Moodle empregando enderezos múltiplos.
|
||||
Se o seu sitio ten varios enderezos públicos debe configurar encamiñamentos permanentes en todos eles, agás neste.
|
||||
Se o seu sitio web é accesíbel tanto desde unha Intranet como desde Internet, escriba aquí o enderezo público e configure o DNS para que os usuarios da Intranet poidan empregar tamén o enderezo público.
|
||||
Se o enderezo non é correcto, cambie o URL no seu navegador para reiniciar a instalación cun valor diferente.';
|
||||
$string['pathsunsecuredataroot'] = 'A localización de dataroot non é segura';
|
||||
$string['pathswrongadmindir'] = 'Non existe o directorio Admin';
|
||||
$string['phpextension'] = 'Extensión PHP {$a}';
|
||||
$string['phpversion'] = 'Versión PHP';
|
||||
$string['phpversionhelp'] = '<p>Moodle require unha versión de PHP de 4.3.0 como mínimo ou 5.1.0 (5.0.x ten problemas coñecidos).</p>
|
||||
<p>Actualmente está a executar a versión {$a}</p>
|
||||
<p>Debe actualizar o PHP ou migrar a outro servidor cunha versión máis nova de PHP!<br/>
|
||||
(No caso de ter unha versión 5.0.x pode retornar para unha versión 4.4.x)</p>';
|
||||
$string['phpversionhelp'] = '<p>Moodle require polo menos unha das versións de PHP 4.3.0 ou 5.1.0 ( as versións 5.0.x teñen unha serie de problemas coñecidos).</p>
|
||||
<p>Neste momento está executandose a versión {$a}</p>
|
||||
<p>Debe actualizar PHP ou trasladarse a outro servidor cunha versión máis recente de PHP!<br />
|
||||
(NO caso de 5.0.x podería tamén reverter cara a versión 4.4.x)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Está a ver esta páxina porque conseguiu instalar e iniciar o paquete <strong>{$a->packname} {$a->packversion}</strong> no seu computador. Parabéns!';
|
||||
$string['welcomep30'] = 'Esta versión do <strong>{$a->installername}</strong> inclúe as aplicacións
|
||||
para crear o ámbito en que <strong>Moodle</strong> pode funcionar, nomeadamente:';
|
||||
$string['welcomep40'] = 'O paquete tamén inclúe <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'A utilización de todas as aplicacións deste paquete réxese polas respectivas licenzas. O paquete <strong>{$a->installername}</strong> completo é <a href="http://www.opensource.org/docs/definition_plain.html"> código aberto</a> distribuído nos termos da licenza <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
$string['welcomep60'] = 'As páxinas seguintes irán conducilo por algúns pasos fáciles de seguir para configurar o <strong>Moodle</strong> no computador. Pode aceptar a configuración por defecto ou, opcionalmente, utilizar outras máis adecuadas ás súas necesidades.';
|
||||
$string['welcomep70'] = 'Prema o botón "Seguinte" debaixo para continuar coa configuración de <strong>Moodle</strong>.';
|
||||
$string['welcomep20'] = 'Se esta a ver esta páxina é porque puido instalar satisfactoriamente e
|
||||
executar o paquete <strong>{$a->packname} {$a->packversion}</strong> no seu computador. Parabéns!';
|
||||
$string['welcomep30'] = 'Esta versión de <strong>{$a->installername}</strong> inclúe os aplicativos
|
||||
para crear un entorno no que <strong>Moodle</strong> funcione, nomeadamente:';
|
||||
$string['welcomep40'] = 'O paquete inclúe tamen <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'O uso de todos os aplicativos do paquete está rexido polas súas respectivas
|
||||
licenzas. O paquete completo <strong>{$a->installername}</strong> é
|
||||
<a href="http://www.opensource.org/docs/definition_plain.html">código aberto</a> e distribúese
|
||||
baixo a licenza <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
$string['welcomep60'] = 'As páxinas seguintes guiarano a través de algúns sinxelos pasos para configurar
|
||||
e axustar <strong>Moodle</strong> no seu computador. Pode empregar os axustes predeterminados
|
||||
ou, opcionalmente, modificalos para que se axusten ás súas necesidades.';
|
||||
$string['welcomep70'] = 'Prema no botón «Seguinte» para continuar coa configuración de <strong>Moodle</strong>.';
|
||||
$string['wwwroot'] = 'Enderezo web';
|
||||
|
||||
@@ -30,6 +30,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = 'pt';
|
||||
$string['parentlanguage'] = '';
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Galego';
|
||||
|
||||
@@ -31,6 +31,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['language'] = 'שפת ממשק';
|
||||
$string['next'] = 'הלאה';
|
||||
$string['next'] = 'הבא';
|
||||
$string['previous'] = 'קודם';
|
||||
$string['reload'] = 'טען מחדש';
|
||||
|
||||
@@ -31,4 +31,4 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = 'he';
|
||||
$string['thislanguage'] = 'Hebrew kids';
|
||||
$string['thislanguage'] = 'עברית בתי־ספר';
|
||||
|
||||
@@ -41,8 +41,8 @@ $string['cannotunzipfile'] = 'Nije moguće otpakirati datoteku';
|
||||
$string['componentisuptodate'] = 'Komponenta je dostupna u svojoj najnovijoj inačici.';
|
||||
$string['downloadedfilecheckfailed'] = 'Došlo je do pogreške pri provjeri preuzete datoteke';
|
||||
$string['invalidmd5'] = 'Neispravna md5 datoteka';
|
||||
$string['missingrequiredfield'] = 'Nedostaje neko obavezno polje';
|
||||
$string['remotedownloaderror'] = 'Nije uspjelo preuzimanje komponente na poslužitelj, provjerite postavke proxyja. Preporuča se uporaba PHP cURL dodatka.<br /><br />Ručno preuzmite datoteku s <a href="{$a->url}">{$a->url}</a> iskopirajte ju u "{$a->dest}" na poslužitelj i raspakirajte.';
|
||||
$string['missingrequiredfield'] = 'Nedostaje neko obvezno polje';
|
||||
$string['remotedownloaderror'] = 'Nije uspjelo preuzimanje komponente na poslužitelj, provjerite postavke proxyja. Preporuča se uporaba PHP cURL dodatka.<br /><br />Ručno preuzmite datoteku s <a href="{$a->url}">{$a->url}</a> iskopirajte ju u "{$a->dest}" na poslužitelju i raspakirajte.';
|
||||
$string['wrongdestpath'] = 'Pogrešna odredišna putanja.';
|
||||
$string['wrongsourcebase'] = 'Pogrešna baza izvornog URL-a';
|
||||
$string['wrongzipfilename'] = 'Pogrešno ime ZIP datoteke';
|
||||
|
||||
@@ -45,14 +45,14 @@ $string['datarootpermission'] = 'Ovlasti nad mapom s podacima';
|
||||
$string['dbprefix'] = 'Prefiks tablice';
|
||||
$string['dirroot'] = 'Moodle mapa';
|
||||
$string['environmenthead'] = 'Provjera okruženja vašeg poslužitelja ...';
|
||||
$string['environmentsub2'] = 'Svaka inačica Moodle-a ima minimalne zahtjeve po pitanju odgovarajuće PHP inačice i nekoliko obaveznih PHP ekstenzija.
|
||||
$string['environmentsub2'] = 'Svaka inačica Moodle-a ima minimalne zahtjeve po pitanju odgovarajuće PHP inačice i nekoliko obveznih PHP ekstenzija.
|
||||
Puna provjera okruženja se obavlja prije svake instalacije ili nadogradnje postojeće inačice. Ako ne znate kako instalirati novu inačicu ili omogućiti PHP ekstenzije, kontaktirajte administratora vašeg poslužitelja.';
|
||||
$string['errorsinenvironment'] = 'Pogreške u okruženju poslužitelja!';
|
||||
$string['installation'] = 'Instalacija';
|
||||
$string['langdownloaderror'] = 'Nažalost, jezik "{$a}" nije instaliran. Proces instalacije će biti nastavljen na engleskom jeziku.';
|
||||
$string['memorylimithelp'] = '<p>PHP ograničenje memorije na poslužitelju je trenutno podešeno na {$a}.</p>
|
||||
|
||||
<p>Ova postavka može kasnije rezultirati memorijskim problemima na vašem Moodle sustavu, posebno ako imate veći broj uključenih modula i/ili veći broj korisnika.</p>
|
||||
<p>Ova postavka može kasnije rezultirati memorijskim problemima na vašem Moodle sustavu, posebno ako imate veći broj omogućenih modula i/ili veći broj korisnika.</p>
|
||||
|
||||
<p>Preporučujemo da konfigurirate PHP s većim ograničenjem ako je moguće, recimo 40M. Postoji nekoliko načina na koje to možete napraviti:</p>
|
||||
<ol>
|
||||
@@ -67,7 +67,7 @@ $string['pathsrodataroot'] = 'Nije moguće zapisivanje u podatkovnu (dataroot) m
|
||||
$string['pathsroparentdataroot'] = 'Nije moguće zapisivati podatke u nadređenu mapu ({$a->parent}). Instalacijska skripta ne može stvoriti mapu za podatke ({$a->dataroot}).';
|
||||
$string['pathssubadmindir'] = 'Manji broj webhosting tvrtki koristi /admin kao posebni URL za Vaš pristup upravljanju vašim hosting paketom. Nažalost, to rezultira konfliktom sa standardnom lokacijom za Moodle administratorsku stranicu. Navedenu lokaciju unutar Moodle sustava možete preimenovati. Na primjer: <br /> <br /><em>moodleadmin</em><br /> <br />
|
||||
Ovo će promijeniti administratorsku poveznicu na Moodle sustavu u novu vrijednost.';
|
||||
$string['pathssubdataroot'] = 'Mora postojati mapa u koju Moodle može pohraniti upload datoteke. Korisnik pod kojim je pokrenut web server (obično \'nobody\' ili \'apache\') bi morao imati mogućnost čitanja/pisanja podataka u toj mapi, ali oni ne bi trebali biti dostupni direktno preko weba. Instalacijska skripta će pokušati stvoriti navedenu mapu ako ista ne postoji.';
|
||||
$string['pathssubdataroot'] = 'Mora postojati mapa u koju Moodle može pohraniti prenešene datoteke. Korisnik pod kojim je pokrenut web server (obično \'nobody\' ili \'apache\') bi morao imati mogućnost čitanja/pisanja podataka u toj mapi, ali oni ne bi trebali biti dostupni direktno preko weba. Instalacijska skripta će pokušati stvoriti navedenu mapu ako ista ne postoji.';
|
||||
$string['pathssubdirroot'] = 'Puna putanja (PATH) do Moodle instalacije.';
|
||||
$string['pathssubwwwroot'] = 'Unesite punu web adresu putem koje će se pristupati vašem Moodle sustavu.
|
||||
Moodle sustavu NIJE MOGUĆE pristupiti preko više URL-ova, odaberite onaj koji vam najviše odgovara.
|
||||
@@ -78,7 +78,7 @@ $string['pathsunsecuredataroot'] = 'Podatkovna (dataroot) mapa nije sigurna';
|
||||
$string['pathswrongadmindir'] = 'Admin mapa ne postoji';
|
||||
$string['phpextension'] = 'PHP ekstenzija {$a}';
|
||||
$string['phpversion'] = 'PHP inačica';
|
||||
$string['phpversionhelp'] = '<p>Moodle zahtijeva najmanje PHP inačicu 4.3.0 ili 5.1.0 (5.0.x funkcionira uz brojne uočene probleme).</p> <p>Trenutno imate inačicu {$a}</p> <p>Morate nadograditi PHP ili premestiti Moodle instalaciju na web poslužitelj s novijom verzijom PHP-a!</br> (U slučaju inačice 5.0.x bilo bi najbolje da je vratite na inačicu 4.4.x)</p>';
|
||||
$string['phpversionhelp'] = '<p>Moodle zahtijeva najmanje PHP inačicu 4.3.0 ili 5.1.0 (5.0.x funkcionira uz brojne uočene probleme).</p> <p>Trenutno imate inačicu {$a}</p> <p>Morate nadograditi PHP ili premestiti Moodle instalaciju na web poslužitelj s novijom inačicom PHP-a!</br> (U slučaju inačice 5.0.x bilo bi najbolje da je vratite na inačicu 4.4.x)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Prikazana vam je ova stranica jer ste uspješno instalirali i pokrenuli <strong>{$a->packname} {$a->packversion}</strong> paket na svom poslužitelju. Čestitamo!';
|
||||
$string['welcomep30'] = 'Ova inačica <strong>{$a->installername}</strong> uključuje aplikacije za stvaranje okruženja u kojem će sustav <strong>Moodle</strong> uspješno funkcionirati, konkretno:';
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['clitypevalue'] = 'tipo reikšmė';
|
||||
$string['clitypevaluedefault'] = 'tipo reikšmė, paspauskite „Enter“, jei norite naudoti numatytąją reikšmę ({$a})';
|
||||
$string['cliunknowoption'] = 'Neatpažintos parinktys: {$a} naudokite --žinyno parinktį.';
|
||||
$string['environmentrequireinstall'] = 'turi būti įdiegta ir įjungta';
|
||||
$string['environmentrequireversion'] = 'būtina naudoti versiją {$a->needed}, o jūs naudojate {$a->current}';
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatelangdir'] = 'Negalima sukurti kalbos katalogo';
|
||||
$string['cannotcreatetempdir'] = 'Negalima sukurti laikinojo katalogo';
|
||||
$string['cannotdownloadcomponents'] = 'Negalima atsisiųsti komponentų';
|
||||
$string['cannotdownloadzipfile'] = 'Negalima atsisiųsti ZIP failo';
|
||||
$string['cannotfindcomponent'] = 'Nepavyko rasti komponento';
|
||||
$string['cannotsavemd5file'] = 'Negalima įrašyti md5 failo';
|
||||
$string['cannotsavezipfile'] = 'Negalima įrašyti ZIP failo';
|
||||
$string['cannotunzipfile'] = 'Negalima išskleisti failo';
|
||||
$string['componentisuptodate'] = 'Komponentas atnaujintas';
|
||||
$string['downloadedfilecheckfailed'] = 'Nepavyko patikrinti atsisiųsto failo';
|
||||
$string['invalidmd5'] = 'Kintamojo patikra nepavyko – bandykite dar kartą';
|
||||
$string['missingrequiredfield'] = 'Trūksta būtino lauko';
|
||||
$string['remotedownloaderror'] = 'Nepavyko į serverį atsisiųsti komponento, patikrinkite tarpinio serverio parametrus, labai rekomenduojama naudoti PHP cURL plėtinį.<br /><br />Turite rankiniu būdu atsisiųsti <a href="{$a->url}">{$a->url}</a> failą, nukopijuoti jį į {$a->dest} serveryje ir ten jį išskleisti.';
|
||||
$string['wrongdestpath'] = 'Neteisingas paskirties kelias';
|
||||
$string['wrongsourcebase'] = 'Neteisingas šaltinio URL pagrindas';
|
||||
$string['wrongzipfilename'] = 'Neteisingas ZIP failo vardas';
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'Administratoriaus katalogas';
|
||||
$string['chooselanguagesub'] = 'Pasirinkite diegimo kalbą. Ši kalba bus naudojama ir kaip numatytoji svetainės kalba, nors vėliau ją bus galima pakeisti.';
|
||||
$string['clialreadyconfigured'] = 'Failas config.php jau yra, prašau naudoti admin/cli/install_database.php jei norite įrašyti šią svetainę.';
|
||||
$string['clialreadyinstalled'] = 'Failas config.php jau yra. Jei norite atnaujinti svetainę, naudokite admin/cli/upgrade.php.';
|
||||
$string['cliinstallheader'] = '„Moodle“ {$a} komandų eilutės diegimo programa';
|
||||
$string['databasehost'] = 'Duomenų bazės pagrindinis kompiuteris';
|
||||
$string['dataroot'] = 'Duomenų katalogas';
|
||||
$string['datarootpermission'] = 'Duomenų katalogo leidimai';
|
||||
$string['dbprefix'] = 'Lentelių priešvardis';
|
||||
$string['dirroot'] = '„Moodle“ katalogas';
|
||||
$string['environmenthead'] = 'Tikrinama aplinka...';
|
||||
$string['environmentsub2'] = 'Kiekvienas „Moodle“ leidimas turi minimalius PHP versijos ir privalomų PHP plėtinių skaičiaus reikalavimus. Prieš kiekvieną diegimą ir versijos naujinimą, išsamiai tikrinama aplinka. Jei nežinote, kaip įdiegti naują versiją arba įjungti PHP plėtinius, kreipkitės į serverio administratorių.';
|
||||
$string['errorsinenvironment'] = 'Aplinkos patikra nepavyko!';
|
||||
$string['installation'] = 'Diegimas';
|
||||
$string['langdownloaderror'] = 'Deja, {$a} kalbos atsisiųsti nepavyko. Diegimo procesas bus tęsiamas anglų kalba.';
|
||||
$string['memorylimithelp'] = '<p>Serverio PHP atminties limitas dabar nustatytas kaip {$a}.</p> <p>Vėliau dėl to „Moodle“ gali iškilti atminties problemų, ypač jei įjungta daug modulių ir (arba) yra daug vartotojų.</p> <p>Rekomenduojame sukonfigūruoti didesnį PHP limitą, jei galima, pvz., 40M. Galite pabandyti tai atlikti keliais būdais:</p> <ol> <li>Jei galite, pakartotinai sukompiliuokite PHP naudodami <i>--enable-memory-limit</i>. Taip „Moodle“ pati galės nustatyti atminties limitą.</li> <li>Jei turite prieigą prie php.ini failo, galite pakeisti <b>memory_limit</b> parametro reikšmę į 40M ar pan. Jei prieigos neturite, galite paprašyti, kad tai padarytų administratorius.</li> <li>Kai kuriuose PHP serveriuose „Moodle“ kataloge galite sukurti .htaccess failą, kuriame būtų ši eilutė : <blockquote><div>php_value memory_limit 40M</div></blockquote> <p>Tačiau kai kuriuose serveriuose dėl to neveiks <b>visi</b> PHP puslapiai (peržiūrėdami puslapius matysite klaidą), todėl the .htaccess failą teks pašalinti.</p></li> </ol>';
|
||||
$string['pathserrcreatedataroot'] = 'Diegimo programa negali sukurti duomenų katalogo ({$a->dataroot}).';
|
||||
$string['pathshead'] = 'Patvirtinti kelius';
|
||||
$string['pathsrodataroot'] = 'Į šakninį duomenų katalogą negalima įrašyti.';
|
||||
$string['pathsroparentdataroot'] = 'Į pirminį katalogą ({$a->parent}) negalima įrašyti. Diegimo programa negali sukurti katalogo ({$a->dataroot}).';
|
||||
$string['pathssubadmindir'] = 'Labai mažai žiniatinklio pagrindinių kompiuterių naudoja /admin kaip specialų URL, kad galėtumėte pasiekti valdymo skydą ar pan. Deja, dėl to kyla konfliktas su „Moodle“ administratoriaus puslapių standartine vieta. Tai galite ištaisyti, jei diegdami pervardysite administratoriaus katalogą ir tą naują pavadinimą įdėsite čia. Pavyzdžiui, <em>moodleadmin</em>. Taip bus ištaisyti administratoriaus saitai „Moodle“.';
|
||||
$string['pathssubdataroot'] = 'Reikalinga vieta, kur „Moodle“ galėtų saugoti įkeltus failus. Iš šio katalogo turi galėti skaityti IR Į JĮ ĮRAŠYTI žiniatinklio serverio vartotojas (paprastai „nobody“ arba „apache“), bet jis neturi būti tiesiogiai pasiekiamas per žiniatinklį. Diegimo programa bandys jį sukurti, jei jo dar nėra.';
|
||||
$string['pathssubdirroot'] = 'Visas „Moodle“ diegimo katalogo kelias.';
|
||||
$string['pathssubwwwroot'] = 'Visas žiniatinklio adresas, kur bus galima pasiekti „Moodle“. „Moodle“ negalima pasiekti naudojant kelis adresus. Jei jūsų svetainė turi kelis viešuosius adresus, turite nustatyti nuolatinį peradresavimą iš jų visų, išskyrus šį vieną. Jei svetainę galima pasiekti tiek iš intraneto, tiek iš interneto, čia naudokite viešąjį adresą ir nustatykite DNS, kad intraneto vartotojai taip pat galėtų naudoti viešąjį adresą. Jei adresas klaidingas, naršyklėje pakeiskite URL, kad pakartotinai paleidus diegti būtų naudojama kita reikšmė.';
|
||||
$string['pathsunsecuredataroot'] = 'Šakninio duomenų katalogo kelias nesaugus';
|
||||
$string['pathswrongadmindir'] = 'Nėra administratoriaus katalogo';
|
||||
$string['phpversionhelp'] = '<p>„Moodle“ reikalauja, kad PHP versija būtų bent 4.3.0 arba 5.1.0 (5.0.x versijoje yra daug problemų).</p> <p>Dabar naudojate versiją {$a}</p> <p>Turite atnaujinti PHP versiją arba perkelti į pagrindinį kompiuterį, kuriame veikia naujesnė PHP versija!<br /> (Jei naudojate 5.0.x versiją, taip pat galite paleisti senesnę 4.4.x versiją)</p>';
|
||||
$string['welcomep20'] = 'Matote šį puslapį, nes į kompiuterį sėkmingai įdiegėte ir paleidote <strong>{$a->packname} {$a->packversion}</strong> paketą. Sveikiname!';
|
||||
$string['welcomep30'] = 'Šiame <strong>{$a->installername}</strong> leidime yra taikomosios programos, skirtos aplinkai, kurioje veiks <strong>Moodle</strong>, sukurti:';
|
||||
$string['welcomep40'] = 'Pakete taip pat yra <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Visoms šio paketo taikomosioms programoms taikomos atitinkamos licencijos. Visas <strong>{$a->installername}</strong> paketas yra <a href="http://www.opensource.org/docs/definition_plain.html">atvirojo kodo</a> ir platinamas pagal <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> licenciją.';
|
||||
$string['welcomep60'] = 'Šiuose puslapiuose bus pateikta keletas paprastų veiksmų, kad būtų galima sukonfigūruoti ir nustatyti <strong>Moodle</strong> kompiuteryje. Galite priimti numatytuosius parametrus arba pasirinktinai juos pakeisti, kad atitiktų jūsų poreikius.';
|
||||
$string['welcomep70'] = 'Norėdami tęsti <strong>Moodle</strong> sąranką, spustelėkite žemiau esantį mygtuką Kitas.';
|
||||
$string['wwwroot'] = 'Žiniatinklio adresas';
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['next'] = 'Pirmyn';
|
||||
@@ -33,11 +33,15 @@ defined('MOODLE_INTERNAL') || die();
|
||||
$string['admindirname'] = 'Katalog admin';
|
||||
$string['availablelangs'] = 'Dostępne paczki językowe';
|
||||
$string['chooselanguagehead'] = 'Wybierz język';
|
||||
$string['chooselanguagesub'] = 'Proszę wybrać język TYLKO do instalacji. Stronę i języki dla użytkowników będzie można wybrać na następnym ekranie.';
|
||||
$string['clialreadyinstalled'] = 'Plik config.php już istnieje, użyj admin/cli/upgrade.php jeśli chcesz uaktualnić witrynę.';
|
||||
$string['chooselanguagesub'] = 'Proszę wybrać język do instalacji. Ten język będą również użyty jako domyślny język witryny, przy czym może być później zmieniony.';
|
||||
$string['clialreadyconfigured'] = 'Plik config.php już istnieje, użyj admin/cli/install_database.php jeśli chcesz zainstalować tę witrynę.';
|
||||
$string['clialreadyinstalled'] = 'Plik config.php już istnieje, użyj admin/cli/upgrade.php, jeśli chcesz uaktualnić witrynę.';
|
||||
$string['cliinstallheader'] = 'Program instalacyjny Moodle {$a} z linii poleceń';
|
||||
$string['databasehost'] = 'Host bazy danych';
|
||||
$string['databasename'] = 'Nazwa bazy danych';
|
||||
$string['dataroot'] = 'Katalog z danymi';
|
||||
$string['databasetypehead'] = 'Wybierz sterownik bazy danych';
|
||||
$string['dataroot'] = 'Katalog danych';
|
||||
$string['datarootpermission'] = 'Prawa katalogów danych';
|
||||
$string['dbprefix'] = 'Prefiks tabel';
|
||||
$string['dirroot'] = 'Katalog Moodle';
|
||||
$string['environmenthead'] = 'Sprawdzam środowisko (ustawienia) ...';
|
||||
@@ -64,10 +68,13 @@ $string['pathserrcreatedataroot'] = 'Katalog danych ({$a->dataroot}) nie może z
|
||||
$string['pathshead'] = 'Potwierdź ścieżki';
|
||||
$string['pathsrodataroot'] = 'Główny katalog danych nie ma uprawnień do zapisu. ';
|
||||
$string['pathsroparentdataroot'] = 'Nadrzędny katalog ({$a->parent}) jest tylko do odczytu. Katalog danych ({$a->dataroot}) nie może zostać utworzony przez instalator. ';
|
||||
$string['pathssubadmindir'] = 'Nieliczne portale używają URL /admin jako specjalnego adresu panelu sterowania. Niestety jest to sprzeczne ze standardowej lokalizacją folderu stron administratora Moodle. Można to naprawić poprzez zmianę nazwy katalogu administratora w instalacji i podanie tej nazwy tu, np.: <em>moodleadmin.</em> Linki administratora Moodle będą automatycznie poprawione.';
|
||||
$string['pathssubdataroot'] = 'Potrzebny jest obszar, gdzie Moodle może zapisywać ładowane do niego pliki. Katalog ten powinien mieć prawo do odczyt i ZAPISU przez użytkownika serwera WWW (zwykle "nobody" lub "apache"), ale może być być dostępny bezpośrednio przez sieć. Instalator spróbuje go utworzyć, jeśli nie istnieje.';
|
||||
$string['pathssubdirroot'] = 'Pełna ścieżka do katalogu z instalacją Moodle.';
|
||||
$string['pathssubwwwroot'] = 'Pełny adres internetowy, pod którym Moodle będzie dostępny. Moodle nie może być dostępny przy użyciu wielu adresów. Jeśli twoja witryna ma kilka adresów publicznych, należy skonfigurować trwałe przekierowania z wszystkich z nich na jeden. Jeśli Twoja witryna jest dostępna zarówno z intranetu i Internetu, korzystaj z publicznego adresu i ustaw DNS tak, aby użytkownicy Intranetu korzystali też z adresu publicznego. Jeśli adres nie jest poprawny, należy ponownie uruchomić instalację z innym adresem.';
|
||||
$string['pathsunsecuredataroot'] = 'Lokalizacja głównego katalogu danych nie jest bezpieczna';
|
||||
$string['pathswrongadmindir'] = 'Katalog admin nie istnieje';
|
||||
$string['phpextension'] = '{$a} rozszerzenie PHP';
|
||||
$string['phpextension'] = 'rozszerzenie PHP {$a}';
|
||||
$string['phpversion'] = 'Wersja PHP';
|
||||
$string['phpversionhelp'] = '<p>Moodle wymaga wersji PHP co najmniej 4.3.0 lub 5.1.0 (5.0.x posiada kilka znanych problemów).</p>
|
||||
<p>Obecnie jest uruchomiona wersja {$a}</p>
|
||||
|
||||
@@ -34,6 +34,7 @@ $string['admindirname'] = 'Каталог администратора';
|
||||
$string['availablelangs'] = 'Доступные языковые пакеты';
|
||||
$string['chooselanguagehead'] = 'Выберите язык';
|
||||
$string['chooselanguagesub'] = 'Сейчас необходимо выбрать язык ТОЛЬКО для сообщений во время установки. Язык сайта и пользовательских интерфейсов можно будет указать далее в процессе установки.';
|
||||
$string['clialreadyconfigured'] = 'Файл config.php уже существует. Если Вы хотите установить этот сайт, используйте admin/cli/install_database.php.';
|
||||
$string['clialreadyinstalled'] = 'Файл config.php уже существует. Если Вы хотите обновить сайт, то используйте скрипт admin/cli/upgrade.php.';
|
||||
$string['cliinstallheader'] = 'Программа установки Moodle {$a} в режиме командной строки';
|
||||
$string['databasehost'] = 'Сервер баз данных';
|
||||
|
||||
@@ -45,8 +45,8 @@ $string['datarootpermission'] = 'Овлашћења над директориј
|
||||
$string['dbprefix'] = 'Префикс табеле';
|
||||
$string['dirroot'] = 'Moodle директоријум';
|
||||
$string['environmenthead'] = 'Проверавање Вашег окружења...';
|
||||
$string['environmentsub2'] = 'Свака верзија Moodlea има минимум захтева по питању одговарајуће PHP верзије и неколико обавезних PHP екстензија.
|
||||
Пуна провера окружења се врши пре сваке инсталације или ажурирања постојеће верзије. Уколико не знате како да инсталирате нову верзију или омогућите PHP ектензије контактирајте Вашег сервер администратора.';
|
||||
$string['environmentsub2'] = 'Свако издање Moodlea има минимум захтева по питању одговарајуће PHP верзије и неколико обавезних PHP екстензија.
|
||||
Комплетна провера окружења се врши пре сваке инсталације и надоградње постојеће верзије. Уколико не знате како да инсталирате нову верзију или омогућите PHP екстензије контактирајте свог администратора сервера.';
|
||||
$string['errorsinenvironment'] = 'Провера окружења није прошла!';
|
||||
$string['installation'] = 'Инсталација';
|
||||
$string['langdownloaderror'] = 'Нажалост, језик "{$a}" се не може преузети. Процес инсталације биће настављен на енглеском језику.';
|
||||
|
||||
@@ -45,8 +45,8 @@ $string['datarootpermission'] = 'Ovlašćenja nad direktorijumom podataka';
|
||||
$string['dbprefix'] = 'Prefiks tabele';
|
||||
$string['dirroot'] = 'Moodle direktorijum';
|
||||
$string['environmenthead'] = 'Proveravanje Vašeg okruženja...';
|
||||
$string['environmentsub2'] = 'Svaka verzija Moodlea ima minimum zahteva po pitanju odgovarajuće PHP verѕije i nekoliko obaveznih PHP ekstenzija.
|
||||
Puna provera okruženja se vrši pre svake instalacije ili ažuriranja postojeće verzije. Ukoliko ne znate kako da instalirate novu verziju ili omogućite PHP ektenzije kontaktirajte Vašeg server administratora.';
|
||||
$string['environmentsub2'] = 'Svako izdanje Moodlea ima minimum zahteva po pitanju odgovarajuće PHP verzije i nekoliko obaveznih PHP ekstenzija.
|
||||
Kompletna provera okruženja se vrši pre svake instalacije i nadogradnje postojeće verzije. Ukoliko ne znate kako da instalirate novu verziju ili omogućite PHP ekstenzije kontaktirajte svog administratora servera.';
|
||||
$string['errorsinenvironment'] = 'Provera okruženja nije prošla!';
|
||||
$string['installation'] = 'Instalacija';
|
||||
$string['langdownloaderror'] = 'Nažalost, jezik "{$a}" se ne može preuzeti. Proces instalacije biće nastavljen na engleskom jeziku.';
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['clianswerno'] = 'не';
|
||||
$string['cliansweryes'] = 'ҳа';
|
||||
$string['cliincorrectvalueerror'] = 'Хато, нишондиҳандаи нодурусти "{$a->value}" барои "{$a->option}"';
|
||||
$string['cliincorrectvalueretry'] = 'Нишондиҳандаи нодуруст, илтимос, аз нав кӯшиш карда бинед';
|
||||
$string['clitypevalue'] = 'Нишондиҳандаро ворид намоед';
|
||||
$string['clitypevaluedefault'] = 'Нишондиҳандаро ворид намоед, Enter-ро барои истифодаи нишондиҳанда аз рӯи хомӯшӣ ({$a}) зер кунед';
|
||||
$string['cliunknowoption'] = 'Параметрҳои шинохтанашуда:
|
||||
{$a}
|
||||
Илтимос, аз параметри --help истифода баред';
|
||||
$string['cliyesnoprompt'] = 'Ҳарфҳои y (яъне Ҳа) ё n (яъне Не)';
|
||||
$string['environmentrequireinstall'] = 'Ҷойгир карда ба кор андохтан лозим аст';
|
||||
$string['environmentrequireversion'] = 'Версияи {$a->needed} лозим аст, Шумо версияи {$a->current} -ро истифода бурда истодаед';
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatelangdir'] = 'Феҳристи забонро бунёд кардан муасар нашуда истодааст';
|
||||
$string['cannotcreatetempdir'] = 'Феҳристи муваққатӣ бунёд кардан нашуда истодааст';
|
||||
$string['cannotdownloadcomponents'] = 'Қисматҳоро бор кардан ғайриимкон аст.';
|
||||
$string['cannotdownloadzipfile'] = 'ZIP-файлро бор кардан муяссар нашуд';
|
||||
$string['cannotfindcomponent'] = 'Қисматро ёфтан муяссар нашуд';
|
||||
$string['cannotsavemd5file'] = 'MD5-файлро маҳфуз доштан муяссар нашуд';
|
||||
$string['cannotsavezipfile'] = 'ZIP-файлро маҳфуз доштан муяссар нашуд';
|
||||
$string['cannotunzipfile'] = 'Файлро кушодан муяссар нашуд';
|
||||
$string['componentisuptodate'] = 'Қисмат ба навсозӣ эҳтиёҷ надорад';
|
||||
$string['downloadedfilecheckfailed'] = 'Хатои тафтиши файли боркардашуда';
|
||||
$string['invalidmd5'] = 'md5-и нодуруст';
|
||||
$string['missingrequiredfield'] = 'Баъзе майдонҳои ҳатмӣ нестанд';
|
||||
$string['remotedownloaderror'] = 'Қисматро ба сервер бор кардан муяссар нашуд, танзимҳои прокси-серверро тафтиш кунед, бо исрор тавсия дода мешавад, ки васеъкунии cURL-и забони PHP ҷойгир карда шавад.<br /> <br />Шумо бояд файлро аз рӯи истиноди <a href="{$a->url}">{$a->url}</a> дастӣ бор кунед, онро ба папкаи "{$a->dest}" дар сервери худ нусхабардорӣ намоед ва дар он ҷо онро кушоед.';
|
||||
$string['wrongdestpath'] = 'Роҳи хатои таъйинкунӣ';
|
||||
$string['wrongsourcebase'] = 'Адреси нодурусти сарчашма';
|
||||
$string['wrongzipfilename'] = 'Номи нодурусти ZIP-файл';
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'Феҳристи администратор';
|
||||
$string['availablelangs'] = 'Пакетҳои забонии дастрас';
|
||||
$string['chooselanguagehead'] = 'Забонро интихоб намоед';
|
||||
$string['chooselanguagesub'] = 'Ҳозир забонро ФАҚАТ барои мактубчаҳо ҳангоми ҷойгиркунӣ интихоб кардан лозим аст. Забони сомона ва интерфейсҳои истифодабарандагонро минбаъд дар раванди ҷойгиркунӣ зикр кардан мумкин аст.';
|
||||
$string['clialreadyinstalled'] = 'Файли config.php аллакай вуҷуд дорад. Агар сомонаро навсозӣ карданӣ бошед, скрипти admin/cli/upgrade.php -ро истифода баред.';
|
||||
$string['cliinstallheader'] = 'Барномаи ҷойгиркунии Moodle {$a} дар реҷаи сатри фармонҳо';
|
||||
$string['databasehost'] = 'Сервери базаҳои маълумотҳо';
|
||||
$string['databasename'] = 'Номи базаи маълумотҳо';
|
||||
$string['databasetypehead'] = 'Драйвери базаи маълумотҳоро интихоб намоед';
|
||||
$string['dataroot'] = 'Феҳристи маълумотҳо';
|
||||
$string['datarootpermission'] = 'Иҷозатҳо ба феҳристи маълумотҳо';
|
||||
$string['dbprefix'] = 'Префикси номҳои ҷадвалҳо';
|
||||
$string['dirroot'] = 'феҳристи Moodle';
|
||||
$string['environmenthead'] = 'Тафтиши муҳит...';
|
||||
$string['environmentsub2'] = 'Ҳар як версияи Moodle талаботҳои минималӣ ба версияи PHP ва маҷмӯи васеъшавиҳои ҳатмии PHP-ро дорад.
|
||||
Тафтиши пурраи муҳит пеш аз ҳар як ҷойгиркунӣ ва навсозӣ ба ҷо оварда мешавад.
|
||||
Илтимос, агар тарзи ҷойгиркунии версияи нав ё ба кор андохтани васеъшавии PHP-ро надонед, бо администратори сервер робита намоед.';
|
||||
$string['errorsinenvironment'] = 'Тафтиши муҳит иҷро нашудааст!';
|
||||
$string['installation'] = 'Ҷойгир кардан';
|
||||
$string['langdownloaderror'] = 'Мутаассифона, забони "{$a}"-ро муқаррар кардан муяссар нашуд. Раванди ҷойгиркунӣ ба забони англисӣ давом хоҳад кард.';
|
||||
$string['memorylimithelp'] = '<p>Ҳозир маҳдудкунии хотира дар PHP дар сервери Шумо ба андозаи {$a} муқаррар шудааст.</p>
|
||||
|
||||
<p>Аз ин сабаб баъди муддате дар Moodle мушкилоти хотира пайдо шуда метавонанд, хусусан агар Шумо бисёр модулҳо ва/ё истифодабарандаҳо дошта бошед.</p>
|
||||
|
||||
<p>Мо тавсия медиҳем, агар имкон бошад, дар PHP маҳдудкунии баландтари хотира муқаррар карда шавад, масалан 40M.
|
||||
Инро бо тарзҳои зерин карда дида метавонед:</p>
|
||||
<ol>
|
||||
<li>Агар имкон бошад, PHP-ро бо калиди <i>--enable-memory-limit</i> аз нав нусхабардорӣ кунед.
|
||||
Дар ин маврид Moodle метавонад мустақилона маҳдудкунии хотираро муқаррар намояд.</li>
|
||||
<li>Агар Шумо ба файли php.ini дастрасӣ дошта бошед, метавонед параметри <b>memory_limit</b> -ро ба чизе монанди 40M тағйир диҳед. Агар дастрасӣ надошта бошед, шояд Шумо имкон доред аз администратор хоҳиш намоед, ки ин корро кунад.</li>
|
||||
<li>Дар баъзе серверҳои PHP дар феҳристи Moodle файли .htaccess бунёд кардан мумкин аст, ки сатри зеринро дорад:
|
||||
<blockquote><div>php_value memory_limit 40M</div></blockquote>
|
||||
<p>Бо вуҷуди ин, дар баъзе серверҳо аз ин сабаб эҳтимол <b>ҳамаи</b> саҳифаҳои PHP кор накарда мемонанд (Шумо хатоҳоро дар саҳифаҳо хоҳед дид). Дар ин маврид лозим меояд, ки файли .htaccess нест карда шавад.</p></li>
|
||||
</ol>';
|
||||
$string['paths'] = 'Роҳҳо';
|
||||
$string['pathserrcreatedataroot'] = 'Барномаи ҷойгиркунӣ феҳристи маълумотҳои ({$a->dataroot})-ро бунёд карда наметавонад.';
|
||||
$string['pathshead'] = 'Роҳҳоро тасдиқ намоед';
|
||||
$string['pathsrodataroot'] = 'Феҳристи маълумотҳо барои сабт дастрас нест.';
|
||||
$string['pathsroparentdataroot'] = 'Феҳристи волидӣ ({$a->parent}) барои сабт дастрас нест. Барномаи ҷойгиркунӣ феҳристи маълумотҳои ({$a->dataroot})-ро бунёд карда наметавонад.';
|
||||
$string['pathssubadmindir'] = 'Дар миқдори ками веб-ҳостингҳо роҳи /admin барои дастрасӣ ба ба панели идоракунӣ ё ягон чизи дигар истифода мешавад. Мутаассифона, ин ба ҷойгиршавии стандартии саҳифаҳои идоракунии Moodle мухолифат дорад. Инро бо аз нав номгузорӣ кардани папкаи "admin" дар феҳристи Moodle ва дар ин ҷо зикр намудани номи нави он ислоҳ кардан мумкин аст. Масалан: <em>moodleadmin</em>. Дар айни ҳол ҳамаи истинодҳо ба панели идоракунии Moodle автоматӣ ислоҳ мешаванд';
|
||||
$string['pathssubdataroot'] = 'Ҷоеро зикр намудан даркор аст, ки Moodle файлҳои боршавандаро нигаҳдорӣ хоҳад кард. Ин феҳрист бояд барои хондан ва САБТ НАМУДАНИ истифодабаранда, ки веб-сервер аз номи ӯ ба кор андохта шудааст, дастрас бошад (одатан \'nobody\' ё \'apache\'), аммо дар айни ҳол он набояд бевосита аз Интернет дастрас бошад. Барномаи ҷойгиркунӣ кӯшиш мекунад, ки ин феҳристро бунёд кунад, агар он вуҷуд надошта бошад.';
|
||||
$string['pathssubdirroot'] = 'Роҳи пурра ба феҳристи ҷойгиркунии Moodle.';
|
||||
$string['pathssubwwwroot'] = 'Веб-адреси пурра, ки аз он Moodle дастрас хоҳад буд.
|
||||
Барои дастрасӣ ба Moodle якчанд адресҳои умумиро истифода бурдан ғайриимкон аст.
|
||||
Агар сомонаи Шумо боз якчанд адресҳои умумӣ дошта бошад, Шумо бояд доимо аз ин адресҳо ба адреси зикршуда равона карданро танзим намоед. Агар сомонаи Шумо ҳам аз Интернета, ҳам аз шабакаи маҳаллӣ дастрас бошад, дар ин ҷо адреси умумкиро зикр намоед ва DNS-ро чунон танзим намоед, ки ин адрес ба истифодабарандаҳои маҳаллӣ низ дастрас бошад.
|
||||
Агар адреси дар ин ҷо зикршуда нодуруст бошад, URL-ро дар сатри адреси браузер тағйир диҳед, то ки дастгоҳро бо нишондиҳандаи дигар аз нав ба кор андозед.';
|
||||
$string['pathsunsecuredataroot'] = 'Ҷойгиршавии феҳристи маълумотҳо ба талаботи бехатарӣ ҷавобгӯ нест';
|
||||
$string['pathswrongadmindir'] = 'Феҳристи admin вуҷуд надорад';
|
||||
$string['phpextension'] = 'Васеъшавии PHP "{$a}"';
|
||||
$string['phpversion'] = 'Версияи PHP';
|
||||
$string['phpversionhelp'] = '<p>Барои Moodle PHP-и версияи 4.3.0 ва болотар ё 5.1.0 ва болотар даркор аст (баъзе мушкилот бо версияи 5.0.x маълуманд).</p>
|
||||
<p>Ҳозир Шумо версияи {$a}-ро истифода мебаред</p>
|
||||
<p>Шумо бояд PHP-ро навсозӣ кунед ё ба ҳостинг бо версияи навтари PHP гузаред!<br />
|
||||
(Дар мавриди версияи 5.0.x ҳамчунин ба версияи 4.4.x фаромадан мумкин аст)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Шумо ин саҳифаро мебинед, чунки дар компютери худ маҷмӯи барномаҳои <strong>{$a->packname} {$a->packversion}</strong> -ро бо муваффақият ҷойгир намудед. Табрик мекунем!';
|
||||
$string['welcomep30'] = 'Ин версияи маҷмӯи барномаҳо <strong>{$a->installername}</strong> барномаҳои зеринро дар бар мегирад, ки барои бунёд кардани муҳите ки дар он <strong>Moodle</strong> кор хоҳад кард, даркоранд:';
|
||||
$string['welcomep40'] = 'Ҳамчунин ба ин маҷмӯъ <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong> дохил мешавад.';
|
||||
$string['welcomep50'] = 'Тартиби истифодаи замимаҳое ки ба ин маҷмӯъ дохил мешаванд, бо иҷозатномаҳои мувофиқ ба низом дароварда мешавад. Маҷмӯи барномаҳои <strong>{$a->installername}</strong> пурра <a href="http://ru.wikipedia.org/wiki/Таъмини_барномавии_кушода">кушода аст </a> ва бо шартҳои иҷозатнома паҳн карда мешавад <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
$string['welcomep60'] = 'Дар саҳифаҳои минбаъда Шумо якчанд қадамҳои оддии ба компютери худ танзим ва ҷойгир кардани <strong>Moodle</strong> -ро дида метавонед. Шумо метавонед танзимҳоро аз рӯи хомӯшӣ қабул намоед ё онҳоро вобаста ба эҳтиёҷоти худ тағйир диҳед.';
|
||||
$string['welcomep70'] = 'Тугмаи "Давомаш"-ро зер кунед, то ки раванди ҷойгиркунии <strong>Moodle</strong>-ро давом диҳед';
|
||||
$string['wwwroot'] = 'Веб-адрес';
|
||||
@@ -30,4 +30,5 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thislanguage'] = 'тоҷикӣ';
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Тоҷикӣ';
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['language'] = 'Забон';
|
||||
$string['next'] = 'Давомаш';
|
||||
$string['previous'] = 'Ба ақиб';
|
||||
$string['reload'] = 'Навсозӣ карда шавад';
|
||||
@@ -32,12 +32,11 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['clianswerno'] = 'n';
|
||||
$string['cliansweryes'] = 'y';
|
||||
$string['cliincorrectvalueerror'] = '錯誤,不正確的值 "{$a->value}" 用於 "{$a->option}"';
|
||||
$string['cliincorrectvalueretry'] = '不正確的值,請再試一次';
|
||||
$string['cliincorrectvalueerror'] = '錯誤,將“{$a->option}”的值設為“{$a->value}”是不正確的';
|
||||
$string['cliincorrectvalueretry'] = '不正確值,請重試';
|
||||
$string['clitypevalue'] = '輸入值';
|
||||
$string['clitypevaluedefault'] = '輸入值,按Enter可使用預設值({$a})';
|
||||
$string['cliunknowoption'] = '不認得的選項: {$a}
|
||||
請使用 --幫助 選項。';
|
||||
$string['cliyesnoprompt'] = '輸入y(是) 或n(否)';
|
||||
$string['clitypevaluedefault'] = '輸入值,按回車使用預設值({$a})';
|
||||
$string['cliunknowoption'] = '錯誤選項:{$a}請使用 --help 選項。';
|
||||
$string['cliyesnoprompt'] = '輸入y(表示是)或n(表示否)';
|
||||
$string['environmentrequireinstall'] = '必須安裝並啟用';
|
||||
$string['environmentrequireversion'] = '要求版本為 {$a->needed} ,您目前版本為 {$a->current}';
|
||||
$string['environmentrequireversion'] = '需求版本為{$a->needed},而您目前版本為 {$a->current}';
|
||||
|
||||
+8
-7
@@ -353,7 +353,7 @@ $string['country'] = 'Default country';
|
||||
$string['coursecontact'] = 'Course contacts';
|
||||
$string['coursecontact_desc'] = 'This setting allows you to control who appears on the course description. Users need to have at least one of these roles in a course to be shown on the course description for that course.';
|
||||
$string['courselistshortnames'] = 'Display extended course names';
|
||||
$string['courselistshortnames_desc'] = 'When showing lists of courses, or when referring to courses on administration screens, show the course short name as well as the full name. In fact, when you turn this setting on, the display uses the \'courseextendednamedisplay\' language string, so you can changewhat is displayed using Language customisation.';
|
||||
$string['courselistshortnames_desc'] = 'If enabled, course short names will be displayed in addition to full names in course lists. If required, extended course names may be customised by editing the \'courseextendednamedisplay\' language string using the language customisation feature.';
|
||||
$string['coursemgmt'] = 'Add/edit courses';
|
||||
$string['courseoverview'] = 'Course overview';
|
||||
$string['courserequestnotify'] = 'Course request notification';
|
||||
@@ -537,6 +537,7 @@ $string['frontpageroles'] = 'Front page roles';
|
||||
$string['frontpagesettings'] = 'Front page settings';
|
||||
$string['fullnamedisplay'] = 'Full name format';
|
||||
$string['gdrecommended'] = 'GD extension is used for conversion of images, some features such as user profile images will not be available if missing.';
|
||||
$string['gdrequired'] = 'The GD extension is now required by Moodle for image conversion.';
|
||||
$string['gdversion'] = 'GD version';
|
||||
$string['generalsettings'] = 'General settings';
|
||||
$string['geoipfile'] = 'GeoIP city data file';
|
||||
@@ -824,7 +825,7 @@ $string['profilingallowall_help'] = 'If you enable this setting, then, at any mo
|
||||
$string['profilingallowme'] = 'Selective profiling';
|
||||
$string['profilingallowme_help'] = 'If you enable this setting, then, selectively, you can use the PROFILEME parameter anywhere (PGC) and profiling for that script will happen. Analogously, you can use the DONTPROFILEME parameter to prevent profiling to happen';
|
||||
$string['profilingautofrec'] = 'Automatic profiling';
|
||||
$string['profilingautofrec_help'] = 'By configuring this setting, some request (randomly, based on the frecuency specified - 1 of XXX) will be picked and automatically profiled, storing results for further analysis. Note that this way of profiling observes the include/exclude settings. Set it to 0 to disable automatic profiling.';
|
||||
$string['profilingautofrec_help'] = 'By configuring this setting, some request (randomly, based on the frequency specified - 1 of N) will be picked and automatically profiled, storing results for further analysis. Note that this way of profiling observes the include/exclude settings. Set it to 0 to disable automatic profiling.';
|
||||
$string['profilingenabled'] = 'Enable profiling';
|
||||
$string['profilingenabled_help'] = 'If you enable this setting, then profiling will be available in this site and you will be able to define its behavior by configuring the next options.';
|
||||
$string['profilingexcluded'] = 'Exclude profiling';
|
||||
@@ -857,10 +858,10 @@ $string['register'] = 'Register your site';
|
||||
$string['registermoodleorg'] = 'When you register your site with {$a}';
|
||||
$string['registermoodleorgli1'] = 'You are added to a low-volume mailing list for important notifications such as security alerts and new releases of Moodle.';
|
||||
$string['registermoodleorgli2'] = 'Statistics about your site will be added to the {$a} of the worldwide Moodle community.';
|
||||
$string['registermoodleorgli3'] = 'Your site is also registered with the Moodle.org Open Community Hub ({$a}), allowing users with the publish courses capability (by default only managers) the option of publishing courses to MOOCH.';
|
||||
$string['registermoodleorgli3'] = 'Your site is also registered with Moodle.net ({$a}), allowing users with the publish courses capability (by default only managers) the option of publishing courses to Moodle.net.';
|
||||
$string['registerwithmoodleorg'] = 'Register with Moodle.org';
|
||||
$string['registration'] = 'Registration';
|
||||
$string['registration_help'] = 'Registering your site with Moodle.org is recommended in order to receive security alert notifications, to contribute <a href="http://moodle.org/stats">Moodle usage statistics</a> and to be able to share courses on <a href="http://hub.moodle.org/">MOOCH</a>.';
|
||||
$string['registration_help'] = 'Registering your site with Moodle.org is recommended in order to receive security alert notifications, to contribute <a href="http://moodle.org/stats">Moodle usage statistics</a> and to be able to share courses on <a href="http://moodle.net/">Moodle.net</a>.';
|
||||
$string['registrationwarning'] = 'Your site is not yet registered.';
|
||||
$string['releasenoteslink'] = 'For information about this version of Moodle, please see the online <a target="_blank" href="{$a}">Release Notes</a>';
|
||||
$string['rememberusername'] = 'Remember username';
|
||||
@@ -1024,16 +1025,16 @@ This can cause significant problems later, so in order to continue you must ensu
|
||||
The recommended way to clean your Moodle directory is as follows:
|
||||
|
||||
* rename the current Moodle directory to "moodle_old"
|
||||
* create a new Moodle directory containing only files from either a standard Moodle package download, or from the Moodle CVS or GIT repositories
|
||||
* create a new Moodle directory containing only files from either a standard Moodle package download, or from the Moodle Git repository
|
||||
* move the original config.php file and any non-standard plugins from the "moodle_old" directory to the new Moodle directory
|
||||
|
||||
When you have a clean Moodle directory, refresh this page to resume the Moodle update process.
|
||||
|
||||
This warning is often caused by unzipping a standard Moodle package over a previous version of Moodle. While this is OK for minor upgrades, it is strongly discouraged for major Moodle upgrades.
|
||||
|
||||
This warning can also be caused by an incomplete checkout or update operation from a CVS, SVN or GIT repository, in which case you may just have to wait for the operation complete, or perhaps run the appropriate clean up command and retry the operation.
|
||||
This warning can also be caused by an incomplete checkout or update operation from the Git repository, in which case you may just have to wait for the operation to complete, or perhaps run the appropriate clean-up command and retry the operation.
|
||||
|
||||
You can find more information in upgrade documentation at <a href="{$a}">{$a}</a>';
|
||||
You can find more information in upgrade documentation at <a href="{$a}">{$a}</a>.';
|
||||
$string['upgradesure'] = 'Your Moodle files have been changed, and you are about to automatically upgrade your server to this version: <br /><br />
|
||||
<strong>{$a}</strong> <br /><br />
|
||||
Once you do this you can not go back again. <br /><br />
|
||||
|
||||
+2
-1
@@ -235,8 +235,9 @@ $string['selectacourse'] = 'Select a course';
|
||||
$string['setting_overwriteconf'] = 'Overwrite course configuration';
|
||||
$string['setting_course_fullname'] = 'Course name';
|
||||
$string['setting_course_shortname'] = 'Course short name';
|
||||
$string['setting_course_startdate'] = 'Course startdate';
|
||||
$string['setting_course_startdate'] = 'Course start date';
|
||||
$string['setting_keep_roles_and_enrolments'] = 'Keep current roles and enrolments';
|
||||
$string['setting_keep_groups_and_groupings'] = 'Keep current groups and groupings';
|
||||
$string['totalcategorysearchresults'] = 'Total categories: {$a}';
|
||||
$string['totalcoursesearchresults'] = 'Total courses: {$a}';
|
||||
$string['morecoursesearchresults'] = 'More than {$a} courses found, showing first {$a} results';
|
||||
|
||||
@@ -29,7 +29,7 @@ $string['availabilityconditions'] = 'Restrict access';
|
||||
$string['availablefrom'] = 'Allow access from';
|
||||
$string['availablefrom_help'] = 'Access from/to dates determine when students can access the activity via a link on the course page.
|
||||
|
||||
The difference between access from/to dates and availability settings for the activity is that outside the set dates the latter allows students to view the activity description, whereas access from/to dates prevent access completely.';
|
||||
The difference between access from/to dates and availability settings for the activity is that outside the set dates, access from/to prevents access completely, while availability allows students to view the activity description.';
|
||||
$string['availableuntil'] = 'Allow access until';
|
||||
$string['badavailabledates'] = 'Invalid dates. If you set both dates, the \'Allow access from\' date should be before the \'until\' date.';
|
||||
$string['badgradelimits'] = 'If you set both an upper and lower grade limit, the upper limit must be higher than the lower limit.';
|
||||
|
||||
+11
-7
@@ -52,7 +52,8 @@ $string['BJ'] = 'Benin';
|
||||
$string['BL'] = 'Saint Barthélemy';
|
||||
$string['BM'] = 'Bermuda';
|
||||
$string['BN'] = 'Brunei Darussalam';
|
||||
$string['BO'] = 'Bolivia';
|
||||
$string['BO'] = 'Bolivia, Plurinational State Of';
|
||||
$string['BQ'] = 'Bonaire, Sint Eustatius And Saba';
|
||||
$string['BR'] = 'Brazil';
|
||||
$string['BS'] = 'Bahamas';
|
||||
$string['BT'] = 'Bhutan';
|
||||
@@ -65,6 +66,7 @@ $string['CC'] = 'Cocos (Keeling) Islands';
|
||||
$string['CD'] = 'Congo, The Democratic Republic Of The';
|
||||
$string['CF'] = 'Central African Republic';
|
||||
$string['CG'] = 'Congo';
|
||||
$string['CH'] = 'Switzerland';
|
||||
$string['CI'] = 'Côte D\'Ivoire';
|
||||
$string['CK'] = 'Cook Islands';
|
||||
$string['CL'] = 'Chile';
|
||||
@@ -74,6 +76,7 @@ $string['CO'] = 'Colombia';
|
||||
$string['CR'] = 'Costa Rica';
|
||||
$string['CU'] = 'Cuba';
|
||||
$string['CV'] = 'Cape Verde';
|
||||
$string['CW'] = 'Curaçao';
|
||||
$string['CX'] = 'Christmas Island';
|
||||
$string['CY'] = 'Cyprus';
|
||||
$string['CZ'] = 'Czech Republic';
|
||||
@@ -121,7 +124,6 @@ $string['HN'] = 'Honduras';
|
||||
$string['HR'] = 'Croatia';
|
||||
$string['HT'] = 'Haiti';
|
||||
$string['HU'] = 'Hungary';
|
||||
$string['CH'] = 'Switzerland';
|
||||
$string['ID'] = 'Indonesia';
|
||||
$string['IE'] = 'Ireland';
|
||||
$string['IL'] = 'Israel';
|
||||
@@ -157,12 +159,12 @@ $string['LS'] = 'Lesotho';
|
||||
$string['LT'] = 'Lithuania';
|
||||
$string['LU'] = 'Luxembourg';
|
||||
$string['LV'] = 'Latvia';
|
||||
$string['LY'] = 'State of Libya';
|
||||
$string['LY'] = 'Libya';
|
||||
$string['MA'] = 'Morocco';
|
||||
$string['MC'] = 'Monaco';
|
||||
$string['MD'] = 'Moldova, Republic Of';
|
||||
$string['ME'] = 'Montenegro';
|
||||
$string['MF'] = 'Saint Martin';
|
||||
$string['MF'] = 'Saint Martin (French Part)';
|
||||
$string['MG'] = 'Madagascar';
|
||||
$string['MH'] = 'Marshall Islands';
|
||||
$string['MK'] = 'Macedonia, The Former Yugoslav Republic Of';
|
||||
@@ -204,7 +206,7 @@ $string['PL'] = 'Poland';
|
||||
$string['PM'] = 'Saint Pierre And Miquelon';
|
||||
$string['PN'] = 'Pitcairn';
|
||||
$string['PR'] = 'Puerto Rico';
|
||||
$string['PS'] = 'Palestinian Territory, Occupied';
|
||||
$string['PS'] = 'Palestine, State Of';
|
||||
$string['PT'] = 'Portugal';
|
||||
$string['PW'] = 'Palau';
|
||||
$string['PY'] = 'Paraguay';
|
||||
@@ -220,7 +222,7 @@ $string['SC'] = 'Seychelles';
|
||||
$string['SD'] = 'Sudan';
|
||||
$string['SE'] = 'Sweden';
|
||||
$string['SG'] = 'Singapore';
|
||||
$string['SH'] = 'Saint Helena';
|
||||
$string['SH'] = 'Saint Helena, Ascension And Tristan Da Cunha';
|
||||
$string['SI'] = 'Slovenia';
|
||||
$string['SJ'] = 'Svalbard And Jan Mayen';
|
||||
$string['SK'] = 'Slovakia';
|
||||
@@ -229,8 +231,10 @@ $string['SM'] = 'San Marino';
|
||||
$string['SN'] = 'Senegal';
|
||||
$string['SO'] = 'Somalia';
|
||||
$string['SR'] = 'Suriname';
|
||||
$string['SS'] = 'South Sudan';
|
||||
$string['ST'] = 'Sao Tome And Principe';
|
||||
$string['SV'] = 'El Salvador';
|
||||
$string['SX'] = 'Sint Maarten (Dutch Part)';
|
||||
$string['SY'] = 'Syrian Arab Republic';
|
||||
$string['SZ'] = 'Swaziland';
|
||||
$string['TC'] = 'Turks And Caicos Islands';
|
||||
@@ -257,7 +261,7 @@ $string['UY'] = 'Uruguay';
|
||||
$string['UZ'] = 'Uzbekistan';
|
||||
$string['VA'] = 'Holy See (Vatican City State)';
|
||||
$string['VC'] = 'Saint Vincent And The Grenadines';
|
||||
$string['VE'] = 'Venezuela';
|
||||
$string['VE'] = 'Venezuela, Bolivarian Republic Of';
|
||||
$string['VG'] = 'Virgin Islands, British';
|
||||
$string['VI'] = 'Virgin Islands, U.S.';
|
||||
$string['VN'] = 'Viet Nam';
|
||||
|
||||
@@ -238,6 +238,7 @@ $string['filternotinstalled'] = 'Filter {$a} is not currently installed';
|
||||
$string['forumblockingtoomanyposts'] = 'You have exceeded the posting threshold set for this forum';
|
||||
$string['generalexceptionmessage'] = 'Exception - {$a}';
|
||||
$string['gradepubdisable'] = 'Grade publishing disabled';
|
||||
$string['gradecantregrade'] = 'An error occurred during grade calculation: {$a}';
|
||||
$string['groupalready'] = 'User already belongs to group {$a}';
|
||||
$string['groupexistforcourse'] = 'Group "{$a}" already exists for this course';
|
||||
$string['groupexistforcoursewithidnumber'] = '{$a->problemgroup}: Group "{$a->name}" with an idnumber of "{$a->idnumber}" already exists for this course';
|
||||
|
||||
@@ -172,6 +172,7 @@ $string['enableoutcomes_help'] = 'Support for Outcomes (also known as Competenci
|
||||
$string['encoding'] = 'Encoding';
|
||||
$string['errorcalculationnoequal'] = 'Formula must start with equal sign (=1+2)';
|
||||
$string['errorcalculationunknown'] = 'Invalid formula';
|
||||
$string['errorcalculationbroken'] = 'Probably circular reference or broken calculation formula';
|
||||
$string['errorgradevaluenonnumeric'] = 'Received non-numeric for low or high grade for';
|
||||
$string['errornocalculationallowed'] = 'Calculations are not allowed for this item';
|
||||
$string['errornocategorisedid'] = 'Could not get an uncategorised id!';
|
||||
|
||||
+1
-1
@@ -160,7 +160,7 @@ $string['registeredsites'] = 'Registered sites';
|
||||
$string['registrationinfo'] = 'Registration information';
|
||||
$string['registeredmoodleorg'] = 'Moodle.org ({$a})';
|
||||
$string['registeredon'] = 'Hubs with which you are registered';
|
||||
$string['registermoochtips'] = 'To be registered with Moodle.org Open Community Hub (MOOCH), your site must be registered with Moodle.org.';
|
||||
$string['registermoochtips'] = 'In order to register with Moodle.net, your site must be registered with Moodle.org.';
|
||||
$string['registersite'] = 'Register with {$a}';
|
||||
$string['registerwith'] = 'Register with a hub';
|
||||
$string['registrationconfirmed'] = 'Site registration confirmed';
|
||||
|
||||
+2
-4
@@ -312,7 +312,7 @@ $string['coursehelpforce'] = 'Force the course group mode to every activity in t
|
||||
$string['coursehelpformat'] = 'The course main page will be displayed in this format.';
|
||||
$string['coursehelphiddensections'] = 'How the hidden sections in the course are displayed to students.';
|
||||
$string['coursehelpmaximumupload'] = 'Define the largest size of file that can be uploaded in this course, limited by the site-wide setting.';
|
||||
$string['coursehelpnewsitemsnumber'] = 'Number of recent items appearing on the course home page, in a news box down the right-hand side (0 means the news box won\'t appear).';
|
||||
$string['coursehelpnewsitemsnumber'] = 'Number of recent items from the news forum appearing in the latest news block on the course page. If set to zero, the latest news block will not be displayed.';
|
||||
$string['coursehelpnumberweeks'] = 'Number of sections in the course (applies to certain course formats only).';
|
||||
$string['coursehelpshowgrades'] = 'Enable the display of the gradebook. It does not prevent grades from being displayed within the individual activities.';
|
||||
$string['coursehidden'] = 'This course is currently unavailable to students';
|
||||
@@ -322,9 +322,7 @@ $string['coursenotaccessible'] = 'This course does not allow public access';
|
||||
$string['courselegacyfiles'] = 'Legacy course files';
|
||||
$string['courselegacyfiles_help'] = 'The course files area provides some backward compatibility with Moodle 1.9 and earlier. All files in this area are always accessible to all participants in the course (whether you link to them or not) and there is no way to know where any of these files are being used in Moodle.
|
||||
|
||||
If you use this area to store course files, you can expose yourself to a number of privacy and security issues, as well as experiencing missing files in backups, course imports and any time content is shared or re-used. It is therefore recommended that you do not use this area unless you really know what you are doing.
|
||||
|
||||
The link below provides more information about all this and will show you some better ways to manage files in Moodle 2.';
|
||||
If you use this area to store course files, you can expose yourself to a number of privacy and security issues, as well as experiencing missing files in backups, course imports and any time content is shared or re-used. It is therefore recommended that you do not use this area unless you really know what you are doing.';
|
||||
$string['courselegacyfiles_link'] = 'coursefiles2';
|
||||
$string['courseoverview'] = 'Course overview';
|
||||
$string['courseoverviewgraph'] = 'Course overview graph';
|
||||
|
||||
+1
-1
@@ -7544,7 +7544,7 @@ class admin_setting_managewebservicetokens extends admin_setting {
|
||||
|
||||
$validuntil = '';
|
||||
if (!empty($token->validuntil)) {
|
||||
$validuntil = date("F j, Y"); //TODO: language support (look for moodle function)
|
||||
$validuntil = userdate($token->validuntil, get_string('strftimedatetime', 'langconfig'));
|
||||
}
|
||||
|
||||
$iprestriction = '';
|
||||
|
||||
@@ -2328,6 +2328,9 @@
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key of the table, please edit me"/>
|
||||
</KEYS>
|
||||
<INDEXES>
|
||||
<INDEX NAME="unreadmessageid_idx" UNIQUE="false" FIELDS="unreadmessageid" COMMENT="Index on unreadmessage id"/>
|
||||
</INDEXES>
|
||||
</TABLE>
|
||||
<TABLE NAME="files" COMMENT="description of files, content is stored in sha1 file pool" PREVIOUS="message_working" NEXT="files_reference">
|
||||
<FIELDS>
|
||||
|
||||
@@ -1126,5 +1126,45 @@ function xmldb_main_upgrade($oldversion) {
|
||||
upgrade_main_savepoint(true, 2012062504.13);
|
||||
}
|
||||
|
||||
if ($oldversion < 2012062506.02) {
|
||||
// Fixing possible wrong MIME type for MIME HTML (MHTML) files.
|
||||
$extensions = array('%.mht', '%.mhtml');
|
||||
$select = $DB->sql_like('filename', '?', false);
|
||||
foreach ($extensions as $extension) {
|
||||
$DB->set_field_select(
|
||||
'files',
|
||||
'mimetype',
|
||||
'message/rfc822',
|
||||
$select,
|
||||
array($extension)
|
||||
);
|
||||
}
|
||||
upgrade_main_savepoint(true, 2012062506.02);
|
||||
}
|
||||
|
||||
if ($oldversion < 2012062506.06) {
|
||||
// MDL-29877 Some bad restores created grade items with no category information.
|
||||
$sql = "UPDATE {grade_items}
|
||||
SET categoryid = courseid
|
||||
WHERE itemtype <> 'course' and itemtype <> 'category'
|
||||
AND categoryid IS NULL";
|
||||
$DB->execute($sql);
|
||||
upgrade_main_savepoint(true, 2012062506.06);
|
||||
}
|
||||
|
||||
if ($oldversion < 2012062506.08) {
|
||||
// Adding index to unreadmessageid field of message_working table (MDL-34933)
|
||||
$table = new xmldb_table('message_working');
|
||||
$index = new xmldb_index('unreadmessageid_idx', XMLDB_INDEX_NOTUNIQUE, array('unreadmessageid'));
|
||||
|
||||
// Conditionally launch add index unreadmessageid
|
||||
if (!$dbman->index_exists($table, $index)) {
|
||||
$dbman->add_index($table, $index);
|
||||
}
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2012062506.08);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -713,7 +713,11 @@ class mssql_native_moodle_database extends moodle_database {
|
||||
$this->query_end($result);
|
||||
|
||||
if ($limitfrom) { // Skip $limitfrom records
|
||||
mssql_data_seek($result, $limitfrom);
|
||||
if (!@mssql_data_seek($result, $limitfrom)) {
|
||||
// Nothing, most probably seek past the end.
|
||||
mssql_free_result($result);
|
||||
$result = null;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->create_recordset($result);
|
||||
@@ -1176,7 +1180,7 @@ class mssql_native_moodle_database extends moodle_database {
|
||||
public function sql_concat() {
|
||||
$arr = func_get_args();
|
||||
foreach ($arr as $key => $ele) {
|
||||
$arr[$key] = ' CAST(' . $ele . ' AS VARCHAR(255)) ';
|
||||
$arr[$key] = ' CAST(' . $ele . ' AS NVARCHAR(255)) ';
|
||||
}
|
||||
$s = implode(' + ', $arr);
|
||||
if ($s === '') {
|
||||
|
||||
@@ -1570,6 +1570,72 @@ class oci_native_moodle_database extends moodle_database {
|
||||
return " $s ";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs 'IN()' or '=' sql fragment
|
||||
*
|
||||
* Method overriding {@link moodle_database::get_in_or_equal} to be able to get
|
||||
* more than 1000 elements working, to avoid ORA-01795. We use a pivoting technique
|
||||
* to be able to transform the params into virtual rows, so the original IN()
|
||||
* expression gets transformed into a subquery. Once more, be noted that we shouldn't
|
||||
* be using ever get_in_or_equal() with such number of parameters (proper subquery and/or
|
||||
* chunking should be used instead).
|
||||
*
|
||||
* @param mixed $items A single value or array of values for the expression.
|
||||
* @param int $type Parameter bounding type : SQL_PARAMS_QM or SQL_PARAMS_NAMED.
|
||||
* @param string $prefix Named parameter placeholder prefix (a unique counter value is appended to each parameter name).
|
||||
* @param bool $equal True means we want to equate to the constructed expression, false means we don't want to equate to it.
|
||||
* @param mixed $onemptyitems This defines the behavior when the array of items provided is empty. Defaults to false,
|
||||
* meaning throw exceptions. Other values will become part of the returned SQL fragment.
|
||||
* @throws coding_exception | dml_exception
|
||||
* @return array A list containing the constructed sql fragment and an array of parameters.
|
||||
*/
|
||||
public function get_in_or_equal($items, $type=SQL_PARAMS_QM, $prefix='param', $equal=true, $onemptyitems=false) {
|
||||
list($sql, $params) = parent::get_in_or_equal($items, $type, $prefix, $equal, $onemptyitems);
|
||||
|
||||
// Less than 1000 elements, nothing to do.
|
||||
if (count($params) < 1000) {
|
||||
return array($sql, $params); // Return unmodified.
|
||||
}
|
||||
|
||||
// Extract the interesting parts of the sql to rewrite.
|
||||
if (preg_match('!(^.*IN \()([^\)]*)(.*)$!', $sql, $matches) === false) {
|
||||
return array($sql, $params); // Return unmodified.
|
||||
}
|
||||
|
||||
$instart = $matches[1];
|
||||
$insql = $matches[2];
|
||||
$inend = $matches[3];
|
||||
$newsql = '';
|
||||
|
||||
// Some basic verification about the matching going ok.
|
||||
$insqlarr = explode(',', $insql);
|
||||
if (count($insqlarr) !== count($params)) {
|
||||
return array($sql, $params); // Return unmodified.
|
||||
}
|
||||
|
||||
// Arrived here, we need to chunk and pivot the params, building a new sql (params remain the same).
|
||||
$addunionclause = false;
|
||||
while ($chunk = array_splice($insqlarr, 0, 125)) { // Each chunk will handle up to 125 (+125 +1) elements (DECODE max is 255).
|
||||
$chunksize = count($chunk);
|
||||
if ($addunionclause) {
|
||||
$newsql .= "\n UNION ALL";
|
||||
}
|
||||
$newsql .= "\n SELECT DECODE(pivot";
|
||||
$counter = 1;
|
||||
foreach ($chunk as $element) {
|
||||
$newsql .= ",\n {$counter}, " . trim($element);
|
||||
$counter++;
|
||||
}
|
||||
$newsql .= ")";
|
||||
$newsql .= "\n FROM dual";
|
||||
$newsql .= "\n CROSS JOIN (SELECT LEVEL AS pivot FROM dual CONNECT BY LEVEL <= {$chunksize})";
|
||||
$addunionclause = true;
|
||||
}
|
||||
|
||||
// Rebuild the complete IN() clause and return it.
|
||||
return array($instart . $newsql . $inend, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the SQL for returning searching one string for the location of another.
|
||||
*/
|
||||
|
||||
@@ -1241,7 +1241,7 @@ class sqlsrv_native_moodle_database extends moodle_database {
|
||||
$arr = func_get_args();
|
||||
|
||||
foreach ($arr as $key => $ele) {
|
||||
$arr[$key] = ' CAST('.$ele.' AS VARCHAR(255)) ';
|
||||
$arr[$key] = ' CAST('.$ele.' AS NVARCHAR(255)) ';
|
||||
}
|
||||
$s = implode(' + ', $arr);
|
||||
|
||||
|
||||
@@ -4152,6 +4152,27 @@ class dml_testcase extends database_driver_testcase {
|
||||
$DB->insert_record($tablename, array('course' => 7, 'content' => 'xx', 'name'=>'1abc'));
|
||||
$this->assertEquals(count($DB->get_records_sql($sql, array(1))), 1);
|
||||
$this->assertEquals(count($DB->get_records_sql($sql, array("1"))), 1);
|
||||
|
||||
// Test get_in_or_equal() with a big number of elements. Note that ideally
|
||||
// we should be detecting and warning about any use over, say, 200 elements
|
||||
// and recommend to change code to use subqueries and/or chunks instead.
|
||||
$currentcount = $DB->count_records($tablename);
|
||||
$numelements = 10000; // Verify that we can handle 10000 elements (crazy!)
|
||||
$values = range(1, $numelements);
|
||||
|
||||
list($insql, $inparams) = $DB->get_in_or_equal($values, SQL_PARAMS_QM); // With QM params.
|
||||
$sql = "SELECT *
|
||||
FROM {{$tablename}}
|
||||
WHERE id $insql";
|
||||
$results = $DB->get_records_sql($sql, $inparams);
|
||||
$this->assertEquals($currentcount, count($results));
|
||||
|
||||
list($insql, $inparams) = $DB->get_in_or_equal($values, SQL_PARAMS_NAMED); // With NAMED params.
|
||||
$sql = "SELECT *
|
||||
FROM {{$tablename}}
|
||||
WHERE id $insql";
|
||||
$results = $DB->get_records_sql($sql, $inparams);
|
||||
$this->assertEquals($currentcount, count($results));
|
||||
}
|
||||
|
||||
function test_onelevel_commit() {
|
||||
|
||||
@@ -139,7 +139,7 @@ class tinymce_texteditor extends texteditor {
|
||||
'apply_source_formatting' => true,
|
||||
'remove_script_host' => false,
|
||||
'entity_encoding' => "raw",
|
||||
'plugins' => "{$xmedia}advimage,safari,table,style,layer,advhr,advlink,emotions,inlinepopups,searchreplace,paste,directionality,fullscreen,moodlenolink,{$xemoticon}{$xdragmath}nonbreaking,contextmenu,insertdatetime,save,iespell,preview,print,noneditable,visualchars,xhtmlxtras,template,pagebreak,spellchecker",
|
||||
'plugins' => "{$xmedia}advimage,table,style,layer,advhr,advlink,emotions,inlinepopups,searchreplace,paste,directionality,fullscreen,moodlenolink,{$xemoticon}{$xdragmath}nonbreaking,contextmenu,insertdatetime,save,iespell,preview,print,noneditable,visualchars,xhtmlxtras,template,pagebreak,spellchecker",
|
||||
'theme_advanced_font_sizes' => "1,2,3,4,5,6,7",
|
||||
'theme_advanced_layout_manager' => "SimpleLayout",
|
||||
'theme_advanced_toolbar_align' => "left",
|
||||
|
||||
@@ -687,6 +687,7 @@ function external_format_text($text, $textformat, $contextid, $component, $filea
|
||||
$settings = external_settings::get_instance();
|
||||
|
||||
if ($settings->get_fileurl()) {
|
||||
require_once($CFG->libdir . "/filelib.php");
|
||||
$text = file_rewrite_pluginfile_urls($text, $settings->get_file(), $contextid, $component, $filearea, $itemid);
|
||||
}
|
||||
|
||||
|
||||
@@ -1445,6 +1445,8 @@ function &get_mimetypes_array() {
|
||||
'm' => array ('type'=>'text/plain', 'icon'=>'sourcecode'),
|
||||
'mbz' => array ('type'=>'application/vnd.moodle.backup', 'icon'=>'moodle'),
|
||||
'mdb' => array ('type'=>'application/x-msaccess', 'icon'=>'base'),
|
||||
'mht' => array ('type'=>'message/rfc822', 'icon'=>'archive'),
|
||||
'mhtml'=> array ('type'=>'message/rfc822', 'icon'=>'archive'),
|
||||
'mov' => array ('type'=>'video/quicktime', 'icon'=>'quicktime', 'groups'=>array('video','web_video'), 'string'=>'video'),
|
||||
'movie'=> array ('type'=>'video/x-sgi-movie', 'icon'=>'quicktime', 'groups'=>array('video'), 'string'=>'video'),
|
||||
'm3u' => array ('type'=>'audio/x-mpegurl', 'icon'=>'mp3', 'groups'=>array('audio'), 'string'=>'audio'),
|
||||
|
||||
@@ -82,8 +82,11 @@ class MoodleQuickForm_passwordunmask extends MoodleQuickForm_password {
|
||||
} else {
|
||||
$unmask = get_string('unmaskpassword', 'form');
|
||||
//Pass id of the element, so that unmask checkbox can be attached.
|
||||
$attributes = array('formid' => $this->getAttribute('id'),
|
||||
'checkboxlabel' => $unmask,
|
||||
'checkboxname' => $this->getAttribute('name'));
|
||||
$PAGE->requires->yui_module('moodle-form-passwordunmask', 'M.form.passwordunmask',
|
||||
array(array('formid' => $this->getAttribute('id'), 'checkboxname' => $unmask)));
|
||||
array($attributes));
|
||||
return $this->_getTabs() . '<input' . $this->_getAttrString($this->_attributes) . ' />';
|
||||
}
|
||||
}
|
||||
|
||||
+10
-4
@@ -71,13 +71,19 @@ class MoodleQuickForm_select extends HTML_QuickForm_select{
|
||||
* @return string
|
||||
*/
|
||||
function toHtml(){
|
||||
$html = '';
|
||||
if ($this->getMultiple()) {
|
||||
// Adding an hidden field forces the browser to send an empty data even though the user did not
|
||||
// select any element. This value will be cleaned up in self::exportValue() as it will not be part
|
||||
// of the select options.
|
||||
$html .= '<input type="hidden" name="'.$this->getName().'" value="_qf__force_multiselect_submission">';
|
||||
}
|
||||
if ($this->_hiddenLabel){
|
||||
$this->_generateId();
|
||||
return '<label class="accesshide" for="'.$this->getAttribute('id').'" >'.
|
||||
$this->getLabel().'</label>'.parent::toHtml();
|
||||
} else {
|
||||
return parent::toHtml();
|
||||
$html .= '<label class="accesshide" for="'.$this->getAttribute('id').'" >'.$this->getLabel().'</label>';
|
||||
}
|
||||
$html .= parent::toHtml();
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
-4
@@ -7,18 +7,19 @@ YUI.add('moodle-form-passwordunmask', function(Y) {
|
||||
//Initialize checkbox if id is passed
|
||||
initializer : function(params) {
|
||||
if (params && params.formid) {
|
||||
this.add_checkbox(params.formid, params.checkboxname);
|
||||
this.add_checkbox(params.formid, params.checkboxlabel, params.checkboxname);
|
||||
}
|
||||
},
|
||||
//Create checkbox for unmasking password
|
||||
add_checkbox : function(elementid, checkboxlabel) {
|
||||
add_checkbox : function(elementid, checkboxlabel, checkboxname) {
|
||||
var node = Y.one('#'+elementid);
|
||||
|
||||
//retaining unmask div from previous implementation.
|
||||
var unmaskdiv = Y.Node.create('<div id="'+elementid+'unmaskdiv" class="unmask"></div>');
|
||||
|
||||
//Add checkbox for unmasking to unmaskdiv
|
||||
var unmaskchb = Y.Node.create('<input id="'+elementid+'unmask" type="checkbox">');
|
||||
var unmaskchb = Y.Node.create('<input id="'+elementid+'unmask" type="checkbox" name="'+
|
||||
checkboxname+'unmask">');
|
||||
unmaskdiv.appendChild(unmaskchb);
|
||||
//Attach event using static javascript function for unmasking password.
|
||||
unmaskchb.on('click', function() {unmaskPassword(elementid);});
|
||||
@@ -36,4 +37,4 @@ YUI.add('moodle-form-passwordunmask', function(Y) {
|
||||
M.form.passwordunmask = function(params) {
|
||||
return new PASSWORDUNMASK(params);
|
||||
}
|
||||
}, '@VERSION@', {requires:['base', 'node']});
|
||||
}, '@VERSION@', {requires:['base', 'node']});
|
||||
|
||||
+78
-11
@@ -1513,6 +1513,81 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
|
||||
$this->_types = $paramtypes + $this->_types;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the type(s) to use to clean an element.
|
||||
*
|
||||
* In the case where the element has an array as a value, we will try to obtain a
|
||||
* type defined for that specific key, and recursively until done.
|
||||
*
|
||||
* This method does not work reverse, you cannot pass a nested element and hoping to
|
||||
* fallback on the clean type of a parent. This method intends to be used with the
|
||||
* main element, which will generate child types if needed, not the other way around.
|
||||
*
|
||||
* Example scenario:
|
||||
*
|
||||
* You have defined a new repeated element containing a text field called 'foo'.
|
||||
* By default there will always be 2 occurence of 'foo' in the form. Even though
|
||||
* you've set the type on 'foo' to be PARAM_INT, for some obscure reason, you want
|
||||
* the first value of 'foo', to be PARAM_FLOAT, which you set using setType:
|
||||
* $mform->setType('foo[0]', PARAM_FLOAT).
|
||||
*
|
||||
* Now if you call this method passing 'foo', along with the submitted values of 'foo':
|
||||
* array(0 => '1.23', 1 => '10'), you will get an array telling you that the key 0 is a
|
||||
* FLOAT and 1 is an INT. If you had passed 'foo[1]', along with its value '10', you would
|
||||
* get the default clean type returned (param $default).
|
||||
*
|
||||
* @param string $elementname name of the element.
|
||||
* @param mixed $value value that should be cleaned.
|
||||
* @param int $default default constant value to be returned (PARAM_...)
|
||||
* @return string|array constant value or array of constant values (PARAM_...)
|
||||
*/
|
||||
public function getCleanType($elementname, $value, $default = PARAM_RAW) {
|
||||
$type = $default;
|
||||
if (array_key_exists($elementname, $this->_types)) {
|
||||
$type = $this->_types[$elementname];
|
||||
}
|
||||
if (is_array($value)) {
|
||||
$default = $type;
|
||||
$type = array();
|
||||
foreach ($value as $subkey => $subvalue) {
|
||||
$typekey = "$elementname" . "[$subkey]";
|
||||
if (array_key_exists($typekey, $this->_types)) {
|
||||
$subtype = $this->_types[$typekey];
|
||||
} else {
|
||||
$subtype = $default;
|
||||
}
|
||||
if (is_array($subvalue)) {
|
||||
$type[$subkey] = $this->getCleanType($typekey, $subvalue, $subtype);
|
||||
} else {
|
||||
$type[$subkey] = $subtype;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the cleaned value using the passed type(s).
|
||||
*
|
||||
* @param mixed $value value that has to be cleaned.
|
||||
* @param int|array $type constant value to use to clean (PARAM_...), typically returned by {@link self::getCleanType()}.
|
||||
* @return mixed cleaned up value.
|
||||
*/
|
||||
public function getCleanedValue($value, $type) {
|
||||
if (is_array($type) && is_array($value)) {
|
||||
foreach ($type as $key => $param) {
|
||||
$value[$key] = $this->getCleanedValue($value[$key], $param);
|
||||
}
|
||||
} else if (!is_array($type) && !is_array($value)) {
|
||||
$value = clean_param($value, $type);
|
||||
} else if (!is_array($type) && is_array($value)) {
|
||||
$value = clean_param_array($value, $type, true);
|
||||
} else {
|
||||
throw new coding_exception('Unexpected type or value received in MoodleQuickForm::getCleanedValue()');
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates submitted values
|
||||
*
|
||||
@@ -1525,17 +1600,9 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
|
||||
if (empty($submission)) {
|
||||
$this->_submitValues = array();
|
||||
} else {
|
||||
foreach ($submission as $key=>$s) {
|
||||
if (array_key_exists($key, $this->_types)) {
|
||||
$type = $this->_types[$key];
|
||||
} else {
|
||||
$type = PARAM_RAW;
|
||||
}
|
||||
if (is_array($s)) {
|
||||
$submission[$key] = clean_param_array($s, $type, true);
|
||||
} else {
|
||||
$submission[$key] = clean_param($s, $type);
|
||||
}
|
||||
foreach ($submission as $key => $s) {
|
||||
$type = $this->getCleanType($key, $s);
|
||||
$submission[$key] = $this->getCleanedValue($s, $type);
|
||||
}
|
||||
$this->_submitValues = $submission;
|
||||
$this->_flagSubmitted = true;
|
||||
|
||||
@@ -1152,13 +1152,17 @@ class grade_category extends grade_object {
|
||||
|
||||
} else {
|
||||
$categoryid = $item->categoryid;
|
||||
if (empty($categoryid)) {
|
||||
debugging('Found a grade item that isnt in a category');
|
||||
}
|
||||
}
|
||||
|
||||
// prevent problems with duplicate sortorders in db
|
||||
$sortorder = $item->sortorder;
|
||||
|
||||
while (array_key_exists($sortorder, $cats[$categoryid]->children)) {
|
||||
//debugging("$sortorder exists in item loop");
|
||||
while (array_key_exists($categoryid, $cats)
|
||||
&& array_key_exists($sortorder, $cats[$categoryid]->children)) {
|
||||
|
||||
$sortorder++;
|
||||
}
|
||||
|
||||
|
||||
@@ -1503,6 +1503,11 @@ class grade_item extends grade_object {
|
||||
$oldgrade->feedback = $grade->feedback;
|
||||
$oldgrade->feedbackformat = $grade->feedbackformat;
|
||||
|
||||
// MDL-31713 rawgramemin and max must be up to date so conditional access %'s works properly.
|
||||
$grade->rawgrademin = $this->grademin;
|
||||
$grade->rawgrademax = $this->grademax;
|
||||
$grade->rawscaleid = $this->scaleid;
|
||||
|
||||
// changed grade?
|
||||
if ($finalgrade !== false) {
|
||||
if ($this->is_overridable_item()) {
|
||||
|
||||
@@ -63,6 +63,7 @@ class grade_item_testcase extends grade_base_testcase {
|
||||
$this->sub_test_grade_item_set_calculation();
|
||||
$this->sub_test_grade_item_get_calculation();
|
||||
$this->sub_test_grade_item_compute();
|
||||
$this->sub_test_update_final_grade();
|
||||
}
|
||||
|
||||
protected function sub_test_grade_item_construct() {
|
||||
@@ -552,4 +553,34 @@ class grade_item_testcase extends grade_base_testcase {
|
||||
$grade_grade = grade_grade::fetch(array('userid'=>$this->grade_grades[5]->userid, 'itemid'=>$this->grade_grades[5]->itemid));
|
||||
$this->assertEquals($this->grade_grades[5]->finalgrade, $grade_grade->finalgrade);
|
||||
}
|
||||
|
||||
protected function sub_test_update_final_grade() {
|
||||
|
||||
// MDL-31713 Check that min and max are set on the grade_grade instance
|
||||
// if the grade is overridden before the activity has supplied a grade.
|
||||
$min = 2;
|
||||
$max = 8;
|
||||
|
||||
// Create a brand new grade item.
|
||||
$grade_item = new grade_item();
|
||||
$this->assertTrue(method_exists($grade_item, 'insert'));
|
||||
|
||||
$grade_item->courseid = $this->courseid;
|
||||
$grade_item->categoryid = $this->grade_categories[1]->id;
|
||||
$grade_item->itemname = 'brand new unit test grade item';
|
||||
$grade_item->itemtype = 'mod';
|
||||
$grade_item->itemmodule = 'quiz';
|
||||
$grade_item->iteminfo = 'Grade item used for unit testing';
|
||||
$grade_item->grademin = $min;
|
||||
$grade_item->grademax = $max;
|
||||
$grade_item->insert();
|
||||
|
||||
// Override the student grade.
|
||||
$grade_item->update_final_grade($this->user[1]->id, 7, 'gradebook', '', FORMAT_MOODLE);
|
||||
|
||||
// Check the student's grade has the correct min and max grade.
|
||||
$grade_grade = grade_grade::fetch(array('userid'=>$this->user[1]->id, 'itemid'=>$grade_item->id));
|
||||
$this->assertEquals($min, $grade_grade->rawgrademin);
|
||||
$this->assertEquals($max, $grade_grade->rawgrademax);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1097,9 +1097,9 @@ function grade_regrade_final_grades($courseid, $userid=null, $updated_item=null)
|
||||
continue; // this one is ok
|
||||
}
|
||||
$grade_items[$gid]->force_regrading();
|
||||
$errors[$grade_items[$gid]->id] = 'Probably circular reference or broken calculation formula'; // TODO: localize
|
||||
$errors[$grade_items[$gid]->id] = get_string('errorcalculationbroken', 'grades');
|
||||
}
|
||||
break; // oki, found error
|
||||
break; // Found error.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+45
-25
@@ -1022,34 +1022,54 @@ function findChildNodes(start, tagName, elementClass, elementID, elementName) {
|
||||
}
|
||||
|
||||
function unmaskPassword(id) {
|
||||
var pw = document.getElementById(id);
|
||||
var chb = document.getElementById(id+'unmask');
|
||||
var pw = document.getElementById(id);
|
||||
var chb = document.getElementById(id+'unmask');
|
||||
var IEbrowser = navigator.userAgent.toLowerCase().indexOf('msie');
|
||||
var IEversion = 0;
|
||||
|
||||
try {
|
||||
// first try IE way - it can not set name attribute later
|
||||
if (chb.checked) {
|
||||
var newpw = document.createElement('<input type="text" autocomplete="off" name="'+pw.name+'">');
|
||||
} else {
|
||||
var newpw = document.createElement('<input type="password" autocomplete="off" name="'+pw.name+'">');
|
||||
if (IEbrowser != -1) {
|
||||
var position = navigator.userAgent.indexOf("MSIE") + 5;
|
||||
var end = navigator.userAgent.search("; Windows");
|
||||
IEversion = parseInt(navigator.userAgent.substring(position,end));
|
||||
}
|
||||
newpw.attributes['class'].nodeValue = pw.attributes['class'].nodeValue;
|
||||
} catch (e) {
|
||||
var newpw = document.createElement('input');
|
||||
newpw.setAttribute('autocomplete', 'off');
|
||||
newpw.setAttribute('name', pw.name);
|
||||
if (chb.checked) {
|
||||
newpw.setAttribute('type', 'text');
|
||||
} else {
|
||||
newpw.setAttribute('type', 'password');
|
||||
|
||||
// MDL-30438 - The capability to changing the value of input type is not supported by IE8 or lower.
|
||||
// Replacing existing child with a new one, removed all yui properties for the node. Therefore, this
|
||||
// functionality won't work in IE8 or lower.
|
||||
// This is a temporary fixed for 2.4 or lower branches to allow other browsers to function properly.
|
||||
if (IEbrowser == -1 || (IEversion >= 9)) {
|
||||
if (chb.checked) {
|
||||
pw.type = "text";
|
||||
} else {
|
||||
pw.type = "password";
|
||||
}
|
||||
} else { //IE Browser version 8 or lower
|
||||
try {
|
||||
// first try IE way - it can not set name attribute later
|
||||
if (chb.checked) {
|
||||
var newpw = document.createElement('<input type="text" autocomplete="off" name="'+pw.name+'">');
|
||||
} else {
|
||||
var newpw = document.createElement('<input type="password" autocomplete="off" name="'+pw.name+'">');
|
||||
}
|
||||
newpw.attributes['class'].nodeValue = pw.attributes['class'].nodeValue;
|
||||
} catch (e) {
|
||||
var newpw = document.createElement('input');
|
||||
newpw.setAttribute('autocomplete', 'off');
|
||||
newpw.setAttribute('name', pw.name);
|
||||
if (chb.checked) {
|
||||
newpw.setAttribute('type', 'text');
|
||||
} else {
|
||||
newpw.setAttribute('type', 'password');
|
||||
}
|
||||
newpw.setAttribute('class', pw.getAttribute('class'));
|
||||
}
|
||||
newpw.id = pw.id;
|
||||
newpw.size = pw.size;
|
||||
newpw.onblur = pw.onblur;
|
||||
newpw.onchange = pw.onchange;
|
||||
newpw.value = pw.value;
|
||||
pw.parentNode.replaceChild(newpw, pw);
|
||||
}
|
||||
newpw.setAttribute('class', pw.getAttribute('class'));
|
||||
}
|
||||
newpw.id = pw.id;
|
||||
newpw.size = pw.size;
|
||||
newpw.onblur = pw.onblur;
|
||||
newpw.onchange = pw.onchange;
|
||||
newpw.value = pw.value;
|
||||
pw.parentNode.replaceChild(newpw, pw);
|
||||
}
|
||||
|
||||
function filterByParent(elCollection, parentFinder) {
|
||||
|
||||
@@ -1279,6 +1279,12 @@ function get_fast_modinfo(&$course, $userid=0) {
|
||||
function rebuild_course_cache($courseid=0, $clearonly=false) {
|
||||
global $COURSE, $DB, $CFG;
|
||||
|
||||
if (!$clearonly && !empty($CFG->upgraderunning)) {
|
||||
debugging('Function rebuild_course_cache() should not be called from upgrade script unless with argument clearonly.',
|
||||
DEBUG_DEVELOPER);
|
||||
$clearonly = true;
|
||||
}
|
||||
|
||||
// Destroy navigation caches
|
||||
navigation_cache::destroy_volatile_caches();
|
||||
|
||||
|
||||
+122
-89
@@ -901,10 +901,7 @@ function clean_param($param, $type) {
|
||||
case PARAM_PLUGIN:
|
||||
case PARAM_AREA:
|
||||
// we do not want any guessing here, either the name is correct or not
|
||||
if (!preg_match('/^[a-z][a-z0-9_]*[a-z0-9]$/', $param)) {
|
||||
return '';
|
||||
}
|
||||
if (strpos($param, '__') !== false) {
|
||||
if (!is_valid_plugin_name($param)) {
|
||||
return '';
|
||||
}
|
||||
return $param;
|
||||
@@ -6455,28 +6452,18 @@ class core_string_manager implements string_manager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns dependencies of current language, en is not included.
|
||||
* Returns list of all explicit parent languages for the given language.
|
||||
*
|
||||
* @param string $lang
|
||||
* @return array all parents, the lang itself is last
|
||||
* English (en) is considered as the top implicit parent of all language packs
|
||||
* and is not included in the returned list. The language itself is appended to the
|
||||
* end of the list. The method is aware of circular dependency risk.
|
||||
*
|
||||
* @see self::populate_parent_languages()
|
||||
* @param string $lang the code of the language
|
||||
* @return array all explicit parent languages with the lang itself appended
|
||||
*/
|
||||
public function get_language_dependencies($lang) {
|
||||
if ($lang === 'en') {
|
||||
return array();
|
||||
}
|
||||
if (!file_exists("$this->otherroot/$lang/langconfig.php")) {
|
||||
return array();
|
||||
}
|
||||
$string = array();
|
||||
include("$this->otherroot/$lang/langconfig.php");
|
||||
|
||||
if (empty($string['parentlanguage'])) {
|
||||
return array($lang);
|
||||
} else {
|
||||
$parentlang = $string['parentlanguage'];
|
||||
unset($string);
|
||||
return array_merge($this->get_language_dependencies($parentlang), array($lang));
|
||||
}
|
||||
return $this->populate_parent_languages($lang);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6613,10 +6600,6 @@ class core_string_manager implements string_manager {
|
||||
* @return boot true if exists
|
||||
*/
|
||||
public function string_exists($identifier, $component) {
|
||||
$identifier = clean_param($identifier, PARAM_STRINGID);
|
||||
if (empty($identifier)) {
|
||||
return false;
|
||||
}
|
||||
$lang = current_language();
|
||||
$string = $this->load_component_strings($component, $lang);
|
||||
return isset($string[$identifier]);
|
||||
@@ -6981,6 +6964,46 @@ class core_string_manager implements string_manager {
|
||||
fulldelete($this->menucache);
|
||||
$this->get_list_of_translations(true);
|
||||
}
|
||||
|
||||
/// End of external API ////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Helper method that recursively loads all parents of the given language.
|
||||
*
|
||||
* @see self::get_language_dependencies()
|
||||
* @param string $lang language code
|
||||
* @param array $stack list of parent languages already populated in previous recursive calls
|
||||
* @return array list of all parents of the given language with the $lang itself added as the last element
|
||||
*/
|
||||
protected function populate_parent_languages($lang, array $stack = array()) {
|
||||
|
||||
// English does not have a parent language.
|
||||
if ($lang === 'en') {
|
||||
return $stack;
|
||||
}
|
||||
|
||||
// Prevent circular dependency (and thence the infinitive recursion loop).
|
||||
if (in_array($lang, $stack)) {
|
||||
return $stack;
|
||||
}
|
||||
|
||||
// Load language configuration and look for the explicit parent language.
|
||||
if (!file_exists("$this->otherroot/$lang/langconfig.php")) {
|
||||
return $stack;
|
||||
}
|
||||
$string = array();
|
||||
include("$this->otherroot/$lang/langconfig.php");
|
||||
|
||||
if (empty($string['parentlanguage']) or $string['parentlanguage'] === 'en') {
|
||||
unset($string);
|
||||
return array_merge(array($lang), $stack);
|
||||
|
||||
} else {
|
||||
$parentlang = $string['parentlanguage'];
|
||||
unset($string);
|
||||
return $this->populate_parent_languages($parentlang, array_merge(array($lang), $stack));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7033,10 +7056,6 @@ class install_string_manager implements string_manager {
|
||||
* @return boot true if exists
|
||||
*/
|
||||
public function string_exists($identifier, $component) {
|
||||
$identifier = clean_param($identifier, PARAM_STRINGID);
|
||||
if (empty($identifier)) {
|
||||
return false;
|
||||
}
|
||||
// simple old style hack ;)
|
||||
$str = get_string($identifier, $component);
|
||||
return (strpos($str, '[[') === false);
|
||||
@@ -7282,8 +7301,7 @@ function get_string($identifier, $component = '', $a = NULL, $lazyload = false)
|
||||
return new lang_string($identifier, $component, $a);
|
||||
}
|
||||
|
||||
$identifier = clean_param($identifier, PARAM_STRINGID);
|
||||
if (empty($identifier)) {
|
||||
if (debugging('', DEBUG_DEVELOPER) && clean_param($identifier, PARAM_STRINGID) === '') {
|
||||
throw new coding_exception('Invalid string identifier. The identifier cannot be empty. Please fix your get_string() call.');
|
||||
}
|
||||
|
||||
@@ -7988,6 +8006,15 @@ function get_plugin_types($fullpaths=true) {
|
||||
return ($fullpaths ? $fullinfo : $info);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method validates a plug name. It is much faster than calling clean_param.
|
||||
* @param string $name a string that might be a plugin name.
|
||||
* @return bool if this string is a valid plugin name.
|
||||
*/
|
||||
function is_valid_plugin_name($name) {
|
||||
return (bool) preg_match('/^[a-z](?:[a-z0-9_](?!__))*[a-z0-9]$/', $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Simplified version of get_list_of_plugins()
|
||||
* @param string $plugintype type of plugin
|
||||
@@ -8049,9 +8076,8 @@ function get_plugin_list($plugintype) {
|
||||
if (in_array($pluginname, $ignored)) {
|
||||
continue;
|
||||
}
|
||||
$pluginname = clean_param($pluginname, PARAM_PLUGIN);
|
||||
if (empty($pluginname)) {
|
||||
// better ignore plugins with problematic names here
|
||||
if (!is_valid_plugin_name($pluginname)) {
|
||||
// Better ignore plugins with problematic names here.
|
||||
continue;
|
||||
}
|
||||
$result[$pluginname] = $fulldir.'/'.$pluginname;
|
||||
@@ -9126,13 +9152,13 @@ function shorten_text($text, $ideal=30, $exact = false, $ending='...') {
|
||||
|
||||
global $CFG;
|
||||
|
||||
// if the plain text is shorter than the maximum length, return the whole text
|
||||
// If the plain text is shorter than the maximum length, return the whole text.
|
||||
if (textlib::strlen(preg_replace('/<.*?>/', '', $text)) <= $ideal) {
|
||||
return $text;
|
||||
}
|
||||
|
||||
// Splits on HTML tags. Each open/close/empty tag will be the first thing
|
||||
// and only tag in its 'line'
|
||||
// and only tag in its 'line'.
|
||||
preg_match_all('/(<.+?>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
|
||||
|
||||
$total_length = textlib::strlen($ending);
|
||||
@@ -9141,37 +9167,43 @@ function shorten_text($text, $ideal=30, $exact = false, $ending='...') {
|
||||
// This array stores information about open and close tags and their position
|
||||
// in the truncated string. Each item in the array is an object with fields
|
||||
// ->open (true if open), ->tag (tag name in lower case), and ->pos
|
||||
// (byte position in truncated text)
|
||||
// (byte position in truncated text).
|
||||
$tagdetails = array();
|
||||
|
||||
foreach ($lines as $line_matchings) {
|
||||
// if there is any html-tag in this line, handle it and add it (uncounted) to the output
|
||||
// If there is any html-tag in this line, handle it and add it (uncounted) to the output.
|
||||
if (!empty($line_matchings[1])) {
|
||||
// if it's an "empty element" with or without xhtml-conform closing slash (f.e. <br/>)
|
||||
// If it's an "empty element" with or without xhtml-conform closing slash (f.e. <br/>).
|
||||
if (preg_match('/^<(\s*.+?\/\s*|\s*(img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param)(\s.+?)?)>$/is', $line_matchings[1])) {
|
||||
// do nothing
|
||||
// if tag is a closing tag (f.e. </b>)
|
||||
// Do nothing.
|
||||
|
||||
} else if (preg_match('/^<\s*\/([^\s]+?)\s*>$/s', $line_matchings[1], $tag_matchings)) {
|
||||
// record closing tag
|
||||
$tagdetails[] = (object)array('open'=>false,
|
||||
'tag'=>textlib::strtolower($tag_matchings[1]), 'pos'=>textlib::strlen($truncate));
|
||||
// if tag is an opening tag (f.e. <b>)
|
||||
// Record closing tag.
|
||||
$tagdetails[] = (object) array(
|
||||
'open' => false,
|
||||
'tag' => textlib::strtolower($tag_matchings[1]),
|
||||
'pos' => textlib::strlen($truncate),
|
||||
);
|
||||
|
||||
} else if (preg_match('/^<\s*([^\s>!]+).*?>$/s', $line_matchings[1], $tag_matchings)) {
|
||||
// record opening tag
|
||||
$tagdetails[] = (object)array('open'=>true,
|
||||
'tag'=>textlib::strtolower($tag_matchings[1]), 'pos'=>textlib::strlen($truncate));
|
||||
// Record opening tag.
|
||||
$tagdetails[] = (object) array(
|
||||
'open' => true,
|
||||
'tag' => textlib::strtolower($tag_matchings[1]),
|
||||
'pos' => textlib::strlen($truncate),
|
||||
);
|
||||
}
|
||||
// add html-tag to $truncate'd text
|
||||
// Add html-tag to $truncate'd text.
|
||||
$truncate .= $line_matchings[1];
|
||||
}
|
||||
|
||||
// calculate the length of the plain text part of the line; handle entities as one character
|
||||
// Calculate the length of the plain text part of the line; handle entities as one character.
|
||||
$content_length = textlib::strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', ' ', $line_matchings[2]));
|
||||
if ($total_length+$content_length > $ideal) {
|
||||
// the number of characters which are left
|
||||
if ($total_length + $content_length > $ideal) {
|
||||
// The number of characters which are left.
|
||||
$left = $ideal - $total_length;
|
||||
$entities_length = 0;
|
||||
// search for html entities
|
||||
// Search for html entities.
|
||||
if (preg_match_all('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) {
|
||||
// calculate the real length of all entities in the legal range
|
||||
foreach ($entities[0] as $entity) {
|
||||
@@ -9184,7 +9216,32 @@ function shorten_text($text, $ideal=30, $exact = false, $ending='...') {
|
||||
}
|
||||
}
|
||||
}
|
||||
$truncate .= textlib::substr($line_matchings[2], 0, $left+$entities_length);
|
||||
$breakpos = $left + $entities_length;
|
||||
|
||||
// if the words shouldn't be cut in the middle...
|
||||
if (!$exact) {
|
||||
// ...search the last occurence of a space...
|
||||
for (; $breakpos > 0; $breakpos--) {
|
||||
if ($char = textlib::substr($line_matchings[2], $breakpos, 1)) {
|
||||
if ($char === '.' or $char === ' ') {
|
||||
$breakpos += 1;
|
||||
break;
|
||||
} else if (strlen($char) > 2) { // Chinese/Japanese/Korean text
|
||||
$breakpos += 1; // can be truncated at any UTF-8
|
||||
break; // character boundary.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($breakpos == 0) {
|
||||
// This deals with the test_shorten_text_no_spaces case.
|
||||
$breakpos = $left + $entities_length;
|
||||
} else if ($breakpos > $left + $entities_length) {
|
||||
// This deals with the previous for loop breaking on the first char.
|
||||
$breakpos = $left + $entities_length;
|
||||
}
|
||||
|
||||
$truncate .= textlib::substr($line_matchings[2], 0, $breakpos);
|
||||
// maximum length is reached, so get off the loop
|
||||
break;
|
||||
} else {
|
||||
@@ -9192,55 +9249,31 @@ function shorten_text($text, $ideal=30, $exact = false, $ending='...') {
|
||||
$total_length += $content_length;
|
||||
}
|
||||
|
||||
// if the maximum length is reached, get off the loop
|
||||
// If the maximum length is reached, get off the loop.
|
||||
if($total_length >= $ideal) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if the words shouldn't be cut in the middle...
|
||||
if (!$exact) {
|
||||
// ...search the last occurence of a space...
|
||||
for ($k=textlib::strlen($truncate);$k>0;$k--) {
|
||||
if ($char = textlib::substr($truncate, $k, 1)) {
|
||||
if ($char === '.' or $char === ' ') {
|
||||
$breakpos = $k+1;
|
||||
break;
|
||||
} else if (strlen($char) > 2) { // Chinese/Japanese/Korean text
|
||||
$breakpos = $k+1; // can be truncated at any UTF-8
|
||||
break; // character boundary.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($breakpos)) {
|
||||
// ...and cut the text in this position
|
||||
$truncate = textlib::substr($truncate, 0, $breakpos);
|
||||
}
|
||||
}
|
||||
|
||||
// add the defined ending to the text
|
||||
// Add the defined ending to the text.
|
||||
$truncate .= $ending;
|
||||
|
||||
// Now calculate the list of open html tags based on the truncate position
|
||||
// Now calculate the list of open html tags based on the truncate position.
|
||||
$open_tags = array();
|
||||
foreach ($tagdetails as $taginfo) {
|
||||
if(isset($breakpos) && $taginfo->pos >= $breakpos) {
|
||||
// Don't include tags after we made the break!
|
||||
break;
|
||||
}
|
||||
if($taginfo->open) {
|
||||
// add tag to the beginning of $open_tags list
|
||||
if ($taginfo->open) {
|
||||
// Add tag to the beginning of $open_tags list.
|
||||
array_unshift($open_tags, $taginfo->tag);
|
||||
} else {
|
||||
$pos = array_search($taginfo->tag, array_reverse($open_tags, true)); // can have multiple exact same open tags, close the last one
|
||||
// Can have multiple exact same open tags, close the last one.
|
||||
$pos = array_search($taginfo->tag, array_reverse($open_tags, true));
|
||||
if ($pos !== false) {
|
||||
unset($open_tags[$pos]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// close all unclosed html-tags
|
||||
// Close all unclosed html-tags.
|
||||
foreach ($open_tags as $tag) {
|
||||
$truncate .= '</' . $tag . '>';
|
||||
}
|
||||
@@ -11083,7 +11116,7 @@ class lang_string {
|
||||
// Check if we need to process the string
|
||||
if ($this->string === null) {
|
||||
// Check the quality of the identifier.
|
||||
if (clean_param($this->identifier, PARAM_STRINGID) == '') {
|
||||
if (debugging('', DEBUG_DEVELOPER) && clean_param($this->identifier, PARAM_STRINGID) === '') {
|
||||
throw new coding_exception('Invalid string identifier. Most probably some illegal character is part of the string identifier. Please check your string definition');
|
||||
}
|
||||
|
||||
|
||||
+27
-12
@@ -667,12 +667,18 @@ class navigation_node implements renderable {
|
||||
* Hides the node and any children it has.
|
||||
*
|
||||
* @since 2.3.5
|
||||
* @param array $typestohide Optional. An array of node types that should be hidden.
|
||||
* If null all nodes will be hidden.
|
||||
* If an array is given then nodes will only be hidden if their type mtatches an element in the array.
|
||||
* e.g. array(navigation_node::TYPE_COURSE) would hide only course nodes.
|
||||
*/
|
||||
public function hide() {
|
||||
$this->display = false;
|
||||
if ($this->has_children()) {
|
||||
foreach ($this->children as $child) {
|
||||
$child->hide();
|
||||
public function hide(array $typestohide = null) {
|
||||
if ($typestohide === null || in_array($this->type, $typestohide)) {
|
||||
$this->display = false;
|
||||
if ($this->has_children()) {
|
||||
foreach ($this->children as $child) {
|
||||
$child->hide($typestohide);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2524,6 +2530,7 @@ class global_navigation extends navigation_node {
|
||||
|
||||
$issite = ($course->id == $SITE->id);
|
||||
$shortname = format_string($course->shortname, true, array('context' => $coursecontext));
|
||||
$fullname = format_string($course->fullname, true, array('context' => $coursecontext));
|
||||
|
||||
if ($issite) {
|
||||
$parent = $this;
|
||||
@@ -2559,7 +2566,9 @@ class global_navigation extends navigation_node {
|
||||
$coursenode = $parent->add($shortname, $url, self::TYPE_COURSE, $shortname, $course->id);
|
||||
$coursenode->nodetype = self::NODETYPE_BRANCH;
|
||||
$coursenode->hidden = (!$course->visible);
|
||||
$coursenode->title(format_string($course->fullname, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id))));
|
||||
// We need to decode &'s here as they will have been added by format_string above and attributes will be encoded again
|
||||
// later.
|
||||
$coursenode->title(str_replace('&', '&', $fullname));
|
||||
if (!$forcegeneric) {
|
||||
$this->addedcourses[$course->id] = $coursenode;
|
||||
}
|
||||
@@ -2745,18 +2754,24 @@ class global_navigation extends navigation_node {
|
||||
public function set_expansion_limit($type) {
|
||||
global $SITE;
|
||||
$nodes = $this->find_all_of_type($type);
|
||||
|
||||
// We only want to hide specific types of nodes.
|
||||
// Only nodes that represent "structure" in the navigation tree should be hidden.
|
||||
// If we hide all nodes then we risk hiding vital information.
|
||||
$typestohide = array(
|
||||
self::TYPE_CATEGORY,
|
||||
self::TYPE_COURSE,
|
||||
self::TYPE_SECTION,
|
||||
self::TYPE_ACTIVITY
|
||||
);
|
||||
|
||||
foreach ($nodes as $node) {
|
||||
// We need to generate the full site node
|
||||
if ($type == self::TYPE_COURSE && $node->key == $SITE->id) {
|
||||
continue;
|
||||
}
|
||||
foreach ($node->children as $child) {
|
||||
// We still want to show course reports and participants containers
|
||||
// or there will be navigation missing.
|
||||
if ($type == self::TYPE_COURSE && $child->type === self::TYPE_CONTAINER) {
|
||||
continue;
|
||||
}
|
||||
$child->hide();
|
||||
$child->hide($typestohide);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -264,6 +264,8 @@ class oauth_helper {
|
||||
$this->sign_secret = $this->consumer_secret.'&'.$secret;
|
||||
$params = $this->prepare_oauth_parameters($this->access_token_api, array('oauth_token'=>$token, 'oauth_verifier'=>$verifier), 'POST');
|
||||
$this->setup_oauth_http_header($params);
|
||||
// Should never send the callback in this request.
|
||||
unset($params['oauth_callback']);
|
||||
$content = $this->http->post($this->access_token_api, $params, $this->http_options);
|
||||
$keys = $this->parse_result($content);
|
||||
$this->set_access_token($keys['oauth_token'], $keys['oauth_token_secret']);
|
||||
|
||||
@@ -529,7 +529,9 @@ class core_renderer extends renderer_base {
|
||||
if (session_is_loggedinas()) {
|
||||
$realuser = session_get_realuser();
|
||||
$fullname = fullname($realuser, true);
|
||||
$realuserinfo = " [<a href=\"$CFG->wwwroot/course/loginas.php?id=$course->id&sesskey=".sesskey()."\">$fullname</a>] ";
|
||||
$loginastitle = get_string('loginas');
|
||||
$realuserinfo = " [<a href=\"$CFG->wwwroot/course/loginas.php?id=$course->id&sesskey=".sesskey()."\"";
|
||||
$realuserinfo .= "title =\"".$loginastitle."\">$fullname</a>] ";
|
||||
} else {
|
||||
$realuserinfo = '';
|
||||
}
|
||||
@@ -544,7 +546,8 @@ class core_renderer extends renderer_base {
|
||||
|
||||
$fullname = fullname($USER, true);
|
||||
// Since Moodle 2.0 this link always goes to the public profile page (not the course profile page)
|
||||
$username = "<a href=\"$CFG->wwwroot/user/profile.php?id=$USER->id\">$fullname</a>";
|
||||
$linktitle = get_string('viewprofile');
|
||||
$username = "<a href=\"$CFG->wwwroot/user/profile.php?id=$USER->id\" title=\"$linktitle\">$fullname</a>";
|
||||
if (is_mnet_remote_user($USER) and $idprovider = $DB->get_record('mnet_host', array('id'=>$USER->mnethostid))) {
|
||||
$username .= " from <a href=\"{$idprovider->wwwroot}\">{$idprovider->name}</a>";
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user