Compare commits
1294 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3d765bc299 | |||
| 9e4b400c67 | |||
| 9a31f96622 | |||
| 8e6e5adb5b | |||
| 51acffb94a | |||
| 74126d6d3e | |||
| c9cfe78950 | |||
| d5ca7b11b7 | |||
| 33091e7e58 | |||
| 019e897604 | |||
| bdf95827b5 | |||
| c03a8543f0 | |||
| fdd6b2fa57 | |||
| 2602c1ce44 | |||
| f5edf4eba4 | |||
| ee281f15a7 | |||
| 490057db33 | |||
| 6dd8588504 | |||
| e2c3a02bb8 | |||
| 5dd5818c9a | |||
| 1f6a502674 | |||
| 067a949f46 | |||
| 4824e2deff | |||
| 95a14f5d55 | |||
| 77738c4562 | |||
| e93dd0d650 | |||
| 98b723b1ce | |||
| d6a7cac991 | |||
| ec9b8fb68d | |||
| 8bd76f9e65 | |||
| 4dbfb1becc | |||
| c06645a539 | |||
| 85906b4ae5 | |||
| 424cb3b0ef | |||
| ab37ff5952 | |||
| b38867187f | |||
| 1cef86131d | |||
| 14b0fea807 | |||
| 9fb272baaa | |||
| 44e9ca744e | |||
| a80c9b9816 | |||
| 3f1ef9ec5a | |||
| d754f1b012 | |||
| 4ca24885a5 | |||
| d69c84b185 | |||
| 87fccbc271 | |||
| dbde930a58 | |||
| 63cca18b3a | |||
| 18c99c67fa | |||
| 00b4aadafe | |||
| 13e183dd84 | |||
| b558672db4 | |||
| 627282714b | |||
| 199e7e9f85 | |||
| 20b76253fb | |||
| 690ef509de | |||
| 0442a23878 | |||
| df50b954c6 | |||
| 38be5071c8 | |||
| 041d4b3fab | |||
| a53366f7ab | |||
| bacfad505d | |||
| fff222f460 | |||
| 60df5b0c05 | |||
| d2175fceaa | |||
| aa114967bb | |||
| e60ca6985b | |||
| b506a6f08e | |||
| 5751edbcb1 | |||
| 7c144c47e5 | |||
| 5f32139fde | |||
| 30a7869e49 | |||
| f2b7714f6b | |||
| d0830107cb | |||
| 953560c9c4 | |||
| b2f46deb0b | |||
| 5ea58ff4e1 | |||
| 3603e0856a | |||
| 91c578c06d | |||
| 7608f458e3 | |||
| 78d1df7fd5 | |||
| bdf1df7058 | |||
| 6c6a05e561 | |||
| 0972d40ad9 | |||
| 58d7e8cf60 | |||
| ebc788d13e | |||
| 9d19a2bcd8 | |||
| c538ea951f | |||
| 1239f5a5c4 | |||
| 47147e2ff5 | |||
| c418df9c94 | |||
| 6ec18f437b | |||
| 2d56b929c0 | |||
| 8dce32bb7b | |||
| 51e1e3d536 | |||
| 0ca9b41b50 | |||
| 5e2f228709 | |||
| 387bde00c2 | |||
| b9bed21722 | |||
| eebe41c9d3 | |||
| 5e90b425fb | |||
| 1a17422d24 | |||
| 722bbfc81f | |||
| 3ee798f85f | |||
| 5e51b68a18 | |||
| 0243159817 | |||
| 2bc77f9cc9 | |||
| 439de8cf42 | |||
| c1beb0fa2d | |||
| 30721d4913 | |||
| aed1ff8d29 | |||
| facb211577 | |||
| f6b9535c4b | |||
| 3a5dd161c2 | |||
| 54b3f85625 | |||
| c865e54938 | |||
| e157c695c9 | |||
| 1d469cae30 | |||
| 7039fa8d96 | |||
| 312a8e0436 | |||
| 59bc05c4a2 | |||
| 3df2ab8d98 | |||
| 77962f179e | |||
| ce7582df1f | |||
| 29134ecc9e | |||
| 2d1e165183 | |||
| f3f329d1be | |||
| e2ea315c5b | |||
| 25c976527b | |||
| 06a8b8482d | |||
| 62920e80ba | |||
| 5fbc1470b1 | |||
| f196ac57ca | |||
| 479af9ed9f | |||
| 52c00a59c6 | |||
| 42a349855f | |||
| 1fc6a6046a | |||
| 13b7a5d4e5 | |||
| f4aea09ea4 | |||
| b086b19faa | |||
| ef9d05cd99 | |||
| e60fc41fdb | |||
| d561fa9527 | |||
| 53c074a81c | |||
| a31173a6a6 | |||
| f850a316f7 | |||
| f0a75425cb | |||
| 43426f3bf8 | |||
| 42d4cf091e | |||
| c841c104f0 | |||
| 57ee29839a | |||
| 64e085e1d1 | |||
| 4f65f98942 | |||
| f3266ff658 | |||
| bede2a2a34 | |||
| c2731a79e2 | |||
| 85ae284e59 | |||
| 029a753b91 | |||
| cba00bdb69 | |||
| 39f5ddeeb7 | |||
| 556c446f32 | |||
| 70e16becad | |||
| 146ada0aa6 | |||
| 11dd2fdb74 | |||
| 98b8818735 | |||
| 52ed7bb7e3 | |||
| f364f5628f | |||
| 2c90eef264 | |||
| 55b0567707 | |||
| 08aaea9856 | |||
| 1749c7aa31 | |||
| b1e71dac7d | |||
| a2c3c37cb6 | |||
| a4c5837ad7 | |||
| a167057d58 | |||
| 14d8d6b7bb | |||
| 687e61cdea | |||
| e186fee5e3 | |||
| 1e7cd615c1 | |||
| 92a3823994 | |||
| 8068301cd7 | |||
| 15141ad25f | |||
| 724641e59a | |||
| 832ea65890 | |||
| 311c3e9365 | |||
| 65ab1ffa5b | |||
| b7424c7693 | |||
| 081d16475b | |||
| b15713760e | |||
| f24f704630 | |||
| 22a35ffaaf | |||
| 96083d8068 | |||
| 31bb03f6e1 | |||
| 00f706d1f5 | |||
| d3e5802d97 | |||
| 6b27edcc47 | |||
| 28883e9b45 | |||
| e79edb11ee | |||
| d5d16e1f9c | |||
| a1e52c70e5 | |||
| b9720b8869 | |||
| 3f4a67b330 | |||
| 62da28c64d | |||
| 1179c92d0b | |||
| 3388d2f9f9 | |||
| 58609afebb | |||
| 6a10905864 | |||
| 87a4bba39c | |||
| 179b60aea6 | |||
| d52f9563d1 | |||
| de8c58715a | |||
| 2771063982 | |||
| acb05b5d4d | |||
| d45e517538 | |||
| df40fa5f66 | |||
| 02e5cdbeb8 | |||
| 029e7f5eae | |||
| 9a529b0753 | |||
| 3c0b7e9468 | |||
| ce7519c27e | |||
| 0a2be338a8 | |||
| d3ff99e745 | |||
| 91d77b17bd | |||
| 142af01f32 | |||
| 6551049f07 | |||
| ed246c21db | |||
| e5073fe305 | |||
| 9ef338d744 | |||
| 68e22328b5 | |||
| 9986fe8d0d | |||
| 13c04d1701 | |||
| bf3e4e030f | |||
| f22a7de23f | |||
| f9356f85ce | |||
| 3c94cc716e | |||
| 5a80cab06d | |||
| b1f400ae6f | |||
| 551fa5f4dd | |||
| bec1c29d84 | |||
| 89f5428879 | |||
| 84c656a557 | |||
| 367f1a7300 | |||
| 725ef19f1f | |||
| 12acab953b | |||
| 1425c0b449 | |||
| 4f24a95cdd | |||
| f4a57f80ef | |||
| feb6542872 | |||
| 1c59b0ad97 | |||
| 9e47a85a24 | |||
| a25ae4ff1b | |||
| 14f9c0cbcd | |||
| c9a0802794 | |||
| 078bd6815c | |||
| c7cce21d67 | |||
| be3aba207e | |||
| c2a64d94ff | |||
| 780cdcea5f | |||
| 4cc5500d0e | |||
| c2fe54c236 | |||
| 104524f504 | |||
| 664a07f74e | |||
| a0e1c31535 | |||
| bf479611db | |||
| 1f52e72526 | |||
| 03af3e075d | |||
| 9a287f8a49 | |||
| 76a07a1da5 | |||
| 46894c5058 | |||
| 52dd1d84a3 | |||
| 75e815fe72 | |||
| 8634bb229e | |||
| 7431abde3c | |||
| eac56e02bc | |||
| 5a52740940 | |||
| 6e4ece5640 | |||
| e84cef850a | |||
| cf93bcd37d | |||
| b5e0ee6f4a | |||
| 230a4ab6a2 | |||
| 41977bb4cc | |||
| 1d34dc5aa3 | |||
| 2c01ba7bb7 | |||
| 5b5bef12f0 | |||
| 88a7dcab1e | |||
| aa1e13ed2e | |||
| 6a008b485e | |||
| 659b8d8dc6 | |||
| 0dd1a7cb66 | |||
| 07d9ba8e9b | |||
| 9d228de05a | |||
| c8028c9371 | |||
| a2cfc3e460 | |||
| 8b805ced71 | |||
| 55ffbabe6d | |||
| e39ee61705 | |||
| 3e7ff59eb4 | |||
| cca2289111 | |||
| e8a165d2a3 | |||
| fcda253026 | |||
| 3728b69f31 | |||
| c8e7fdd9af | |||
| 2bdfe77686 | |||
| 1b8b39cbde | |||
| c874785067 | |||
| cbf4d62ccd | |||
| 6ad6368adc | |||
| 58cbfde495 | |||
| a743d4a77c | |||
| f3a2907f15 | |||
| a873af4dfe | |||
| 47a6e69179 | |||
| 4ecd7134e5 | |||
| 269255473f | |||
| 3bbbd26ee6 | |||
| 81c77993e3 | |||
| 6aec498812 | |||
| 11909e87a0 | |||
| 48db633522 | |||
| 1a6bfd3c1e | |||
| e4ff5b5d74 | |||
| 4e86cbabb0 | |||
| 5bdd8b8e7a | |||
| fd526f38ce | |||
| 56eff94252 | |||
| b6cbbb862c | |||
| 0683e9c5be | |||
| 3b7127a9b7 | |||
| 6740639cef | |||
| dcaa0b4e21 | |||
| 190cae0e09 | |||
| 4b85dc13ac | |||
| 761a9abd02 | |||
| 763fc56f9a | |||
| 43424771b6 | |||
| 4ac89c85d4 | |||
| d98c8aedb2 | |||
| a6a58c3485 | |||
| 6e6b96d57b | |||
| c9f31ba3a3 | |||
| 3675dbc32b | |||
| b8a5c64e95 | |||
| 984c6bd358 | |||
| 1389810600 | |||
| 0f68bcbc52 | |||
| 033be70faa | |||
| c440ddfb58 | |||
| 6a60e3f282 | |||
| f15c1b78ab | |||
| 0b1bc0a771 | |||
| 43b2bb6cd9 | |||
| 7d5f92870e | |||
| e99d784ffe | |||
| 25f8084ba0 | |||
| 187c395673 | |||
| 902b6d7df4 | |||
| d5addee28f | |||
| a8562f6c01 | |||
| e29521960d | |||
| 914cbfa714 | |||
| 54641661e1 | |||
| b7342c4c7b | |||
| e8e1ad9100 | |||
| 8c598be92d | |||
| dcb368720a | |||
| 9d9e5bc707 | |||
| e8ce08c331 | |||
| f84058a263 | |||
| 3b81d3b0e2 | |||
| 03e29fff56 | |||
| 3765c3f098 | |||
| b3ebbd4fc8 | |||
| 919304d4bf | |||
| 01ae3d20da | |||
| 15125314eb | |||
| 44e6b8ff57 | |||
| 8684284e49 | |||
| c46c673568 | |||
| aa79f99d53 | |||
| ef65eefff8 | |||
| df390ba9f0 | |||
| 2a41529f68 | |||
| e9adc8f6eb | |||
| 22edb9944a | |||
| ceedbe876d | |||
| 213eaa94f6 | |||
| 2acfb396ec | |||
| 936f6706c2 | |||
| 2e3a96e192 | |||
| 417fdfab6b | |||
| 77c9ae457d | |||
| a8fd6146e7 | |||
| 538e680d39 | |||
| ec5f521a59 | |||
| 100308ce24 | |||
| f6fc3616de | |||
| 9a8343cdde | |||
| a4e3607a21 | |||
| 27a2c6bffd | |||
| b6481ac993 | |||
| 2abbe6e2a3 | |||
| 3687ab70bc | |||
| 201159335f | |||
| c3ceb8d218 | |||
| 9df28ce5a3 | |||
| 784c24fde1 | |||
| cf264063c1 | |||
| 3f51ad2a70 | |||
| 6b0b96c581 | |||
| 8190a2911f | |||
| e336ad1b80 | |||
| ac30618786 | |||
| e9889abe38 | |||
| c0e1e425be | |||
| 517d606401 | |||
| f3cbcc623d | |||
| be36e2ad1d | |||
| aff1c65c3d | |||
| d96d964425 | |||
| 4f76e7ddf7 | |||
| 393d636e25 | |||
| 2b98c3d5e0 | |||
| 2bd3fc4d03 | |||
| 6b43f50c41 | |||
| 533a766447 | |||
| 59f3144e0a | |||
| ef5a198d1c | |||
| 60e7f2b113 | |||
| 68bc5b7b68 | |||
| 45222fc50f | |||
| 78092d6742 | |||
| a3fe5348ab | |||
| e3f6f30896 | |||
| 50296e134b | |||
| a6c44179e5 | |||
| ab93b02919 | |||
| 07ea543a1c | |||
| 768dd79e1f | |||
| c7f51d2dfe | |||
| ebbc9e717f | |||
| 617027cf84 | |||
| 21dc44b4df | |||
| 922817560c | |||
| 4b9cb37191 | |||
| a4673317a7 | |||
| deba736fbc | |||
| badddcab36 | |||
| be1f4ab759 | |||
| 01bb865997 | |||
| 79f544a45f | |||
| eadbd73918 | |||
| bf9f318ead | |||
| c015236f00 | |||
| 7a3156d001 | |||
| b22eb6a987 | |||
| c7c83663e1 | |||
| 49d85b7cfa | |||
| bc5d53c15c | |||
| 95f780c200 | |||
| 3656becc4a | |||
| 89ba1d6c2b | |||
| cca30c4795 | |||
| c78b71efb6 | |||
| 35a5d3b2fc | |||
| 40638405ea | |||
| a53760ef5a | |||
| 1193e6b023 | |||
| 8c5b86e044 | |||
| 6bc177e912 | |||
| 1f7907dac3 | |||
| 25c53e2b9f | |||
| 83fcca9346 | |||
| ab837e6113 | |||
| 96651cf9ed | |||
| 583c465a3a | |||
| 24f90eedb9 | |||
| 0d81404f9a | |||
| 7ba9375e84 | |||
| 15ffa46a1a | |||
| 38bc3c281a | |||
| 9bb6e09468 | |||
| 77de688b82 | |||
| dd8e618917 | |||
| ea819f2205 | |||
| 05deeaacdb | |||
| 19dd687377 | |||
| f2c12522c3 | |||
| 79a80529f8 | |||
| 70a649e40c | |||
| 38a94e0d39 | |||
| 327c88b76b | |||
| b229f563e5 | |||
| 7769615e76 | |||
| 056d2682a1 | |||
| a103d27e06 | |||
| d9c90952bb | |||
| 89b2800f75 | |||
| e12559481f | |||
| 6761018805 | |||
| 9948122905 | |||
| 308e53f572 | |||
| 3367e3ee1e | |||
| c1979ef02d | |||
| 25a5bd96f9 | |||
| 536c7aa882 | |||
| 534eebdd35 | |||
| e317113746 | |||
| ac473cb811 | |||
| fea115dab3 | |||
| 46306d8a25 | |||
| 2c9b8852f0 | |||
| 413b73ffe3 | |||
| 5bda351ef7 | |||
| e5180a491c | |||
| 5d7b69cd80 | |||
| 4bd293ee63 | |||
| 8252cd2848 | |||
| a35be2f5ef | |||
| 668a9eb90b | |||
| 606e175133 | |||
| 2e214b26f3 | |||
| c24ad72ba0 | |||
| ed26ad33ca | |||
| 9a380fbb53 | |||
| 6893e10840 | |||
| c18a7f9d94 | |||
| 07ca3c6816 | |||
| 9315fd7200 | |||
| 10bc60a163 | |||
| 0f9a1467e2 | |||
| 8b3405e8f2 | |||
| c5b7c1f627 | |||
| cc56539e51 | |||
| ae8da34929 | |||
| 0a6604e525 | |||
| 385e9d72ec | |||
| ae912070ea | |||
| 988f1a05e7 | |||
| b8369f5e9f | |||
| 020f0ffc5b | |||
| 087a329eef | |||
| 39025fe177 | |||
| 473afcbfec | |||
| 1dcb107bd4 | |||
| 7cf9937724 | |||
| f6c6bb4d39 | |||
| 814bce6575 | |||
| f12c714e6f | |||
| 74e78f3ad8 | |||
| 4a7e2298a3 | |||
| 910c941fa8 | |||
| bfb0183f6d | |||
| add39c57dd | |||
| 1b024a0b51 | |||
| 9d12edfcae | |||
| 746f1ac85c | |||
| 8277c39c76 | |||
| fb654f651f | |||
| 494f645bf4 | |||
| a26a8c6a6f | |||
| 27beb68c4b | |||
| 8254083dc9 | |||
| 9b7ac1ea57 | |||
| b214520d8b | |||
| abfe9dbe6e | |||
| 8c75bb5976 | |||
| e78632643c | |||
| f114cff65f | |||
| 3c18677ad1 | |||
| 1a199937f0 | |||
| b39029f718 | |||
| 7cb1a84978 | |||
| 8f7c097a09 | |||
| 5dc47fbbc6 | |||
| bac9a5e95e | |||
| 4a8d589d41 | |||
| ffd06a7394 | |||
| ba55e33828 | |||
| 3fcd1d05b9 | |||
| 29f02f10f0 | |||
| ff555b58be | |||
| 42d1a03acc | |||
| 80a90f8d71 | |||
| 4a225b69bb | |||
| 727242750d | |||
| 454efc509f | |||
| 1bef145b49 | |||
| 1a20976561 | |||
| 2558ce3593 | |||
| ab14ec06d2 | |||
| d072124ba4 | |||
| d9c19266c8 | |||
| cf93662ffe | |||
| 177f14d6f6 | |||
| bdcea1a221 | |||
| 25ebb1df63 | |||
| 39af096daf | |||
| 0ff186d7d7 | |||
| 26a92149cc | |||
| 38961259de | |||
| 528cde2db2 | |||
| 0ca33a3835 | |||
| 2a02a3f0de | |||
| 8445c4724c | |||
| 3e6c1d4d55 | |||
| 2c85a824fc | |||
| 6ce26b03e7 | |||
| ae18165edd | |||
| 5def8d573d | |||
| 41c5f54940 | |||
| 39b5360e69 | |||
| 6409d38377 | |||
| 945df69ff3 | |||
| 16aae71dcd | |||
| 371e83db2d | |||
| f4bc50d2bb | |||
| b32484d582 | |||
| 6750bec6c9 | |||
| 6a8787828e | |||
| 466b23caf7 | |||
| a4d6717aec | |||
| cc50a2fbc4 | |||
| 3345c20e29 | |||
| c06e87a410 | |||
| db005da178 | |||
| cfc9f55ca6 | |||
| 15f0d2ed37 | |||
| a370e4e4fa | |||
| a9e0bc82fb | |||
| ec05915767 | |||
| b5e8919b7c | |||
| 397262e292 | |||
| ea1e93b265 | |||
| 29e42725a4 | |||
| 91c59dbd8e | |||
| 87c8b752ca | |||
| 4fcc689dfc | |||
| 27f31cc626 | |||
| 9660303cc2 | |||
| 9abec7278b | |||
| ba7c14c1a7 | |||
| 97161e5008 | |||
| 25041083d5 | |||
| a1c5868475 | |||
| d4e94648cf | |||
| b651e7bb74 | |||
| d527599fcd | |||
| c1d93d47e9 | |||
| 6160c1721c | |||
| 71472b0a82 | |||
| ba3721d463 | |||
| 1a1f7b0eec | |||
| 0c60b1113e | |||
| 79121602c4 | |||
| ba16180449 | |||
| 01765239b0 | |||
| d65a2b2262 | |||
| 4754c0edd1 | |||
| ec441b6dd0 | |||
| df01a82082 | |||
| 00338d8b94 | |||
| 57e034c094 | |||
| c5b9fe0dda | |||
| 07511dbe6d | |||
| df70dfe4ee | |||
| f872b32778 | |||
| beb807e033 | |||
| 98d17b5bad | |||
| bca840b4bc | |||
| 80406e9dd8 | |||
| f4c5e50440 | |||
| 1382f8a549 | |||
| c372808e97 | |||
| f279137a86 | |||
| 0ad12999d7 | |||
| a390156411 | |||
| b84a272faf | |||
| f2ba68efc1 | |||
| 629ea4957b | |||
| 4c1db5b4ea | |||
| 7ea0f8e519 | |||
| ece057943d | |||
| edb8d49d35 | |||
| 8c23e3f5ff | |||
| 30a39ee2b7 | |||
| c3a68f4496 | |||
| d230fb7bcd | |||
| 0f37e97dc6 | |||
| c33e534dce | |||
| 65814f90c1 | |||
| 3a1380d81a | |||
| 743010f779 | |||
| 5a1a6fc1f0 | |||
| b0022f8d91 | |||
| 838f1bcdf4 | |||
| 014fba4928 | |||
| 32eadaf080 | |||
| dba24103ea | |||
| 0a770d5c6c | |||
| 29775a8e89 | |||
| f2855813c7 | |||
| b5e1c2e748 | |||
| 98c1207c46 | |||
| 3466a42f31 | |||
| 3fc24f1238 | |||
| 2e8ab7269c | |||
| 72ca02b0b2 | |||
| 22a7afd577 | |||
| c281550ce5 | |||
| 4a94bae470 | |||
| 92480bc82b | |||
| 2ff8943027 | |||
| da63c93657 | |||
| 4e184a9ce6 | |||
| 36420f78c1 | |||
| 93e980d52b | |||
| 9e5855cb1a | |||
| f9ba5c5222 | |||
| f79dd3b57d | |||
| f5eec88fb6 | |||
| f5a4f25375 | |||
| d714350a11 | |||
| a021f72a34 | |||
| 32af9814f1 | |||
| bcb785fa9e | |||
| 733bd07b8b | |||
| 19ab387d06 | |||
| 02a03f4fe2 | |||
| 75c92b6306 | |||
| e56ac08a5c | |||
| 0cf31e061b | |||
| 65150b26cd | |||
| e1ad9ae4f5 | |||
| ffa12b8397 | |||
| 890c7fae4e | |||
| 9f2e9b535d | |||
| c7d4a92ccf | |||
| 5bd0e7af9f | |||
| 794fb0e565 | |||
| 998b74a160 | |||
| 9ae0b69f59 | |||
| f4dc83e6e6 | |||
| ca2b2eb8af | |||
| 5399e053d1 | |||
| 6ef4ef1ee5 | |||
| f5a1b068cc | |||
| b9d64ab18f | |||
| 39d106ee76 | |||
| 07373d91a8 | |||
| 633fcef536 | |||
| dde17843e0 | |||
| 2430319b52 | |||
| adabef8bf6 | |||
| 22ea14df25 | |||
| 6867fc94b7 | |||
| 8385249f5b | |||
| 30dc7311ad | |||
| 9784520acb | |||
| d015c2352f | |||
| 35fa620a2e | |||
| 15516e6445 | |||
| 280a641232 | |||
| 14dac82376 | |||
| 06ede85e1f | |||
| 31a43cca97 | |||
| 8ad8b7dba8 | |||
| a09897b4b1 | |||
| 5e00f29019 | |||
| 36f0835e72 | |||
| 259b9d05f3 | |||
| da20cd7b43 | |||
| acb4688d29 | |||
| 471952fe82 | |||
| 0d738689bd | |||
| 7390fdde63 | |||
| 1374c61bb4 | |||
| 98d9209a34 | |||
| 8351ce1bd0 | |||
| b911ab236c | |||
| b4730465e6 | |||
| 78cc7bee62 | |||
| 5d6eafcf10 | |||
| 090e19328e | |||
| 34b5e856b0 | |||
| c44a5d5946 | |||
| b7d7679112 | |||
| 90061a6d95 | |||
| c9c031fc90 | |||
| 64a17788aa | |||
| 0baa1eee59 | |||
| 9f6eeb4abf | |||
| 6a48b42ae8 | |||
| 2dd90f136c | |||
| e6647397b9 | |||
| 07fa10d725 | |||
| 98032d512d | |||
| 389235fb00 | |||
| 656237dd55 | |||
| e3cc5b1a7f | |||
| 0742ea86b2 | |||
| 41f79b5c07 | |||
| ed85c0acd2 | |||
| 9c39028179 | |||
| 9fb4a6300b | |||
| 44c9dc6e7b | |||
| 4af7c9d188 | |||
| 847dee60ce | |||
| b7551bdf23 | |||
| e0be8fd6a3 | |||
| 55e03d1233 | |||
| e391f907af | |||
| bef867a96c | |||
| 4207d47742 | |||
| bd7193c7ac | |||
| 77e4a16c4f | |||
| 7daba2713e | |||
| 03b1be3005 | |||
| 5c8511ecf7 | |||
| 52435228c5 | |||
| c9dc3e5564 | |||
| ffaf18a8c1 | |||
| f5fddc6081 | |||
| 9d5a4e2b7c | |||
| ba9103b2c6 | |||
| 79196c9ed5 | |||
| a572cfe5bd | |||
| 92d7776478 | |||
| 2715f96932 | |||
| 6919d9f790 | |||
| 8be0517692 | |||
| a4b65c11b9 | |||
| 64e711f04b | |||
| e6cf40de78 | |||
| 174f5a0189 | |||
| dd56fd7c64 | |||
| 436f83f8ff | |||
| d03f904759 | |||
| 15a6af91f5 | |||
| 0a23dec07a | |||
| 6f8081bef4 | |||
| c643d3ae06 | |||
| 507ccf1c4b | |||
| 60bc533ee8 | |||
| 42f2b8d0dd | |||
| 84047d1fc9 | |||
| b79ac7e0d6 | |||
| 241ceba38c | |||
| 8e49e0833c | |||
| f6bf9c932d | |||
| 1fb2369b09 | |||
| 4de0925820 | |||
| 81f2a1686a | |||
| 5f509554a5 | |||
| edd5d0693d | |||
| d59a75a841 | |||
| 9b482d1cbe | |||
| ca090f3262 | |||
| 12db898084 | |||
| c79345c0f0 | |||
| d691571218 | |||
| 4e1bb6e10c | |||
| a7e920fbfb | |||
| 7a725d6b59 | |||
| 489c6ef357 | |||
| dbb6157aa1 | |||
| 50467e50c9 | |||
| 85a91fb98e | |||
| 75454e2567 | |||
| 06c09f30e3 | |||
| 26daa23d9d | |||
| 74a2ee73ed | |||
| fca41d2589 | |||
| 6de6a45a10 | |||
| 0f1fac1f1f | |||
| 692134ecd4 | |||
| d7706bac2c | |||
| 391e054c03 | |||
| 71f2316fe6 | |||
| 16d610019a | |||
| 4f5791da64 | |||
| c5e3a242b1 | |||
| 13ad1eaf37 | |||
| 7ca448fa83 | |||
| 37efb4f1ee | |||
| 81bd2292bc | |||
| 8fa13d155d | |||
| 465846f082 | |||
| f68815ffcf | |||
| 67b5d74b2c | |||
| 3d0e3ade75 | |||
| 7d1fb2f6ec | |||
| 227e54d65a | |||
| ee6181b1e7 | |||
| 3962c89bbf | |||
| 59137c2c5b | |||
| b83e494d6f | |||
| 3b2164bdca | |||
| aa54d70440 | |||
| d2d4bccec1 | |||
| f3a3c59f48 | |||
| 3d62a46b26 | |||
| 9aacfedb22 | |||
| 12b734434b | |||
| f9068e531c | |||
| 96506c474a | |||
| 0d66e33da5 | |||
| 934fa3ed6c | |||
| 6743d6c520 | |||
| cf76e10e4a | |||
| c800e31213 | |||
| 23580ddacb | |||
| 827fcdb347 | |||
| 60aaf1dc77 | |||
| fd8fa6f9d0 | |||
| 8adf19eda8 | |||
| a6e29ac6a3 | |||
| 52e184904f | |||
| b8d80c062e | |||
| eb9d692f8b | |||
| a805d653d1 | |||
| fe4a0cfe63 | |||
| d0e3447e43 | |||
| f046221272 | |||
| 42a50a0a45 | |||
| 77335e76e9 | |||
| ddf3e875f3 | |||
| 91fa7abf3d | |||
| b060e5b0b8 | |||
| f9c8746704 | |||
| c629aeabe3 | |||
| 27614a5e5d | |||
| ba32fc0042 | |||
| 87b05ba3e0 | |||
| 728f3c9d08 | |||
| d7dd177eb4 | |||
| 507de745e3 | |||
| bf8ff4889b | |||
| f9112bda35 | |||
| ba63612bfa | |||
| 408612d111 | |||
| 60e837038a | |||
| 4cb05cea9d | |||
| 0960f2f417 | |||
| 09c1e72a56 | |||
| d2455301b7 | |||
| 1be2b904ab | |||
| 337817e669 | |||
| b17a3a5591 | |||
| c44c552efa | |||
| faa297ce6f | |||
| e1ce68c2f9 | |||
| b6225c0f2f | |||
| 50496af78b | |||
| 8fc52ccf46 | |||
| 9f9324f408 | |||
| d4dc367a5b | |||
| 3ede344b5c | |||
| 5c686792c6 | |||
| 91a4b3bd3e | |||
| 1a6a1487f4 | |||
| a5286ae4cc | |||
| 5b97bff526 | |||
| 1c4873ba1b | |||
| 9a8f8cea49 | |||
| c37f03543b | |||
| cd4ca97611 | |||
| 77bfc4ce0f | |||
| 13c53a4a2e | |||
| d3796a2c61 | |||
| 43070e6193 | |||
| d099348e32 | |||
| c4dd3bb86f | |||
| ce8b66c67f | |||
| d38f419d5c | |||
| c102060deb | |||
| 0ae36f6638 | |||
| 3c3d544700 | |||
| c4b491a417 | |||
| 112d3b4962 | |||
| 7bb8ae5911 | |||
| dbe6d9f821 | |||
| 4927443761 | |||
| 92a387b467 | |||
| ac3e0b3c8c | |||
| 34c0b5bd86 | |||
| a93bd90b97 | |||
| 18e3cba749 | |||
| c6f7c3e7f3 | |||
| bc35885cb4 | |||
| b9c6ce2d19 | |||
| bf1a4d75e0 | |||
| 8c2e4c90d7 | |||
| be5eb0013e | |||
| c031f2c1e7 | |||
| 63187a6887 | |||
| 1595b8120f | |||
| 4c2ce98b42 | |||
| c20d07074c | |||
| 3bfb75a9ed | |||
| 83ee4693c5 | |||
| 7b2dde5a80 | |||
| 94ff0f08f3 | |||
| f80de2f25c | |||
| 25bd4d9a37 | |||
| 4386e0d101 | |||
| 2c23734a7f | |||
| 61baea5d22 | |||
| 1f95c9a4af | |||
| cd278cd454 | |||
| 1997d9dc1d | |||
| 4c1638c10f | |||
| c0c232ab63 | |||
| af7b3673d7 | |||
| 10464ffb33 | |||
| 7a5852c857 | |||
| 9c3865c81c | |||
| dca072aedc | |||
| e5be555c27 | |||
| 949fe7154c | |||
| d96b0a969b | |||
| ae8c1f3d06 | |||
| e4e9e853d2 | |||
| 8196e3c08d | |||
| 587a4ee42c | |||
| c889fb8372 | |||
| beb81f4947 | |||
| ee780aeeaf | |||
| d9738e84d6 | |||
| 161ba40d03 | |||
| ca3fce634f | |||
| 909fc3ff2e | |||
| e460480080 | |||
| d1f5425171 | |||
| 1698268db1 | |||
| 885e86b108 | |||
| 37fff87398 | |||
| b89d39bfcb | |||
| 9d61397181 | |||
| 0235bd8706 | |||
| 553669ae17 | |||
| c78262b542 | |||
| c6e46d37bc | |||
| 7119e1a0a7 | |||
| 8f6c1f3488 | |||
| 5b183f51a8 | |||
| fd85ceac57 | |||
| d9e0b80ffb | |||
| 61c32b7b27 | |||
| d6614d667d | |||
| 36c0108a2f | |||
| 8c448e1c83 | |||
| c08643da97 | |||
| 00570de599 | |||
| ced9fc4453 | |||
| 34b9d4d4a5 | |||
| 9bf6815753 | |||
| 4c2820fbd8 | |||
| dd18964703 | |||
| c755c87437 | |||
| c683165a4a | |||
| d30d67aad5 | |||
| 53b1445eeb | |||
| a3516c4908 | |||
| 3e7069e70b | |||
| d2b322ae3c | |||
| 77e889a0ef | |||
| 10793e570c | |||
| ea003cd59a | |||
| 72650054f4 | |||
| 505c641a52 | |||
| 22a7796343 | |||
| bc61aa4085 | |||
| 4335aa296e | |||
| 3d24c50144 | |||
| adaeccb66d | |||
| b6eb984a45 | |||
| 200b4556d7 | |||
| d8e7d1a085 | |||
| f51cda3d09 | |||
| f723bd3df5 | |||
| 56babbcb76 | |||
| b6e526585a | |||
| 76027a9f65 | |||
| 93d8fdc201 | |||
| e5e64a4886 | |||
| d587f077ef | |||
| 1bb4846249 | |||
| b0b4ab1aff | |||
| 0393a8b706 | |||
| cd3d2823af | |||
| 65361ab836 | |||
| e7104d2dba | |||
| 3908f7ca1a | |||
| 6326817e0f | |||
| 3d63eb08f6 | |||
| 571ae25286 | |||
| f786f01115 | |||
| e1f517fcc7 | |||
| 8b759a9a48 | |||
| 5e911b2ea5 | |||
| 0e412e87a4 | |||
| 4afb01dbb4 | |||
| 3718dfc771 | |||
| 2848b97948 | |||
| e96aa1a669 | |||
| 4bbe460316 | |||
| 85f1abe304 | |||
| 9fed82de9c | |||
| 2012d82a96 | |||
| 66c6e870ef | |||
| b146486613 | |||
| e9fda1c945 | |||
| af99e7286b | |||
| 77a5af1f12 | |||
| df94dbd825 | |||
| e2d50a6a00 | |||
| 64f3208b7c | |||
| 3c38ad5d79 | |||
| 98fd7dcb72 | |||
| b8f249b43a | |||
| 9f091bcd45 | |||
| 008011875c | |||
| 5869d05bb7 | |||
| 2b1a23a6aa | |||
| d47070248f | |||
| c3b5e8290b | |||
| 6bfddc2e38 | |||
| 7e0579cb8c | |||
| 9929445926 | |||
| f934143c6c | |||
| e9579e548d | |||
| 5cd0d27089 | |||
| b5686d021b | |||
| d93c27ec95 | |||
| 908b892d9c | |||
| 22acfde076 | |||
| 40b204b863 | |||
| 4f7fd61a7a | |||
| 8dc0b786d0 | |||
| 69542fb3af | |||
| f7f0909ce5 | |||
| b399e43592 | |||
| ee69d85a1f | |||
| 181991e791 | |||
| fcd2cbaf1f | |||
| e140197481 | |||
| fab058e5d5 | |||
| c198593b0e | |||
| 74a43c7487 | |||
| c159b07046 | |||
| 2a5302b62d | |||
| 67fc4f0025 | |||
| 6e571603c0 | |||
| e4e9611570 | |||
| c5169f4e78 | |||
| 66e937a44b | |||
| d60cc8dbec | |||
| 69ae86ea5f | |||
| ec5ced0d9d | |||
| 2ef9c4eb67 | |||
| 91c2b0f068 | |||
| 9316d66121 | |||
| 1e668c4d85 | |||
| b053dcab0f | |||
| f11672d84a | |||
| 5f36713765 | |||
| 0484f1ef01 | |||
| cea5d97b4c | |||
| ca8f828cb5 | |||
| c4a88609fe | |||
| a6b53a7cbe | |||
| c09604234a | |||
| 48c235941f | |||
| 8d22e342a9 | |||
| d93cafeaa1 | |||
| 7e0218e79f | |||
| ed66022935 | |||
| 23c799459d | |||
| 2150d1580f | |||
| 2fb0b3bd3b | |||
| 97b4297e13 | |||
| 71575a152c | |||
| 4eca364392 | |||
| 8eade3d773 | |||
| 25ca24d59f | |||
| 2c10c5f4e5 | |||
| 5f9f0717fe | |||
| 29c852088a | |||
| 7a2f4c12b6 | |||
| 9f3813016c | |||
| 34700d60f2 | |||
| 51ecc3255b | |||
| 500422e6d0 | |||
| 5ff33ba14b | |||
| 34e30d9bce | |||
| 7d754148c4 | |||
| 2875c1507f | |||
| 5878504958 | |||
| 4b43b1074f | |||
| 07a36633f9 | |||
| d67c20b873 | |||
| 69c3d39a9c | |||
| 25bd5c75ab | |||
| 8f63ab1f44 | |||
| 209442ce24 | |||
| 4a6f461830 | |||
| 231ec77323 | |||
| b302591de8 | |||
| 165b7bd987 | |||
| 0357171e68 | |||
| 7fedc2c25e | |||
| 89213d0041 | |||
| b031caf858 | |||
| f07704d2a2 | |||
| e13d02f544 | |||
| 757bade1f6 | |||
| de6aaa7295 | |||
| 3479ba4d48 | |||
| 0c5e812ba7 | |||
| ea118bed0c | |||
| 1a4d6a5b60 | |||
| dc41abd808 | |||
| 3d673fc474 | |||
| 98529b009b | |||
| 48fe5c6cf9 | |||
| 84fed015d8 | |||
| 0b15b43b3e | |||
| 5eb1e14aa4 | |||
| 2197b642b3 | |||
| faceca9176 | |||
| 431ac39634 | |||
| 2a921ee985 | |||
| 8cf42d248e | |||
| 847753d497 | |||
| 8ef8ec689e | |||
| c2a975e68d | |||
| a8ccca5325 | |||
| 77e4bb774b | |||
| 70e6628ea3 | |||
| 589028b203 | |||
| bca4fa81a8 | |||
| ed9fd13fd6 | |||
| 7c4c754a89 | |||
| 16fd74a3a5 | |||
| 29cbe43189 | |||
| 8bdb31ed54 | |||
| 629f5021b3 | |||
| 3d8f1d3abc | |||
| 54c3b90ec6 | |||
| b9825e8e29 | |||
| 303c04f7d0 | |||
| 2b37004c28 | |||
| 92c4354ff9 | |||
| b2bce32ff0 | |||
| fa188aa0a2 | |||
| 1dade8b185 | |||
| d6211dce9a | |||
| ec58c9ddf0 | |||
| 5df4d6ccab | |||
| 9da0fc11ac | |||
| 0783533066 | |||
| a8f690e4e6 | |||
| 6cb66ae00e | |||
| 908053e21d | |||
| 915a20f5a5 | |||
| 0797530336 | |||
| c5530f4151 | |||
| f7edca80b0 | |||
| 3521e87f06 | |||
| f44872427f | |||
| d33d813d91 | |||
| e49c60345e | |||
| 29336fb13c | |||
| cc31313c4b | |||
| 6c0f13a5bc | |||
| 7c26c3f875 | |||
| d5a1cca1af | |||
| dd2645d304 | |||
| e4f72d1428 | |||
| fdef13e692 | |||
| d042ff06b3 | |||
| aafa4f324a | |||
| 5cf4fa4684 | |||
| 7cc5cec6e1 | |||
| 79c6e3a096 | |||
| 19a9f1124d | |||
| bbc2d0ba31 | |||
| cb6b733232 | |||
| ffdf7f8a24 | |||
| c76cd2ede1 | |||
| 7bbe971548 | |||
| 731f8516bc | |||
| ee3b46d8bf | |||
| 6f2257ae0d |
+62
-5
@@ -12,6 +12,8 @@
|
||||
$hide = optional_param('hide', 0, PARAM_INT);
|
||||
$show = optional_param('show', 0, PARAM_INT);
|
||||
$delete = optional_param('delete', 0, PARAM_INT);
|
||||
$unprotect = optional_param('unprotect', 0, PARAM_INT);
|
||||
$protect = optional_param('protect', 0, PARAM_INT);
|
||||
|
||||
/// Print headings
|
||||
|
||||
@@ -24,6 +26,9 @@
|
||||
$strcourses = get_string('blockinstances', 'admin');
|
||||
$strname = get_string('name');
|
||||
$strshowblockcourse = get_string('showblockcourse');
|
||||
$strprotecthdr = get_string('blockprotect', 'admin'). $OUTPUT->help_icon('blockprotect','admin');
|
||||
$strprotect = get_string('blockprotect', 'admin');
|
||||
$strunprotect = get_string('blockunprotect', 'admin');
|
||||
|
||||
/// If data submitted, then process and store.
|
||||
|
||||
@@ -43,6 +48,36 @@
|
||||
admin_get_root(true, false); // settings not required - only pages
|
||||
}
|
||||
|
||||
if (!isset($CFG->undeletableblocktypes) || (!is_array($CFG->undeletableblocktypes) && !is_string($CFG->undeletableblocktypes))) {
|
||||
$undeletableblocktypes = array('navigation', 'settings');
|
||||
} else if (is_string($CFG->undeletableblocktypes)) {
|
||||
$undeletableblocktypes = explode(',', $CFG->undeletableblocktypes);
|
||||
} else {
|
||||
$undeletableblocktypes = $CFG->undeletableblocktypes;
|
||||
}
|
||||
|
||||
if (!empty($protect) && confirm_sesskey()) {
|
||||
if (!$block = $DB->get_record('block', array('id'=>$protect))) {
|
||||
print_error('blockdoesnotexist', 'error');
|
||||
}
|
||||
if (!in_array($block->name, $undeletableblocktypes)) {
|
||||
$undeletableblocktypes[] = $block->name;
|
||||
set_config('undeletableblocktypes', implode(',', $undeletableblocktypes));
|
||||
}
|
||||
admin_get_root(true, false); // settings not required - only pages
|
||||
}
|
||||
|
||||
if (!empty($unprotect) && confirm_sesskey()) {
|
||||
if (!$block = $DB->get_record('block', array('id'=>$unprotect))) {
|
||||
print_error('blockdoesnotexist', 'error');
|
||||
}
|
||||
if (in_array($block->name, $undeletableblocktypes)) {
|
||||
$undeletableblocktypes = array_diff($undeletableblocktypes, array($block->name));
|
||||
set_config('undeletableblocktypes', implode(',', $undeletableblocktypes));
|
||||
}
|
||||
admin_get_root(true, false); // settings not required - only pages
|
||||
}
|
||||
|
||||
if (!empty($delete) && confirm_sesskey()) {
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($strmanageblocks);
|
||||
@@ -114,11 +149,12 @@
|
||||
|
||||
$table = new flexible_table('admin-blocks-compatible');
|
||||
|
||||
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'delete', 'settings'));
|
||||
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strdelete, $strsettings));
|
||||
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'undeletable', 'delete', 'settings'));
|
||||
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strprotecthdr, $strdelete, $strsettings));
|
||||
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
|
||||
$table->set_attribute('class', 'compatibleblockstable blockstable generaltable');
|
||||
$table->setup();
|
||||
$tablerows = array();
|
||||
|
||||
foreach ($blocks as $blockid=>$block) {
|
||||
$blockname = $block->name;
|
||||
@@ -147,7 +183,11 @@
|
||||
|
||||
$settings = ''; // By default, no configuration
|
||||
if ($blockobject and $blockobject->has_config()) {
|
||||
if (file_exists($CFG->dirroot.'/blocks/'.$block->name.'/settings.php')) {
|
||||
$blocksettings = admin_get_root()->locate('blocksetting' . $block->name);
|
||||
|
||||
if ($blocksettings instanceof admin_externalpage) {
|
||||
$settings = '<a href="' . $blocksettings->url . '">' . get_string('settings') . '</a>';
|
||||
} else if ($blocksettings instanceof admin_settingpage) {
|
||||
$settings = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=blocksetting'.$block->name.'">'.$strsettings.'</a>';
|
||||
} else {
|
||||
$settings = '<a href="block.php?block='.$blockid.'">'.$strsettings.'</a>';
|
||||
@@ -187,15 +227,32 @@
|
||||
$version = "$block->version ($plugin->version)";
|
||||
}
|
||||
|
||||
if (!$blockobject) {
|
||||
// ignore
|
||||
$undeletable = '';
|
||||
} else if (in_array($blockname, $undeletableblocktypes)) {
|
||||
$undeletable = '<a href="blocks.php?unprotect='.$blockid.'&sesskey='.sesskey().'" title="'.$strunprotect.'">'.
|
||||
'<img src="'.$OUTPUT->pix_url('t/unlock') . '" class="icon" alt="'.$strunprotect.'" /></a>';
|
||||
} else {
|
||||
$undeletable = '<a href="blocks.php?protect='.$blockid.'&sesskey='.sesskey().'" title="'.$strprotect.'">'.
|
||||
'<img src="'.$OUTPUT->pix_url('t/unlock_gray') . '" class="icon" alt="'.$strprotect.'" /></a>';
|
||||
}
|
||||
|
||||
$table->add_data(array(
|
||||
$row = array(
|
||||
'<span'.$class.'>'.$strblockname.'</span>',
|
||||
$blocklist,
|
||||
'<span'.$class.'>'.$version.'</span>',
|
||||
$visible,
|
||||
$undeletable,
|
||||
$delete,
|
||||
$settings
|
||||
));
|
||||
);
|
||||
$tablerows[] = array(strip_tags($strblockname), $row); // first element will be used for sorting
|
||||
}
|
||||
|
||||
textlib_get_instance()->asort($tablerows);
|
||||
foreach ($tablerows as $row) {
|
||||
$table->add_data($row[1]);
|
||||
}
|
||||
|
||||
$table->print_html();
|
||||
|
||||
@@ -88,9 +88,9 @@ function bloglevelupgrade_entries($blogentries, $forum, $cm, $groupid=-1) {
|
||||
$discussion->course = $forum->course;
|
||||
$discussion->forum = $forum->id;
|
||||
$discussion->name = $blogentry->subject;
|
||||
$discussion->intro = $blogentry->summary;
|
||||
$discussion->assessed = $forum->assessed;
|
||||
$discussion->messageformat = $forum->introformat;
|
||||
$discussion->message = $blogentry->summary;
|
||||
$discussion->messageformat = $blogentry->summaryformat;
|
||||
$discussion->messagetrust = 0;
|
||||
$discussion->attachments = 0;
|
||||
$discussion->mailnow = false;
|
||||
|
||||
+28
-3
@@ -70,6 +70,8 @@ Options:
|
||||
problem encountered.
|
||||
--agree-license Indicates agreement with software license,
|
||||
required in non-interactive mode.
|
||||
--allow-unstable Install even if the version is not marked as stable yet,
|
||||
required in non-interactive mode.
|
||||
-h, --help Print out this help
|
||||
|
||||
Example:
|
||||
@@ -136,9 +138,6 @@ $CFG->early_install_lang = true;
|
||||
$parts = explode('/', str_replace('\\', '/', dirname(dirname(__FILE__))));
|
||||
$CFG->admin = array_pop($parts);
|
||||
|
||||
require($CFG->dirroot.'/version.php');
|
||||
$CFG->target_release = $release;
|
||||
|
||||
//point pear include path to moodles lib/pear so that includes and requires will search there for files before anywhere else
|
||||
//the problem is that we need specific version of quickforms and hacked excel files :-(
|
||||
ini_set('include_path', $CFG->libdir.'/pear' . PATH_SEPARATOR . ini_get('include_path'));
|
||||
@@ -154,6 +153,9 @@ require_once($CFG->libdir.'/deprecatedlib.php');
|
||||
require_once($CFG->libdir.'/adminlib.php');
|
||||
require_once($CFG->libdir.'/componentlib.class.php');
|
||||
|
||||
require($CFG->dirroot.'/version.php');
|
||||
$CFG->target_release = $release;
|
||||
|
||||
//Database types
|
||||
$databases = array('mysqli' => moodle_database::get_driver_instance('mysqli', 'native'),
|
||||
'pgsql' => moodle_database::get_driver_instance('pgsql', 'native'),
|
||||
@@ -193,6 +195,7 @@ list($options, $unrecognized) = cli_get_params(
|
||||
'adminpass' => '',
|
||||
'non-interactive' => false,
|
||||
'agree-license' => false,
|
||||
'allow-unstable' => false,
|
||||
'help' => false
|
||||
),
|
||||
array(
|
||||
@@ -402,6 +405,28 @@ $CFG->langotherroot = $CFG->dataroot.'/lang';
|
||||
$CFG->langlocalroot = $CFG->dataroot.'/lang';
|
||||
get_string_manager(true);
|
||||
|
||||
// make sure we are installing stable release or require a confirmation
|
||||
if (isset($maturity)) {
|
||||
if (($maturity < MATURITY_STABLE) and !$options['allow-unstable']) {
|
||||
$maturitylevel = get_string('maturity'.$maturity, 'admin');
|
||||
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('notice'));
|
||||
echo get_string('maturitycorewarning', 'admin', $maturitylevel) . PHP_EOL;
|
||||
echo get_string('morehelp') . ': ' . get_docs_url('admin/versions') . PHP_EOL;
|
||||
echo get_string('continue') . PHP_EOL;
|
||||
$prompt = get_string('cliyesnoprompt', 'admin');
|
||||
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
|
||||
if ($input == get_string('clianswerno', 'admin')) {
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
cli_error(get_string('maturitycorewarning', 'admin'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ask for db type - show only drivers available
|
||||
if ($interactive) {
|
||||
$options['dbtype'] = strtolower($options['dbtype']);
|
||||
|
||||
@@ -46,6 +46,8 @@ Options:
|
||||
--adminuser=USERNAME Username for the moodle admin account. Default is admin.
|
||||
--adminpass=PASSWORD Password for the moodle admin account.
|
||||
--agree-license Indicates agreement with software license.
|
||||
--fullname Name of the site
|
||||
--shortname Name of the site
|
||||
-h, --help Print out this help
|
||||
|
||||
Example:
|
||||
@@ -93,6 +95,8 @@ list($options, $unrecognized) = cli_get_params(
|
||||
'lang' => 'en',
|
||||
'adminuser' => 'admin',
|
||||
'adminpass' => '',
|
||||
'fullname' => '',
|
||||
'shortname' => '',
|
||||
'agree-license' => false,
|
||||
'help' => false
|
||||
),
|
||||
|
||||
+39
-4
@@ -40,8 +40,16 @@ require_once($CFG->libdir.'/environmentlib.php');
|
||||
|
||||
|
||||
// now get cli options
|
||||
list($options, $unrecognized) = cli_get_params(array('non-interactive'=>false, 'help'=>false),
|
||||
array('h'=>'help'));
|
||||
list($options, $unrecognized) = cli_get_params(
|
||||
array(
|
||||
'non-interactive' => false,
|
||||
'allow-unstable' => false,
|
||||
'help' => false
|
||||
),
|
||||
array(
|
||||
'h' => 'help'
|
||||
)
|
||||
);
|
||||
|
||||
$interactive = empty($options['non-interactive']);
|
||||
|
||||
@@ -59,6 +67,8 @@ Site defaults may be changed via local/defaults.php.
|
||||
|
||||
Options:
|
||||
--non-interactive No interactive questions or confirmations
|
||||
--allow-unstable Upgrade even if the version is not marked as stable yet,
|
||||
required in non-interactive mode.
|
||||
-h, --help Print out this help
|
||||
|
||||
Example:
|
||||
@@ -73,17 +83,18 @@ if (empty($CFG->version)) {
|
||||
cli_error(get_string('missingconfigversion', 'debug'));
|
||||
}
|
||||
|
||||
require("$CFG->dirroot/version.php"); // defines $version and $release
|
||||
require("$CFG->dirroot/version.php"); // defines $version, $release and $maturity
|
||||
$CFG->target_release = $release; // used during installation and upgrades
|
||||
|
||||
if ($version < $CFG->version) {
|
||||
cli_error(get_string('downgradedcore', 'error'));
|
||||
}
|
||||
|
||||
$oldversion = "$CFG->release ($CFG->version)";
|
||||
$newversion = "$release ($version)";
|
||||
|
||||
// test environment first
|
||||
if (!check_moodle_environment($version, $environment_results, false, ENV_SELECT_RELEASE)) {
|
||||
if (!check_moodle_environment(normalize_version($release), $environment_results, false, ENV_SELECT_RELEASE)) {
|
||||
$errors = environment_get_errors($environment_results);
|
||||
cli_heading(get_string('environment', 'admin'));
|
||||
foreach ($errors as $error) {
|
||||
@@ -93,6 +104,30 @@ if (!check_moodle_environment($version, $environment_results, false, ENV_SELECT_
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ($interactive) {
|
||||
$a = new stdClass();
|
||||
$a->oldversion = $oldversion;
|
||||
$a->newversion = $newversion;
|
||||
echo cli_heading(get_string('databasechecking', '', $a)) . PHP_EOL;
|
||||
}
|
||||
|
||||
// make sure we are upgrading to a stable release or display a warning
|
||||
if (isset($maturity)) {
|
||||
if (($maturity < MATURITY_STABLE) and !$options['allow-unstable']) {
|
||||
$maturitylevel = get_string('maturity'.$maturity, 'admin');
|
||||
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('notice'));
|
||||
echo get_string('maturitycorewarning', 'admin', $maturitylevel) . PHP_EOL;
|
||||
echo get_string('morehelp') . ': ' . get_docs_url('admin/versions') . PHP_EOL;
|
||||
cli_separator();
|
||||
} else {
|
||||
cli_error(get_string('maturitycorewarning', 'admin', $maturitylevel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($interactive) {
|
||||
echo html_to_text(get_string('upgradesure', 'admin', $newversion))."\n";
|
||||
$prompt = get_string('cliyesnoprompt', 'admin');
|
||||
|
||||
@@ -36,6 +36,12 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
|
||||
if (defined('STDIN')) {
|
||||
fwrite(STDERR, "ERROR: This script no longer supports CLI, please use admin/cli/cron.php instead\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// This is a fake CLI script, it is a really ugly hack which emulates
|
||||
// CLI via web interface, please do not use this hack elsewhere
|
||||
define('CLI_SCRIPT', true);
|
||||
|
||||
@@ -328,4 +328,118 @@
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
<MOODLE version="2.1" requires="1.9">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mysql" version="5.0.25">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="mysql416required" />
|
||||
</FEEDBACK>
|
||||
</VENDOR>
|
||||
<VENDOR name="postgres" version="8.3" />
|
||||
<VENDOR name="mssql" version="9.0" />
|
||||
<VENDOR name="odbc_mssql" version="9.0" />
|
||||
<VENDOR name="mssql_n" version="9.0" />
|
||||
<VENDOR name="oracle" version="10.2" />
|
||||
<VENDOR name="sqlite" version="2.0" />
|
||||
</DATABASE>
|
||||
<PHP version="5.3.2" level="required">
|
||||
</PHP>
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="mbstringrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="opensslrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="tokenizer" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="tokenizerrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xmlrpc" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="xmlrpcrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="soap" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="soaprecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="ctype" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ctyperequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="zip" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ziprequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="gd" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="gdrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="dom" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xml" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="intl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="intlrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="json" level="required">
|
||||
</PHP_EXTENSION>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="40M" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="settingmemorylimit" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="safe_mode" value="0" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingsafemode" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="file_uploads" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingfileuploads" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
</PHP_SETTINGS>
|
||||
</MOODLE>
|
||||
</COMPATIBILITY_MATRIX>
|
||||
|
||||
Executable → Regular
+2
-2
@@ -387,10 +387,10 @@ class generator {
|
||||
.$this->get('number_of_modules')." modules in each section, for each course...");
|
||||
|
||||
list($modules_list_sql, $modules_params) =
|
||||
$DB->get_in_or_equal($this->get('modules_list'), SQL_PARAMS_NAMED, 'param0000', true);
|
||||
$DB->get_in_or_equal($this->get('modules_list'), SQL_PARAMS_NAMED, 'mod', true);
|
||||
|
||||
list($modules_ignored_sql, $ignore_params) =
|
||||
$DB->get_in_or_equal($this->modules_to_ignore, SQL_PARAMS_NAMED, 'param2000', false);
|
||||
$DB->get_in_or_equal($this->modules_to_ignore, SQL_PARAMS_NAMED, 'ignore', false);
|
||||
|
||||
$wheresql = "name $modules_list_sql AND name $modules_ignored_sql";
|
||||
$modules = $DB->get_records_select('modules', $wheresql, array_merge($modules_params, $ignore_params));
|
||||
|
||||
+35
-14
@@ -86,7 +86,7 @@ if (!isset($CFG->version)) {
|
||||
|
||||
$version = null;
|
||||
$release = null;
|
||||
require("$CFG->dirroot/version.php"); // defines $version and $release
|
||||
require("$CFG->dirroot/version.php"); // defines $version, $release and $maturity
|
||||
$CFG->target_release = $release; // used during installation and upgrades
|
||||
|
||||
if (!$version or !$release) {
|
||||
@@ -123,24 +123,36 @@ if (!core_tables_exist()) {
|
||||
echo $OUTPUT->box($copyrightnotice, 'copyrightnotice');
|
||||
echo '<br />';
|
||||
$continue = new single_button(new moodle_url('/admin/index.php', array('lang'=>$CFG->lang, 'agreelicense'=>1)), get_string('continue'), 'get');
|
||||
echo $OUTPUT->confirm(get_string('doyouagree'), $continue, "http://docs.moodle.org/en/License");
|
||||
echo $OUTPUT->confirm(get_string('doyouagree'), $continue, "http://docs.moodle.org/dev/License");
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
if (empty($confirmrelease)) {
|
||||
$strcurrentrelease = get_string('currentrelease');
|
||||
$PAGE->navbar->add($strcurrentrelease);
|
||||
$PAGE->set_title($strinstallation.' - Moodle '.$CFG->target_release);
|
||||
$PAGE->set_heading($strinstallation);
|
||||
$PAGE->set_title($strinstallation);
|
||||
$PAGE->set_heading($strinstallation . ' - Moodle ' . $CFG->target_release);
|
||||
$PAGE->set_cacheable(false);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading("Moodle $release");
|
||||
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes');
|
||||
|
||||
if (isset($maturity)) {
|
||||
// main version.php declares moodle code maturity
|
||||
if ($maturity < MATURITY_STABLE) {
|
||||
$maturitylevel = get_string('maturity'.$maturity, 'admin');
|
||||
echo $OUTPUT->box(
|
||||
$OUTPUT->container(get_string('maturitycorewarning', 'admin', $maturitylevel)) .
|
||||
$OUTPUT->container($OUTPUT->doc_link('admin/versions', get_string('morehelp'))),
|
||||
'generalbox maturitywarning');
|
||||
}
|
||||
}
|
||||
|
||||
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/dev/Releases');
|
||||
$releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack
|
||||
echo $OUTPUT->box($releasenoteslink, 'generalbox boxaligncenter boxwidthwide');
|
||||
echo $OUTPUT->box($releasenoteslink, 'generalbox releasenoteslink');
|
||||
|
||||
require_once($CFG->libdir.'/environmentlib.php');
|
||||
if (!check_moodle_environment($release, $environment_results, true, ENV_SELECT_RELEASE)) {
|
||||
if (!check_moodle_environment(normalize_version($release), $environment_results, true, ENV_SELECT_RELEASE)) {
|
||||
print_upgrade_reload("index.php?agreelicense=1&lang=$CFG->lang");
|
||||
} else {
|
||||
echo $OUTPUT->notification(get_string('environmentok', 'admin'), 'notifysuccess');
|
||||
@@ -189,11 +201,20 @@ if ($version > $CFG->version) { // upgrade
|
||||
$strdatabasechecking = get_string('databasechecking', '', $a);
|
||||
|
||||
if (empty($confirmupgrade)) {
|
||||
$PAGE->navbar->add($strdatabasechecking);
|
||||
$PAGE->set_title($strdatabasechecking);
|
||||
$PAGE->set_heading($stradministration);
|
||||
$PAGE->set_title($stradministration);
|
||||
$PAGE->set_heading($strdatabasechecking);
|
||||
$PAGE->set_cacheable(false);
|
||||
echo $OUTPUT->header();
|
||||
if (isset($maturity)) {
|
||||
// main version.php declares moodle code maturity
|
||||
if ($maturity < MATURITY_STABLE) {
|
||||
$maturitylevel = get_string('maturity'.$maturity, 'admin');
|
||||
echo $OUTPUT->box(
|
||||
$OUTPUT->container(get_string('maturitycorewarning', 'admin', $maturitylevel)) .
|
||||
$OUTPUT->container($OUTPUT->doc_link('admin/versions', get_string('morehelp'))),
|
||||
'generalbox maturitywarning');
|
||||
}
|
||||
}
|
||||
$continueurl = new moodle_url('index.php', array('confirmupgrade' => 1));
|
||||
$cancelurl = new moodle_url('index.php');
|
||||
echo $OUTPUT->confirm(get_string('upgradesure', 'admin', $a->newversion), $continueurl, $cancelurl);
|
||||
@@ -208,7 +229,7 @@ if ($version > $CFG->version) { // upgrade
|
||||
$PAGE->set_cacheable(false);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading("Moodle $release");
|
||||
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes');
|
||||
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/dev/Releases');
|
||||
$releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack
|
||||
echo $OUTPUT->box($releasenoteslink);
|
||||
|
||||
@@ -419,10 +440,10 @@ if (!empty($CFG->maintenance_enabled)) {
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO HIDE, REMOVE OR MODIFY THIS COPYRIGHT NOTICE ///
|
||||
$copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
|
||||
'<a href="http://docs.moodle.org/en/Release" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
|
||||
'<a href="http://docs.moodle.org/dev/Releases" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
|
||||
'Copyright © 1999 onwards, Martin Dougiamas<br />'.
|
||||
'and <a href="http://docs.moodle.org/en/Credits">many other contributors</a>.<br />'.
|
||||
'<a href="http://docs.moodle.org/en/License">GNU Public License</a>';
|
||||
'and <a href="http://docs.moodle.org/dev/Credits">many other contributors</a>.<br />'.
|
||||
'<a href="http://docs.moodle.org/dev/License">GNU Public License</a>';
|
||||
echo $OUTPUT->box($copyrighttext, 'copyright');
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Executable → Regular
-5
@@ -53,11 +53,6 @@ define('INSTALLATION_OF_SELECTED_LANG', 2);
|
||||
define('DELETION_OF_SELECTED_LANG', 4);
|
||||
define('UPDATE_ALL_LANG', 5);
|
||||
|
||||
//reset and diagnose lang cache permissions
|
||||
remove_dir($CFG->dataroot.'/cache/languages');
|
||||
if (file_exists($CFG->dataroot.'/cache/languages')) {
|
||||
print_error('cannotdeletelangcache', 'error');
|
||||
}
|
||||
get_string_manager()->reset_caches();
|
||||
|
||||
$notice_ok = array();
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* Displays the list of found local plugins, their version (if found) and
|
||||
* a link to delete the local plugin.
|
||||
*
|
||||
* @see http://docs.moodle.org/en/Development:Local_customisation
|
||||
* @see http://docs.moodle.org/dev/Local_customisation
|
||||
* @package admin
|
||||
* @copyright 2010 David Mudrak <david.mudrak@gmail.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
|
||||
Executable → Regular
@@ -47,7 +47,7 @@ $error = optional_param('error', '', PARAM_ALPHANUM);
|
||||
admin_externalpage_setup('registrationindex');
|
||||
|
||||
if (!empty($error) and $error == 'urlalreadyexist') {
|
||||
throw new moodle_exception('urlalreadyregistered', 'hub',
|
||||
throw new moodle_exception('urlalreadyregistered', 'hub',
|
||||
$CFG->wwwroot . '/' . $CFG->admin . '/registration/index.php');
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ if (!empty($registeredhub) and $registeredhub->token == $token) {
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
} else {
|
||||
throw new moodle_exception('wrongtoken', 'hub',
|
||||
throw new moodle_exception('wrongtoken', 'hub',
|
||||
$CFG->wwwroot . '/' . $CFG->admin . '/registration/index.php');
|
||||
}
|
||||
|
||||
|
||||
@@ -148,12 +148,12 @@ if (empty($cancel) and $unregistration and !$confirm) {
|
||||
$moodleorghub = $registrationmanager->get_registeredhub(HUB_MOODLEORGHUBURL);
|
||||
if (!empty($moodleorghub)) {
|
||||
$registeredonmoodleorg = true;
|
||||
}
|
||||
}
|
||||
|
||||
echo $OUTPUT->heading(get_string('registeron', 'hub'), 3, 'main');
|
||||
echo $renderer->registrationselector($registeredonmoodleorg);
|
||||
|
||||
if (extension_loaded('xmlrpc')) {
|
||||
if (extension_loaded('xmlrpc')) {
|
||||
$hubs = $registrationmanager->get_registered_on_hubs();
|
||||
if (!empty($hubs)) {
|
||||
echo $OUTPUT->heading(get_string('registeredon', 'hub'), 3, 'main');
|
||||
|
||||
+16
-21
@@ -11,23 +11,32 @@ admin_externalpage_setup('replace');
|
||||
|
||||
$search = optional_param('search', '', PARAM_RAW);
|
||||
$replace = optional_param('replace', '', PARAM_RAW);
|
||||
$sure = optional_param('sure', 0, PARAM_BOOL);
|
||||
|
||||
###################################################################
|
||||
echo $OUTPUT->header();
|
||||
|
||||
echo $OUTPUT->heading('Search and replace text throughout the whole database');
|
||||
|
||||
if ($DB->get_dbfamily() !== 'mysql' and $DB->get_dbfamily() !== 'postgres') {
|
||||
//TODO: add $DB->text_replace() to DML drivers
|
||||
echo $OUTPUT->notification('Sorry, this feature is implemented only for MySQL and PostgreSQL databases.');
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
|
||||
if (!data_submitted() or !$search or !$replace or !confirm_sesskey()) { /// Print a form
|
||||
if (!data_submitted() or !$search or !$replace or !confirm_sesskey() or !$sure) { /// Print a form
|
||||
echo $OUTPUT->notification('This script is not supported, always make complete backup before proceeding!<br />This operation can not be reverted!');
|
||||
|
||||
echo $OUTPUT->box_start();
|
||||
echo '<div class="mdl-align">';
|
||||
echo '<form action="replace.php" method="post">';
|
||||
echo '<form action="replace.php" method="post"><div>';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
echo 'Search whole database for: <input type="text" name="search" /><br />';
|
||||
echo 'Replace with this string: <input type="text" name="replace" /><br />';
|
||||
echo '<input type="submit" value="Yes, do it now" /><br />';
|
||||
echo '</form>';
|
||||
echo '<div><label for="search">Search whole database for: </label><input id="search" type="text" name="search" size="40" /> (usually previous server URL)</div>';
|
||||
echo '<div><label for="replace">Replace with this string: </label><input type="text" id="replace" name="replace" size="40" /> (usually new server URL)</div>';
|
||||
echo '<div><label for="sure">I understand the risks of this operation: </label><input type="checkbox" id="sure" name="sure" value="1" /></div>';
|
||||
echo '<div class="buttons"><input type="submit" class="singlebutton" value="Yes, do it now" /></div>';
|
||||
echo '</div></form>';
|
||||
echo '</div>';
|
||||
echo $OUTPUT->box_end();
|
||||
echo $OUTPUT->footer();
|
||||
@@ -35,23 +44,9 @@ if (!data_submitted() or !$search or !$replace or !confirm_sesskey()) { /// Pr
|
||||
}
|
||||
|
||||
echo $OUTPUT->box_start();
|
||||
|
||||
if (!db_replace($search, $replace)) {
|
||||
print_error('erroroccur', debug);
|
||||
}
|
||||
|
||||
db_replace($search, $replace);
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
/// Try to replace some well-known serialised contents (html blocks)
|
||||
echo $OUTPUT->notification('Replacing in html blocks...');
|
||||
$instances = $DB->get_recordset('block_instances', array('blockname' => 'html'));
|
||||
foreach ($instances as $instance) {
|
||||
$blockobject = block_instance('html', $instance);
|
||||
$blockobject->config->text = str_replace($search, $replace, $blockobject->config->text);
|
||||
$blockobject->instance_config_commit();
|
||||
}
|
||||
$instances->close();
|
||||
|
||||
/// Rebuild course cache which might be incorrect now
|
||||
echo $OUTPUT->notification('Rebuilding course cache...', 'notifysuccess');
|
||||
rebuild_course_cache();
|
||||
|
||||
@@ -79,13 +79,12 @@
|
||||
$param->extras
|
||||
ORDER BY $param->orderby";
|
||||
}
|
||||
//error_log($sql);
|
||||
|
||||
$courses = $DB->get_records_sql($sql, $param->params, 0, $numcourses);
|
||||
|
||||
if (empty($courses)) {
|
||||
echo $OUTPUT->notification(get_string('statsnodata'));
|
||||
echo '</td></tr></table>';echo '<p>after notify</p>';
|
||||
echo '</td></tr></table>';
|
||||
|
||||
} else {
|
||||
if (empty($CFG->gdversion)) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="admin/report/customlang/db" VERSION="20101115" COMMENT="XMLDB file for Moodle admin/report/customlang"
|
||||
<XMLDB PATH="admin/report/customlang/db" VERSION="20110419" COMMENT="XMLDB file for Moodle admin/report/customlang"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -30,11 +30,11 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="name"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="The normalized name of the plugin" PREVIOUS="id" NEXT="version"/>
|
||||
<FIELD NAME="version" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="The checked out version of the plugin, null of the version is unknown" PREVIOUS="name"/>
|
||||
<FIELD NAME="version" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" COMMENT="The checked out version of the plugin, null if the version is unknown" PREVIOUS="name"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
||||
</KEYS>
|
||||
</TABLE>
|
||||
</TABLES>
|
||||
</XMLDB>
|
||||
</XMLDB>
|
||||
@@ -57,5 +57,18 @@ function xmldb_report_customlang_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2010111500, 'report', 'customlang');
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the version field from integer to varchar
|
||||
*/
|
||||
if ($oldversion < 2011041900) {
|
||||
$table = new xmldb_table('report_customlang_components');
|
||||
$field = new xmldb_field('version', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'name');
|
||||
|
||||
$dbman->change_field_type($table, $field);
|
||||
|
||||
upgrade_plugin_savepoint(true, 2011041900, 'report', 'customlang');
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
define('NO_OUTPUT_BUFFERING', true); // progress bar is used here
|
||||
|
||||
require(dirname(dirname(dirname(dirname(__FILE__)))).'/config.php');
|
||||
require_once($CFG->dirroot.'/'.$CFG->admin.'/report/customlang/locallib.php');
|
||||
require_once($CFG->libdir.'/adminlib.php');
|
||||
@@ -45,8 +47,22 @@ if ($action === 'checkout') {
|
||||
if (empty($lng)) {
|
||||
print_error('missingparameter');
|
||||
}
|
||||
report_customlang_utils::checkout($lng);
|
||||
redirect(new moodle_url('/admin/report/customlang/edit.php', array('lng' => $lng)));
|
||||
|
||||
$PAGE->set_cacheable(false); // progress bar is used here
|
||||
$output = $PAGE->get_renderer('report_customlang');
|
||||
echo $output->header();
|
||||
echo $output->heading(get_string('pluginname', 'report_customlang'));
|
||||
$progressbar = new progress_bar();
|
||||
$progressbar->create(); // prints the HTML code of the progress bar
|
||||
|
||||
// we may need a bit of extra execution time and memory here
|
||||
@set_time_limit(HOURSECS);
|
||||
raise_memory_limit(MEMORY_EXTRA);
|
||||
report_customlang_utils::checkout($lng, $progressbar);
|
||||
|
||||
echo $output->continue_button(new moodle_url('/admin/report/customlang/edit.php', array('lng' => $lng)), 'get');
|
||||
echo $output->footer();
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($action === 'checkin') {
|
||||
|
||||
@@ -27,7 +27,9 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['checkin'] = 'Check in strings into disk';
|
||||
$string['checkout'] = 'Check out strings into translator';
|
||||
$string['checkout'] = 'Check out strings into the translator';
|
||||
$string['checkoutdone'] = 'Strings checked out successfully into the translator';
|
||||
$string['checkoutinprogress'] = 'Checking out strings into the translator';
|
||||
$string['confirmcheckin'] = 'You are about to check in modified strings into your local language pack. This will export the customized strings from the translator into the data directory and Moodle will start using the modified strings. Press \'Continue\' button to proceed check in.';
|
||||
$string['customlang:edit'] = 'Edit local translation';
|
||||
$string['customlang:view'] = 'View local translation';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Definition of classes used by Langugae customization admin report
|
||||
* Definition of classes used by language customization admin report
|
||||
*
|
||||
* @package report
|
||||
* @subpackage customlang
|
||||
@@ -33,6 +33,12 @@ defined('MOODLE_INTERNAL') || die();
|
||||
*/
|
||||
class report_customlang_utils {
|
||||
|
||||
/**
|
||||
* Rough number of strings that are being processed during a full checkout.
|
||||
* This is used to estimate the progress of the checkout.
|
||||
*/
|
||||
const ROUGH_NUMBER_OF_STRINGS = 16500;
|
||||
|
||||
/** @var array cache of {@link self::list_components()} results */
|
||||
protected static $components = null;
|
||||
|
||||
@@ -83,8 +89,9 @@ class report_customlang_utils {
|
||||
* This should be executed each time before going to the translation page
|
||||
*
|
||||
* @param string $lang language code to checkout
|
||||
* @param progress_bar $progressbar optionally, the given progress bar can be updated
|
||||
*/
|
||||
public static function checkout($lang) {
|
||||
public static function checkout($lang, progress_bar $progressbar = null) {
|
||||
global $DB;
|
||||
|
||||
// make sure that all components are registered
|
||||
@@ -107,6 +114,10 @@ class report_customlang_utils {
|
||||
}
|
||||
unset($current);
|
||||
|
||||
// initialize the progress counter - stores the number of processed strings
|
||||
$done = 0;
|
||||
$strinprogress = get_string('checkoutinprogress', 'report_customlang');
|
||||
|
||||
// reload components and fetch their strings
|
||||
$stringman = get_string_manager();
|
||||
$components = $DB->get_records('report_customlang_components');
|
||||
@@ -129,6 +140,12 @@ class report_customlang_utils {
|
||||
$stringlocal = isset($local[$stringid]) ? $local[$stringid] : null;
|
||||
$now = time();
|
||||
|
||||
if (!is_null($progressbar)) {
|
||||
$done++;
|
||||
$donepercent = floor(min($done, self::ROUGH_NUMBER_OF_STRINGS) / self::ROUGH_NUMBER_OF_STRINGS * 100);
|
||||
$progressbar->update_full($donepercent, $strinprogress);
|
||||
}
|
||||
|
||||
if (isset($current[$stringid])) {
|
||||
$needsupdate = false;
|
||||
$currentoriginal = $current[$stringid]->original;
|
||||
@@ -175,6 +192,10 @@ class report_customlang_utils {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_null($progressbar)) {
|
||||
$progressbar->update_full(100, get_string('checkoutdone', 'report_customlang'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -63,3 +63,7 @@
|
||||
background-color: #f6f6f6;
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
#page-admin-report-customlang-index .continuebutton {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
@@ -24,5 +24,5 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2010120900;
|
||||
$plugin->version = 2011041900;
|
||||
$plugin->requires = 2010120700;
|
||||
|
||||
Executable → Regular
+8
-6
@@ -151,19 +151,21 @@ function search_spammers($keywords) {
|
||||
$params = array('userid'=>$USER->id);
|
||||
|
||||
$keywordfull = array();
|
||||
$i = 0;
|
||||
foreach ($keywords as $keyword) {
|
||||
$keywordfull[] = $DB->sql_like('description', ':descpat', false);
|
||||
$params['descpat'] = "%$keyword%";
|
||||
$keywordfull2[] = $DB->sql_like('p.summary', ':sumpat', false);
|
||||
$params['sumpat'] = "%$keyword%";
|
||||
$keywordfull[] = $DB->sql_like('description', ':descpat'.$i, false);
|
||||
$params['descpat'.$i] = "%$keyword%";
|
||||
$keywordfull2[] = $DB->sql_like('p.summary', ':sumpat'.$i, false);
|
||||
$params['sumpat'.$i] = "%$keyword%";
|
||||
$i++;
|
||||
}
|
||||
$conditions = '( '.implode(' OR ', $keywordfull).' )';
|
||||
$conditions2 = '( '.implode(' OR ', $keywordfull2).' )';
|
||||
|
||||
$sql = "SELECT * FROM {user} WHERE deleted = 0 AND id <> :userid AND $conditions"; // Exclude oneself
|
||||
$sql2 = "SELECT u.*, p.summary FROM {user} AS u, {post} AS p WHERE $conditions2 AND u.deleted = 0 AND u.id=p.userid AND u.id <> :userid";
|
||||
$spamusers_desc = $DB->get_recordset_sql($sql);
|
||||
$spamusers_blog = $DB->get_recordset_sql($sql2);
|
||||
$spamusers_desc = $DB->get_recordset_sql($sql, $params);
|
||||
$spamusers_blog = $DB->get_recordset_sql($sql2, $params);
|
||||
|
||||
$keywordlist = implode(', ', $keywords);
|
||||
echo $OUTPUT->box(get_string('spamresult', 'report_spamcleaner').s($keywordlist)).' ...';
|
||||
|
||||
@@ -108,7 +108,7 @@ M.report_spamcleaner = {
|
||||
context.Y = Y;
|
||||
context.me = me;
|
||||
if (Y.one("#removeall_btn")) {
|
||||
Y.on("click", context.del_all, "#removeall_btn");
|
||||
Y.on("click", context.del_all, "#removeall_btn");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Executable → Regular
@@ -68,7 +68,11 @@ if (!empty($edit) || !empty($new)) {
|
||||
$settings['name'] = $fromform->name;
|
||||
if (!$instance->readonly) {
|
||||
foreach($configs as $config) {
|
||||
$settings[$config] = $fromform->$config;
|
||||
if (isset($fromform->$config)) {
|
||||
$settings[$config] = $fromform->$config;
|
||||
} else {
|
||||
$settings[$config] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
$success = $instance->set_option($settings);
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+5
-5
@@ -628,7 +628,7 @@ class define_role_table_advanced extends capability_table_with_risks {
|
||||
|
||||
// Legacy type.
|
||||
$archetype = optional_param('archetype', null, PARAM_RAW);
|
||||
if ($archetype) {
|
||||
if (isset($archetype)) {
|
||||
$archetypes = get_role_archetypes();
|
||||
if (isset($archetypes[$archetype])){
|
||||
$this->role->archetype = $archetype;
|
||||
@@ -716,7 +716,6 @@ class define_role_table_advanced extends capability_table_with_risks {
|
||||
}
|
||||
|
||||
protected function get_archetype_field($id) {
|
||||
global $OUTPUT;
|
||||
$options = array();
|
||||
$options[''] = get_string('none');
|
||||
foreach(get_role_archetypes() as $type) {
|
||||
@@ -780,8 +779,8 @@ class define_role_table_advanced extends capability_table_with_risks {
|
||||
global $OUTPUT;
|
||||
// Extra fields at the top of the page.
|
||||
echo '<div class="topfields clearfix">';
|
||||
$this->print_field('name', get_string('name'), $this->get_name_field('name'));
|
||||
$this->print_field('shortname', get_string('shortname'), $this->get_shortname_field('shortname'));
|
||||
$this->print_field('name', get_string('rolefullname', 'role'), $this->get_name_field('name'));
|
||||
$this->print_field('shortname', get_string('roleshortname', 'role'), $this->get_shortname_field('shortname'));
|
||||
$this->print_field('edit-description', get_string('description'), $this->get_description_field('description'));
|
||||
$this->print_field('menuarchetype', get_string('archetype', 'role').' '.$OUTPUT->help_icon('archetype', 'role'), $this->get_archetype_field('archetype'));
|
||||
$this->print_field('', get_string('maybeassignedin', 'role'), $this->get_assignable_levels_control());
|
||||
@@ -1143,7 +1142,7 @@ class existing_role_holders extends role_assign_user_selector_base {
|
||||
global $DB;
|
||||
|
||||
list($wherecondition, $params) = $this->search_sql($search, 'u');
|
||||
list($ctxcondition, $ctxparams) = $DB->get_in_or_equal(get_parent_contexts($this->context, true), SQL_PARAMS_NAMED, 'ctx00');
|
||||
list($ctxcondition, $ctxparams) = $DB->get_in_or_equal(get_parent_contexts($this->context, true), SQL_PARAMS_NAMED, 'ctx');
|
||||
$params = array_merge($params, $ctxparams);
|
||||
$params['roleid'] = $this->roleid;
|
||||
|
||||
@@ -1317,6 +1316,7 @@ abstract class role_allow_role_page {
|
||||
foreach ($rs as $allow) {
|
||||
$this->allowed[$allow->roleid][$allow->{$this->targetcolname}] = true;
|
||||
}
|
||||
$rs->close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Executable → Regular
+1
-1
@@ -194,7 +194,7 @@
|
||||
$table->head = array(
|
||||
get_string('role') . ' ' . $OUTPUT->help_icon('roles', 'role'),
|
||||
get_string('description'),
|
||||
get_string('shortname'),
|
||||
get_string('roleshortname', 'role'),
|
||||
get_string('edit')
|
||||
);
|
||||
|
||||
|
||||
Executable → Regular
@@ -138,7 +138,7 @@ M.core_role.init_cap_table_filter = function(Y, tableid, contextid) {
|
||||
lastheading = null;
|
||||
|
||||
this.setFilterCookieValue(filtertext);
|
||||
|
||||
|
||||
this.button.set('disabled', (filtertext == ''));
|
||||
|
||||
this.table.all('tr').each(function(row){
|
||||
|
||||
Executable → Regular
@@ -63,10 +63,10 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
// blog
|
||||
$temp = new admin_settingpage('blog', get_string('blog','blog'));
|
||||
$temp->add(new admin_setting_configcheckbox('useblogassociations', get_string('useblogassociations', 'blog'), get_string('configuseblogassociations','blog'), 1));
|
||||
$temp->add(new admin_setting_bloglevel('bloglevel', get_string('bloglevel', 'admin'), get_string('configbloglevel', 'admin'), 4, array(5 => get_string('worldblogs','blog'),
|
||||
4 => get_string('siteblogs','blog'),
|
||||
1 => get_string('personalblogs','blog'),
|
||||
0 => get_string('disableblogs','blog'))));
|
||||
$temp->add(new admin_setting_bloglevel('bloglevel', get_string('bloglevel', 'admin'), get_string('configbloglevel', 'admin'), 4, array(BLOG_GLOBAL_LEVEL => get_string('worldblogs','blog'),
|
||||
BLOG_SITE_LEVEL => get_string('siteblogs','blog'),
|
||||
BLOG_USER_LEVEL => get_string('personalblogs','blog'),
|
||||
0 => get_string('disableblogs','blog'))));
|
||||
$temp->add(new admin_setting_configcheckbox('useexternalblogs', get_string('useexternalblogs', 'blog'), get_string('configuseexternalblogs','blog'), 1));
|
||||
$temp->add(new admin_setting_configselect('externalblogcrontime', get_string('externalblogcrontime', 'blog'), get_string('configexternalblogcrontime', 'blog'), 86400,
|
||||
array(43200 => get_string('numhours', '', 12),
|
||||
@@ -130,7 +130,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
|
||||
// link to tag management interface
|
||||
$ADMIN->add('appearance', new admin_externalpage('managetags', get_string('managetags', 'tag'), "$CFG->wwwroot/tag/manage.php"));
|
||||
|
||||
|
||||
$temp = new admin_settingpage('additionalhtml', get_string('additionalhtml', 'admin'));
|
||||
$temp->add(new admin_setting_heading('additionalhtml_heading', get_string('additionalhtml_heading', 'admin'), get_string('additionalhtml_desc', 'admin')));
|
||||
$temp->add(new admin_setting_configtextarea('additionalhtmlhead', get_string('additionalhtmlhead', 'admin'), get_string('additionalhtmlhead_desc', 'admin'), '', PARAM_RAW));
|
||||
|
||||
@@ -139,10 +139,10 @@ if ($hassiteconfig
|
||||
400 => '400',
|
||||
500 => '500');
|
||||
$temp->add(new admin_setting_configselect('backup/backup_auto_keep', get_string('keep'), get_string('backupkeephelp'), 1, $keepoptoins));
|
||||
|
||||
|
||||
|
||||
$temp->add(new admin_setting_heading('automatedsettings', get_string('automatedsettings','backup'), ''));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_users', get_string('users'), get_string('backupusershelp'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_users', get_string('generalusers', 'backup'), get_string('configgeneralusers', 'backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_role_assignments', get_string('generalroleassignments','backup'), get_string('configgeneralroleassignments','backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_user_files', get_string('generaluserfiles', 'backup'), get_string('configgeneraluserfiles','backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_activities', get_string('generalactivities','backup'), get_string('configgeneralactivities','backup'), 1));
|
||||
@@ -150,10 +150,10 @@ if ($hassiteconfig
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_filters', get_string('generalfilters','backup'), get_string('configgeneralfilters','backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_comments', get_string('generalcomments','backup'), get_string('configgeneralcomments','backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_userscompletion', get_string('generaluserscompletion','backup'), get_string('configgeneraluserscompletion','backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_logs', get_string('logs'), get_string('backuplogshelp'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_logs', get_string('generallogs', 'backup'), get_string('configgenerallogs', 'backup'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_histories', get_string('generalhistories','backup'), get_string('configgeneralhistories','backup'), 0));
|
||||
|
||||
|
||||
|
||||
|
||||
//$temp->add(new admin_setting_configcheckbox('backup/backup_auto_messages', get_string('messages', 'message'), get_string('backupmessageshelp','message'), 0));
|
||||
//$temp->add(new admin_setting_configcheckbox('backup/backup_auto_blogs', get_string('blogs', 'blog'), get_string('backupblogshelp','blog'), 0));
|
||||
|
||||
|
||||
@@ -52,13 +52,22 @@ if (!during_initial_install()) { //do not use during installation
|
||||
$temp->add(new admin_setting_configtext('coursesperpage', get_string('coursesperpage', 'admin'), get_string('configcoursesperpage', 'admin'), 20, PARAM_INT));
|
||||
|
||||
// front page default role
|
||||
$roleoptions = array(0=>get_string('none')); // roles to choose from
|
||||
if ($roles = get_all_roles()) {
|
||||
foreach ($roles as $role) {
|
||||
$roleoptions[$role->id] = strip_tags(format_string($role->name, true));
|
||||
$options = array(0=>get_string('none')); // roles to choose from
|
||||
$defaultfrontpageroleid = 0;
|
||||
foreach (get_all_roles() as $role) {
|
||||
if (empty($role->archetype) or $role->archetype === 'guest' or $role->archetype === 'frontpage' or $role->archetype === 'student') {
|
||||
$options[$role->id] = strip_tags(format_string($role->name)) . ' ('. $role->shortname . ')';
|
||||
if ($role->archetype === 'frontpage') {
|
||||
$defaultfrontpageroleid = $role->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
$temp->add(new admin_setting_configselect('defaultfrontpageroleid', get_string('frontpagedefaultrole', 'admin'), '', 0, $roleoptions));
|
||||
if ($defaultfrontpageroleid and (!isset($CFG->defaultfrontpageroleid) or $CFG->defaultfrontpageroleid)) {
|
||||
//frotpage role may not exist in old upgraded sites
|
||||
unset($options[0]);
|
||||
}
|
||||
$temp->add(new admin_setting_configselect('defaultfrontpageroleid', get_string('frontpagedefaultrole', 'admin'), '', $defaultfrontpageroleid, $options));
|
||||
|
||||
|
||||
$ADMIN->add('frontpage', $temp);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ if ($hassiteconfig) {
|
||||
$temp->add(new admin_setting_configselect('lang', get_string('lang', 'admin'), get_string('configlang', 'admin'), current_language(), get_string_manager()->get_list_of_translations())); // $CFG->lang might be set in installer already, default en is in setup.php
|
||||
$temp->add(new admin_setting_configcheckbox('langmenu', get_string('langmenu', 'admin'), get_string('configlangmenu', 'admin'), 1));
|
||||
$temp->add(new admin_setting_langlist());
|
||||
$temp->add(new admin_setting_configcheckbox('langcache', get_string('langcache', 'admin'), get_string('configlangcache', 'admin'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('langcache', get_string('langcache', 'admin'), get_string('langcache_desc', 'admin'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('langstringcache', get_string('langstringcache', 'admin'), get_string('configlangstringcache', 'admin'), 1));
|
||||
$temp->add(new admin_setting_configtext('locale', get_string('localetext', 'admin'), get_string('configlocale', 'admin'), '', PARAM_FILE));
|
||||
$temp->add(new admin_setting_configselect('latinexcelexport', get_string('latinexcelexport', 'admin'), get_string('configlatinexcelexport', 'admin'), '0', array('0'=>'Unicode','1'=>'Latin')));
|
||||
|
||||
@@ -321,6 +321,8 @@ if ($hassiteconfig) {
|
||||
$temp = new admin_settingpage('webservicesoverview', get_string('webservicesoverview', 'webservice'));
|
||||
$temp->add(new admin_setting_webservicesoverview());
|
||||
$ADMIN->add('webservicesettings', $temp);
|
||||
//API documentation
|
||||
$ADMIN->add('webservicesettings', new admin_externalpage('webservicedocumentation', get_string('wsdocapi', 'webservice'), "$CFG->wwwroot/$CFG->admin/webservice/documentation.php", 'moodle/site:config', false));
|
||||
/// manage service
|
||||
$temp = new admin_settingpage('externalservices', get_string('externalservices', 'webservice'));
|
||||
$temp->add(new admin_setting_heading('manageserviceshelpexplaination', get_string('information', 'webservice'), get_string('servicehelpexplanation', 'webservice')));
|
||||
@@ -367,7 +369,7 @@ if ($hassiteconfig) {
|
||||
}
|
||||
$ADMIN->add('webservicesettings', $temp);
|
||||
|
||||
|
||||
// Question type settings
|
||||
if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
|
||||
// Question type settings.
|
||||
$ADMIN->add('modules', new admin_category('qtypesettings', get_string('questiontypes', 'admin')));
|
||||
@@ -385,6 +387,8 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Plagiarism plugin settings
|
||||
if ($hassiteconfig && !empty($CFG->enableplagiarism)) {
|
||||
$ADMIN->add('modules', new admin_category('plagiarism', get_string('plagiarism', 'plagiarism')));
|
||||
$temp = new admin_settingpage('plagiarismsettings', get_string('plagiarismsettings', 'plagiarism'));
|
||||
@@ -397,8 +401,31 @@ if ($hassiteconfig && !empty($CFG->enableplagiarism)) {
|
||||
}
|
||||
}
|
||||
$ADMIN->add('reports', new admin_externalpage('comments', get_string('comments'), $CFG->wwwroot.'/comment/', 'moodle/site:viewreports'));
|
||||
/// Now add reports
|
||||
|
||||
// Course reports settings
|
||||
if ($hassiteconfig) {
|
||||
$pages = array();
|
||||
foreach (get_plugin_list('coursereport') as $report => $path) {
|
||||
$file = $CFG->dirroot . '/course/report/' . $report . '/settings.php';
|
||||
if (file_exists($file)) {
|
||||
$settings = new admin_settingpage('coursereport' . $report,
|
||||
get_string('pluginname', 'coursereport_' . $report), 'moodle/site:config');
|
||||
// settings.php may create a subcategory or unset the settings completely
|
||||
include($file);
|
||||
if ($settings) {
|
||||
$pages[] = $settings;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($pages)) {
|
||||
$ADMIN->add('modules', new admin_category('coursereports', get_string('coursereports')));
|
||||
foreach ($pages as $page) {
|
||||
$ADMIN->add('coursereports', $page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now add reports
|
||||
foreach (get_plugin_list('report') as $plugin => $plugindir) {
|
||||
$settings_path = "$plugindir/settings.php";
|
||||
if (file_exists($settings_path)) {
|
||||
|
||||
@@ -71,6 +71,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
$temp->add(new admin_setting_configcheckbox('groupenrolmentkeypolicy', get_string('groupenrolmentkeypolicy', 'admin'), get_string('groupenrolmentkeypolicy_desc', 'admin'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('disableuserimages', get_string('disableuserimages', 'admin'), get_string('configdisableuserimages', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('emailchangeconfirmation', get_string('emailchangeconfirmation', 'admin'), get_string('configemailchangeconfirmation', 'admin'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('strictformsrequired', get_string('strictformsrequired', 'admin'), get_string('configstrictformsrequired', 'admin'), 0));
|
||||
$ADMIN->add('security', $temp);
|
||||
|
||||
|
||||
|
||||
@@ -227,6 +227,8 @@ $ADMIN->add('server', new admin_externalpage('phpinfo', get_string('phpinfo'), "
|
||||
// "performance" settingpage
|
||||
$temp = new admin_settingpage('performance', get_string('performance', 'admin'));
|
||||
|
||||
$temp->add(new admin_setting_configtext('numcoursesincombo', get_string('numcoursesincombo', 'admin'), get_string('numcoursesincombo_help', 'admin'), 500));
|
||||
|
||||
$temp->add(new admin_setting_configselect('extramemorylimit', get_string('extramemorylimit', 'admin'),
|
||||
get_string('configextramemorylimit', 'admin'), '512M',
|
||||
// if this option is set to 0, default 128M will be used
|
||||
@@ -239,6 +241,8 @@ $temp->add(new admin_setting_configselect('extramemorylimit', get_string('extram
|
||||
$temp->add(new admin_setting_configtext('curlcache', get_string('curlcache', 'admin'),
|
||||
get_string('configcurlcache', 'admin'), 120, PARAM_INT));
|
||||
|
||||
$temp->add(new admin_setting_configtext('curltimeoutkbitrate', get_string('curltimeoutkbitrate', 'admin'),
|
||||
get_string('curltimeoutkbitrate_help', 'admin'), 56, PARAM_INT));
|
||||
/* //TODO: we need to fix code instead of relying on slow rcache, enable this once we have some code that is actually using it
|
||||
$temp->add(new admin_setting_special_selectsetup('cachetype', get_string('cachetype', 'admin'),
|
||||
get_string('configcachetype', 'admin'), '',
|
||||
|
||||
@@ -37,9 +37,10 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
$optionalsubsystems->add(new admin_setting_configcheckbox('enablecompletion',
|
||||
get_string('enablecompletion','completion'),
|
||||
get_string('configenablecompletion','completion'), 0));
|
||||
$optionalsubsystems->add(new admin_setting_configcheckbox('enableavailability',
|
||||
$optionalsubsystems->add($checkbox = new admin_setting_configcheckbox('enableavailability',
|
||||
get_string('enableavailability','condition'),
|
||||
get_string('configenableavailability','condition'), 0));
|
||||
$checkbox->set_affects_modinfo(true);
|
||||
|
||||
$optionalsubsystems->add(new admin_setting_configcheckbox('enableplagiarism', get_string('enableplagiarism','plagiarism'), get_string('configenableplagiarism','plagiarism'), 0));
|
||||
}
|
||||
|
||||
+25
-27
@@ -38,17 +38,18 @@ if ($hassiteconfig
|
||||
if ($ADMIN->fulltree) {
|
||||
if (!during_initial_install()) {
|
||||
$context = get_context_instance(CONTEXT_SYSTEM);
|
||||
$allroles = array();
|
||||
$generalroles = array();
|
||||
|
||||
$otherroles = array();
|
||||
$guestroles = array();
|
||||
$userroles = array();
|
||||
$studentroles = array();
|
||||
$teacherroles = array();
|
||||
$creatornewroles = array();
|
||||
|
||||
$defaultteacherid = null;
|
||||
$defaultuserid = null;
|
||||
$defaultguestid = null;
|
||||
|
||||
foreach (get_all_roles() as $role) {
|
||||
$rolename = strip_tags(format_string($role->name)) . ' ('. $role->shortname . ')';
|
||||
$allroles[$role->id] = $rolename;
|
||||
switch ($role->archetype) {
|
||||
case 'manager':
|
||||
$creatornewroles[$role->id] = $rolename;
|
||||
@@ -56,58 +57,55 @@ if ($hassiteconfig
|
||||
case 'coursecreator':
|
||||
break;
|
||||
case 'editingteacher':
|
||||
$teacherroles[$role->id] = $rolename;
|
||||
$defaultteacherid = isset($defaultteacherid) ? $defaultteacherid : $role->id;
|
||||
$creatornewroles[$role->id] = $rolename;
|
||||
break;
|
||||
case 'teacher':
|
||||
$creatornewroles[$role->id] = $rolename;
|
||||
break;
|
||||
case 'student':
|
||||
$studentroles[$role->id] = $rolename;
|
||||
break;
|
||||
case 'guest':
|
||||
$defaultguestid = isset($defaultguestid) ? $defaultguestid : $role->id;
|
||||
$guestroles[$role->id] = $rolename;
|
||||
break;
|
||||
case 'user':
|
||||
$defaultuserid = isset($defaultuserid) ? $defaultuserid : $role->id;
|
||||
$userroles[$role->id] = $rolename;
|
||||
break;
|
||||
case 'frontpage':
|
||||
break;
|
||||
default:
|
||||
$creatornewroles[$role->id] = $rolename;
|
||||
$generalroles[$role->id] = $rolename;
|
||||
$otherroles[$role->id] = $rolename;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
reset($guestroles);
|
||||
$defaultguestid = key($guestroles);
|
||||
reset($studentroles);
|
||||
$defaultstudentid = key($studentroles);
|
||||
reset($teacherroles);
|
||||
$defaultteacherid = key($teacherroles);
|
||||
if (empty($guestroles)) {
|
||||
$guestroles[0] = get_string('none');
|
||||
$defaultguestid = 0;
|
||||
}
|
||||
|
||||
if ($userroles) {
|
||||
reset($userroles);
|
||||
$defaultuserid = key($userroles);
|
||||
} else {
|
||||
$userroles = array('0'=>get_string('none'));
|
||||
if (empty($userroles)) {
|
||||
$userroles[0] = get_string('none');
|
||||
$defaultuserid = 0;
|
||||
}
|
||||
|
||||
$temp->add(new admin_setting_configselect('notloggedinroleid', get_string('notloggedinroleid', 'admin'),
|
||||
get_string('confignotloggedinroleid', 'admin'), $defaultguestid, ($guestroles + $generalroles)));
|
||||
get_string('confignotloggedinroleid', 'admin'), $defaultguestid, ($guestroles + $otherroles)));
|
||||
$temp->add(new admin_setting_configselect('guestroleid', get_string('guestroleid', 'admin'),
|
||||
get_string('guestroleid_help', 'admin'), $defaultguestid, ($guestroles + $generalroles)));
|
||||
get_string('guestroleid_help', 'admin'), $defaultguestid, ($guestroles + $otherroles)));
|
||||
$temp->add(new admin_setting_configselect('defaultuserroleid', get_string('defaultuserroleid', 'admin'),
|
||||
get_string('configdefaultuserroleid', 'admin'), $defaultuserid, ($userroles + $generalroles)));
|
||||
}
|
||||
|
||||
$temp->add(new admin_setting_configcheckbox('nodefaultuserrolelists', get_string('nodefaultuserrolelists', 'admin'), get_string('confignodefaultuserrolelists', 'admin'), 0));
|
||||
|
||||
if (!during_initial_install()) {
|
||||
get_string('configdefaultuserroleid', 'admin'), $defaultuserid, ($userroles + $otherroles)));
|
||||
$temp->add(new admin_setting_configselect('creatornewroleid', get_string('creatornewroleid', 'admin'),
|
||||
get_string('creatornewroleid_help', 'admin'), $defaultteacherid, $creatornewroles));
|
||||
|
||||
// release memory
|
||||
unset($otherroles);
|
||||
unset($guestroles);
|
||||
unset($userroles);
|
||||
unset($creatornewroles);
|
||||
}
|
||||
|
||||
$temp->add(new admin_setting_configcheckbox('autologinguests', get_string('autologinguests', 'admin'), get_string('configautologinguests', 'admin'), 0));
|
||||
|
||||
Executable → Regular
+401
-724
File diff suppressed because it is too large
Load Diff
+112
-67
@@ -1,16 +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/>.
|
||||
|
||||
if (!defined('MOODLE_INTERNAL')) {
|
||||
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
|
||||
}
|
||||
/**
|
||||
* Bulk user upload forms
|
||||
*
|
||||
* @package core
|
||||
* @subpackage admin
|
||||
* @copyright 2007 Dan Poltawski
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once $CFG->libdir.'/formslib.php';
|
||||
|
||||
class admin_uploaduser_form1 extends moodleform {
|
||||
function definition (){
|
||||
global $CFG, $USER;
|
||||
|
||||
$mform =& $this->_form;
|
||||
/**
|
||||
* Upload a file CVS file with user information.
|
||||
*
|
||||
* @package core
|
||||
* @subpackage admin
|
||||
* @copyright 2007 Petr Skoda {@link http://skodak.org}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class admin_uploaduser_form1 extends moodleform {
|
||||
function definition () {
|
||||
$mform = $this->_form;
|
||||
|
||||
$mform->addElement('header', 'settingsheader', get_string('upload'));
|
||||
|
||||
@@ -36,69 +64,90 @@ class admin_uploaduser_form1 extends moodleform {
|
||||
$mform->addElement('select', 'previewrows', get_string('rowpreviewnum', 'admin'), $choices);
|
||||
$mform->setType('previewrows', PARAM_INT);
|
||||
|
||||
$choices = array(UU_ADDNEW => get_string('uuoptype_addnew', 'admin'),
|
||||
UU_ADDINC => get_string('uuoptype_addinc', 'admin'),
|
||||
UU_ADD_UPDATE => get_string('uuoptype_addupdate', 'admin'),
|
||||
UU_UPDATE => get_string('uuoptype_update', 'admin'));
|
||||
$mform->addElement('select', 'uutype', get_string('uuoptype', 'admin'), $choices);
|
||||
|
||||
$this->add_action_buttons(false, get_string('uploadusers', 'admin'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Specify user upload details
|
||||
*
|
||||
* @package core
|
||||
* @subpackage admin
|
||||
* @copyright 2007 Petr Skoda {@link http://skodak.org}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class admin_uploaduser_form2 extends moodleform {
|
||||
function definition (){
|
||||
function definition () {
|
||||
global $CFG, $USER;
|
||||
|
||||
$mform =& $this->_form;
|
||||
$columns =& $this->_customdata;
|
||||
$mform = $this->_form;
|
||||
$columns = $this->_customdata['columns'];
|
||||
$data = $this->_customdata['data'];
|
||||
|
||||
// I am the template user, why should it be the administrator? we have roles now, other ppl may use this script ;-)
|
||||
$templateuser = $USER;
|
||||
|
||||
// upload settings and file
|
||||
$mform->addElement('header', 'settingsheader', get_string('settings'));
|
||||
$mform->addElement('static', 'uutypelabel', get_string('uuoptype', 'admin') );
|
||||
|
||||
$choices = array(UU_USER_ADDNEW => get_string('uuoptype_addnew', 'admin'),
|
||||
UU_USER_ADDINC => get_string('uuoptype_addinc', 'admin'),
|
||||
UU_USER_ADD_UPDATE => get_string('uuoptype_addupdate', 'admin'),
|
||||
UU_USER_UPDATE => get_string('uuoptype_update', 'admin'));
|
||||
$mform->addElement('select', 'uutype', get_string('uuoptype', 'admin'), $choices);
|
||||
|
||||
$choices = array(0 => get_string('infilefield', 'auth'), 1 => get_string('createpasswordifneeded', 'auth'));
|
||||
$mform->addElement('select', 'uupasswordnew', get_string('uupasswordnew', 'admin'), $choices);
|
||||
$mform->setDefault('uupasswordnew', 1);
|
||||
$mform->disabledIf('uupasswordnew', 'uutype', 'eq', UU_UPDATE);
|
||||
$mform->disabledIf('uupasswordnew', 'uutype', 'eq', UU_USER_UPDATE);
|
||||
|
||||
$choices = array(0 => get_string('nochanges', 'admin'),
|
||||
1 => get_string('uuupdatefromfile', 'admin'),
|
||||
2 => get_string('uuupdateall', 'admin'),
|
||||
3 => get_string('uuupdatemissing', 'admin'));
|
||||
$choices = array(UU_UPDATE_NOCHANGES => get_string('nochanges', 'admin'),
|
||||
UU_UPDATE_FILEOVERRIDE => get_string('uuupdatefromfile', 'admin'),
|
||||
UU_UPDATE_ALLOVERRIDE => get_string('uuupdateall', 'admin'),
|
||||
UU_UPDATE_MISSING => get_string('uuupdatemissing', 'admin'));
|
||||
$mform->addElement('select', 'uuupdatetype', get_string('uuupdatetype', 'admin'), $choices);
|
||||
$mform->setDefault('uuupdatetype', 0);
|
||||
$mform->disabledIf('uuupdatetype', 'uutype', 'eq', UU_ADDNEW);
|
||||
$mform->disabledIf('uuupdatetype', 'uutype', 'eq', UU_ADDINC);
|
||||
$mform->setDefault('uuupdatetype', UU_UPDATE_NOCHANGES);
|
||||
$mform->disabledIf('uuupdatetype', 'uutype', 'eq', UU_USER_ADDNEW);
|
||||
$mform->disabledIf('uuupdatetype', 'uutype', 'eq', UU_USER_ADDINC);
|
||||
|
||||
$choices = array(0 => get_string('nochanges', 'admin'), 1 => get_string('update'));
|
||||
$mform->addElement('select', 'uupasswordold', get_string('uupasswordold', 'admin'), $choices);
|
||||
$mform->setDefault('uupasswordold', 0);
|
||||
$mform->disabledIf('uupasswordold', 'uutype', 'eq', UU_ADDNEW);
|
||||
$mform->disabledIf('uupasswordold', 'uutype', 'eq', UU_ADDINC);
|
||||
$mform->disabledIf('uupasswordold', 'uutype', 'eq', UU_USER_ADDNEW);
|
||||
$mform->disabledIf('uupasswordold', 'uutype', 'eq', UU_USER_ADDINC);
|
||||
$mform->disabledIf('uupasswordold', 'uuupdatetype', 'eq', 0);
|
||||
$mform->disabledIf('uupasswordold', 'uuupdatetype', 'eq', 3);
|
||||
|
||||
$choices = array(UU_PWRESET_WEAK => get_string('usersweakpassword', 'admin'),
|
||||
UU_PWRESET_NONE => get_string('none'),
|
||||
UU_PWRESET_ALL => get_string('all'));
|
||||
if (empty($CFG->passwordpolicy)) {
|
||||
unset($choices[UU_PWRESET_WEAK]);
|
||||
}
|
||||
$mform->addElement('select', 'uuforcepasswordchange', get_string('forcepasswordchange', 'core'), $choices);
|
||||
|
||||
|
||||
$mform->addElement('selectyesno', 'uuallowrenames', get_string('allowrenames', 'admin'));
|
||||
$mform->setDefault('uuallowrenames', 0);
|
||||
$mform->disabledIf('uuallowrenames', 'uutype', 'eq', UU_ADDNEW);
|
||||
$mform->disabledIf('uuallowrenames', 'uutype', 'eq', UU_ADDINC);
|
||||
$mform->disabledIf('uuallowrenames', 'uutype', 'eq', UU_USER_ADDNEW);
|
||||
$mform->disabledIf('uuallowrenames', 'uutype', 'eq', UU_USER_ADDINC);
|
||||
|
||||
$mform->addElement('selectyesno', 'uuallowdeletes', get_string('allowdeletes', 'admin'));
|
||||
$mform->setDefault('uuallowdeletes', 0);
|
||||
$mform->disabledIf('uuallowdeletes', 'uutype', 'eq', UU_ADDNEW);
|
||||
$mform->disabledIf('uuallowdeletes', 'uutype', 'eq', UU_ADDINC);
|
||||
$mform->disabledIf('uuallowdeletes', 'uutype', 'eq', UU_USER_ADDNEW);
|
||||
$mform->disabledIf('uuallowdeletes', 'uutype', 'eq', UU_USER_ADDINC);
|
||||
|
||||
$mform->addElement('selectyesno', 'uunoemailduplicates', get_string('uunoemailduplicates', 'admin'));
|
||||
$mform->setDefault('uunoemailduplicates', 1);
|
||||
|
||||
$choices = array(0 => get_string('no'),
|
||||
1 => get_string('uubulknew', 'admin'),
|
||||
2 => get_string('uubulkupdated', 'admin'),
|
||||
3 => get_string('uubulkall', 'admin'));
|
||||
$mform->addElement('selectyesno', 'uustandardusernames', get_string('uustandardusernames', 'admin'));
|
||||
$mform->setDefault('uustandardusernames', 1);
|
||||
|
||||
$choices = array(UU_BULK_NONE => get_string('no'),
|
||||
UU_BULK_NEW => get_string('uubulknew', 'admin'),
|
||||
UU_BULK_UPDATED => get_string('uubulkupdated', 'admin'),
|
||||
UU_BULK_ALL => get_string('uubulkall', 'admin'));
|
||||
$mform->addElement('select', 'uubulk', get_string('uubulk', 'admin'), $choices);
|
||||
$mform->setDefault('uubulk', 0);
|
||||
|
||||
@@ -152,18 +201,22 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
// default values
|
||||
$mform->addElement('header', 'defaultheader', get_string('defaultvalues', 'admin'));
|
||||
|
||||
$mform->addElement('text', 'username', get_string('username'), 'size="20"');
|
||||
$mform->addElement('text', 'username', get_string('uuusernametemplate', 'admin'), 'size="20"');
|
||||
$mform->addRule('username', get_string('requiredtemplate', 'admin'), 'required', null, 'client');
|
||||
$mform->disabledIf('username', 'uutype', 'eq', UU_USER_ADD_UPDATE);
|
||||
$mform->disabledIf('username', 'uutype', 'eq', UU_USER_UPDATE);
|
||||
|
||||
$mform->addElement('text', 'email', get_string('email'), 'maxlength="100" size="30"');
|
||||
$mform->disabledIf('email', 'uutype', 'eq', UU_USER_ADD_UPDATE);
|
||||
$mform->disabledIf('email', 'uutype', 'eq', UU_USER_UPDATE);
|
||||
|
||||
// only enabled and known to work plugins
|
||||
$choices = uu_allowed_auths();
|
||||
$choices = uu_supported_auths();
|
||||
$mform->addElement('select', 'auth', get_string('chooseauthmethod','auth'), $choices);
|
||||
$mform->setDefault('auth', 'manual'); // manual is a sensible backwards compatible default
|
||||
$mform->addHelpButton('auth', 'chooseauthmethod', 'auth');
|
||||
$mform->setAdvanced('auth');
|
||||
|
||||
$mform->addElement('text', 'email', get_string('email'), 'maxlength="100" size="30"');
|
||||
|
||||
$choices = array(0 => get_string('emaildisplayno'), 1 => get_string('emaildisplayyes'), 2 => get_string('emaildisplaycourse'));
|
||||
$mform->addElement('select', 'maildisplay', get_string('emaildisplay'), $choices);
|
||||
$mform->setDefault('maildisplay', 2);
|
||||
@@ -178,7 +231,7 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
$mform->setDefault('maildigest', 0);
|
||||
$mform->setAdvanced('maildigest');
|
||||
|
||||
$choices = array(0 => get_string('autosubscribeyes'), 1 => get_string('autosubscribeno'));
|
||||
$choices = array(1 => get_string('autosubscribeyes'), 0 => get_string('autosubscribeno'));
|
||||
$mform->addElement('select', 'autosubscribe', get_string('autosubscribe'), $choices);
|
||||
$mform->setDefault('autosubscribe', 1);
|
||||
|
||||
@@ -211,6 +264,7 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
} else {
|
||||
$mform->setDefault('city', $CFG->defaultcity);
|
||||
}
|
||||
$mform->addRule('city', get_string('required'), 'required');
|
||||
|
||||
$mform->addElement('select', 'country', get_string('selectacountry'), get_string_manager()->get_list_of_countries());
|
||||
if (empty($CFG->country)) {
|
||||
@@ -272,27 +326,30 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
$mform->addElement('hidden', 'previewrows');
|
||||
$mform->setType('previewrows', PARAM_INT);
|
||||
|
||||
$mform->addElement('hidden', 'readcount');
|
||||
$mform->setType('readcount', PARAM_INT);
|
||||
|
||||
$mform->addElement('hidden', 'uutype');
|
||||
$mform->setType('uutype', PARAM_INT);
|
||||
|
||||
$this->add_action_buttons(true, get_string('uploadusers', 'admin'));
|
||||
|
||||
$this->set_data($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Form tweaks that depend on current data.
|
||||
*/
|
||||
function definition_after_data() {
|
||||
$mform =& $this->_form;
|
||||
$columns =& $this->_customdata;
|
||||
$mform = $this->_form;
|
||||
$columns = $this->_customdata['columns'];
|
||||
|
||||
foreach ($columns as $column) {
|
||||
if ($mform->elementExists($column)) {
|
||||
$mform->removeElement($column);
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_array('password', $columns)) {
|
||||
// password resetting makes sense only if password specified in csv file
|
||||
if ($mform->elementExists('uuforcepasswordchange')) {
|
||||
$mform->removeElement('uuforcepasswordchange');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -300,19 +357,19 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
*/
|
||||
function validation($data, $files) {
|
||||
$errors = parent::validation($data, $files);
|
||||
$columns =& $this->_customdata;
|
||||
$columns = $this->_customdata['columns'];
|
||||
$optype = $data['uutype'];
|
||||
|
||||
// detect if password column needed in file
|
||||
if (!in_array('password', $columns)) {
|
||||
switch ($optype) {
|
||||
case UU_UPDATE:
|
||||
case UU_USER_UPDATE:
|
||||
if (!empty($data['uupasswordold'])) {
|
||||
$errors['uupasswordold'] = get_string('missingfield', 'error', 'password');
|
||||
}
|
||||
break;
|
||||
|
||||
case UU_ADD_UPDATE:
|
||||
case UU_USER_ADD_UPDATE:
|
||||
if (empty($data['uupasswordnew'])) {
|
||||
$errors['uupasswordnew'] = get_string('missingfield', 'error', 'password');
|
||||
}
|
||||
@@ -321,12 +378,12 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
}
|
||||
break;
|
||||
|
||||
case UU_ADDNEW:
|
||||
case UU_USER_ADDNEW:
|
||||
if (empty($data['uupasswordnew'])) {
|
||||
$errors['uupasswordnew'] = get_string('missingfield', 'error', 'password');
|
||||
}
|
||||
break;
|
||||
case UU_ADDINC:
|
||||
case UU_USER_ADDINC:
|
||||
if (empty($data['uupasswordnew'])) {
|
||||
$errors['uupasswordnew'] = get_string('missingfield', 'error', 'password');
|
||||
}
|
||||
@@ -335,7 +392,7 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
}
|
||||
|
||||
// look for other required data
|
||||
if ($optype != UU_UPDATE) {
|
||||
if ($optype != UU_USER_UPDATE) {
|
||||
if (!in_array('firstname', $columns)) {
|
||||
$errors['uutype'] = get_string('missingfield', 'error', 'firstname');
|
||||
}
|
||||
@@ -352,10 +409,6 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
if (!in_array('email', $columns) and empty($data['email'])) {
|
||||
$errors['email'] = get_string('requiredtemplate', 'admin');
|
||||
}
|
||||
|
||||
if (!in_array('city', $columns) and empty($data['city'])) {
|
||||
$errors['city'] = get_string('required');
|
||||
}
|
||||
}
|
||||
|
||||
return $errors;
|
||||
@@ -369,7 +422,7 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
function get_data() {
|
||||
$data = parent::get_data();
|
||||
|
||||
if ($data !== null) {
|
||||
if ($data !== null and isset($data->description)) {
|
||||
$data->descriptionformat = $data->description['format'];
|
||||
$data->description = $data->description['text'];
|
||||
}
|
||||
@@ -377,11 +430,3 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
class admin_uploaduser_form3 extends moodleform {
|
||||
function definition (){
|
||||
global $CFG, $USER;
|
||||
$mform =& $this->_form;
|
||||
$this->add_action_buttons(false, get_string('uploadnewfile'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,368 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Bulk user registration functions
|
||||
*
|
||||
* @package core
|
||||
* @subpackage admin
|
||||
* @copyright 2004 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
define('UU_USER_ADDNEW', 0);
|
||||
define('UU_USER_ADDINC', 1);
|
||||
define('UU_USER_ADD_UPDATE', 2);
|
||||
define('UU_USER_UPDATE', 3);
|
||||
|
||||
define('UU_UPDATE_NOCHANGES', 0);
|
||||
define('UU_UPDATE_FILEOVERRIDE', 1);
|
||||
define('UU_UPDATE_ALLOVERRIDE', 2);
|
||||
define('UU_UPDATE_MISSING', 3);
|
||||
|
||||
define('UU_BULK_NONE', 0);
|
||||
define('UU_BULK_NEW', 1);
|
||||
define('UU_BULK_UPDATED', 2);
|
||||
define('UU_BULK_ALL', 3);
|
||||
|
||||
define('UU_PWRESET_NONE', 0);
|
||||
define('UU_PWRESET_WEAK', 1);
|
||||
define('UU_PWRESET_ALL', 2);
|
||||
|
||||
/**
|
||||
* Tracking of processed users.
|
||||
*
|
||||
* This class prints user information into a html table.
|
||||
*
|
||||
* @package core
|
||||
* @subpackage admin
|
||||
* @copyright 2007 Petr Skoda {@link http://skodak.org}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class uu_progress_tracker {
|
||||
private $_row;
|
||||
public $columns = array('status', 'line', 'id', 'username', 'firstname', 'lastname', 'email', 'password', 'auth', 'enrolments', 'deleted');
|
||||
|
||||
/**
|
||||
* Print table header.
|
||||
* @return void
|
||||
*/
|
||||
public function start() {
|
||||
$ci = 0;
|
||||
echo '<table id="uuresults" class="generaltable boxaligncenter flexible-wrap" summary="'.get_string('uploadusersresult', 'admin').'">';
|
||||
echo '<tr class="heading r0">';
|
||||
echo '<th class="header c'.$ci++.'" scope="col">'.get_string('status').'</th>';
|
||||
echo '<th class="header c'.$ci++.'" scope="col">'.get_string('uucsvline', 'admin').'</th>';
|
||||
echo '<th class="header c'.$ci++.'" scope="col">ID</th>';
|
||||
echo '<th class="header c'.$ci++.'" scope="col">'.get_string('username').'</th>';
|
||||
echo '<th class="header c'.$ci++.'" scope="col">'.get_string('firstname').'</th>';
|
||||
echo '<th class="header c'.$ci++.'" scope="col">'.get_string('lastname').'</th>';
|
||||
echo '<th class="header c'.$ci++.'" scope="col">'.get_string('email').'</th>';
|
||||
echo '<th class="header c'.$ci++.'" scope="col">'.get_string('password').'</th>';
|
||||
echo '<th class="header c'.$ci++.'" scope="col">'.get_string('authentication').'</th>';
|
||||
echo '<th class="header c'.$ci++.'" scope="col">'.get_string('enrolments', 'enrol').'</th>';
|
||||
echo '<th class="header c'.$ci++.'" scope="col">'.get_string('delete').'</th>';
|
||||
echo '</tr>';
|
||||
$this->_row = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush previous line and start a new one.
|
||||
* @return void
|
||||
*/
|
||||
public function flush() {
|
||||
if (empty($this->_row) or empty($this->_row['line']['normal'])) {
|
||||
// Nothing to print - each line has to have at least number
|
||||
$this->_row = array();
|
||||
foreach ($this->columns as $col) {
|
||||
$this->_row[$col] = array('normal'=>'', 'info'=>'', 'warning'=>'', 'error'=>'');
|
||||
}
|
||||
return;
|
||||
}
|
||||
$ci = 0;
|
||||
$ri = 1;
|
||||
echo '<tr class="r'.$ri.'">';
|
||||
foreach ($this->_row as $key=>$field) {
|
||||
foreach ($field as $type=>$content) {
|
||||
if ($field[$type] !== '') {
|
||||
$field[$type] = '<span class="uu'.$type.'">'.$field[$type].'</span>';
|
||||
} else {
|
||||
unset($field[$type]);
|
||||
}
|
||||
}
|
||||
echo '<td class="cell c'.$ci++.'">';
|
||||
if (!empty($field)) {
|
||||
echo implode('<br />', $field);
|
||||
} else {
|
||||
echo ' ';
|
||||
}
|
||||
echo '</td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
foreach ($this->columns as $col) {
|
||||
$this->_row[$col] = array('normal'=>'', 'info'=>'', 'warning'=>'', 'error'=>'');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add tracking info
|
||||
* @param string $col name of column
|
||||
* @param string $msg message
|
||||
* @param string $level 'normal', 'warning' or 'error'
|
||||
* @param bool $merge true means add as new line, false means override all previous text of the same type
|
||||
* @return void
|
||||
*/
|
||||
public function track($col, $msg, $level = 'normal', $merge = true) {
|
||||
if (empty($this->_row)) {
|
||||
$this->flush(); //init arrays
|
||||
}
|
||||
if (!in_array($col, $this->columns)) {
|
||||
debugging('Incorrect column:'.$col);
|
||||
return;
|
||||
}
|
||||
if ($merge) {
|
||||
if ($this->_row[$col][$level] != '') {
|
||||
$this->_row[$col][$level] .='<br />';
|
||||
}
|
||||
$this->_row[$col][$level] .= $msg;
|
||||
} else {
|
||||
$this->_row[$col][$level] = $msg;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the table end
|
||||
* @return void
|
||||
*/
|
||||
public function close() {
|
||||
$this->flush();
|
||||
echo '</table>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validation callback function - verified the column line of csv file.
|
||||
* Converts standard column names to lowercase.
|
||||
* @param csv_import_reader $cir
|
||||
* @param array $stdfields standard user fields
|
||||
* @param array $profilefields custom profile fields
|
||||
* @param moodle_url $returnurl return url in case of any error
|
||||
* @return array list of fields
|
||||
*/
|
||||
function uu_validate_user_upload_columns(csv_import_reader $cir, $stdfields, $profilefields, moodle_url $returnurl) {
|
||||
$columns = $cir->get_columns();
|
||||
|
||||
if (empty($columns)) {
|
||||
$cir->close();
|
||||
$cir->cleanup();
|
||||
print_error('cannotreadtmpfile', 'error', $returnurl);
|
||||
}
|
||||
if (count($columns) < 2) {
|
||||
$cir->close();
|
||||
$cir->cleanup();
|
||||
print_error('csvfewcolumns', 'error', $returnurl);
|
||||
}
|
||||
|
||||
$textlib = textlib_get_instance(); // profile fields may contain unicode chars
|
||||
|
||||
// test columns
|
||||
$processed = array();
|
||||
foreach ($columns as $key=>$unused) {
|
||||
$field = $columns[$key];
|
||||
$lcfield = $textlib->strtolower($field);
|
||||
if (in_array($field, $stdfields) or in_array($lcfield, $stdfields)) {
|
||||
// standard fields are only lowercase
|
||||
$newfield = $lcfield;
|
||||
|
||||
} else if (in_array($field, $profilefields)) {
|
||||
// exact profile field name match - these are case sensitive
|
||||
$newfield = $field;
|
||||
|
||||
} else if (in_array($lcfield, $profilefields)) {
|
||||
// hack: somebody wrote uppercase in csv file, but the system knows only lowercase profile field
|
||||
$newfield = $lcfield;
|
||||
|
||||
} else if (preg_match('/^(course|group|type|role|enrolperiod)\d+$/', $lcfield)) {
|
||||
// special fields for enrolments
|
||||
$newfield = $lcfield;
|
||||
|
||||
} else {
|
||||
$cir->close();
|
||||
$cir->cleanup();
|
||||
print_error('invalidfieldname', 'error', $returnurl, $field);
|
||||
}
|
||||
if (in_array($newfield, $processed)) {
|
||||
$cir->close();
|
||||
$cir->cleanup();
|
||||
print_error('duplicatefieldname', 'error', $returnurl, $newfield);
|
||||
}
|
||||
$processed[$key] = $newfield;
|
||||
}
|
||||
|
||||
return $processed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Increments username - increments trailing number or adds it if not present.
|
||||
* Varifies that the new username does not exist yet
|
||||
* @param string $username
|
||||
* @return incremented username which does not exist yet
|
||||
*/
|
||||
function uu_increment_username($username) {
|
||||
global $DB, $CFG;
|
||||
|
||||
if (!preg_match_all('/(.*?)([0-9]+)$/', $username, $matches)) {
|
||||
$username = $username.'2';
|
||||
} else {
|
||||
$username = $matches[1][0].($matches[2][0]+1);
|
||||
}
|
||||
|
||||
if ($DB->record_exists('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id))) {
|
||||
return uu_increment_username($username);
|
||||
} else {
|
||||
return $username;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if default field contains templates and apply them.
|
||||
* @param string template - potential tempalte string
|
||||
* @param object user object- we need username, firstname and lastname
|
||||
* @return string field value
|
||||
*/
|
||||
function uu_process_template($template, $user) {
|
||||
if (is_array($template)) {
|
||||
// hack for for support of text editors with format
|
||||
$t = $template['text'];
|
||||
} else {
|
||||
$t = $template;
|
||||
}
|
||||
if (strpos($t, '%') === false) {
|
||||
return $template;
|
||||
}
|
||||
|
||||
$username = isset($user->username) ? $user->username : '';
|
||||
$firstname = isset($user->firstname) ? $user->firstname : '';
|
||||
$lastname = isset($user->lastname) ? $user->lastname : '';
|
||||
|
||||
$callback = partial('uu_process_template_callback', $username, $firstname, $lastname);
|
||||
|
||||
$result = preg_replace_callback('/(?<!%)%([+-~])?(\d)*([flu])/', $callback, $t);
|
||||
|
||||
if (is_null($result)) {
|
||||
return $template; //error during regex processing??
|
||||
}
|
||||
|
||||
if (is_array($template)) {
|
||||
$template['text'] = $result;
|
||||
return $t;
|
||||
} else {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal callback function.
|
||||
*/
|
||||
function uu_process_template_callback($username, $firstname, $lastname, $block) {
|
||||
$textlib = textlib_get_instance();
|
||||
|
||||
switch ($block[3]) {
|
||||
case 'u':
|
||||
$repl = $username;
|
||||
break;
|
||||
case 'f':
|
||||
$repl = $firstname;
|
||||
break;
|
||||
case 'l':
|
||||
$repl = $lastname;
|
||||
break;
|
||||
default:
|
||||
return $block[0];
|
||||
}
|
||||
|
||||
switch ($block[1]) {
|
||||
case '+':
|
||||
$repl = $textlib->strtoupper($repl);
|
||||
break;
|
||||
case '-':
|
||||
$repl = $textlib->strtolower($repl);
|
||||
break;
|
||||
case '~':
|
||||
$repl = $textlib->strtotitle($repl);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!empty($block[2])) {
|
||||
$repl = $textlib->substr($repl, 0 , $block[2]);
|
||||
}
|
||||
|
||||
return $repl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns list of auth plugins that are enabled and known to work.
|
||||
*
|
||||
* If ppl want to use some other auth type they have to include it
|
||||
* in the CSV file next on each line.
|
||||
*
|
||||
* @return array type=>name
|
||||
*/
|
||||
function uu_supported_auths() {
|
||||
// only following plugins are guaranteed to work properly
|
||||
$whitelist = array('manual', 'nologin', 'none', 'email');
|
||||
$plugins = get_enabled_auth_plugins();
|
||||
$choices = array();
|
||||
foreach ($plugins as $plugin) {
|
||||
if (!in_array($plugin, $whitelist)) {
|
||||
continue;
|
||||
}
|
||||
$choices[$plugin] = get_string('pluginname', "auth_{$plugin}");
|
||||
}
|
||||
|
||||
return $choices;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns list of roles that are assignable in courses
|
||||
* @return array
|
||||
*/
|
||||
function uu_allowed_roles() {
|
||||
// let's cheat a bit, frontpage is guaranteed to exist and has the same list of roles ;-)
|
||||
$roles = get_assignable_roles(get_context_instance(CONTEXT_COURSE, SITEID), ROLENAME_ORIGINALANDSHORT);
|
||||
return array_reverse($roles, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns mapping of all roles using short role name as index.
|
||||
* @return array
|
||||
*/
|
||||
function uu_allowed_roles_cache() {
|
||||
$allowedroles = get_assignable_roles(get_context_instance(CONTEXT_COURSE, SITEID), ROLENAME_SHORT);
|
||||
foreach ($allowedroles as $rid=>$rname) {
|
||||
$rolecache[$rid] = new stdClass();
|
||||
$rolecache[$rid]->id = $rid;
|
||||
$rolecache[$rid]->name = $rname;
|
||||
if (!is_numeric($rname)) { // only non-numeric shortnames are supported!!!
|
||||
$rolecache[$rname] = new stdClass();
|
||||
$rolecache[$rname]->id = $rid;
|
||||
$rolecache[$rname]->name = $rname;
|
||||
}
|
||||
}
|
||||
return $rolecache;
|
||||
}
|
||||
+1
-1
@@ -180,7 +180,7 @@
|
||||
}
|
||||
|
||||
foreach ($users as $key => $user) {
|
||||
if (!empty($user->country)) {
|
||||
if (isset($countries[$user->country])) {
|
||||
$users[$key]->country = $countries[$user->country];
|
||||
}
|
||||
}
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -0,0 +1,61 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Web services API documentation
|
||||
*
|
||||
* @package webservice
|
||||
* @copyright 2011 Moodle Pty Ltd (http://moodle.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @author Jerome Mouneyrac
|
||||
*/
|
||||
require_once('../../config.php');
|
||||
require_once($CFG->libdir . '/adminlib.php');
|
||||
require($CFG->dirroot . '/webservice/lib.php');
|
||||
|
||||
admin_externalpage_setup('webservicedocumentation');
|
||||
|
||||
// get all the function descriptions
|
||||
$functions = $DB->get_records('external_functions', array(), 'name');
|
||||
$functiondescs = array();
|
||||
foreach ($functions as $function) {
|
||||
$functiondescs[$function->name] = external_function_info($function);
|
||||
}
|
||||
|
||||
//display the documentation for all documented protocols,
|
||||
//regardless if they are activated or not
|
||||
$protocols = array();
|
||||
$protocols['rest'] = true;
|
||||
$protocols['xmlrpc'] = true;
|
||||
|
||||
/// Check if we are in printable mode
|
||||
$printableformat = optional_param('print', false, PARAM_BOOL);
|
||||
|
||||
/// OUTPUT
|
||||
echo $OUTPUT->header();
|
||||
|
||||
$renderer = $PAGE->get_renderer('core', 'webservice');
|
||||
echo $renderer->documentation_html($functiondescs,
|
||||
$printableformat, $protocols, array(), $PAGE->url);
|
||||
|
||||
/// trigger browser print operation
|
||||
if (!empty($printableformat)) {
|
||||
$PAGE->requires->js_function_call('window.print', array());
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
@@ -33,7 +33,7 @@ $userid = required_param('userid', PARAM_INT);
|
||||
admin_externalpage_setup('externalserviceusersettings');
|
||||
|
||||
//define nav bar
|
||||
$PAGE->set_url('/' . $CFG->admin . '/webservice/service_user_settings.php',
|
||||
$PAGE->set_url('/' . $CFG->admin . '/webservice/service_user_settings.php',
|
||||
array('id' => $serviceid, 'userid' => $userid));
|
||||
$node = $PAGE->settingsnav->find('externalservices', navigation_node::TYPE_SETTING);
|
||||
if ($node) {
|
||||
@@ -62,7 +62,7 @@ if ($usersettingsform->is_cancelled()) {
|
||||
$serviceuserinfo->id = $serviceuser->serviceuserid;
|
||||
$serviceuserinfo->iprestriction = $settingsformdata->iprestriction;
|
||||
$serviceuserinfo->validuntil = $settingsformdata->validuntil;
|
||||
|
||||
|
||||
$webservicemanager->update_ws_authorised_user($serviceuserinfo);
|
||||
|
||||
//TODO: assign capability
|
||||
|
||||
@@ -37,7 +37,7 @@ $PAGE->set_url('/' . $CFG->admin . '/webservice/testclient.php');
|
||||
$PAGE->navbar->ignore_active(true);
|
||||
$PAGE->navbar->add(get_string('administrationsite'));
|
||||
$PAGE->navbar->add(get_string('development', 'admin'));
|
||||
$PAGE->navbar->add(get_string('testclient', 'webservice'),
|
||||
$PAGE->navbar->add(get_string('testclient', 'webservice'),
|
||||
new moodle_url('/' . $CFG->admin . '/webservice/testclient.php'));
|
||||
if (!empty($function)) {
|
||||
$PAGE->navbar->add($function);
|
||||
@@ -169,4 +169,4 @@ if ($mform->is_cancelled()) {
|
||||
$mform->display();
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ switch ($action) {
|
||||
die;
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
case 'delete':
|
||||
$token = $webservicemanager->get_created_by_user_ws_token($USER->id, $tokenid);
|
||||
|
||||
//Delete the token
|
||||
|
||||
@@ -290,7 +290,7 @@ class main_view extends XMLDBAction {
|
||||
$o .= ' that seems to be active (true). ENUMs support has been dropped in Moodle 2.0, ' .
|
||||
' the XMLDB Editor will delete any ENUM reference next time you save this file' .
|
||||
' and you MUST provide one upgrade block in your code to drop them from DB. See' .
|
||||
' <a href="http://docs.moodle.org/en/Development:DB_layer_2.0_migration_docs#The_changes">' .
|
||||
' <a href="http://docs.moodle.org/dev/DB_layer_2.0_migration_docs#The_changes">' .
|
||||
' Moodle Docs</a> for more info and examples.';
|
||||
} else {
|
||||
$o .= ' that seem to be inactive (false). ENUMs support has been dropped in Moodle 2.0,' .
|
||||
|
||||
+36
-1
@@ -360,7 +360,7 @@ class auth_plugin_cas extends auth_plugin_ldap {
|
||||
* @return boolean result
|
||||
*/
|
||||
function iscreator($username) {
|
||||
if ((empty($this->config->attrcreators) && empty($this->config->groupecreators)) or empty($this->config->memberattribute)) {
|
||||
if (empty($this->config->host_url) or (empty($this->config->attrcreators) && empty($this->config->groupecreators)) or empty($this->config->memberattribute)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -405,4 +405,39 @@ class auth_plugin_cas extends auth_plugin_ldap {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads user information from LDAP and returns it as array()
|
||||
*
|
||||
* If no LDAP servers are configured, user information has to be
|
||||
* provided via other methods (CSV file, manually, etc.). Return
|
||||
* an empty array so existing user info is not lost. Otherwise,
|
||||
* calls parent class method to get user info.
|
||||
*
|
||||
* @param string $username username
|
||||
* @return mixed array with no magic quotes or false on error
|
||||
*/
|
||||
function get_userinfo($username) {
|
||||
if (empty($this->config->host_url)) {
|
||||
return array();
|
||||
}
|
||||
return parent::get_userinfo($username);
|
||||
}
|
||||
|
||||
/**
|
||||
* Syncronizes users from LDAP server to moodle user table.
|
||||
*
|
||||
* If no LDAP servers are configured, simply return. Otherwise,
|
||||
* call parent class method to do the work.
|
||||
*
|
||||
* @param bool $do_updates will do pull in data updates from LDAP if relevant
|
||||
* @return nothing
|
||||
*/
|
||||
function sync_users($do_updates=true) {
|
||||
if (empty($this->config->host_url)) {
|
||||
error_log('[AUTH CAS] '.get_string('noldapserver', 'auth_cas'));
|
||||
return;
|
||||
}
|
||||
parent::sync_users($do_updates);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,4 +61,5 @@ $string['auth_cas_text'] = 'Secure connection';
|
||||
$string['auth_cas_use_cas'] = 'Use CAS';
|
||||
$string['auth_cas_version'] = 'Version of CAS';
|
||||
$string['CASform'] = 'Authentication choice';
|
||||
$string['noldapserver'] = 'No LDAP server configured for CAS! Syncing disabled.';
|
||||
$string['pluginname'] = 'CAS server (SSO)';
|
||||
|
||||
+6
-6
@@ -228,17 +228,17 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
|
||||
// find obsolete users
|
||||
if (count($userlist)) {
|
||||
list($notin_sql, $params) = $DB->get_in_or_equal($userlist, SQL_PARAMS_NAMED, 'u0000', false);
|
||||
$params['authtype'] = $this->authtype;
|
||||
$sql = "SELECT u.id, u.username, u.email, u.auth
|
||||
list($notin_sql, $params) = $DB->get_in_or_equal($userlist, SQL_PARAMS_NAMED, 'u', false);
|
||||
$params['authtype'] = $this->authtype;
|
||||
$sql = "SELECT u.*
|
||||
FROM {user} u
|
||||
WHERE u.auth=:authtype AND u.deleted=0 AND u.username $notin_sql";
|
||||
} else {
|
||||
$sql = "SELECT u.id, u.username, u.email, u.auth
|
||||
$sql = "SELECT u.*
|
||||
FROM {user} u
|
||||
WHERE u.auth=:authtype AND u.deleted=0";
|
||||
$params = array();
|
||||
$params['authtype'] = $this->authtype;
|
||||
$params['authtype'] = $this->authtype;
|
||||
}
|
||||
$remove_users = $DB->get_records_sql($sql, $params);
|
||||
|
||||
@@ -290,7 +290,7 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
// only go ahead if we actually
|
||||
// have fields to update locally
|
||||
if (!empty($updatekeys)) {
|
||||
list($in_sql, $params) = $DB->get_in_or_equal($userlist, SQL_PARAMS_NAMED, 'u0000', true);
|
||||
list($in_sql, $params) = $DB->get_in_or_equal($userlist, SQL_PARAMS_NAMED, 'u', true);
|
||||
$params['authtype'] = $this->authtype;
|
||||
$sql = "SELECT u.id, u.username
|
||||
FROM {user} u
|
||||
|
||||
@@ -29,7 +29,7 @@ $string['auth_emailchangepending'] = 'Change pending. Open the link sent to you
|
||||
$string['auth_emailnoemail'] = 'Tried to send you an email but failed!';
|
||||
$string['auth_emailnoinsert'] = 'Could not add your record to the database!';
|
||||
$string['auth_emailnowexists'] = 'The email address you tried to assign to your profile has been assigned to someone else since your original request. Your request for change of email address is hereby cancelled, but you may try again with a different address.';
|
||||
$string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the signup page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See http://recaptcha.net/learnmore.html for more details. <br /><em>PHP cURL extension is required.</em>';
|
||||
$string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the signup page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See http://www.google.com/recaptcha/learnmore for more details. <br /><em>PHP cURL extension is required.</em>';
|
||||
$string['auth_emailrecaptcha_key'] = 'Enable reCAPTCHA element';
|
||||
$string['auth_emailsettings'] = 'Settings';
|
||||
$string['auth_emailupdate'] = 'Email address update';
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
LDAP-module README
|
||||
|
||||
Please read comments from lib.php
|
||||
Please read comments from auth.php in this directory.
|
||||
|
||||
+13
-12
@@ -579,16 +579,17 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
$sr = ldap_read($ldapconnection, $user_dn, '(objectClass=*)', $search_attribs);
|
||||
if ($sr) {
|
||||
$info = ldap_get_entries_moodle($ldapconnection, $sr);
|
||||
$info = array_change_key_case($info, CASE_LOWER);
|
||||
if (!empty ($info) and !empty($info[0][$this->config->expireattr][0])) {
|
||||
$expiretime = $this->ldap_expirationtime2unix($info[0][$this->config->expireattr][0], $ldapconnection, $user_dn);
|
||||
if ($expiretime != 0) {
|
||||
$now = time();
|
||||
if ($expiretime > $now) {
|
||||
$result = ceil(($expiretime - $now) / DAYSECS);
|
||||
}
|
||||
else {
|
||||
$result = floor(($expiretime - $now) / DAYSECS);
|
||||
if (!empty ($info)) {
|
||||
$info = array_change_key_case($info[0], CASE_LOWER);
|
||||
if (!empty($info[$this->config->expireattr][0])) {
|
||||
$expiretime = $this->ldap_expirationtime2unix($info[$this->config->expireattr][0], $ldapconnection, $user_dn);
|
||||
if ($expiretime != 0) {
|
||||
$now = time();
|
||||
if ($expiretime > $now) {
|
||||
$result = ceil(($expiretime - $now) / DAYSECS);
|
||||
} else {
|
||||
$result = floor(($expiretime - $now) / DAYSECS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -689,7 +690,7 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
// Find users in DB that aren't in ldap -- to be removed!
|
||||
// this is still not as scalable (but how often do we mass delete?)
|
||||
if ($this->config->removeuser !== AUTH_REMOVEUSER_KEEP) {
|
||||
$sql = 'SELECT u.id, u.username, u.email, u.auth
|
||||
$sql = 'SELECT u.*
|
||||
FROM {user} u
|
||||
LEFT JOIN {tmp_extuser} e ON (u.username = e.username AND u.mnethostid = e.mnethostid)
|
||||
WHERE u.auth = ?
|
||||
@@ -1385,7 +1386,7 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
}
|
||||
}
|
||||
}
|
||||
$moodleattributes['username'] = $this->config->user_attribute;
|
||||
$moodleattributes['username'] = moodle_strtolower(trim($this->config->user_attribute));
|
||||
return $moodleattributes;
|
||||
}
|
||||
|
||||
|
||||
Executable → Regular
@@ -101,7 +101,7 @@ $string['auth_ntlmsso_enabled'] = 'Set to yes to attempt Single Sign On with the
|
||||
$string['auth_ntlmsso_enabled_key'] = 'Enable';
|
||||
$string['auth_ntlmsso_ie_fastpath'] = 'Set to yes to enable the NTLM SSO fast path (bypasses certain steps and only works if the client\'s browser is MS Internet Explorer).';
|
||||
$string['auth_ntlmsso_ie_fastpath_key'] = 'MS IE fast path?';
|
||||
$string['auth_ntlmsso_subnet'] = 'If set, it will only attempt SSO with clients in this subnet. Format: xxx.xxx.xxx.xxx/bitmask';
|
||||
$string['auth_ntlmsso_subnet'] = 'If set, it will only attempt SSO with clients in this subnet. Format: xxx.xxx.xxx.xxx/bitmask. Separate multiple subnets with \',\' (comma).';
|
||||
$string['auth_ntlmsso_subnet_key'] = 'Subnet';
|
||||
$string['auth_ntlmsso_type_key'] = 'Authentication type';
|
||||
$string['auth_ntlmsso_type'] = 'The authentication method configured in the web server to authenticate the users (if in doubt, choose NTLM)';
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Manual authentication plugin upgrade code
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage manual
|
||||
* @copyright 2011 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param int $oldversion the version we are upgrading from
|
||||
* @return bool result
|
||||
*/
|
||||
function xmldb_auth_manual_upgrade($oldversion) {
|
||||
global $CFG, $DB, $OUTPUT;
|
||||
|
||||
if ($oldversion < 2011022700) {
|
||||
// force creation of missing passwords
|
||||
$createpassword = hash_internal_user_password('');
|
||||
$rs = $DB->get_recordset('user', array('password'=>$createpassword, 'auth'=>'manual'));
|
||||
foreach ($rs as $user) {
|
||||
if (validate_email($user->email)) {
|
||||
$DB->set_field('user', 'password', 'to be created', array('id'=>$user->id));
|
||||
unset_user_preference('auth_forcepasswordchange', $user);
|
||||
set_user_preference('create_password', 1, $user);
|
||||
}
|
||||
}
|
||||
$rs->close();
|
||||
upgrade_plugin_savepoint(true, 2011022700, 'auth', 'manual');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Manual authentication plugin version information
|
||||
*
|
||||
* @package auth
|
||||
* @subpackage manual
|
||||
* @copyright 2011 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2011022700;
|
||||
$plugin->component = 'auth_manual';
|
||||
+1
-2
@@ -276,6 +276,7 @@ class auth_plugin_mnet extends auth_plugin_base {
|
||||
*/
|
||||
$remoteuser->mnethostid = $remotehost->id;
|
||||
$remoteuser->firstaccess = time(); // First time user in this server, grab it here
|
||||
$remoteuser->confirmed = 1;
|
||||
|
||||
$remoteuser->id = $DB->insert_record('user', $remoteuser);
|
||||
$firsttime = true;
|
||||
@@ -889,8 +890,6 @@ class auth_plugin_mnet extends auth_plugin_base {
|
||||
global $CFG, $DB;
|
||||
$remoteclient = get_mnet_remote_client();
|
||||
|
||||
$CFG->usesid = true;
|
||||
|
||||
// We don't want to output anything to the client machine
|
||||
$start = ob_start();
|
||||
|
||||
|
||||
@@ -193,18 +193,13 @@ class auth_plugin_shibboleth extends auth_plugin_base {
|
||||
*
|
||||
*/
|
||||
function logoutpage_hook() {
|
||||
global $redirect;
|
||||
global $SESSION, $redirect;
|
||||
|
||||
// Only do this if logout handler is defined
|
||||
if (
|
||||
isset($this->config->logout_handler)
|
||||
&& !empty($this->config->logout_handler)
|
||||
){
|
||||
// Only do this if logout handler is defined, and if the user is actually logged in via Shibboleth
|
||||
$logouthandlervalid = isset($this->config->logout_handler) && !empty($this->config->logout_handler);
|
||||
if ( isset($SESSION->shibboleth_session_id) && $logouthandlervalid) {
|
||||
// Check if there is an alternative logout return url defined
|
||||
if (
|
||||
isset($this->config->logout_return_url)
|
||||
&& !empty($this->config->logout_return_url)
|
||||
){
|
||||
if (isset($this->config->logout_return_url) && !empty($this->config->logout_return_url)) {
|
||||
// Set temp_redirect to alternative return url
|
||||
$temp_redirect = $this->config->logout_return_url;
|
||||
} else {
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user