Compare commits
704 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b3931cdb95 | |||
| fd5c871a97 | |||
| a09fd050ec | |||
| b3dedc5af3 | |||
| a61646a0d1 | |||
| e2fa2076e4 | |||
| ed4b5ee771 | |||
| f01cda2aeb | |||
| db02eee7d5 | |||
| 00e68b4589 | |||
| f6bb25b56f | |||
| c01c06499b | |||
| 3078c375c1 | |||
| d7d509f436 | |||
| d058754256 | |||
| 77d88f337a | |||
| 197fbf5537 | |||
| cfb7322101 | |||
| b7e44a928e | |||
| 589d4edc00 | |||
| 905f25d484 | |||
| 927d5013f0 | |||
| 578e89a8f8 | |||
| 67bc64b4e7 | |||
| e4d623aed4 | |||
| 0c2f6aea38 | |||
| 38a927a8e3 | |||
| 38fdb6f843 | |||
| 472f2af220 | |||
| 42fbf15e51 | |||
| dd696fc542 | |||
| 9ac7aa2b16 | |||
| 2d1fdbfdf1 | |||
| dfdef6559c | |||
| e3acb02b21 | |||
| a79d05937d | |||
| 327677fa6e | |||
| 392f443e5c | |||
| 1e51bc0b9c | |||
| 4c2a750ea2 | |||
| c005142d52 | |||
| 535d23ae32 | |||
| 50c7ababe2 | |||
| dd8b44fdb6 | |||
| 3e34ad3372 | |||
| 7abcb5d0f8 | |||
| 740a2e1e63 | |||
| 5b796d20f4 | |||
| c290790e4d | |||
| 96423fc89b | |||
| cae04d6818 | |||
| d68cf00b25 | |||
| ae31be1e34 | |||
| 8d2a6b9032 | |||
| 3425ea6720 | |||
| 73c7844ae1 | |||
| d3d1b71bda | |||
| 1a8c5dff7f | |||
| 8035c1f36e | |||
| 5f77e55e70 | |||
| daf68856ad | |||
| fa874a091b | |||
| 35c88aac05 | |||
| 45ba902f43 | |||
| 88e8071992 | |||
| e8a972b31e | |||
| 03adf4a38d | |||
| 987acd27c8 | |||
| 37f2eb5e6c | |||
| 579b13974a | |||
| df9697c06a | |||
| 7ee7345443 | |||
| 1e12c4c9f2 | |||
| 76b8b81458 | |||
| d56feffe7d | |||
| 05240f478a | |||
| 7ffc30f15c | |||
| e7cd712f00 | |||
| 81df76169b | |||
| 63ff5f9e56 | |||
| 269d534310 | |||
| 2a18bc5a99 | |||
| 612e1a1717 | |||
| d9c6b13d3d | |||
| 1d7a3099c6 | |||
| 6b08395f13 | |||
| de537c2809 | |||
| 40d6c3b81d | |||
| 0b2667b633 | |||
| 5d68066d44 | |||
| bc1cfb05eb | |||
| 872dbc575b | |||
| cc9bccc4e3 | |||
| ab2eca0301 | |||
| e75580602b | |||
| 853071ad9b | |||
| 08551968b0 | |||
| d617d8be89 | |||
| 9a968aa29e | |||
| 55d4ab8915 | |||
| 5a8b259752 | |||
| b31b1a02f3 | |||
| ab85ec15c7 | |||
| 84b9f41015 | |||
| 1eb612c42b | |||
| ceeaa53d84 | |||
| 638e129d3d | |||
| 5d9eca1a47 | |||
| 4b2e6a1536 | |||
| e5c6443bd8 | |||
| f1fa047cc4 | |||
| a39ae19602 | |||
| 70166de9a0 | |||
| 3913fd8b62 | |||
| 4e7d6aaafc | |||
| e8f7dbd6ea | |||
| 12d9e0fa1e | |||
| 3731263712 | |||
| 61c1ce2b67 | |||
| aeb8c8eab1 | |||
| 6e4d4e8f92 | |||
| c55f5b5add | |||
| 0d6c468ea5 | |||
| 1f4889e687 | |||
| 3c848c4dce | |||
| 654da32364 | |||
| 75b281479a | |||
| 5264faaa19 | |||
| df3e417cfc | |||
| d0d3baa8e2 | |||
| 1c1d7d6c17 | |||
| db9de727fe | |||
| e3b68ffc48 | |||
| 5132b81172 | |||
| 83011d028b | |||
| 4f69959085 | |||
| f607194edf | |||
| c1c60e69dc | |||
| 82823372b9 | |||
| 175799de40 | |||
| 1c9006cc0b | |||
| b3a3a6a407 | |||
| f26819a752 | |||
| 49b0ef223f | |||
| 44e4aedc03 | |||
| 7d7fee6b44 | |||
| b4791b688d | |||
| a0f4cf9ff4 | |||
| e6f30c5384 | |||
| cd6600da14 | |||
| 7984e7c547 | |||
| f327dadf52 | |||
| 352beaae35 | |||
| 904dae88b9 | |||
| f9137c531c | |||
| 47ce8f57b7 | |||
| a1b6122ee6 | |||
| 451e14cace | |||
| a7f62cc60b | |||
| 8d88b980fd | |||
| 67d78f23e6 | |||
| d002c6f4f9 | |||
| 54b998482b | |||
| 348f9afab6 | |||
| 37b0d9fc20 | |||
| 3ddf1716ee | |||
| 693231b048 | |||
| 1a2ca2e5ba | |||
| 6b4e0696ec | |||
| 88b1458eb7 | |||
| de3c6685ac | |||
| 8a89e36712 | |||
| 1d8be79382 | |||
| c00d63893c | |||
| 807edce748 | |||
| b85a3ce296 | |||
| 60c003bf36 | |||
| c6329d1a63 | |||
| b905030978 | |||
| a40e5bad8f | |||
| 6e13b652cc | |||
| a78447a111 | |||
| 142012d312 | |||
| fac52f6f86 | |||
| 8f316b9b7e | |||
| 26d7e53400 | |||
| 20aee393ce | |||
| 1187083f7c | |||
| a1a39340d4 | |||
| 5d142821a3 | |||
| 829af84071 | |||
| 96fae5a652 | |||
| 4262d0c1ec | |||
| 03adce20fc | |||
| b44acfecd2 | |||
| 5217658e55 | |||
| 96adf12aa8 | |||
| b723767972 | |||
| 77ca508326 | |||
| 0d6f6a9088 | |||
| 9a3e960c18 | |||
| 89e6f737cc | |||
| 325858c5ca | |||
| bcbde331d7 | |||
| bf2577afca | |||
| eb5d247514 | |||
| 9578db9fe6 | |||
| e4967d5d18 | |||
| c26afd96fb | |||
| 5afdc793f5 | |||
| aec6155835 | |||
| c9626cabcb | |||
| 0e3b5377e6 | |||
| ab4ee8f328 | |||
| 238266ff98 | |||
| 7548a8be9f | |||
| c1700053ec | |||
| 7c1e31a75b | |||
| 5d3865580c | |||
| 6d4d675f44 | |||
| 229c6c6c07 | |||
| eb9f01469c | |||
| bafc8047b4 | |||
| 76f31349ac | |||
| aa296d4b31 | |||
| ed301a7653 | |||
| eb2100be30 | |||
| 7b4a6d9000 | |||
| 82cee60e32 | |||
| 2568276f44 | |||
| 830a52400b | |||
| 8d90017ef7 | |||
| b43a9d9833 | |||
| 1dc5c3f1d4 | |||
| b279bf6a8e | |||
| a80f8498fd | |||
| 90a2a8f3b4 | |||
| 6b673ff711 | |||
| 63624458a5 | |||
| 7707d087fe | |||
| 543c247ae5 | |||
| b2eff97b64 | |||
| 77692ee5ea | |||
| 652f6caf19 | |||
| 0a6cb5f2fa | |||
| 53e2e59432 | |||
| 0d2d28c16c | |||
| a964ca4470 | |||
| 43c0d9b0b8 | |||
| 1c0573332c | |||
| dde4a44ccf | |||
| 5ac3f7495d | |||
| 189e0ac8cd | |||
| c43616b1e4 | |||
| 89888c790b | |||
| 5963dda401 | |||
| 64d6d74942 | |||
| 369daf04e4 | |||
| bfcdb5100f | |||
| 1a9cebf136 | |||
| 587f006439 | |||
| 293d075b40 | |||
| ecdf8eea49 | |||
| 928d7f6ea1 | |||
| a313b9d862 | |||
| 7c085e8389 | |||
| 12090ec2e0 | |||
| fc836a4dfd | |||
| ae29a9a148 | |||
| 8d0a1ccd81 | |||
| 4930c4c7e1 | |||
| 1e9626a730 | |||
| e0722bdc08 | |||
| 9619f59803 | |||
| 07845198da | |||
| eb81c2890d | |||
| 83d9bb6ffb | |||
| 7a57da7970 | |||
| b967ee6ec4 | |||
| 3054fcdf10 | |||
| cc712e151f | |||
| e6c92dc291 | |||
| dc17e7802f | |||
| 830942431b | |||
| 47b0005d74 | |||
| 4c0b46de32 | |||
| c5aac1bb0a | |||
| 6c934c5a80 | |||
| c65250bbf2 | |||
| 0ee76b5e61 | |||
| 3e229be7ea | |||
| 9850eeb84a | |||
| d80f7924d7 | |||
| 9d8cc0da84 | |||
| 697c49f289 | |||
| ee886074f3 | |||
| b763993d9e | |||
| 9ed5fcd1f8 | |||
| 948aeee28c | |||
| 5585fc8bfe | |||
| d9ea363e48 | |||
| df61405d05 | |||
| 9535c1d318 | |||
| e0ad6dc24f | |||
| 61cc6ebce7 | |||
| ea56ece9e4 | |||
| d400c265a9 | |||
| 142b278272 | |||
| ab12805184 | |||
| b9791b7617 | |||
| 5bd4fb8e3a | |||
| fc8a385290 | |||
| 6ef8966625 | |||
| fdbcec4879 | |||
| 29cc42a867 | |||
| 71f5b521e9 | |||
| f85fa813e1 | |||
| 55840b3b63 | |||
| 011ccd1636 | |||
| 4433432675 | |||
| ce7ca4817b | |||
| f664fd9b6e | |||
| d3f009362d | |||
| 00f0ec3ccf | |||
| 60f37890fb | |||
| df13123c81 | |||
| 7ec4cb0f6d | |||
| d7b0927a83 | |||
| b2a29a4402 | |||
| b2403bad15 | |||
| a79727f18e | |||
| dc7c6d1535 | |||
| 10ce5fef12 | |||
| 8ab6ae5a8a | |||
| 59679f6daf | |||
| fcab82c2dd | |||
| 31a28b72bb | |||
| 1df7118320 | |||
| e0d33cdf64 | |||
| 7a42c2e37a | |||
| 269d66470f | |||
| 47a2a2dc53 | |||
| 212dbbade5 | |||
| 8a0b122c5f | |||
| a5785e2cc1 | |||
| fc34c352d7 | |||
| 2e6502f5bc | |||
| 55db72df9f | |||
| 35fa93da9f | |||
| c93964407e | |||
| 60fb52e209 | |||
| 61f9725107 | |||
| bcf2d4d224 | |||
| c58bc49a07 | |||
| fd5d2048f1 | |||
| 33758429af | |||
| f10a1dba9f | |||
| 432db3fc41 | |||
| c5858e948e | |||
| a22374386d | |||
| c2c8375863 | |||
| e64b77077a | |||
| 289bdbaae1 | |||
| fcd60bd8ef | |||
| 8652ec36e5 | |||
| e1e874e622 | |||
| 1c1f85fde4 | |||
| 0e85adb8d6 | |||
| 78517d9570 | |||
| 1d79aa088d | |||
| 04cb4312bc | |||
| 9d2bb14dd3 | |||
| b2ae39d595 | |||
| f8b903596a | |||
| 2a28dbdf78 | |||
| 0e85649699 | |||
| e9cece4b1c | |||
| 351a65a924 | |||
| 0c589780bb | |||
| 90fcb571e5 | |||
| a71c98f540 | |||
| 81eb2ce13b | |||
| b7640d3047 | |||
| b2046b8b67 | |||
| 28e9774815 | |||
| 0a3c54bff4 | |||
| 077363e342 | |||
| 1f435633bd | |||
| 1384b051c9 | |||
| 840bbadf64 | |||
| 5b3776ceb4 | |||
| 583f508538 | |||
| 2e49bf766a | |||
| 98c2b5ee67 | |||
| 984867f4a8 | |||
| d11f65c29b | |||
| b390286ed9 | |||
| f9fedf6cac | |||
| 4776a21a45 | |||
| 7947b4dded | |||
| 03d184d1d3 | |||
| 85350a2959 | |||
| ba1165af63 | |||
| fab65d14c9 | |||
| 34ee47e8a9 | |||
| 2b916ec563 | |||
| cc77d48e7c | |||
| aa55f38820 | |||
| 09bb7c6e60 | |||
| 1c88fb8e69 | |||
| 90882b0ae5 | |||
| 86d52532ff | |||
| c0c89726ff | |||
| 95d655295f | |||
| 77efe4c929 | |||
| a01724d0ab | |||
| 3555770591 | |||
| 7bb9f136d2 | |||
| 5525bddcc0 | |||
| 104e8851c5 | |||
| 33d29d0d61 | |||
| 3cc69df4fb | |||
| 8dd52ab507 | |||
| d0cd29b798 | |||
| 6e650af798 | |||
| c556b31910 | |||
| c171c880c0 | |||
| 60df835524 | |||
| b6d441149a | |||
| 0b82fba271 | |||
| 4d0a2b47fe | |||
| 03ed804abe | |||
| 8b1f225034 | |||
| 3c70be709b | |||
| c686fee654 | |||
| e302f2dec8 | |||
| 4bd3217ce8 | |||
| 3a71764572 | |||
| ec6e2c892b | |||
| 15d05e6d76 | |||
| 96579b1904 | |||
| cea21c1db0 | |||
| b5600c2b56 | |||
| 5b374f607a | |||
| f0f81cbddf | |||
| 9141121f01 | |||
| 588f9efe8c | |||
| 6e9de0d56b | |||
| 5f96398a90 | |||
| ea3bba0ac8 | |||
| fd1b952e3e | |||
| 00253d140c | |||
| ade9ea1b64 | |||
| 175e553143 | |||
| ccaa6daf95 | |||
| f3a96eb019 | |||
| 2ef48e488b | |||
| 7809800e0c | |||
| f68fc730f4 | |||
| c44cd5ce91 | |||
| 65acecced1 | |||
| 3f8502225e | |||
| a7f0516ae9 | |||
| 10fef0df99 | |||
| f6f8ec2291 | |||
| 065fdf4b2d | |||
| 1ab447455b | |||
| bf301a5e81 | |||
| bbd8a07f68 | |||
| 8b2638fd56 | |||
| cd7fb950de | |||
| 97414ca1cb | |||
| a11e396945 | |||
| c13aac05cc | |||
| a4e26132e0 | |||
| 1b6873b44a | |||
| 9b0645fc15 | |||
| 2db344ac25 | |||
| 3be068cc72 | |||
| e33213647c | |||
| 289056c576 | |||
| 1e6e11d8d3 | |||
| 94a7dbf7f4 | |||
| 70d07c5947 | |||
| 8a31a02cce | |||
| a8b2acd35c | |||
| cd2a074cc2 | |||
| 660d38be15 | |||
| a87bb9848f | |||
| 376411566a | |||
| 85f4603014 | |||
| 1ae32381c5 | |||
| 966ac4af8f | |||
| 9a20fcd261 | |||
| d0931fd7d4 | |||
| d3f2f141a5 | |||
| 6f59fe694b | |||
| 2cc40431cb | |||
| cdbc789fd8 | |||
| 3e45d0801e | |||
| 348c37c98d | |||
| 57b5c36320 | |||
| cd0b2c6624 | |||
| 2ba08bbda2 | |||
| e7e806e5f9 | |||
| 9aa4e03b03 | |||
| e8e20f996d | |||
| 46861f51b7 | |||
| 6e98de58b4 | |||
| 445f79f464 | |||
| 359b36db98 | |||
| 491356530e | |||
| 943ad5a1fc | |||
| 88763543f8 | |||
| 47e3c9ad06 | |||
| 5ac62e7763 | |||
| 7eba1d5996 | |||
| 7541e7282a | |||
| 5c1dd89dd3 | |||
| 518a161c66 | |||
| fa5a4b9612 | |||
| 2da1a26439 | |||
| 88ef13a747 | |||
| ab60333d45 | |||
| 485130d7c5 | |||
| f83ab42515 | |||
| eb19752b9a | |||
| 3bb4b79a15 | |||
| 671514c6c2 | |||
| 1113c4c5b1 | |||
| 2b50abb97b | |||
| 4a844708e6 | |||
| 36f946b5db | |||
| 39def1c571 | |||
| df4c1d94f0 | |||
| 1f60d5198d | |||
| c85daf2e2f | |||
| a93ceeef99 | |||
| 1be54667d6 | |||
| 5ae0bf0a12 | |||
| 8dd0ea96e5 | |||
| 42b0a371bf | |||
| c63f883dbf | |||
| 796dd551f7 | |||
| 8d8b9b7268 | |||
| cb041849a3 | |||
| e764df0dbb | |||
| a817a54e90 | |||
| 176558d2ce | |||
| f7931a5580 | |||
| d12989b797 | |||
| 1262e4539e | |||
| eb7e4a9b65 | |||
| 26e68178a8 | |||
| b1d7ea12cd | |||
| c370c0cc5e | |||
| e1d05182a6 | |||
| 2b6424c59d | |||
| 8270af1bf0 | |||
| 88e82bb634 | |||
| 5a189106ad | |||
| 6a107256e3 | |||
| 521a83352d | |||
| 66183e5320 | |||
| 5ebabad505 | |||
| 9fe9652c16 | |||
| e5b715291d | |||
| 50a7bad23e | |||
| cfcfa4b1cd | |||
| 5ec8651d54 | |||
| ff08b12ce1 | |||
| 762681f5c4 | |||
| 4d40958181 | |||
| c5846d06df | |||
| 7f3f962c3f | |||
| aab9e18b6d | |||
| a3e629c7e8 | |||
| cd5c991ede | |||
| 1c70185782 | |||
| cf431667e9 | |||
| 598b4743cc | |||
| a35b341ce7 | |||
| 66f4852bff | |||
| aeace8ee75 | |||
| 38f99a1e60 | |||
| 7547dec095 | |||
| d4564b876e | |||
| 0f5cb9dbd5 | |||
| 1ecc215b3a | |||
| ecc8edd917 | |||
| 8bcec8ba5f | |||
| b26192f62f | |||
| 82c915dbc3 | |||
| 50ab3f94d5 | |||
| 5b282947d7 | |||
| 24dc478086 | |||
| 2562bbfd1b | |||
| 1716e2f2cd | |||
| acff633e39 | |||
| 65ceca6092 | |||
| c21b1143a4 | |||
| 0cd7aaebcd | |||
| 2e8b980985 | |||
| 01aa6fa7d2 | |||
| 6290196cde | |||
| ffa8c930f0 | |||
| 8679f4afdf | |||
| 1afeadb4f4 | |||
| 3fc2111a4b | |||
| d731f7e01e | |||
| 49fbe6d614 | |||
| 9ece615f6c | |||
| 42052386d1 | |||
| 0d02ded10f | |||
| aaf5c3f8b7 | |||
| 11c941f404 | |||
| 87d0aae1fb | |||
| 3e0c2a45fb | |||
| a3b84f77c7 | |||
| 149a477903 | |||
| 47cd445f67 | |||
| 5524686f71 | |||
| 20d4962c33 | |||
| 1b93c2781e | |||
| 39658c5b3a | |||
| e271f67942 | |||
| 1aef5337bd | |||
| 3ef3a9b1bc | |||
| 80c7a3a847 | |||
| c5b16d9afb | |||
| 4fb2a4dd60 | |||
| 5ab2997d89 | |||
| 16efbcaa01 | |||
| 3f020e662d | |||
| ef01def984 | |||
| ce1ef8bda0 | |||
| 8adf0918ce | |||
| 86e830eac4 | |||
| 60fb2c1232 | |||
| 605a610702 | |||
| 55e6c1b588 | |||
| e792dbbe0b | |||
| 09880d7d78 | |||
| 426e34af13 | |||
| 161d14cd92 | |||
| 204da574bd | |||
| a7f0f4af47 | |||
| cec04e64a1 | |||
| 371c836be1 | |||
| 97f35300f7 | |||
| 2870ea8556 | |||
| 1c2e8c3abb | |||
| 125ff0d462 | |||
| 23bde28300 | |||
| f5aa88ec02 | |||
| 9f9fa01a91 | |||
| 5bf6da6331 | |||
| 69751fcd69 | |||
| 5c969d2370 | |||
| 7c959f479b | |||
| d43cec5bb3 | |||
| a47729dc17 | |||
| 8ffd4c4bb1 | |||
| a3ab626df1 | |||
| fd103caa83 | |||
| 12d87a9b65 | |||
| cd54f46df1 | |||
| 49e66dfc5d | |||
| c36c98448d | |||
| 5e7d431426 | |||
| 3b4b95d431 | |||
| 42079bb48d | |||
| c294a22dae | |||
| bde5487a56 | |||
| c0b2343245 | |||
| ae500b5728 | |||
| 7597343964 | |||
| b311baf0bd | |||
| d1c223071a | |||
| 14f9c08355 | |||
| 9ec7e01527 | |||
| ce20b2f255 | |||
| 85bd222b2f | |||
| cf3d932d74 | |||
| 0b47dfec7c | |||
| 8036733091 | |||
| a74e15c66b | |||
| b7e1d77184 | |||
| 5379d34827 | |||
| 50e813478a | |||
| 4f699801b9 | |||
| 7beb6d7e82 | |||
| 1f1406d68c | |||
| 17924add45 | |||
| 56293e0de4 | |||
| 653c0937c6 | |||
| 9fcb0eca01 | |||
| ff87bb5101 | |||
| a271d9efc9 | |||
| 3e18e85dce | |||
| 92fdfe834f | |||
| f7c18e4e4b | |||
| 2698647bcd | |||
| 803c3d8977 |
@@ -1,5 +1,6 @@
|
||||
**/yui/build/** -diff
|
||||
**/amd/build/** -diff
|
||||
lib/dml/oci_native_moodle_package.sql text eol=lf
|
||||
**.js.map -diff
|
||||
**-min.js -diff
|
||||
**.min.js -diff
|
||||
|
||||
@@ -45,7 +45,7 @@ $CFG->admin = 'admin';
|
||||
$CFG->directorypermissions = 0777;
|
||||
|
||||
// Debug options - possible to be controlled by flag in future.
|
||||
$CFG->debug = (E_ALL); // DEBUG_DEVELOPER.
|
||||
$CFG->debug = (E_ALL | E_STRICT); // DEBUG_DEVELOPER.
|
||||
$CFG->debugdisplay = 1;
|
||||
$CFG->debugstringids = 1; // Add strings=1 to url to get string ids.
|
||||
$CFG->perfdebug = 15;
|
||||
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
chunk=$(((($count % $chunks)) + 1))
|
||||
echo "$testname $testfile" >> ./chunk_$chunk.txt
|
||||
done < <(grep "function test_" "${testfile}" | sed -r "s/^.*function (test_[a-zA-Z0-9_]+).*/\1/")
|
||||
done < <(find . -name "*_test.php" -not -path "*/fixtures/*")
|
||||
done < <(find . -name "*_test.php")
|
||||
# Generate the matrix to run tests.
|
||||
echo "matrix=$(ls -1 chunk_*.txt | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
|
||||
echo "$count individual tests collected in $chunks files"
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
- name: Setting up DB pgsql
|
||||
uses: m4nu56/postgresql-action@v1
|
||||
with:
|
||||
postgresql version: 14
|
||||
postgresql version: 13
|
||||
postgresql db: test
|
||||
postgresql user: test
|
||||
postgresql password: test
|
||||
@@ -93,7 +93,7 @@ jobs:
|
||||
- name: Setting up PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.4
|
||||
php-version: 8.3
|
||||
ini-values: max_input_vars=5000
|
||||
coverage: none
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ on:
|
||||
default: ''
|
||||
|
||||
env:
|
||||
php: 8.4
|
||||
php: 8.3
|
||||
|
||||
jobs:
|
||||
Grunt:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checking out code
|
||||
@@ -61,13 +61,13 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
# MySQL builds always run with the lowest PHP supported version.
|
||||
- os: ubuntu-24.04
|
||||
php: 8.2
|
||||
- os: ubuntu-22.04
|
||||
php: 8.1
|
||||
extensions:
|
||||
db: mysqli
|
||||
# PostgreSQL builds always run with the highest PHP supported version.
|
||||
- os: ubuntu-24.04
|
||||
php: 8.4
|
||||
- os: ubuntu-22.04
|
||||
php: 8.3
|
||||
db: pgsql
|
||||
|
||||
steps:
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
uses: moodlehq/mysql-action@v1
|
||||
with:
|
||||
collation server: utf8mb4_bin
|
||||
mysql version: 8.4
|
||||
mysql version: 8.0
|
||||
mysql database: test
|
||||
mysql user: test
|
||||
mysql password: test
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
if: ${{ matrix.db == 'pgsql' }}
|
||||
uses: m4nu56/postgresql-action@v1
|
||||
with:
|
||||
postgresql version: 14
|
||||
postgresql version: 13
|
||||
postgresql db: test
|
||||
postgresql user: test
|
||||
postgresql password: test
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
php: [8.2, 8.4]
|
||||
php: [8.1, 8.3]
|
||||
steps:
|
||||
- name: Construct repository URL
|
||||
run: echo "REPOSITORY_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> $GITHUB_ENV
|
||||
|
||||
@@ -8,7 +8,7 @@ on:
|
||||
required: false
|
||||
default: ''
|
||||
env:
|
||||
php: 8.4
|
||||
php: 8.3
|
||||
|
||||
jobs:
|
||||
Grunt:
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-latest
|
||||
php: 8.4
|
||||
php: 8.3
|
||||
# Ideally we should use mysql/mariadb, but they are 4x slower without tweaks and configuration
|
||||
# so let's run only postgres (1.5h vs 6h) only, If some day we want to improve the mysql runs,
|
||||
# this is the place to enable them.
|
||||
@@ -59,16 +59,16 @@ jobs:
|
||||
db: pgsql
|
||||
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium, zip
|
||||
- os: windows-latest
|
||||
php: 8.2
|
||||
php: 8.1
|
||||
db: pgsql
|
||||
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium, zip
|
||||
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium
|
||||
|
||||
steps:
|
||||
- name: Setting up DB mysql
|
||||
if: ${{ matrix.db == 'mysqli' }}
|
||||
uses: shogo82148/actions-setup-mysql@v1
|
||||
with:
|
||||
mysql-version: 8.4
|
||||
mysql-version: 8.0
|
||||
user: test
|
||||
password: test
|
||||
|
||||
|
||||
@@ -59,4 +59,3 @@ moodle-plugin-ci.phar
|
||||
phpcs.xml
|
||||
jsconfig.json
|
||||
UPGRADING-CURRENT.md
|
||||
.phpunit.cache
|
||||
|
||||
+9
-22
@@ -69,17 +69,6 @@ const fetchComponentData = () => {
|
||||
// The list of components includes the list of subsystems.
|
||||
componentData.components = {...componentData.subsystems};
|
||||
|
||||
const subpluginAdder = (subpluginType, subpluginTypePath) => {
|
||||
glob.sync(`${subpluginTypePath}/*/version.php`).forEach(versionPath => {
|
||||
const componentPath = fs.realpathSync(path.dirname(versionPath));
|
||||
const componentName = path.basename(componentPath);
|
||||
const frankenstyleName = `${subpluginType}_${componentName}`;
|
||||
|
||||
componentData.components[`${subpluginTypePath}/${componentName}`] = frankenstyleName;
|
||||
componentData.pathList.push(componentPath);
|
||||
});
|
||||
};
|
||||
|
||||
// Go through each of the plugintypes.
|
||||
Object.entries(components.plugintypes).forEach(([pluginType, pluginTypePath]) => {
|
||||
// We don't allow any code in this place..?
|
||||
@@ -95,18 +84,16 @@ const fetchComponentData = () => {
|
||||
if (fs.existsSync(subPluginConfigurationFile)) {
|
||||
const subpluginList = JSON.parse(fs.readFileSync(fs.realpathSync(subPluginConfigurationFile)));
|
||||
|
||||
if (subpluginList.subplugintypes) {
|
||||
Object.entries(subpluginList.subplugintypes).forEach(([subpluginType, subpluginTypePath]) => {
|
||||
subpluginAdder(
|
||||
subpluginType,
|
||||
`${pluginTypePath}/${componentName}/${subpluginTypePath}`
|
||||
);
|
||||
Object.entries(subpluginList.plugintypes).forEach(([subpluginType, subpluginTypePath]) => {
|
||||
glob.sync(`${subpluginTypePath}/*/version.php`).forEach(versionPath => {
|
||||
const componentPath = fs.realpathSync(path.dirname(versionPath));
|
||||
const componentName = path.basename(componentPath);
|
||||
const frankenstyleName = `${subpluginType}_${componentName}`;
|
||||
|
||||
componentData.components[`${subpluginTypePath}/${componentName}`] = frankenstyleName;
|
||||
componentData.pathList.push(componentPath);
|
||||
});
|
||||
} else if (subpluginList.plugintypes) {
|
||||
Object.entries(subpluginList.plugintypes).forEach(([subpluginType, subpluginTypePath]) => {
|
||||
subpluginAdder(subpluginType, subpluginTypePath);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -58,31 +58,6 @@ module.exports = grunt => {
|
||||
}) + "\n");
|
||||
};
|
||||
|
||||
/**
|
||||
* Extracts ignore entries from a local ignore file.
|
||||
*
|
||||
* @param {string} componentPath the file path to the component, relative to the code base directory
|
||||
* @param {string} ignoreFilePath the path to the ignore file
|
||||
* @return {array} array of ignore paths to be included in the global ignore files
|
||||
*/
|
||||
const getEntriesFromLocalIgnoreFile = (componentPath, ignoreFilePath) => {
|
||||
const ignorePaths = [];
|
||||
if (grunt.file.exists(ignoreFilePath)) {
|
||||
const ignoreFile = grunt.file.read(ignoreFilePath);
|
||||
const entries = ignoreFile.split('\n');
|
||||
entries.forEach(entry => {
|
||||
entry = entry.trim();
|
||||
if (entry.length > 0 && !entry.startsWith('#') && !entry.startsWith('!')) {
|
||||
while (entry.startsWith('/')) {
|
||||
entry = entry.substring(1);
|
||||
}
|
||||
ignorePaths.push(componentPath + '/' + entry);
|
||||
}
|
||||
});
|
||||
}
|
||||
return ignorePaths;
|
||||
};
|
||||
|
||||
/**
|
||||
* Generate ignore files (utilising thirdpartylibs.xml data)
|
||||
*/
|
||||
@@ -92,20 +67,6 @@ module.exports = grunt => {
|
||||
|
||||
// An array of paths to third party directories.
|
||||
const thirdPartyPaths = ComponentList.getThirdPartyPaths();
|
||||
const localStylelintIgnorePaths = [];
|
||||
const localEslintIgnorePaths = [];
|
||||
ComponentList.getComponentPaths(process.cwd() + '/').forEach(componentPath => {
|
||||
const localEslintIgnorePath = process.cwd() + '/' + componentPath + '/.eslintignore';
|
||||
const localEslintIgnoreEntries = getEntriesFromLocalIgnoreFile(componentPath, localEslintIgnorePath);
|
||||
if (localEslintIgnoreEntries.length > 0) {
|
||||
localEslintIgnorePaths.push(...localEslintIgnoreEntries);
|
||||
}
|
||||
const localStylelintIgnorePath = process.cwd() + '/' + componentPath + '/.stylelintignore';
|
||||
const localStylelintIgnoreEntries = getEntriesFromLocalIgnoreFile(componentPath, localStylelintIgnorePath);
|
||||
if (localStylelintIgnoreEntries.length > 0) {
|
||||
localStylelintIgnorePaths.push(...localStylelintIgnoreEntries);
|
||||
}
|
||||
});
|
||||
|
||||
// Generate .eslintignore.
|
||||
const eslintIgnores = [
|
||||
@@ -116,7 +77,7 @@ module.exports = grunt => {
|
||||
// Ignore all yui/src meta directories and build directories.
|
||||
'*/**/yui/src/*/meta/',
|
||||
'*/**/build/',
|
||||
].concat(thirdPartyPaths).concat(localEslintIgnorePaths);
|
||||
].concat(thirdPartyPaths);
|
||||
grunt.file.write('.eslintignore', eslintIgnores.join('\n') + '\n');
|
||||
|
||||
// Generate .stylelintignore.
|
||||
@@ -127,7 +88,7 @@ module.exports = grunt => {
|
||||
'theme/classic/style/moodle.css',
|
||||
'jsdoc/styles/*.css',
|
||||
'admin/tool/componentlibrary/hugo/dist/css/docs.css',
|
||||
].concat(thirdPartyPaths).concat(localStylelintIgnorePaths);
|
||||
].concat(thirdPartyPaths);
|
||||
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n') + '\n');
|
||||
|
||||
phpcsIgnore(thirdPartyPaths);
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
issueNumber: MDL-87443
|
||||
notes:
|
||||
core:
|
||||
- message: >-
|
||||
There is a new Behat `toast_message` named selector to more easily
|
||||
assert the presence of Toast messages on the page
|
||||
type: improved
|
||||
+114
-1465
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
@@ -7,6 +7,6 @@ define("core_admin/expand_hash",["exports"],(function(_exports){Object.definePro
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @since 4.5
|
||||
*/
|
||||
const SELECTORS_COLLAPSE_ELEMENTS='[data-bs-toggle="collapse"]',SELECTORS_FOCUSTHENEXPAND_ELEMENTS=".focus-expand";_exports.init=()=>{const focusexpand=document.querySelector(SELECTORS_FOCUSTHENEXPAND_ELEMENTS);null==focusexpand||focusexpand.addEventListener("click",(()=>{expandSection("".concat(focusexpand.getAttribute("href")))}))};const expandSection=hash=>{const container=document.querySelector(hash),targetContainer=null==container?void 0:container.querySelector(SELECTORS_COLLAPSE_ELEMENTS);if("false"===(null==targetContainer?void 0:targetContainer.getAttribute("aria-expanded"))){const collapseId=targetContainer.getAttribute("aria-controls"),collapseContainer=document.getElementById(collapseId);collapseContainer.classList.remove("collapse"),collapseContainer.classList.add("show"),targetContainer.setAttribute("aria-expanded","true"),targetContainer.classList.remove("collapsed");const collapseElement=document.querySelector(".collapseexpand.collapsemenu");collapseElement.setAttribute("aria-expanded","true"),collapseElement.classList.remove("collapsed")}};_exports.expandSection=expandSection}));
|
||||
const SELECTORS_COLLAPSE_ELEMENTS='[data-toggle="collapse"]',SELECTORS_FOCUSTHENEXPAND_ELEMENTS=".focus-expand";_exports.init=()=>{const focusexpand=document.querySelector(SELECTORS_FOCUSTHENEXPAND_ELEMENTS);null==focusexpand||focusexpand.addEventListener("click",(()=>{expandSection("".concat(focusexpand.getAttribute("href")))}))};const expandSection=hash=>{const container=document.querySelector(hash),targetContainer=null==container?void 0:container.querySelector(SELECTORS_COLLAPSE_ELEMENTS);if("false"===(null==targetContainer?void 0:targetContainer.getAttribute("aria-expanded"))){const collapseId=targetContainer.getAttribute("aria-controls"),collapseContainer=document.getElementById(collapseId);collapseContainer.classList.remove("collapse"),collapseContainer.classList.add("show"),targetContainer.setAttribute("aria-expanded","true"),targetContainer.classList.remove("collapsed");const collapseElement=document.querySelector(".collapseexpand.collapsemenu");collapseElement.setAttribute("aria-expanded","true"),collapseElement.classList.remove("collapsed")}};_exports.expandSection=expandSection}));
|
||||
|
||||
//# sourceMappingURL=expand_hash.min.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"expand_hash.min.js","sources":["../src/expand_hash.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Expand the collapse section element.\n *\n * @module core_admin/expand_hash\n * @copyright Meirza <meirza.arson@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 4.5\n */\n\nconst SELECTORS = {\n COLLAPSE_ELEMENTS: '[data-bs-toggle=\"collapse\"]',\n FOCUSTHENEXPAND_ELEMENTS: '.focus-expand',\n};\n\n/**\n * Initializes the focus and expand functionality.\n */\nexport const init = () => {\n // Select all collapsible elements only.\n const focusexpand = document.querySelector(SELECTORS.FOCUSTHENEXPAND_ELEMENTS);\n\n // Add click event listener to the anchor element\n focusexpand?.addEventListener('click', () => {\n expandSection(`${focusexpand.getAttribute('href')}`);\n });\n};\n\n/**\n * Expands a section based on the provided URL hash.\n *\n * This function takes a hash string, finds the corresponding element in the DOM,\n * and expands it if it is currently collapsed. It updates the necessary ARIA\n * attributes and classes to reflect the expanded state.\n *\n * @param {string} hash - The hash (e.g., '#elementId') of the element to expand.\n */\nexport const expandSection = (hash) => {\n const container = document.querySelector(hash);\n const targetContainer = container?.querySelector(SELECTORS.COLLAPSE_ELEMENTS);\n\n if (targetContainer?.getAttribute('aria-expanded') === 'false') {\n const collapseId = targetContainer.getAttribute('aria-controls');\n const collapseContainer = document.getElementById(collapseId);\n\n // Show the content.\n collapseContainer.classList.remove('collapse');\n collapseContainer.classList.add('show');\n\n // Update aria-expanded attribute to reflect the new state.\n targetContainer.setAttribute('aria-expanded', 'true');\n targetContainer.classList.remove('collapsed');\n\n // Get collapse expand menu element.\n const collapseElement = document.querySelector('.collapseexpand.collapsemenu');\n // Ensure it gets noticed to make it work.\n collapseElement.setAttribute('aria-expanded', 'true');\n collapseElement.classList.remove('collapsed');\n }\n};\n"],"names":["SELECTORS","focusexpand","document","querySelector","addEventListener","expandSection","getAttribute","hash","container","targetContainer","collapseId","collapseContainer","getElementById","classList","remove","add","setAttribute","collapseElement"],"mappings":";;;;;;;;;MAwBMA,4BACiB,8BADjBA,mCAEwB,8BAMV,WAEVC,YAAcC,SAASC,cAAcH,oCAG3CC,MAAAA,aAAAA,YAAaG,iBAAiB,SAAS,KACnCC,wBAAiBJ,YAAYK,aAAa,oBAarCD,cAAiBE,aACpBC,UAAYN,SAASC,cAAcI,MACnCE,gBAAkBD,MAAAA,iBAAAA,UAAWL,cAAcH,gCAEM,WAAnDS,MAAAA,uBAAAA,gBAAiBH,aAAa,kBAA8B,OACtDI,WAAaD,gBAAgBH,aAAa,iBAC1CK,kBAAoBT,SAASU,eAAeF,YAGlDC,kBAAkBE,UAAUC,OAAO,YACnCH,kBAAkBE,UAAUE,IAAI,QAGhCN,gBAAgBO,aAAa,gBAAiB,QAC9CP,gBAAgBI,UAAUC,OAAO,mBAG3BG,gBAAkBf,SAASC,cAAc,gCAE/Cc,gBAAgBD,aAAa,gBAAiB,QAC9CC,gBAAgBJ,UAAUC,OAAO"}
|
||||
{"version":3,"file":"expand_hash.min.js","sources":["../src/expand_hash.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Expand the collapse section element.\n *\n * @module core_admin/expand_hash\n * @copyright Meirza <meirza.arson@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 4.5\n */\n\nconst SELECTORS = {\n COLLAPSE_ELEMENTS: '[data-toggle=\"collapse\"]',\n FOCUSTHENEXPAND_ELEMENTS: '.focus-expand',\n};\n\n/**\n * Initializes the focus and expand functionality.\n */\nexport const init = () => {\n // Select all collapsible elements only.\n const focusexpand = document.querySelector(SELECTORS.FOCUSTHENEXPAND_ELEMENTS);\n\n // Add click event listener to the anchor element\n focusexpand?.addEventListener('click', () => {\n expandSection(`${focusexpand.getAttribute('href')}`);\n });\n};\n\n/**\n * Expands a section based on the provided URL hash.\n *\n * This function takes a hash string, finds the corresponding element in the DOM,\n * and expands it if it is currently collapsed. It updates the necessary ARIA\n * attributes and classes to reflect the expanded state.\n *\n * @param {string} hash - The hash (e.g., '#elementId') of the element to expand.\n */\nexport const expandSection = (hash) => {\n const container = document.querySelector(hash);\n const targetContainer = container?.querySelector(SELECTORS.COLLAPSE_ELEMENTS);\n\n if (targetContainer?.getAttribute('aria-expanded') === 'false') {\n const collapseId = targetContainer.getAttribute('aria-controls');\n const collapseContainer = document.getElementById(collapseId);\n\n // Show the content.\n collapseContainer.classList.remove('collapse');\n collapseContainer.classList.add('show');\n\n // Update aria-expanded attribute to reflect the new state.\n targetContainer.setAttribute('aria-expanded', 'true');\n targetContainer.classList.remove('collapsed');\n\n // Get collapse expand menu element.\n const collapseElement = document.querySelector('.collapseexpand.collapsemenu');\n // Ensure it gets noticed to make it work.\n collapseElement.setAttribute('aria-expanded', 'true');\n collapseElement.classList.remove('collapsed');\n }\n};\n"],"names":["SELECTORS","focusexpand","document","querySelector","addEventListener","expandSection","getAttribute","hash","container","targetContainer","collapseId","collapseContainer","getElementById","classList","remove","add","setAttribute","collapseElement"],"mappings":";;;;;;;;;MAwBMA,4BACiB,2BADjBA,mCAEwB,8BAMV,WAEVC,YAAcC,SAASC,cAAcH,oCAG3CC,MAAAA,aAAAA,YAAaG,iBAAiB,SAAS,KACnCC,wBAAiBJ,YAAYK,aAAa,oBAarCD,cAAiBE,aACpBC,UAAYN,SAASC,cAAcI,MACnCE,gBAAkBD,MAAAA,iBAAAA,UAAWL,cAAcH,gCAEM,WAAnDS,MAAAA,uBAAAA,gBAAiBH,aAAa,kBAA8B,OACtDI,WAAaD,gBAAgBH,aAAa,iBAC1CK,kBAAoBT,SAASU,eAAeF,YAGlDC,kBAAkBE,UAAUC,OAAO,YACnCH,kBAAkBE,UAAUE,IAAI,QAGhCN,gBAAgBO,aAAa,gBAAiB,QAC9CP,gBAAgBI,UAAUC,OAAO,mBAG3BG,gBAAkBf,SAASC,cAAc,gCAE/Cc,gBAAgBD,aAAa,gBAAiB,QAC9CC,gBAAgBJ,UAAUC,OAAO"}
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
const SELECTORS = {
|
||||
COLLAPSE_ELEMENTS: '[data-bs-toggle="collapse"]',
|
||||
COLLAPSE_ELEMENTS: '[data-toggle="collapse"]',
|
||||
FOCUSTHENEXPAND_ELEMENTS: '.focus-expand',
|
||||
};
|
||||
|
||||
|
||||
@@ -118,10 +118,6 @@ foreach ($settingspage->children as $childpage) {
|
||||
}
|
||||
$outputhtml .= html_writer::tag('div', '<!-- -->', array('class' => 'clearer'));
|
||||
$outputhtml .= $setting->output_html($data);
|
||||
if ($childpage->has_dependencies()) {
|
||||
$context = ['dependencies' => json_encode($childpage->get_dependencies_for_javascript())];
|
||||
echo $OUTPUT->render_from_template('core_admin/settings_showhide', $context);
|
||||
}
|
||||
}
|
||||
$outputhtml .= html_writer::end_tag('fieldset');
|
||||
}
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
<?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/>.
|
||||
|
||||
namespace core_admin\admin;
|
||||
|
||||
use admin_setting;
|
||||
|
||||
/**
|
||||
* Render a notification as part of other admin settings.
|
||||
*
|
||||
* @package core_admin
|
||||
* @subpackage admin
|
||||
* @copyright 2025 Matt Porritt <matt.porritt@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class admin_setting_notification extends admin_setting {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $name The name of the setting.
|
||||
* @param string $notification The notification to display.
|
||||
* @param string $type The type of notification.
|
||||
* @param bool $cancelable Whether the notification can be canceled.
|
||||
*/
|
||||
public function __construct(
|
||||
string $name,
|
||||
/** @var string The notification to display. */
|
||||
protected string $notification,
|
||||
/** @var string The type of notification. */
|
||||
protected string $type = 'info',
|
||||
/** @var bool Whether the notification can be canceled. */
|
||||
protected bool $cancelable = false
|
||||
) {
|
||||
$this->nosave = true;
|
||||
|
||||
parent::__construct($name, '', '', '');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function get_setting(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function get_defaultsetting(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function write_setting($data): string {
|
||||
// Do not write any setting.
|
||||
return '';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function output_html($data, $query = ''): string {
|
||||
global $OUTPUT;
|
||||
|
||||
return $OUTPUT->notification($this->notification, $this->type, $this->cancelable);
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
<?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/>.
|
||||
|
||||
namespace core_admin\admin;
|
||||
|
||||
use admin_setting;
|
||||
|
||||
/**
|
||||
* Render a template as part of other admin settings.
|
||||
* Use for rendering additional html in settings.
|
||||
*
|
||||
* @package core_admin
|
||||
* @subpackage admin
|
||||
* @copyright 2024 Matt Porritt <matt.porritt@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class admin_setting_template_render extends admin_setting {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $name The name of the setting.
|
||||
* @param string $templatename The name of the template to render.
|
||||
* @param array|\stdClass $context The context to pass to the template.
|
||||
*/
|
||||
public function __construct(
|
||||
string $name,
|
||||
/** @var string The name of the template to render. */
|
||||
protected string $templatename,
|
||||
/** @var array|\stdClass The context to pass to the template. */
|
||||
protected array|\stdClass $context
|
||||
) {
|
||||
$this->nosave = true;
|
||||
|
||||
parent::__construct($name, $templatename, '', '');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function get_setting(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function get_defaultsetting(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
|
||||
public function write_setting($data): string {
|
||||
// Do not write any setting.
|
||||
return '';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function output_html($data, $query = ''): string {
|
||||
global $OUTPUT;
|
||||
|
||||
return $OUTPUT->render_from_template($this->templatename, $this->context);
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,6 @@ class purge_caches extends \moodleform {
|
||||
$mform->addElement('header', 'purgecacheheader', get_string('purgeselectedcaches', 'admin'));
|
||||
$checkboxes = [
|
||||
$mform->createElement('advcheckbox', 'theme', '', get_string('purgethemecache', 'admin')),
|
||||
$mform->createElement('advcheckbox', 'courses', '', get_string('purgecoursecache', 'admin')),
|
||||
$mform->createElement('advcheckbox', 'lang', '', get_string('purgelangcache', 'admin')),
|
||||
$mform->createElement('advcheckbox', 'js', '', get_string('purgejscache', 'admin')),
|
||||
$mform->createElement('advcheckbox', 'template', '', get_string('purgetemplates', 'admin')),
|
||||
|
||||
@@ -271,6 +271,8 @@ class task_log extends base {
|
||||
* @return filter[]
|
||||
*/
|
||||
protected function get_all_filters(): array {
|
||||
global $DB;
|
||||
|
||||
$tablealias = $this->get_table_alias('task_log');
|
||||
|
||||
// Name filter (Filter by classname).
|
||||
@@ -328,7 +330,7 @@ class task_log extends base {
|
||||
'output',
|
||||
new lang_string('task_logoutput', 'admin'),
|
||||
$this->get_entity_name(),
|
||||
"{$tablealias}.output"
|
||||
$DB->sql_cast_to_char("{$tablealias}.output")
|
||||
))
|
||||
->add_joins($this->get_joins());
|
||||
|
||||
|
||||
@@ -159,11 +159,11 @@ class users extends system_report {
|
||||
->add_callback(static function(string $fullname, \stdClass $row): string {
|
||||
if ($row->suspended) {
|
||||
$fullname .= ' ' . \html_writer::tag('span', get_string('suspended', 'moodle'),
|
||||
['class' => 'badge text-bg-secondary ms-1']);
|
||||
['class' => 'badge badge-secondary ms-1']);
|
||||
}
|
||||
if (!$row->confirmed) {
|
||||
$fullname .= ' ' . \html_writer::tag('span', get_string('confirmationpending', 'admin'),
|
||||
['class' => 'badge text-bg-danger ms-1']);
|
||||
['class' => 'badge badge-danger ms-1']);
|
||||
}
|
||||
return $fullname;
|
||||
});
|
||||
|
||||
@@ -232,7 +232,7 @@ class hook_list_table extends flexible_table {
|
||||
}
|
||||
|
||||
if ($tooltip) {
|
||||
$attributes['data-bs-toggle'] = 'tooltip';
|
||||
$attributes['data-toggle'] = 'tooltip';
|
||||
$attributes['title'] = $tooltip;
|
||||
}
|
||||
return html_writer::span($tag, "badge badge-{$type}", $attributes);
|
||||
|
||||
@@ -322,7 +322,7 @@ abstract class plugin_management_table extends flexible_table implements dynamic
|
||||
],
|
||||
'title' => $labelstr,
|
||||
'label' => $labelstr,
|
||||
'labelclasses' => 'visually-hidden',
|
||||
'labelclasses' => 'sr-only',
|
||||
];
|
||||
|
||||
return $OUTPUT->render_from_template('core_admin/setting_configtoggle', $params);
|
||||
|
||||
@@ -71,7 +71,7 @@ Example:
|
||||
exit(0);
|
||||
}
|
||||
|
||||
error_reporting(E_ALL);
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
$content = core_component::get_cache_content();
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
*/
|
||||
|
||||
define('CLI_SCRIPT', true);
|
||||
define('NO_DEBUG_DISPLAY', false);
|
||||
|
||||
// extra execution prevention - we can not just require config.php here
|
||||
if (isset($_SERVER['REMOTE_ADDR'])) {
|
||||
@@ -166,7 +165,7 @@ $CFG->running_installer = true;
|
||||
$CFG->early_install_lang = true;
|
||||
$CFG->ostype = (stristr(PHP_OS, 'win') && !stristr(PHP_OS, 'darwin')) ? 'WINDOWS' : 'UNIX';
|
||||
$CFG->dboptions = array();
|
||||
$CFG->debug = (E_ALL);
|
||||
$CFG->debug = (E_ALL | E_STRICT);
|
||||
$CFG->debugdisplay = true;
|
||||
$CFG->debugdeveloper = true;
|
||||
|
||||
@@ -217,6 +216,7 @@ $databases = array('mysqli' => moodle_database::get_driver_instance('mysqli', 'n
|
||||
'auroramysql' => moodle_database::get_driver_instance('auroramysql', 'native'),
|
||||
'mariadb'=> moodle_database::get_driver_instance('mariadb', 'native'),
|
||||
'pgsql' => moodle_database::get_driver_instance('pgsql', 'native'),
|
||||
'oci' => moodle_database::get_driver_instance('oci', 'native'),
|
||||
'sqlsrv' => moodle_database::get_driver_instance('sqlsrv', 'native'), // MS SQL*Server PHP driver
|
||||
);
|
||||
foreach ($databases as $type=>$database) {
|
||||
@@ -560,6 +560,7 @@ do {
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('dbprefix', 'install'));
|
||||
//TODO: solve somehow the prefix trouble for oci.
|
||||
if ($options['prefix'] !== '') {
|
||||
$prompt = get_string('clitypevaluedefault', 'admin', $options['prefix']);
|
||||
} else {
|
||||
|
||||
@@ -69,7 +69,7 @@ if ($options['enablelater']) {
|
||||
}
|
||||
|
||||
$time = time() + ($options['enablelater']*60);
|
||||
set_config('maintenance_later', $time, null, true);
|
||||
set_config('maintenance_later', $time);
|
||||
|
||||
echo get_string('clistatusenabledlater', 'admin', userdate($time))."\n";
|
||||
return 0;
|
||||
@@ -77,32 +77,23 @@ if ($options['enablelater']) {
|
||||
} else if ($options['enable']) {
|
||||
if (file_exists("$CFG->dataroot/climaintenance.html")) {
|
||||
// The maintenance is already enabled, nothing to do.
|
||||
exit(0);
|
||||
}
|
||||
enable_cli_maintenance_mode();
|
||||
set_config('maintenance_enabled', 'cli mode', null, true);
|
||||
|
||||
if (isset($CFG->maintenance_later)) {
|
||||
unset_config('maintenance_later', null, true);
|
||||
} else {
|
||||
enable_cli_maintenance_mode();
|
||||
}
|
||||
set_config('maintenance_enabled', 0);
|
||||
unset_config('maintenance_later');
|
||||
echo get_string('sitemaintenanceoncli', 'admin')."\n";
|
||||
exit(0);
|
||||
|
||||
} else if ($options['enableold']) {
|
||||
set_config('maintenance_enabled', 1, null, true);
|
||||
if (isset($CFG->maintenance_later)) {
|
||||
unset_config('maintenance_later', null, true);
|
||||
}
|
||||
set_config('maintenance_enabled', 1);
|
||||
unset_config('maintenance_later');
|
||||
echo get_string('sitemaintenanceon', 'admin')."\n";
|
||||
exit(0);
|
||||
|
||||
} else if ($options['disable']) {
|
||||
if ($CFG->maintenance_enabled !== '0') {
|
||||
set_config('maintenance_enabled', 0, null, true);
|
||||
}
|
||||
if (isset($CFG->maintenance_later)) {
|
||||
unset_config('maintenance_later', null, true);
|
||||
}
|
||||
set_config('maintenance_enabled', 0);
|
||||
unset_config('maintenance_later');
|
||||
if (file_exists("$CFG->dataroot/climaintenance.html")) {
|
||||
unlink("$CFG->dataroot/climaintenance.html");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
*/
|
||||
|
||||
define('CLI_SCRIPT', true);
|
||||
define('IGNORE_COMPONENT_CACHE', true);
|
||||
|
||||
require(__DIR__.'/../../config.php');
|
||||
require_once($CFG->libdir.'/clilib.php');
|
||||
|
||||
@@ -55,14 +55,13 @@ If courseid is set, course module/s will be added into the course.
|
||||
|
||||
Options:
|
||||
-f, --file=STRING Path to the backup file.
|
||||
-c, --categoryid=INT ID of the course category to restore to. This option is ignored when restoring an activity and courseid is set.
|
||||
-C, --courseid=INT ID of the course to restore to. This option is ignored when restoring a course and the categoryid is set.
|
||||
-c, --categoryid=INT ID of the course category to restore to.
|
||||
-C, --courseid=INT ID of the course to restore to. This option is ignored if categoryid is set.
|
||||
-s, --showdebugging Show developer level debugging information
|
||||
-h, --help Print out this help.
|
||||
|
||||
Example:
|
||||
\$sudo -u www-data /usr/bin/php admin/cli/restore_backup.php --file=/path/to/backup/coursebackup.mbz --categoryid=1\n
|
||||
\$sudo -u www-data /usr/bin/php admin/cli/restore_backup.php --file=/path/to/backup/activitybackup.mbz --courseid=1\n
|
||||
\$sudo -u www-data /usr/bin/php admin/cli/restore_backup.php --file=/path/to/backup/file.mbz --categoryid=1\n
|
||||
EOL;
|
||||
|
||||
echo $help;
|
||||
@@ -85,15 +84,11 @@ if ($options['categoryid']) {
|
||||
if (!$category = $DB->get_record('course_categories', ['id' => $options['categoryid']], 'id')) {
|
||||
throw new \moodle_exception('invalidcategoryid');
|
||||
}
|
||||
}
|
||||
|
||||
if ($options['courseid']) {
|
||||
} else if ($options['courseid']) {
|
||||
if (!$course = $DB->get_record('course', ['id' => $options['courseid']], 'id')) {
|
||||
throw new \moodle_exception('invalidcourseid');
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($category) && empty($course)) {
|
||||
} else {
|
||||
throw new \moodle_exception('invalidoption');
|
||||
}
|
||||
|
||||
@@ -105,46 +100,28 @@ $fp = get_file_packer('application/vnd.moodle.backup');
|
||||
$fp->extract_to_pathname($options['file'], $path);
|
||||
|
||||
cli_heading(get_string('preprocessingbackupfile'));
|
||||
|
||||
try {
|
||||
// Create a temporary restore controller to determine the restore type.
|
||||
$tmprc = new restore_controller($backupdir, SITEID, backup::INTERACTIVE_NO,
|
||||
backup::MODE_GENERAL, $admin->id, backup::TARGET_EXISTING_ADDING);
|
||||
// Restore the backup into a new course if:
|
||||
// - It is a course backup and the category is set.
|
||||
// - It is an activity backup and the course is not set.
|
||||
$restoreasnewcourse = ($tmprc->get_type() === backup::TYPE_1COURSE && !empty($category)) ||
|
||||
($tmprc->get_type() !== backup::TYPE_1COURSE && empty($course));
|
||||
// Make sure to clean up the temporary restore controller.
|
||||
$tmprc->destroy();
|
||||
list($fullname, $shortname) = restore_dbops::calculate_course_names(0, get_string('restoringcourse', 'backup'),
|
||||
get_string('restoringcourseshortname', 'backup'));
|
||||
|
||||
if ($restoreasnewcourse) {
|
||||
list($fullname, $shortname) = restore_dbops::calculate_course_names(0, get_string('restoringcourse', 'backup'),
|
||||
get_string('restoringcourseshortname', 'backup'));
|
||||
$courseid = restore_dbops::create_new_course($fullname, $shortname, $category->id);
|
||||
$rc = new restore_controller($backupdir, $courseid, backup::INTERACTIVE_NO,
|
||||
backup::MODE_GENERAL, $admin->id, backup::TARGET_NEW_COURSE);
|
||||
} else {
|
||||
if (!empty($course)) {
|
||||
$courseid = $course->id;
|
||||
$rc = new restore_controller($backupdir, $courseid, backup::INTERACTIVE_NO,
|
||||
backup::MODE_GENERAL, $admin->id, backup::TARGET_EXISTING_ADDING);
|
||||
} else {
|
||||
$courseid = restore_dbops::create_new_course($fullname, $shortname, $category->id);
|
||||
$rc = new restore_controller($backupdir, $courseid, backup::INTERACTIVE_NO,
|
||||
backup::MODE_GENERAL, $admin->id, backup::TARGET_NEW_COURSE);
|
||||
}
|
||||
$rc->execute_precheck();
|
||||
$rc->execute_plan();
|
||||
$rc->destroy();
|
||||
|
||||
// Rename the course's full and short names with the backup file's original names if the backup file is an activity backup
|
||||
// that is restored to a new course.
|
||||
if ($restoreasnewcourse && $rc->get_type() !== backup::TYPE_1COURSE) {
|
||||
// Rename course name if the backup is from course module and restore to category.
|
||||
if (empty($course)) {
|
||||
$course = get_course($courseid);
|
||||
$backupinfo = $rc->get_info();
|
||||
$tmpfullname = $backupinfo->original_course_fullname ?? get_string('restoretonewcourse', 'backup');
|
||||
$tmpshortname = $backupinfo->original_course_shortname ?? get_string('newcourse');
|
||||
list($fullname, $shortname) = restore_dbops::calculate_course_names(
|
||||
courseid: 0,
|
||||
fullname: $tmpfullname,
|
||||
shortname: $tmpshortname,
|
||||
);
|
||||
list($fullname, $shortname) = restore_dbops::calculate_course_names(0, get_string('restoretonewcourse', 'backup'),
|
||||
get_string('newcourse'));
|
||||
$course->fullname = $fullname;
|
||||
$course->shortname = $shortname;
|
||||
$course->visible = 1;
|
||||
|
||||
@@ -125,6 +125,11 @@ if ($options['list']) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (moodle_needs_upgrading()) {
|
||||
mtrace("Moodle upgrade pending, cannot manage tasks.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ($disable = $options['disable']) {
|
||||
if (!$task = \core\task\manager::get_scheduled_task($disable)) {
|
||||
mtrace("Task '$disable' not found");
|
||||
@@ -152,11 +157,6 @@ if ($disable = $options['disable']) {
|
||||
exit(1);
|
||||
}
|
||||
} else if ($execute = $options['execute']) {
|
||||
if (moodle_needs_upgrading()) {
|
||||
mtrace("Moodle upgrade pending, cannot execute tasks.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!$task = \core\task\manager::get_scheduled_task($execute)) {
|
||||
mtrace("Task '$execute' not found");
|
||||
exit(1);
|
||||
|
||||
@@ -158,13 +158,13 @@ if ($options['plugins']) {
|
||||
if (is_null($plugin)) {
|
||||
cli_writeln('Unknown plugin: ' . $component);
|
||||
} else {
|
||||
$pluginstring = $component . "\t" . $plugin->displayname;
|
||||
$pluginstring = $plugin->component . "\t" . $plugin->displayname;
|
||||
|
||||
if ($pluginman->can_uninstall_plugin($component)) {
|
||||
if ($pluginman->can_uninstall_plugin($plugin->component)) {
|
||||
if ($options['run']) {
|
||||
cli_writeln('Uninstalling: ' . $pluginstring);
|
||||
$progress = new progress_trace_buffer(new text_progress_trace(), true);
|
||||
$pluginman->uninstall_plugin($component, $progress);
|
||||
$pluginman->uninstall_plugin($plugin->component, $progress);
|
||||
$progress->finished();
|
||||
cli_write($progress->get_buffer());
|
||||
} else {
|
||||
|
||||
@@ -3835,7 +3835,6 @@
|
||||
<PHP_EXTENSION name="fileinfo" level="required"/>
|
||||
<PHP_EXTENSION name="sodium" level="optional"/>
|
||||
<PHP_EXTENSION name="exif" level="optional"/>
|
||||
<PHP_EXTENSION name="filter" level="required"/>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="96M" level="required">
|
||||
@@ -4328,7 +4327,6 @@
|
||||
<VENDOR name="oracle" version="19" />
|
||||
</DATABASE>
|
||||
<PHP version="8.1.0" level="required">
|
||||
<RESTRICT function="restrict_php_version_84" message="unsupportedphpversion84" />
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
@@ -4412,7 +4410,6 @@
|
||||
<PHP_EXTENSION name="fileinfo" level="required"/>
|
||||
<PHP_EXTENSION name="sodium" level="required"/>
|
||||
<PHP_EXTENSION name="exif" level="optional"/>
|
||||
<PHP_EXTENSION name="filter" level="required"/>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="96M" level="required">
|
||||
@@ -4525,7 +4522,6 @@
|
||||
<VENDOR name="oracle" version="19" />
|
||||
</DATABASE>
|
||||
<PHP version="8.1.0" level="required">
|
||||
<RESTRICT function="restrict_php_version_84" message="unsupportedphpversion84" />
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
@@ -4609,7 +4605,6 @@
|
||||
<PHP_EXTENSION name="fileinfo" level="required"/>
|
||||
<PHP_EXTENSION name="sodium" level="required"/>
|
||||
<PHP_EXTENSION name="exif" level="optional"/>
|
||||
<PHP_EXTENSION name="filter" level="required"/>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="96M" level="required">
|
||||
@@ -4719,7 +4714,6 @@
|
||||
<VENDOR name="mysql" version="8.4" />
|
||||
<VENDOR name="postgres" version="14" />
|
||||
<VENDOR name="mssql" version="14.0" />
|
||||
<VENDOR name="auroramysql" version="8.0" />
|
||||
</DATABASE>
|
||||
<PHP version="8.2.0" level="required">
|
||||
</PHP>
|
||||
@@ -4805,7 +4799,6 @@
|
||||
<PHP_EXTENSION name="fileinfo" level="required"/>
|
||||
<PHP_EXTENSION name="sodium" level="required"/>
|
||||
<PHP_EXTENSION name="exif" level="optional"/>
|
||||
<PHP_EXTENSION name="filter" level="required"/>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="96M" level="required">
|
||||
@@ -4900,413 +4893,6 @@
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_aurora_version" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
<MOODLE version="5.1" requires="4.2.3">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mariadb" version="10.11.0" />
|
||||
<VENDOR name="mysql" version="8.4" />
|
||||
<VENDOR name="postgres" version="15" />
|
||||
<VENDOR name="mssql" version="14.0" />
|
||||
<VENDOR name="auroramysql" version="8.0" />
|
||||
</DATABASE>
|
||||
<PHP version="8.2.0" level="required">
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="pcreunicodewarning" />
|
||||
</FEEDBACK>
|
||||
</PCREUNICODE>
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="mbstringrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="opensslrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="tokenizer" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="tokenizerrecommended" />
|
||||
</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="zlib" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="gd" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="gdrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="dom" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xml" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xmlreader" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="intl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="intlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="json" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="hash" level="required"/>
|
||||
<PHP_EXTENSION name="fileinfo" level="required"/>
|
||||
<PHP_EXTENSION name="sodium" level="required"/>
|
||||
<PHP_EXTENSION name="exif" level="optional"/>
|
||||
<PHP_EXTENSION name="filter" level="required"/>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="96M" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="settingmemorylimit" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="file_uploads" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingfileuploads" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="opcache.enable" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="opcacherecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="zend.exception_ignore_args" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingzendexceptionignoreargs" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
</PHP_SETTINGS>
|
||||
<CUSTOM_CHECKS>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddbstorageengine" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="quizattemptsupgradedmessage" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="slashargumentswarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="unsupporteddbtablerowformat" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="unoconvwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="libcurlwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddbfileformat" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddbfilepertable" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddblargeprefix" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="ishttpswarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="incompleteunicodesupport" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="sixtyfourbitsrequired" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_admin_dir_usage" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iscustomadminwarnings" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mod_assignment" level="required">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_db_prefix_length" level="required">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_aurora_version" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
<MOODLE version="5.2" requires="4.4">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mariadb" version="10.11.0" />
|
||||
<VENDOR name="mysql" version="8.4" />
|
||||
<VENDOR name="postgres" version="16" />
|
||||
<VENDOR name="mssql" version="15.0" />
|
||||
<VENDOR name="auroramysql" version="8.0" />
|
||||
</DATABASE>
|
||||
<PHP version="8.3.0" level="required">
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="pcreunicodewarning" />
|
||||
</FEEDBACK>
|
||||
</PCREUNICODE>
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="mbstringrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="opensslrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="tokenizer" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="tokenizerrecommended" />
|
||||
</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="zlib" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="gd" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="gdrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="dom" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xml" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xmlreader" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="intl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="intlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="json" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="hash" level="required"/>
|
||||
<PHP_EXTENSION name="fileinfo" level="required"/>
|
||||
<PHP_EXTENSION name="sodium" level="required"/>
|
||||
<PHP_EXTENSION name="exif" level="optional"/>
|
||||
<PHP_EXTENSION name="filter" level="required"/>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="96M" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="settingmemorylimit" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="file_uploads" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingfileuploads" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="opcache.enable" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="opcacherecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="zend.exception_ignore_args" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingzendexceptionignoreargs" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
</PHP_SETTINGS>
|
||||
<CUSTOM_CHECKS>
|
||||
<CUSTOM_CHECK function="\core\environment::check_composer_dependencies_installed" level="optional" />
|
||||
<CUSTOM_CHECK function="\core\environment::check_composer_developer_dependencies_not_installed" level="optional" />
|
||||
<CUSTOM_CHECK function="\core\environment::check_composer_dependencies_optimised" level="optional" />
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddbstorageengine" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="quizattemptsupgradedmessage" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="slashargumentswarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="unsupporteddbtablerowformat" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="unoconvwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="libcurlwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddbfileformat" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddbfilepertable" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddblargeprefix" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="ishttpswarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="incompleteunicodesupport" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="sixtyfourbitsrequired" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_admin_dir_usage" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iscustomadminwarnings" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mod_assignment" level="required">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_db_prefix_length" level="required">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_aurora_version" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
</COMPATIBILITY_MATRIX>
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ $table = new html_table();
|
||||
$table->head = [get_string('filter'), get_string('isactive', 'filters'),
|
||||
get_string('order'), get_string('applyto', 'filters'), get_string('settings'), get_string('uninstallplugin', 'core_admin')];
|
||||
$table->colclasses = array ('leftalign', 'leftalign', 'centeralign', 'leftalign', 'leftalign', 'leftalign');
|
||||
$table->attributes['class'] = 'admintable generaltable table table-hover';
|
||||
$table->attributes['class'] = 'admintable generaltable';
|
||||
$table->id = 'filterssetting';
|
||||
$table->data = [];
|
||||
|
||||
|
||||
+3
-16
@@ -916,14 +916,8 @@ if (empty($CFG->disabledevlibdirscheck) && (is_dir($CFG->dirroot.'/vendor') || i
|
||||
// Check if the site is being foced onto ssl.
|
||||
$overridetossl = !empty($CFG->overridetossl);
|
||||
|
||||
if (defined('BEHAT_SITE_RUNNING') && BEHAT_SITE_RUNNING) {
|
||||
// We need to add this in order to be able to verify the showcampaigncontent setting behaviour during behat tests.
|
||||
$showcampaigncontent = get_config('core', 'showcampaigncontent');
|
||||
$showcampaigncontent = $showcampaigncontent === 'true';
|
||||
} else {
|
||||
// Check if moodle campaign content setting is enabled or not.
|
||||
$showcampaigncontent = !isset($CFG->showcampaigncontent) || $CFG->showcampaigncontent;
|
||||
}
|
||||
// Check if moodle campaign content setting is enabled or not.
|
||||
$showcampaigncontent = !isset($CFG->showcampaigncontent) || $CFG->showcampaigncontent;
|
||||
|
||||
// Encourage admins to enable the user feedback feature if it is not enabled already.
|
||||
$showfeedbackencouragement = empty($CFG->enableuserfeedback);
|
||||
@@ -937,13 +931,6 @@ $result = new environment_results('custom_checks');
|
||||
$result = check_xmlrpc_usage($result);
|
||||
$xmlrpcwarning = !is_null($result) ? get_string($result->getFeedbackStr(), 'admin') : '';
|
||||
|
||||
// Check whether MoodleNet features are enabled and warn about removal.
|
||||
$moodlenetwarning = '';
|
||||
$moodlenetenabled = get_config('tool_moodlenet', 'enablemoodlenet');
|
||||
if ($moodlenetenabled) {
|
||||
$moodlenetwarning = get_string('moodlenetremovalwarning', 'admin');
|
||||
}
|
||||
|
||||
admin_externalpage_setup('adminnotifications');
|
||||
|
||||
$output = $PAGE->get_renderer('core', 'admin');
|
||||
@@ -953,4 +940,4 @@ echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisp
|
||||
$registered, $cachewarnings, $eventshandlers, $themedesignermode, $devlibdir,
|
||||
$mobileconfigured, $overridetossl, $invalidforgottenpasswordurl, $croninfrequent,
|
||||
$showcampaigncontent, $showfeedbackencouragement, $servicesandsupportcontent,
|
||||
$xmlrpcwarning, $moodlenetwarning);
|
||||
$xmlrpcwarning);
|
||||
|
||||
+69
-1
@@ -43,6 +43,61 @@ $providers = get_message_providers();
|
||||
$preferences = get_message_output_default_preferences();
|
||||
|
||||
if (($form = data_submitted()) && confirm_sesskey()) {
|
||||
$newpreferences = array();
|
||||
// Prepare default message outputs settings.
|
||||
foreach ($providers as $provider) {
|
||||
$componentproviderbase = $provider->component.'_'.$provider->name;
|
||||
$disableprovidersetting = $componentproviderbase.'_disable';
|
||||
if (!isset($form->$disableprovidersetting)) {
|
||||
$newpreferences[$disableprovidersetting] = 1;
|
||||
} else {
|
||||
$newpreferences[$disableprovidersetting] = 0;
|
||||
}
|
||||
|
||||
$componentprovidersetting = $componentproviderbase.'_locked';
|
||||
foreach ($processors as $processor) {
|
||||
$value = 0;
|
||||
if (isset($form->{$componentprovidersetting}[$processor->name])) {
|
||||
$value = $form->{$componentprovidersetting}[$processor->name];
|
||||
if ($value == 'on') {
|
||||
$value = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Record the site preference.
|
||||
$newpreferences[$processor->name.'_provider_'.$componentprovidersetting] = $value;
|
||||
}
|
||||
|
||||
$componentprovidersetting = $componentproviderbase.'_enabled';
|
||||
$newsettings = [];
|
||||
if (isset($form->$componentprovidersetting)) {
|
||||
// Store defined comma-separated processors as setting value.
|
||||
// Using array_filter eliminates elements set to 0 above.
|
||||
$newsettings = array_keys(array_filter($form->{$componentprovidersetting}));
|
||||
}
|
||||
|
||||
// Let's join existing setting values for disabled processors.
|
||||
$property = 'message_provider_'.$componentprovidersetting;
|
||||
if (property_exists($preferences, $property)) {
|
||||
$existingsetting = $preferences->$property;
|
||||
foreach ($disabledprocessors as $disable) {
|
||||
if (strpos($existingsetting, $disable->name) > -1) {
|
||||
$newsettings[] = $disable->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$value = join(',', $newsettings);
|
||||
if (empty($value)) {
|
||||
$value = null;
|
||||
}
|
||||
|
||||
// Record the site preference.
|
||||
$newpreferences['message_provider_'.$componentprovidersetting] = $value;
|
||||
}
|
||||
|
||||
// Update database.
|
||||
$transaction = $DB->start_delegated_transaction();
|
||||
|
||||
// Save processors enabled/disabled status.
|
||||
foreach ($allprocessors as $processor) {
|
||||
@@ -51,11 +106,24 @@ if (($form = data_submitted()) && confirm_sesskey()) {
|
||||
$class::enable_plugin($processor->name, $enabled);
|
||||
}
|
||||
|
||||
foreach ($newpreferences as $name => $value) {
|
||||
$old = isset($preferences->$name) ? $preferences->$name : '';
|
||||
|
||||
if ($old != $value) {
|
||||
add_to_config_log($name, $old, $value, 'core');
|
||||
}
|
||||
|
||||
set_config($name, $value, 'message');
|
||||
}
|
||||
$transaction->allow_commit();
|
||||
|
||||
core_plugin_manager::reset_caches();
|
||||
|
||||
$url = new moodle_url('message.php');
|
||||
redirect($url);
|
||||
}
|
||||
|
||||
// Page settings.
|
||||
// Page settings
|
||||
$PAGE->set_context(context_system::instance());
|
||||
$renderer = $PAGE->get_renderer('core', 'message');
|
||||
|
||||
|
||||
@@ -98,10 +98,10 @@
|
||||
echo $OUTPUT->header();
|
||||
?>
|
||||
<form method="post" action="index.php">
|
||||
<table align="center" width="635" class="generaltable table table-hover" border="0" cellpadding="5" cellspacing="0">
|
||||
<table align="center" width="635" class="generaltable" border="0" cellpadding="5" cellspacing="0">
|
||||
<tr>
|
||||
<td class="generalboxcontent">
|
||||
<table cellpadding="9" cellspacing="0" class="table-reboot">
|
||||
<table cellpadding="9" cellspacing="0" >
|
||||
<tr valign="top">
|
||||
<td colspan="2" class="header"><?php print_string('aboutyourhost', 'mnet'); ?></td>
|
||||
</tr>
|
||||
@@ -119,10 +119,10 @@
|
||||
</table>
|
||||
</form>
|
||||
<form method="post" action="index.php">
|
||||
<table align="center" width="635" class="generaltable table table-hover" border="0" cellpadding="5" cellspacing="0">
|
||||
<table align="center" width="635" class="generaltable" border="0" cellpadding="5" cellspacing="0">
|
||||
<tr>
|
||||
<td class="generalboxcontent">
|
||||
<table cellpadding="9" cellspacing="0" class="table-reboot">
|
||||
<table cellpadding="9" cellspacing="0" >
|
||||
<tr valign="top">
|
||||
<td colspan="2" class="header"><?php print_string('expireyourkey', 'mnet'); ?></td>
|
||||
</tr>
|
||||
|
||||
@@ -91,8 +91,7 @@ if (!empty($hostid) && array_key_exists($hostid, $hosts)) {
|
||||
// this query is horrible and has to be remapped afterwards, because of the non-uniqueness
|
||||
// of the remoterep service (it has two plugins so far that use it)
|
||||
// it's possible to get a unique list back using a subquery with LIMIT but that would break oracle
|
||||
// so it's best to just do this small query and then remap the results afterwards.
|
||||
// TODO: Optimise the query, as Oracle-specific constraints no longer apply.
|
||||
// so it's best to just do this small query and then remap the results afterwards
|
||||
$sql = '
|
||||
SELECT DISTINCT
|
||||
' . $DB->sql_concat('r.plugintype', "'_'", 'r.pluginname', "'_'", 's.name') . ' AS uniqueid,
|
||||
|
||||
@@ -54,7 +54,7 @@ $table = new html_table();
|
||||
$table->head = array($txt->name, $txt->version, $txt->uninstall, $txt->settings);
|
||||
$table->colclasses = array('mdl-left', 'mdl-align', 'mdl-align', 'mdl-align');
|
||||
$table->data = array();
|
||||
$table->attributes['class'] = 'manageplagiarismtable generaltable table table-hover';
|
||||
$table->attributes['class'] = 'manageplagiarismtable generaltable';
|
||||
|
||||
// Iterate through auth plugins and add to the display table.
|
||||
$authcount = count($plagiarismplugins);
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
# core_adminpresets (subsystem) Upgrade notes
|
||||
|
||||
## 5.0
|
||||
|
||||
### Removed
|
||||
|
||||
- Remove chat and survey from Adminpresets.
|
||||
|
||||
For more information see [MDL-82457](https://tracker.moodle.org/browse/MDL-82457)
|
||||
- Removed block_mnet_hosts from admin presets
|
||||
|
||||
For more information see [MDL-84309](https://tracker.moodle.org/browse/MDL-84309)
|
||||
@@ -193,12 +193,14 @@ class helper {
|
||||
// Set Activity chooser tabs to "Starred, Recommended, All".
|
||||
static::add_item($presetid, 'activitychoosertabmode', '4');
|
||||
|
||||
// Modules: Hide database, external tool (lti), IMS content package (imscp), lesson, SCORM, wiki, workshop.
|
||||
// Modules: Hide chat, database, external tool (lti), IMS content package (imscp), lesson, SCORM, survey, wiki, workshop.
|
||||
static::add_plugin($presetid, 'mod', 'chat', false);
|
||||
static::add_plugin($presetid, 'mod', 'data', false);
|
||||
static::add_plugin($presetid, 'mod', 'lti', false);
|
||||
static::add_plugin($presetid, 'mod', 'imscp', false);
|
||||
static::add_plugin($presetid, 'mod', 'lesson', false);
|
||||
static::add_plugin($presetid, 'mod', 'scorm', false);
|
||||
static::add_plugin($presetid, 'mod', 'survey', false);
|
||||
static::add_plugin($presetid, 'mod', 'wiki', false);
|
||||
static::add_plugin($presetid, 'mod', 'workshop', false);
|
||||
|
||||
@@ -207,7 +209,7 @@ class helper {
|
||||
static::add_plugin($presetid, 'availability', 'profile', false);
|
||||
|
||||
// Blocks: Hide Activities, Blog menu, Blog tags, Comments, Course completion status, Courses, Flickr,
|
||||
// Global search, Latest badges, Learning plans, Logged in user, Login, Main menu, Mentees, Online users,
|
||||
// Global search, Latest badges, Learning plans, Logged in user, Login, Main menu, Mentees, Network servers, Online users,
|
||||
// Private files, Recent blog entries, Recently accessed courses, Search forums, Section links, Social activities,
|
||||
// Starred courses, Tags, YouTube.
|
||||
// Hidden by default: Course/site summary, RSS feeds, Self completion, Feedback.
|
||||
@@ -226,6 +228,7 @@ class helper {
|
||||
static::add_plugin($presetid, 'block', 'login', false);
|
||||
static::add_plugin($presetid, 'block', 'site_main_menu', false);
|
||||
static::add_plugin($presetid, 'block', 'mentees', false);
|
||||
static::add_plugin($presetid, 'block', 'mnet_hosts', false);
|
||||
static::add_plugin($presetid, 'block', 'private_files', false);
|
||||
static::add_plugin($presetid, 'block', 'blog_recent', false);
|
||||
static::add_plugin($presetid, 'block', 'rss_client', false);
|
||||
@@ -289,7 +292,7 @@ class helper {
|
||||
static::add_item($presetid, 'enablenotes', '1');
|
||||
static::add_item($presetid, 'enableblogs', '1');
|
||||
static::add_item($presetid, 'enablebadges', '1');
|
||||
static::add_item($presetid, 'enableanalytics', '0');
|
||||
static::add_item($presetid, 'enableanalytics', '1');
|
||||
static::add_item($presetid, 'enabled', '1', 'core_competency');
|
||||
static::add_item($presetid, 'pushcourseratingstouserplans', '1', 'core_competency');
|
||||
static::add_item($presetid, 'showdataretentionsummary', '1', 'tool_dataprivacy');
|
||||
@@ -312,7 +315,7 @@ class helper {
|
||||
static::add_plugin($presetid, 'availability', 'profile', true);
|
||||
|
||||
// Blocks: Enable Activities, Blog menu, Blog tags, Comments, Course completion status, Courses, Flickr,
|
||||
// Global search, Latest badges, Learning plans, Logged in user, Login, Main menu, Mentees, Online users,
|
||||
// Global search, Latest badges, Learning plans, Logged in user, Login, Main menu, Mentees, Network servers, Online users,
|
||||
// Private files, Recent blog entries, Recently accessed courses, Search forums, Section links, Social activities,
|
||||
// Starred courses, Tags, YouTube.
|
||||
// Hidden by default: Course/site summary, RSS feeds, Self completion, Feedback.
|
||||
@@ -330,6 +333,7 @@ class helper {
|
||||
static::add_plugin($presetid, 'block', 'login', true);
|
||||
static::add_plugin($presetid, 'block', 'site_main_menu', true);
|
||||
static::add_plugin($presetid, 'block', 'mentees', true);
|
||||
static::add_plugin($presetid, 'block', 'mnet_hosts', true);
|
||||
static::add_plugin($presetid, 'block', 'private_files', true);
|
||||
static::add_plugin($presetid, 'block', 'blog_recent', true);
|
||||
static::add_plugin($presetid, 'block', 'search_forums', true);
|
||||
|
||||
@@ -1133,11 +1133,6 @@ class manager {
|
||||
'visiblevalue' => $visiblevalue,
|
||||
];
|
||||
|
||||
if ($plugininfo && $plugininfo->is_deprecated()) {
|
||||
$skipped[] = $data;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($pluginclass == '\core\plugininfo\orphaned') {
|
||||
$skipped[] = $data;
|
||||
continue;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PRESET>
|
||||
<NAME>Imported preset</NAME>
|
||||
<COMMENTS><p dir="ltr" style="text-align:left;">Porfolios enabled, Emojipicker enabled, Lesson media width set to 900 and maxanswers set to 2 and disabled advanced. Plugins: disabled block_html, mod_database and mod_page plugins and enabled atto_html, block_activity_modules and mod_lesson.</p></COMMENTS>
|
||||
<COMMENTS><p dir="ltr" style="text-align:left;">Porfolios enabled, Emojipicker enabled, Lesson media width set to 900 and maxanswers set to 2 and disabled advanced. Plugins: disabled block_html, mod_database and mod_chat plugins and enabled atto_html, block_activity_modules and mod_lesson.</p></COMMENTS>
|
||||
<PRESET_DATE>1631615985</PRESET_DATE>
|
||||
<SITE_URL>http://demo.moodle</SITE_URL>
|
||||
<AUTHOR>Ada Lovelace</AUTHOR>
|
||||
@@ -30,7 +30,7 @@
|
||||
<ACTIVITY_MODULES>1</ACTIVITY_MODULES>
|
||||
</BLOCK>
|
||||
<MOD>
|
||||
<PAGE>0</PAGE>
|
||||
<CHAT>0</CHAT>
|
||||
<DATA>0</DATA>
|
||||
<LESSON>1</LESSON>
|
||||
</MOD>
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PRESET>
|
||||
<NAME>Starter</NAME>
|
||||
<COMMENTS><p dir="ltr" style="text-align:left;">Badges disabled, Emojipicker enabled, Lesson media width set to 900 and maxanswers set to 2 and disabled advanced. Plugins: disabled block_html, mod_database and mod_page plugins and enabled atto_html and block_activity_modules.</p></COMMENTS>
|
||||
<COMMENTS><p dir="ltr" style="text-align:left;">Badges disabled, Emojipicker enabled, Lesson media width set to 900 and maxanswers set to 2 and disabled advanced. Plugins: disabled block_html, mod_database and mod_chat plugins and enabled atto_html and block_activity_modules.</p></COMMENTS>
|
||||
<PRESET_DATE>1631615985</PRESET_DATE>
|
||||
<SITE_URL>http://demo.moodle</SITE_URL>
|
||||
<AUTHOR>Ada Lovelace</AUTHOR>
|
||||
@@ -30,7 +30,7 @@
|
||||
<ACTIVITY_MODULES>1</ACTIVITY_MODULES>
|
||||
</BLOCK>
|
||||
<MOD>
|
||||
<PAGE>0</PAGE>
|
||||
<CHAT>0</CHAT>
|
||||
<DATA>0</DATA>
|
||||
<LESSON>1</LESSON>
|
||||
</MOD>
|
||||
|
||||
@@ -285,15 +285,12 @@ final class helper_test extends \advanced_testcase {
|
||||
|
||||
// We need to change some of the default values; otherwise, the full preset won't be applied, because all the settings
|
||||
// and plugins are the same.
|
||||
set_config('enableanalytics', '1');
|
||||
set_config('enableanalytics', '0');
|
||||
|
||||
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
|
||||
$generator->create_preset(['name' => 'Preset 1']);
|
||||
|
||||
$invokable = self::get_invokable();
|
||||
set_error_handler($invokable, E_WARNING);
|
||||
$presetid = helper::change_default_preset($preset);
|
||||
restore_error_handler();
|
||||
|
||||
if (empty($settings) && empty($plugins)) {
|
||||
// The preset hasn't been applied.
|
||||
@@ -334,7 +331,7 @@ final class helper_test extends \advanced_testcase {
|
||||
],
|
||||
'plugins' => [
|
||||
'assign' => 1,
|
||||
'wiki' => 0,
|
||||
'chat' => 0,
|
||||
'data' => 0,
|
||||
'lesson' => 0,
|
||||
],
|
||||
@@ -374,7 +371,7 @@ final class helper_test extends \advanced_testcase {
|
||||
],
|
||||
'plugins' => [
|
||||
'assign' => 1,
|
||||
'page' => 0,
|
||||
'chat' => 0,
|
||||
'data' => 0,
|
||||
'lesson' => 1,
|
||||
],
|
||||
|
||||
@@ -75,15 +75,15 @@ final class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase
|
||||
public static function save_value_provider(): array {
|
||||
return [
|
||||
'Save the bloglevel and set blog_menu block visibility to true' => [
|
||||
'settingvalue' => BLOG_USER_LEVEL,
|
||||
'setttingvalue' => BLOG_USER_LEVEL,
|
||||
'expectedsaved' => true,
|
||||
],
|
||||
'Same value to bloglevel, so it will not be saved' => [
|
||||
'settingvalue' => BLOG_SITE_LEVEL,
|
||||
'setttingvalue' => BLOG_SITE_LEVEL,
|
||||
'expectedsaved' => false,
|
||||
],
|
||||
'Save the bloglevel and set blog_menu block visibility to false' => [
|
||||
'settingvalue' => 0,
|
||||
'setttingvalue' => 0,
|
||||
'expectedsaved' => true,
|
||||
],
|
||||
];
|
||||
|
||||
@@ -70,22 +70,22 @@ final class adminpresets_admin_setting_sitesettext_test extends \advanced_testca
|
||||
return [
|
||||
'Fullname: different value' => [
|
||||
'settingname' => 'fullname',
|
||||
'settingvalue' => 'New site fullname',
|
||||
'setttingvalue' => 'New site fullname',
|
||||
'expectedsaved' => true,
|
||||
],
|
||||
'Fullname: same value' => [
|
||||
'settingname' => 'fullname',
|
||||
'settingvalue' => 'PHPUnit test site',
|
||||
'setttingvalue' => 'PHPUnit test site',
|
||||
'expectedsaved' => false,
|
||||
],
|
||||
'Summary: different value' => [
|
||||
'settingname' => 'summary',
|
||||
'settingvalue' => 'This is a new site summary.',
|
||||
'setttingvalue' => 'This is a new site summary.',
|
||||
'expectedsaved' => true,
|
||||
],
|
||||
'Summary: same value' => [
|
||||
'settingname' => 'summary',
|
||||
'settingvalue' => '',
|
||||
'setttingvalue' => '',
|
||||
'expectedsaved' => false,
|
||||
],
|
||||
];
|
||||
|
||||
@@ -83,28 +83,28 @@ final class adminpresets_setting_test extends \advanced_testcase {
|
||||
'category' => 'optionalsubsystems',
|
||||
'settingplugin' => 'core',
|
||||
'settingname' => 'enablebadges',
|
||||
'settingvalue' => '1',
|
||||
'setttingvalue' => '1',
|
||||
'expectedsaved' => false,
|
||||
],
|
||||
'Core setting with a different value is saved' => [
|
||||
'category' => 'optionalsubsystems',
|
||||
'settingplugin' => 'core',
|
||||
'settingname' => 'enablebadges',
|
||||
'settingvalue' => '0',
|
||||
'setttingvalue' => '0',
|
||||
'expectedsaved' => true,
|
||||
],
|
||||
'Plugin setting with the same value is not saved' => [
|
||||
'category' => 'modsettinglesson',
|
||||
'settingplugin' => 'mod_lesson',
|
||||
'settingname' => 'mediawidth',
|
||||
'settingvalue' => '640',
|
||||
'setttingvalue' => '640',
|
||||
'expectedsaved' => false,
|
||||
],
|
||||
'Plugin setting with different value is saved' => [
|
||||
'category' => 'modsettinglesson',
|
||||
'settingplugin' => 'mod_lesson',
|
||||
'settingname' => 'mediawidth',
|
||||
'settingvalue' => '900',
|
||||
'setttingvalue' => '900',
|
||||
'expectedsaved' => true,
|
||||
],
|
||||
];
|
||||
@@ -174,7 +174,7 @@ final class adminpresets_setting_test extends \advanced_testcase {
|
||||
'settingplugin' => 'mod_lesson',
|
||||
'settingname' => 'maxanswers',
|
||||
'advsettingname' => 'maxanswers_adv',
|
||||
'advsettingvalue' => '1',
|
||||
'advsetttingvalue' => '1',
|
||||
'expectedsaved' => false,
|
||||
],
|
||||
'Plugin setting with different value is saved' => [
|
||||
@@ -182,7 +182,7 @@ final class adminpresets_setting_test extends \advanced_testcase {
|
||||
'settingplugin' => 'mod_lesson',
|
||||
'settingname' => 'maxanswers',
|
||||
'advsettingname' => 'maxanswers_adv',
|
||||
'advsettingvalue' => '0',
|
||||
'advsetttingvalue' => '0',
|
||||
'expectedsaved' => true,
|
||||
],
|
||||
'Plugin setting without advanced attributes are not saved' => [
|
||||
@@ -190,7 +190,7 @@ final class adminpresets_setting_test extends \advanced_testcase {
|
||||
'settingplugin' => 'mod_lesson',
|
||||
'settingname' => 'maxanswers',
|
||||
'advsettingname' => null,
|
||||
'advsettingvalue' => '0',
|
||||
'advsetttingvalue' => '0',
|
||||
'expectedsaved' => false,
|
||||
],
|
||||
];
|
||||
|
||||
@@ -438,10 +438,7 @@ final class manager_test extends \advanced_testcase {
|
||||
// Call the method to be tested.
|
||||
$manager = new manager();
|
||||
try {
|
||||
$invokable = self::get_invokable();
|
||||
set_error_handler($invokable, E_WARNING);
|
||||
list($xml, $preset, $settingsfound, $pluginsfound) = $manager->import_preset($filecontents);
|
||||
restore_error_handler();
|
||||
} catch (\exception $e) {
|
||||
if ($expectedexception) {
|
||||
$this->assertInstanceOf($expectedexception, $e);
|
||||
@@ -509,7 +506,7 @@ final class manager_test extends \advanced_testcase {
|
||||
'activity_modules' => 1,
|
||||
],
|
||||
'mod' => [
|
||||
'page' => 0,
|
||||
'chat' => 0,
|
||||
'data' => 0,
|
||||
'lesson' => 1,
|
||||
],
|
||||
@@ -812,41 +809,4 @@ final class manager_test extends \advanced_testcase {
|
||||
$enabledplugins = \core\plugininfo\qtype::get_enabled_plugins();
|
||||
$this->assertArrayHasKey('truefalse', $enabledplugins);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test apply_preset for a deprecated plugin type.
|
||||
*
|
||||
* @runInSeparateProcess
|
||||
*
|
||||
* @covers ::apply_preset
|
||||
* @return void
|
||||
*/
|
||||
public function test_apply_preset_deprecated_plugintype(): void {
|
||||
global $CFG;
|
||||
$this->resetAfterTest();
|
||||
|
||||
// Create a preset.
|
||||
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
|
||||
$presetid = $generator->create_preset();
|
||||
|
||||
// Add a mock plugin into the preset. This plugin will be mocked and deprecated below.
|
||||
helper::add_plugin($presetid, 'fake', 'fullfeatured', true);
|
||||
|
||||
// Inject the mock plugin type + plugin, and deprecate it.
|
||||
$this->add_mocked_plugintype('fake', "$CFG->libdir/tests/fixtures/fakeplugins/fake", true);
|
||||
$this->add_mocked_plugin('fake', 'fullfeatured', $CFG->libdir . '/tests/fixtures/fakeplugins/fake/fullfeatured');
|
||||
|
||||
// Pre-flight check to ensure that the plugin is deprecated.
|
||||
$pluginman = \core\plugin_manager::instance();
|
||||
$plugininfo = $pluginman->get_plugin_info('fake_fullfeatured');
|
||||
// Expected, unit-test-only debugging, since \core\plugin_manager isn't aware of the mock plugininfo class for this type.
|
||||
$this->assertDebuggingCalled();
|
||||
$this->assertTrue($plugininfo->is_deprecated());
|
||||
|
||||
// Finally, check apply_preset method, verifying the deprecated plugin is skipped.
|
||||
$manager = new manager();
|
||||
[$applied, $skipped] = $manager->apply_preset($presetid);
|
||||
$this->assertdebuggingcalledcount(2); // Expected unit-test-only debugging, as above.
|
||||
$this->assertContains('fake', array_column($skipped, 'plugin'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
#!/usr/bin/php -f
|
||||
<?php
|
||||
|
||||
//error_reporting(0);
|
||||
//ini_set('display_errors',0);
|
||||
require_once(__DIR__ . '/../config.php');
|
||||
$tmp = explode('@',$_ENV['RECIPIENT']);
|
||||
$address = $tmp[0];
|
||||
|
||||
// BOUNCE EMAILS TO NOREPLY
|
||||
if ($_ENV['RECIPIENT'] == $CFG->noreplyaddress) {
|
||||
$user = new stdClass();
|
||||
$user->email = $_ENV['SENDER'];
|
||||
|
||||
if (!validate_email($user->email)) {
|
||||
die();
|
||||
}
|
||||
|
||||
$site = get_site();
|
||||
$subject = get_string('noreplybouncesubject','moodle',format_string($site->fullname));
|
||||
$body = get_string('noreplybouncemessage','moodle',format_string($site->fullname))."\n\n";
|
||||
|
||||
$fd = fopen('php://stdin','r');
|
||||
if ($fd) {
|
||||
while(!feof($fd)) {
|
||||
$body .= fgets($fd);
|
||||
}
|
||||
fclose($fd);
|
||||
}
|
||||
|
||||
$user->id = 0; // to prevent anything annoying happening
|
||||
|
||||
$from->firstname = null;
|
||||
$from->lastname = null;
|
||||
$from->email = '<>';
|
||||
$from->maildisplay = true;
|
||||
|
||||
email_to_user($user,$from,$subject,$body);
|
||||
die ();
|
||||
}
|
||||
/// ALL OTHER PROCESSING
|
||||
// we need to split up the address
|
||||
$prefix = substr($address,0,4);
|
||||
$mod = substr($address,4,2);
|
||||
$modargs = substr($address,6,-16);
|
||||
$hash = substr($address,-16);
|
||||
|
||||
if (substr(md5($prefix.$mod.$modargs.$CFG->siteidentifier),0,16) != $hash) {
|
||||
die("HASH DIDN'T MATCH!\n");
|
||||
}
|
||||
list(,$modid) = unpack('C',base64_decode($mod.'=='));
|
||||
|
||||
if ($modid == '0') { // special
|
||||
$modname = 'moodle';
|
||||
}
|
||||
else {
|
||||
$modname = $DB->get_field("modules", "name", array("id"=>$modid));
|
||||
include_once('mod/'.$modname.'/lib.php');
|
||||
}
|
||||
$function = $modname.'_process_email';
|
||||
|
||||
if (!function_exists($function)) {
|
||||
die();
|
||||
}
|
||||
$fd = fopen('php://stdin','r');
|
||||
if (!$fd) {
|
||||
exit();
|
||||
}
|
||||
|
||||
while(!feof($fd)) {
|
||||
$body .= fgets($fd);
|
||||
}
|
||||
|
||||
$function($modargs,$body);
|
||||
|
||||
fclose($fd);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
define('IGNORE_COMPONENT_CACHE', true);
|
||||
|
||||
require_once('../config.php');
|
||||
require_once($CFG->libdir.'/adminlib.php');
|
||||
|
||||
@@ -44,11 +42,7 @@ if ($data = $form->get_data()) {
|
||||
purge_caches();
|
||||
$message = get_string('purgecachesfinished', 'admin');
|
||||
} else {
|
||||
// When passing selected options, ensure each is cast to boolean for strict comparison.
|
||||
purge_caches(array_map(
|
||||
fn($option) => (bool) $option,
|
||||
$data->purgeselectedoptions,
|
||||
));
|
||||
purge_caches($data->purgeselectedoptions);
|
||||
$message = get_string('purgeselectedcachesfinished', 'admin');
|
||||
}
|
||||
|
||||
|
||||
@@ -34,10 +34,8 @@ admin_externalpage_setup('registrationmoodleorg');
|
||||
|
||||
$unregistration = optional_param('unregistration', false, PARAM_BOOL);
|
||||
$confirm = optional_param('confirm', false, PARAM_BOOL);
|
||||
// Consider the site 'registered' if records exist locally and at the hub.
|
||||
$siteisregistered = \core\hub\registration::is_registered() && core\hub\api::is_site_registered_in_hub();
|
||||
|
||||
if ($unregistration && $siteisregistered) {
|
||||
if ($unregistration && \core\hub\registration::is_registered()) {
|
||||
if ($confirm) {
|
||||
require_sesskey();
|
||||
\core\hub\registration::unregister(false, false);
|
||||
@@ -62,7 +60,7 @@ if (!$returnurl = optional_param('returnurl', null, PARAM_LOCALURL)) {
|
||||
$returnurl = $isinitialregistration ? '/admin/index.php' : '/admin/registration/index.php';
|
||||
}
|
||||
|
||||
$siteregistrationform = new \core\hub\site_registration_form(null, ['registered' => $siteisregistered]);
|
||||
$siteregistrationform = new \core\hub\site_registration_form();
|
||||
$siteregistrationform->set_data(['returnurl' => $returnurl]);
|
||||
if ($fromform = $siteregistrationform->get_data()) {
|
||||
|
||||
@@ -88,7 +86,7 @@ echo $OUTPUT->header();
|
||||
// Current status of registration.
|
||||
|
||||
$notificationtype = \core\output\notification::NOTIFY_ERROR;
|
||||
if ($siteisregistered) {
|
||||
if (\core\hub\registration::is_registered()) {
|
||||
$lastupdated = \core\hub\registration::get_last_updated();
|
||||
if ($lastupdated == 0) {
|
||||
$registrationmessage = get_string('pleaserefreshregistrationunknown', 'admin');
|
||||
@@ -106,7 +104,7 @@ if ($siteisregistered) {
|
||||
}
|
||||
|
||||
// Heading.
|
||||
if ($siteisregistered) {
|
||||
if (\core\hub\registration::is_registered()) {
|
||||
echo $OUTPUT->heading(get_string('registerwithmoodleorgupdate', 'core_hub'));
|
||||
} else if ($isinitialregistration) {
|
||||
echo $OUTPUT->heading(get_string('registerwithmoodleorgcomplete', 'core_hub'));
|
||||
@@ -119,7 +117,7 @@ echo $renderer->moodleorg_registration_message();
|
||||
|
||||
$siteregistrationform->display();
|
||||
|
||||
if ($siteisregistered) {
|
||||
if (\core\hub\registration::is_registered()) {
|
||||
// Unregister link.
|
||||
$unregisterhuburl = new moodle_url("/admin/registration/index.php", ['unregistration' => 1]);
|
||||
echo html_writer::div(html_writer::link($unregisterhuburl, get_string('unregister', 'hub')), 'unregister mt-2');
|
||||
|
||||
+38
-113
@@ -279,7 +279,6 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
* @param bool $showfeedbackencouragement Whether the feedback encouragement content should be displayed or not.
|
||||
* @param bool $showservicesandsupport Whether the services and support content should be displayed or not.
|
||||
* @param string $xmlrpcwarning XML-RPC deprecation warning message.
|
||||
* @param string $moodlenetwarning MoodleNet removal warning message.
|
||||
*
|
||||
* @return string HTML to output.
|
||||
*/
|
||||
@@ -289,13 +288,14 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
$themedesignermode = false, $devlibdir = false, $mobileconfigured = false,
|
||||
$overridetossl = false, $invalidforgottenpasswordurl = false, $croninfrequent = false,
|
||||
$showcampaigncontent = false, bool $showfeedbackencouragement = false, bool $showservicesandsupport = false,
|
||||
$xmlrpcwarning = '', $moodlenetwarning = '') {
|
||||
$xmlrpcwarning = '') {
|
||||
|
||||
global $CFG;
|
||||
$output = '';
|
||||
|
||||
$output .= $this->header();
|
||||
$output .= $this->output->heading(get_string('notifications', 'admin'));
|
||||
$output .= $this->upgrade_news_message();
|
||||
$output .= $this->maturity_info($maturity);
|
||||
$output .= empty($CFG->disableupdatenotifications) ? $this->available_updates($availableupdates, $availableupdatesfetch) : '';
|
||||
$output .= $this->insecure_dataroot_warning($insecuredataroot);
|
||||
@@ -314,7 +314,6 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
$output .= $this->mobile_configuration_warning($mobileconfigured);
|
||||
$output .= $this->forgotten_password_url_warning($invalidforgottenpasswordurl);
|
||||
$output .= $this->mnet_deprecation_warning($xmlrpcwarning);
|
||||
$output .= $this->moodlenet_removal_warning($moodlenetwarning);
|
||||
$output .= $this->userfeedback_encouragement($showfeedbackencouragement);
|
||||
$output .= $this->services_and_support_content($showservicesandsupport);
|
||||
$output .= $this->campaign_content($showcampaigncontent);
|
||||
@@ -756,6 +755,22 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
return $this->box($copyrighttext, 'copyright');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a transient notification for important upgrades messages for
|
||||
* specific releases.
|
||||
*
|
||||
* @return string HTML to output.
|
||||
*/
|
||||
protected function upgrade_news_message() {
|
||||
return $this->notification(
|
||||
get_string('importantupdates_content', 'admin'),
|
||||
'info',
|
||||
false,
|
||||
get_string('importantupdates_title', 'admin'),
|
||||
'i/circleinfo, core'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a warning about installing development code if necesary.
|
||||
* @param int $maturity
|
||||
@@ -1026,7 +1041,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
*/
|
||||
public function plugins_check_table(core_plugin_manager $pluginman, $version, array $options = array()) {
|
||||
global $CFG;
|
||||
$plugininfo = $pluginman->get_plugins(true);
|
||||
$plugininfo = $pluginman->get_plugins();
|
||||
|
||||
if (empty($plugininfo)) {
|
||||
return '';
|
||||
@@ -1061,20 +1076,6 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
$upgradeabortable = $pluginman->list_restorable_archives();
|
||||
|
||||
foreach ($plugininfo as $type => $plugins) {
|
||||
// Skip deleted plugin types.
|
||||
if (\core_component::is_deleted_plugin_type($type)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip deprecated plugintypes having no installed plugins, in which case there is nothing to report.
|
||||
if (\core_component::is_deprecated_plugin_type($type)) {
|
||||
$reportableplugins = array_filter($plugins, function($plugininfo) {
|
||||
return $plugininfo->versiondb != null;
|
||||
});
|
||||
if (empty($reportableplugins)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$header = new html_table_cell($pluginman->plugintype_name_plural($type));
|
||||
$header->header = true;
|
||||
@@ -1123,7 +1124,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
);
|
||||
|
||||
$versiondb = new html_table_cell($plugin->versiondb);
|
||||
$versiondisk = $plugin->is_deprecated() ? new html_table_cell() : new html_table_cell($plugin->versiondisk);
|
||||
$versiondisk = new html_table_cell($plugin->versiondisk);
|
||||
|
||||
if ($isstandard = $plugin->is_standard()) {
|
||||
$row->attributes['class'] .= ' standard';
|
||||
@@ -1142,9 +1143,6 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
|
||||
$statuscode = $plugin->get_status();
|
||||
$row->attributes['class'] .= ' status-' . $statuscode;
|
||||
if ($plugin->is_deprecated()) {
|
||||
$row->attributes['class'] .= ' deprecatedtype';
|
||||
}
|
||||
$statusclass = 'statustext badge ';
|
||||
switch ($statuscode) {
|
||||
case core_plugin_manager::PLUGIN_STATUS_NEW:
|
||||
@@ -1165,18 +1163,6 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
}
|
||||
$status = html_writer::span(get_string('status_' . $statuscode, 'core_plugin'), $statusclass);
|
||||
|
||||
$deprecatedstatus = '';
|
||||
if ($plugin->is_deprecated()) {
|
||||
// During upgrade, omit the status for deprecated plugin types, unless it's 'missing from disk'.
|
||||
// Deprecated plugins cannot be installed, upgraded, downgraded, and won't be automatically deleted.
|
||||
$status = in_array($statuscode,
|
||||
[core_plugin_manager::PLUGIN_STATUS_MISSING, core_plugin_manager::PLUGIN_STATUS_DELETE]) ? $status : '';
|
||||
$deprecatedstatus = html_writer::span(
|
||||
get_string('deprecated_type', 'core_plugin'),
|
||||
'statustext badge bg-danger text-white'
|
||||
);
|
||||
}
|
||||
|
||||
if (!empty($installabortable[$plugin->component])) {
|
||||
$status .= $this->output->single_button(
|
||||
new moodle_url($this->page->url, array('abortinstall' => $plugin->component, 'confirmplugincheck' => 0)),
|
||||
@@ -1202,7 +1188,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
}
|
||||
}
|
||||
|
||||
$status = new html_table_cell($sourcelabel.' '.$status.' '.$deprecatedstatus);
|
||||
$status = new html_table_cell($sourcelabel.' '.$status);
|
||||
if ($plugin->pluginsupported != null) {
|
||||
$requires = new html_table_cell($this->required_column($plugin, $pluginman, $version, $CFG->branch));
|
||||
} else {
|
||||
@@ -1210,8 +1196,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
}
|
||||
|
||||
$statusisboring = in_array($statuscode, array(
|
||||
core_plugin_manager::PLUGIN_STATUS_NODB, core_plugin_manager::PLUGIN_STATUS_UPTODATE))
|
||||
&& !$plugin->is_deprecated();
|
||||
core_plugin_manager::PLUGIN_STATUS_NODB, core_plugin_manager::PLUGIN_STATUS_UPTODATE));
|
||||
|
||||
if ($options['xdep']) {
|
||||
// we want to see only plugins with failed dependencies
|
||||
@@ -1687,26 +1672,12 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
*/
|
||||
public function plugins_overview_panel(core_plugin_manager $pluginman, array $options = array()) {
|
||||
|
||||
$plugininfo = $pluginman->get_plugins(true);
|
||||
$plugininfo = $pluginman->get_plugins();
|
||||
$this->page->requires->js_call_amd('core_admin/plugins_overview', 'init');
|
||||
|
||||
$numtotal = $numextension = $numupdatable = $numinstallable = $nummissing = $numnew = 0;
|
||||
|
||||
foreach ($plugininfo as $type => $plugins) {
|
||||
if (\core_component::is_deleted_plugin_type($type)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip deprecated plugintypes having no installed plugins, in which case there is nothing to report.
|
||||
if (\core_component::is_deprecated_plugin_type($type)) {
|
||||
$reportableplugins = array_filter($plugins, function($plugininfo) {
|
||||
return $plugininfo->versiondb != null;
|
||||
});
|
||||
if (empty($reportableplugins)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($plugins as $name => $plugin) {
|
||||
if ($res = $plugin->available_updates()) {
|
||||
$numupdatable++;
|
||||
@@ -1735,13 +1706,13 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
$this->page->url,
|
||||
get_string('overviewall', 'core_plugin'),
|
||||
['title' => get_string('filterall', 'core_plugin'), 'data-filterby' => 'all', 'class' => 'active']
|
||||
).' '.html_writer::span($numtotal, 'badge text-dark number number-all');
|
||||
).' '.html_writer::span($numtotal, 'badge number number-all');
|
||||
|
||||
$infoext = html_writer::link(
|
||||
new moodle_url($this->page->url, [], 'additional'),
|
||||
get_string('overviewext', 'core_plugin'),
|
||||
['title' => get_string('filtercontribonly', 'core_plugin'), 'data-filterby' => 'additional']
|
||||
).' '.html_writer::span($numextension, 'badge text-dark number number-additional');
|
||||
).' '.html_writer::span($numextension, 'badge number number-additional');
|
||||
|
||||
if ($numupdatable) {
|
||||
$infoupdatable = html_writer::link(
|
||||
@@ -1807,11 +1778,10 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
*/
|
||||
public function plugins_control_panel(core_plugin_manager $pluginman, array $options = array()) {
|
||||
|
||||
$plugininfo = $pluginman->get_plugins(true);
|
||||
$plugininfo = $pluginman->get_plugins();
|
||||
|
||||
$table = new html_table();
|
||||
$table->id = 'plugins-control-panel';
|
||||
$table->attributes['class'] = 'generaltable table table-striped table-hover';
|
||||
$table->head = array(
|
||||
get_string('displayname', 'core_plugin'),
|
||||
get_string('version', 'core_plugin'),
|
||||
@@ -1825,20 +1795,6 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
);
|
||||
|
||||
foreach ($plugininfo as $type => $plugins) {
|
||||
if (\core_component::is_deleted_plugin_type($type)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip deprecated plugintypes having no installed plugins, in which case there is nothing to report.
|
||||
if (\core_component::is_deprecated_plugin_type($type)) {
|
||||
$reportableplugins = array_filter($plugins, function($plugininfo) {
|
||||
return $plugininfo->versiondb != null;
|
||||
});
|
||||
if (empty($reportableplugins)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$heading = $pluginman->plugintype_name_plural($type);
|
||||
$pluginclass = core_plugin_manager::resolve_plugininfo_class($type);
|
||||
if ($manageurl = $pluginclass::get_manage_url()) {
|
||||
@@ -1881,9 +1837,6 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
}
|
||||
$status = $plugin->get_status();
|
||||
$row->attributes['class'] .= ' status-'.$status;
|
||||
if ($plugin->is_deprecated()) {
|
||||
$row->attributes['class'] .= ' deprecatedtype';
|
||||
}
|
||||
$pluginname = html_writer::tag('div', $icon.$plugin->displayname, array('class' => 'displayname')).
|
||||
html_writer::tag('div', $plugin->component, array('class' => 'componentname'));
|
||||
$pluginname = new html_table_cell($pluginname);
|
||||
@@ -1925,29 +1878,19 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
$source = '';
|
||||
} else {
|
||||
$row->attributes['class'] .= ' additional';
|
||||
$source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source badge me-1 text-bg-info');
|
||||
$source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source badge mr-1 bg-info text-white');
|
||||
}
|
||||
|
||||
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
|
||||
$row->attributes['class'] .= ' missing';
|
||||
$msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg badge text-bg-danger');
|
||||
$msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg badge bg-danger text-white');
|
||||
} else if ($status === core_plugin_manager::PLUGIN_STATUS_NEW) {
|
||||
$row->attributes['class'] .= ' newplugin';
|
||||
$msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg badge text-bg-success');
|
||||
$msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg badge bg-success text-white');
|
||||
} else {
|
||||
$msg = '';
|
||||
}
|
||||
|
||||
$deprecatedmsg = '';
|
||||
if ($plugin->is_deprecated()) {
|
||||
// Omit the status for deprecated plugin types, unless it's 'missing from disk'.
|
||||
$msg = $status == core_plugin_manager::PLUGIN_STATUS_MISSING ? $msg : '';
|
||||
$deprecatedmsg = html_writer::div(
|
||||
get_string('deprecated_type', 'core_plugin'),
|
||||
'statusmsg badge bg-danger text-white'
|
||||
);
|
||||
}
|
||||
|
||||
$requriedby = $pluginman->other_plugins_that_require($plugin->component);
|
||||
if ($requriedby) {
|
||||
$requiredby = html_writer::tag('div', get_string('requiredby', 'core_plugin', implode(', ', $requriedby)),
|
||||
@@ -1964,7 +1907,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
}
|
||||
}
|
||||
|
||||
$notes = new html_table_cell($source.' '.$msg.' '.$deprecatedmsg.$requiredby.$updateinfo);
|
||||
$notes = new html_table_cell($source.$msg.$requiredby.$updateinfo);
|
||||
|
||||
$row->cells = array(
|
||||
$pluginname, $version, $availability, $settings, $uninstall, $notes
|
||||
@@ -2066,7 +2009,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
get_string('status'),
|
||||
);
|
||||
$servertable->colclasses = array('centeralign name', 'centeralign info', 'leftalign report', 'leftalign plugin', 'centeralign status');
|
||||
$servertable->attributes['class'] = 'table table-striped admintable environmenttable generaltable table-sm table-hover';
|
||||
$servertable->attributes['class'] = 'admintable environmenttable generaltable table-sm';
|
||||
$servertable->id = 'serverstatus';
|
||||
|
||||
$serverdata = array('ok'=>array(), 'warn'=>array(), 'error'=>array());
|
||||
@@ -2079,7 +2022,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
get_string('status'),
|
||||
);
|
||||
$othertable->colclasses = array('aligncenter info', 'alignleft report', 'alignleft plugin', 'aligncenter status');
|
||||
$othertable->attributes['class'] = 'table table-striped admintable environmenttable generaltable table-sm table-hover';
|
||||
$othertable->attributes['class'] = 'admintable environmenttable generaltable table-sm';
|
||||
$othertable->id = 'otherserverstatus';
|
||||
|
||||
$otherdata = array('ok'=>array(), 'warn'=>array(), 'error'=>array());
|
||||
@@ -2180,33 +2123,29 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
} else {
|
||||
$report = $this->doc_link(join('/', $linkparts), get_string($stringtouse, 'admin', $rec), true);
|
||||
}
|
||||
// Enclose report text in div so feedback text will be displayed underneath it.
|
||||
$report = html_writer::div($report);
|
||||
|
||||
// Format error or warning line
|
||||
if ($errorline) {
|
||||
$messagetype = 'error';
|
||||
$statusclass = 'bg-danger text-white';
|
||||
$feedbackclass = 'alert-danger';
|
||||
} else if ($warningline) {
|
||||
$messagetype = 'warn';
|
||||
$statusclass = 'bg-warning text-dark';
|
||||
$feedbackclass = 'alert-warning';
|
||||
} else {
|
||||
$messagetype = 'ok';
|
||||
$statusclass = 'bg-success text-white';
|
||||
$feedbackclass = 'alert-success';
|
||||
}
|
||||
$status = html_writer::span($status, 'badge ' . $statusclass);
|
||||
// Here we'll store all the feedback found
|
||||
$feedbacktext = '';
|
||||
// Append the feedback if there is some
|
||||
$feedbacktext .= $environment_result->strToReport($environment_result->getFeedbackStr(),
|
||||
"alert {$feedbackclass} px-2 py-1 m-1");
|
||||
$feedbacktext .= $environment_result->strToReport($environment_result->getFeedbackStr(), $messagetype);
|
||||
//Append the bypass if there is some
|
||||
$feedbacktext .= $environment_result->strToReport($environment_result->getBypassStr(),
|
||||
'alert alert-warning px-2 py-1 m-1');
|
||||
$feedbacktext .= $environment_result->strToReport($environment_result->getBypassStr(), 'warn');
|
||||
//Append the restrict if there is some
|
||||
$feedbacktext .= $environment_result->strToReport($environment_result->getRestrictStr(),
|
||||
'alert alert-danger px-2 py-1 m-1');
|
||||
$feedbacktext .= $environment_result->strToReport($environment_result->getRestrictStr(), 'error');
|
||||
|
||||
$report .= $feedbacktext;
|
||||
|
||||
@@ -2279,7 +2218,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
public function moodleorg_registration_message() {
|
||||
$a = new stdClass();
|
||||
$a->moreinformation = '#id_sitestats'; // More information anchor.
|
||||
$a->moodleapp = MOODLE_PRODUCTURL . '/solutions/moodle-app/';
|
||||
$a->moodleapp = HUB_MOODLEORGHUBURL . '/solutions/moodle-app/';
|
||||
$out = format_text(get_string('registerwithmoodleorginfo', 'core_hub', $a), FORMAT_MARKDOWN);
|
||||
|
||||
$out .= html_writer::link(
|
||||
@@ -2328,20 +2267,6 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
return $this->warning($xmlrpcwarning);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a warning about the removal of MoodleNet integration.
|
||||
*
|
||||
* @param string $moodlenetwarning The warning message
|
||||
* @return string HTML to output.
|
||||
*/
|
||||
protected function moodlenet_removal_warning($moodlenetwarning) {
|
||||
if (empty($moodlenetwarning)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $this->warning($moodlenetwarning);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the theme selector list.
|
||||
*
|
||||
|
||||
@@ -263,7 +263,7 @@ if (($action == 'edit') || ($action == 'new')) {
|
||||
$table->colclasses = array('leftalign', 'centeralign', 'centeralign', 'centeralign', 'centeralign', 'centeralign');
|
||||
$table->id = 'repositoriessetting';
|
||||
$table->data = array();
|
||||
$table->attributes['class'] = 'admintable generaltable table table-hover';
|
||||
$table->attributes['class'] = 'admintable generaltable';
|
||||
|
||||
// Get list of used plug-ins
|
||||
$repositorytypes = repository::get_types();
|
||||
|
||||
@@ -179,7 +179,7 @@ echo $OUTPUT->header();
|
||||
<div>
|
||||
<input type="hidden" name="sesskey" value="<?php p(sesskey()); ?>" />
|
||||
|
||||
<table class="generaltable generalbox groupmanagementtable boxaligncenter table table-hover" summary="">
|
||||
<table class="generaltable generalbox groupmanagementtable boxaligncenter" summary="">
|
||||
<tr>
|
||||
<td id='existingcell'>
|
||||
<p>
|
||||
|
||||
@@ -228,7 +228,7 @@ if ($roleid) {
|
||||
<form id="assignform" method="post" action="<?php echo $assignurl ?>"><div>
|
||||
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
|
||||
|
||||
<table id="assigningrole" summary="" class="admintable roleassigntable generaltable table table-hover" cellspacing="0">
|
||||
<table id="assigningrole" summary="" class="admintable roleassigntable generaltable" cellspacing="0">
|
||||
<tr>
|
||||
<td id="existingcell">
|
||||
<p><label for="removeselect"><?php print_string('extusers', 'core_role'); ?></label></p>
|
||||
@@ -322,7 +322,7 @@ if ($roleid) {
|
||||
$table->id = 'assignrole';
|
||||
$table->head = array(get_string('role'), get_string('description'), get_string('userswiththisrole', 'core_role'));
|
||||
$table->colclasses = array('leftalign role', 'leftalign', 'centeralign userrole');
|
||||
$table->attributes['class'] = 'admintable generaltable table table-hover';
|
||||
$table->attributes['class'] = 'admintable generaltable';
|
||||
if ($showroleholders) {
|
||||
$table->headspan = array(1, 1, 2);
|
||||
$table->colclasses[] = 'leftalign roleholder';
|
||||
|
||||
@@ -43,7 +43,7 @@ abstract class core_role_capability_table_base {
|
||||
protected $id;
|
||||
|
||||
/** Added to the class="" attribute on output. */
|
||||
protected $classes = ['rolecap table w-auto table-hover'];
|
||||
protected $classes = array('rolecap table-hover');
|
||||
|
||||
/** Default number of capabilities in the table for the search UI to be shown. */
|
||||
const NUM_CAPS_FOR_SEARCH = 12;
|
||||
|
||||
@@ -544,7 +544,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
|
||||
$options[$type] = get_string('archetype'.$type, 'role');
|
||||
}
|
||||
return html_writer::select($options, 'archetype', $this->role->archetype, false,
|
||||
['class' => 'form-select']);
|
||||
array('class' => 'custom-select'));
|
||||
}
|
||||
|
||||
protected function get_assignable_levels_control() {
|
||||
|
||||
@@ -83,6 +83,8 @@ class role extends base {
|
||||
* @return column[]
|
||||
*/
|
||||
protected function get_all_columns(): array {
|
||||
global $DB;
|
||||
|
||||
$contextalias = $this->get_table_alias('context');
|
||||
$rolealias = $this->get_table_alias('role');
|
||||
|
||||
@@ -95,9 +97,9 @@ class role extends base {
|
||||
->add_joins($this->get_joins())
|
||||
->add_fields("{$rolealias}.name, {$rolealias}.shortname, {$rolealias}.id, {$contextalias}.id AS contextid")
|
||||
->add_fields(context_helper::get_preload_record_columns_sql($contextalias))
|
||||
// The sorting is on name, unless empty then we use shortname.
|
||||
// The sorting is on name, unless empty (determined by single space - thanks Oracle) then we use shortname.
|
||||
->set_is_sortable(true, [
|
||||
"CASE WHEN COALESCE({$rolealias}.name, '') = ''
|
||||
"CASE WHEN " . $DB->sql_concat("{$rolealias}.name", "' '") . " = ' '
|
||||
THEN {$rolealias}.shortname
|
||||
ELSE {$rolealias}.name
|
||||
END",
|
||||
@@ -121,9 +123,9 @@ class role extends base {
|
||||
))
|
||||
->add_joins($this->get_joins())
|
||||
->add_fields("{$rolealias}.name, {$rolealias}.shortname")
|
||||
// The sorting is on name, unless empty then we use shortname.
|
||||
// The sorting is on name, unless empty (determined by single space - thanks Oracle) then we use shortname.
|
||||
->set_is_sortable(true, [
|
||||
"CASE WHEN COALESCE({$rolealias}.name, '') = ''
|
||||
"CASE WHEN " . $DB->sql_concat("{$rolealias}.name", "' '") . " = ' '
|
||||
THEN {$rolealias}.shortname
|
||||
ELSE {$rolealias}.name
|
||||
END",
|
||||
@@ -159,6 +161,10 @@ class role extends base {
|
||||
->set_is_sortable(true);
|
||||
|
||||
// Description column.
|
||||
$descriptionfieldsql = "{$rolealias}.description";
|
||||
if ($DB->get_dbfamily() === 'oracle') {
|
||||
$descriptionfieldsql = $DB->sql_order_by_text($descriptionfieldsql, 1024);
|
||||
}
|
||||
$columns[] = (new column(
|
||||
'description',
|
||||
new lang_string('description'),
|
||||
@@ -166,8 +172,8 @@ class role extends base {
|
||||
))
|
||||
->add_joins($this->get_joins())
|
||||
->set_type(column::TYPE_LONGTEXT)
|
||||
->add_fields("{$rolealias}.description, {$rolealias}.shortname")
|
||||
->set_is_sortable(true)
|
||||
->add_field($descriptionfieldsql, 'description')
|
||||
->add_field("{$rolealias}.shortname")
|
||||
->add_callback(fn(?string $description, stdClass $role) => match ($description) {
|
||||
null => '',
|
||||
default => role_get_description($role),
|
||||
|
||||
@@ -153,7 +153,7 @@ require('managetabs.php');
|
||||
$table = new html_table();
|
||||
$table->colclasses = array('leftalign', 'leftalign', 'leftalign', 'leftalign');
|
||||
$table->id = 'roles';
|
||||
$table->attributes['class'] = 'admintable generaltable table table-hover';
|
||||
$table->attributes['class'] = 'admintable generaltable';
|
||||
$table->head = array(
|
||||
get_string('role') . ' ' . $OUTPUT->help_icon('roles', 'core_role'),
|
||||
get_string('description'),
|
||||
|
||||
@@ -77,7 +77,7 @@ final class provider_test extends provider_testcase {
|
||||
$course = $this->getDataGenerator()->create_course();
|
||||
$course2 = $this->getDataGenerator()->create_course();
|
||||
$coursecat = $this->getDataGenerator()->create_category();
|
||||
$cm = $this->getDataGenerator()->create_module('assign', ['course' => $course->id]);
|
||||
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course->id]);
|
||||
$cmcontext = \context_module::instance($cm->cmid);
|
||||
$page = $this->getDataGenerator()->create_module('page', array('course' => $course->id));
|
||||
$cmcontext2 = \context_module::instance($page->cmid);
|
||||
@@ -125,7 +125,7 @@ final class provider_test extends provider_testcase {
|
||||
$course = $this->getDataGenerator()->create_course();
|
||||
$course2 = $this->getDataGenerator()->create_course();
|
||||
$coursecat = $this->getDataGenerator()->create_category();
|
||||
$cm = $this->getDataGenerator()->create_module('assign', ['course' => $course->id]);
|
||||
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course->id]);
|
||||
$cmcontext = \context_module::instance($cm->cmid);
|
||||
$page = $this->getDataGenerator()->create_module('page', array('course' => $course->id));
|
||||
$cmcontext2 = \context_module::instance($page->cmid);
|
||||
@@ -257,7 +257,7 @@ final class provider_test extends provider_testcase {
|
||||
$coursecat = $this->getDataGenerator()->create_category();
|
||||
$coursecatcontext = \context_coursecat::instance($coursecat->id);
|
||||
$systemcontext = \context_system::instance();
|
||||
$cm = $this->getDataGenerator()->create_module('assign', ['course' => $course->id]);
|
||||
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course->id]);
|
||||
$cmcontext = \context_module::instance($cm->cmid);
|
||||
$student = $DB->get_record('role', array('shortname' => 'student'), '*', MUST_EXIST);
|
||||
$manager = $DB->get_record('role', array('shortname' => 'manager'), '*', MUST_EXIST);
|
||||
@@ -348,7 +348,7 @@ final class provider_test extends provider_testcase {
|
||||
$coursecat = $this->getDataGenerator()->create_category();
|
||||
$coursecatcontext = \context_coursecat::instance($coursecat->id);
|
||||
$systemcontext = \context_system::instance();
|
||||
$cm = $this->getDataGenerator()->create_module('assign', ['course' => $course->id]);
|
||||
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course->id]);
|
||||
$cmcontext = \context_module::instance($cm->cmid);
|
||||
$student = $DB->get_record('role', array('shortname' => 'student'), '*', MUST_EXIST);
|
||||
$manager = $DB->get_record('role', array('shortname' => 'manager'), '*', MUST_EXIST);
|
||||
@@ -499,8 +499,8 @@ final class provider_test extends provider_testcase {
|
||||
// Create course category.
|
||||
$coursecat = $this->getDataGenerator()->create_category();
|
||||
$coursecatcontext = \context_coursecat::instance($coursecat->id);
|
||||
// Create assignment module.
|
||||
$cm = $this->getDataGenerator()->create_module('assign', ['course' => $course1->id]);
|
||||
// Create chat module.
|
||||
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course1->id]);
|
||||
$cmcontext = \context_module::instance($cm->cmid);
|
||||
|
||||
$systemcontext = \context_system::instance();
|
||||
@@ -619,8 +619,8 @@ final class provider_test extends provider_testcase {
|
||||
// Create course category.
|
||||
$coursecat = $this->getDataGenerator()->create_category();
|
||||
$coursecatcontext = \context_coursecat::instance($coursecat->id);
|
||||
// Create assignment module.
|
||||
$cm = $this->getDataGenerator()->create_module('assign', ['course' => $course1->id]);
|
||||
// Create chat module.
|
||||
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course1->id]);
|
||||
$cmcontext = \context_module::instance($cm->cmid);
|
||||
|
||||
$systemcontext = \context_system::instance();
|
||||
|
||||
@@ -149,7 +149,7 @@ final class roles_test extends core_reportbuilder_testcase {
|
||||
], true],
|
||||
'Filter role name (no match)' => ['role:name', [
|
||||
'role:name_operator' => select::EQUAL_TO,
|
||||
'role:name_value' => $DB->get_field('role', 'id', ['shortname' => 'teacher']),
|
||||
'role:name_value' => -1,
|
||||
], false],
|
||||
'Filter role archetype' => ['role:archetype', [
|
||||
'role:archetype_operator' => select::EQUAL_TO,
|
||||
|
||||
+4
-2
@@ -165,8 +165,10 @@ if (empty($SITE->fullname)) {
|
||||
$PAGE->requires->js_call_amd('core_form/changechecker', 'watchFormById', ['adminsettings']);
|
||||
|
||||
if ($settingspage->has_dependencies()) {
|
||||
$context = ['dependencies' => json_encode($settingspage->get_dependencies_for_javascript())];
|
||||
echo $OUTPUT->render_from_template('core_admin/settings_showhide', $context);
|
||||
$opts = [
|
||||
'dependencies' => $settingspage->get_dependencies_for_javascript()
|
||||
];
|
||||
$PAGE->requires->js_call_amd('core/showhidesettings', 'init', [$opts]);
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
+11
-40
@@ -30,33 +30,23 @@ if ($hassiteconfig) {
|
||||
// Add settings page for AI provider settings.
|
||||
$providers = new admin_settingpage('aiprovider', new lang_string('aiproviders', 'ai'));
|
||||
$providers->add(new admin_setting_heading('availableproviders',
|
||||
get_string('availableproviders', 'core_ai'),
|
||||
get_string('availableproviders_desc', 'core_ai')));
|
||||
|
||||
if (!empty(core_plugin_manager::instance()->get_plugins_of_type("aiprovider"))) {
|
||||
// Add call to action to add a new provider.
|
||||
$providers->add(new \core_admin\admin\admin_setting_template_render(
|
||||
name: 'addnewprovider',
|
||||
templatename: 'core_ai/admin_add_provider',
|
||||
context: ['addnewproviderurl' => new moodle_url('/ai/configure.php')]
|
||||
));
|
||||
|
||||
$providers->add(new \core_ai\admin\admin_setting_provider_manager(
|
||||
get_string('availableproviders', 'core_ai'),
|
||||
get_string('availableproviders_desc', 'core_ai')));
|
||||
$providers->add(new \core_admin\admin\admin_setting_plugin_manager(
|
||||
'aiprovider',
|
||||
\core_ai\table\aiprovider_management_table::class,
|
||||
'manageaiproviders',
|
||||
new lang_string('manageaiproviders', 'core_ai'),
|
||||
));
|
||||
} else {
|
||||
$providers->add(new \core_admin\admin\admin_setting_notification(
|
||||
name:'noproviderplugins',
|
||||
notification: get_string('noproviderplugins', 'core_ai'),
|
||||
type: 'danger'
|
||||
));
|
||||
}
|
||||
|
||||
));
|
||||
$ADMIN->add('ai', $providers);
|
||||
|
||||
// Load settings for all AI providers.
|
||||
$plugins = core_plugin_manager::instance()->get_plugins_of_type('aiprovider');
|
||||
foreach ($plugins as $plugin) {
|
||||
/** @var \core\plugininfo\aiprovider $plugin */
|
||||
$plugin->load_settings($ADMIN, 'ai', $hassiteconfig);
|
||||
}
|
||||
|
||||
// Add settings page for AI placement settings.
|
||||
$placements = new admin_settingpage('aiplacement', new lang_string('aiplacements', 'ai'));
|
||||
$placements->add(new admin_setting_heading('availableplacements',
|
||||
@@ -77,22 +67,3 @@ if ($hassiteconfig) {
|
||||
$plugin->load_settings($ADMIN, 'ai', $hassiteconfig);
|
||||
}
|
||||
}
|
||||
|
||||
// AI reports category.
|
||||
$ADMIN->add('reports', new admin_category('aireports', get_string('aireports', 'core_ai')));
|
||||
// Add AI policy acceptance report.
|
||||
$aipolicyacceptance = new admin_externalpage(
|
||||
'aipolicyacceptancereport',
|
||||
get_string('aipolicyacceptance', 'core_ai'),
|
||||
new moodle_url('/ai/policy_acceptance_report.php'),
|
||||
'moodle/ai:viewaipolicyacceptancereport'
|
||||
);
|
||||
$ADMIN->add('aireports', $aipolicyacceptance);
|
||||
// Add AI usage report.
|
||||
$aiusage = new admin_externalpage(
|
||||
'aiusagereport',
|
||||
get_string('aiusage', 'core_ai'),
|
||||
new moodle_url('/ai/usage_report.php'),
|
||||
'moodle/ai:viewaiusagereport',
|
||||
);
|
||||
$ADMIN->add('aireports', $aiusage);
|
||||
|
||||
@@ -69,37 +69,19 @@ if ($hassiteconfig && \core_analytics\manager::is_analytics_enabled()) {
|
||||
$ADMIN->add('analytics', $settings);
|
||||
|
||||
if ($ADMIN->fulltree) {
|
||||
|
||||
|
||||
// Select the site prediction's processor.
|
||||
$predictionprocessors = \core_analytics\manager::get_all_prediction_processors();
|
||||
$predictors = [];
|
||||
$predictors = array();
|
||||
foreach ($predictionprocessors as $fullclassname => $predictor) {
|
||||
$pluginname = substr($fullclassname, 1, strpos($fullclassname, '\\', 1) - 1);
|
||||
$predictors[$fullclassname] = new lang_string('pluginname', $pluginname);
|
||||
}
|
||||
$settings->add(
|
||||
new \core_analytics\admin_setting_predictor(
|
||||
'analytics/predictionsprocessor',
|
||||
new lang_string('defaultpredictionsprocessor', 'analytics'),
|
||||
new lang_string('predictionsprocessor_help', 'analytics'),
|
||||
\core_analytics\manager::default_mlbackend(),
|
||||
$predictors,
|
||||
)
|
||||
$settings->add(new \core_analytics\admin_setting_predictor('analytics/predictionsprocessor',
|
||||
new lang_string('defaultpredictionsprocessor', 'analytics'), new lang_string('predictionsprocessor_help', 'analytics'),
|
||||
\core_analytics\manager::default_mlbackend(), $predictors)
|
||||
);
|
||||
// Warn if current processor is not configured.
|
||||
// We are avoiding doing this check in write_config because it is likely the default
|
||||
// mlbackend_python plugin is not configured and will output warnings during install.
|
||||
$currentprocessor = get_config('analytics', 'predictionsprocessor');
|
||||
if (!empty($currentprocessor)) {
|
||||
$currentprocessor = new $currentprocessor;
|
||||
$currentprocessorisready = $currentprocessor->is_ready();
|
||||
if ($currentprocessorisready !== true) {
|
||||
$settings->add(new admin_setting_description(
|
||||
'processornotready',
|
||||
'',
|
||||
html_writer::tag('div', $currentprocessorisready, ['class' => 'alert alert-danger'])
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
// Log store.
|
||||
$logmanager = get_log_manager();
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
// This file defines settingpages and externalpages under the "appearance" category
|
||||
|
||||
$ADMIN->add('appearance', new admin_category('themes', new lang_string('themesettingscustom', 'admin')));
|
||||
|
||||
$capabilities = array(
|
||||
'moodle/my:configsyspages',
|
||||
'moodle/tag:manage'
|
||||
@@ -332,10 +330,6 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
|
||||
$temp->add(new admin_setting_configcheckbox('logininfoinsecurelayout',
|
||||
new lang_string('logininfoinsecurelayout', 'admin'),
|
||||
new lang_string('logininfoinsecurelayout_desc', 'admin'), 0));
|
||||
// Process primary navigation (custom menu) through Moodle filters.
|
||||
$temp->add(new admin_setting_configcheckbox('navfilter',
|
||||
new lang_string('navfilter', 'admin'),
|
||||
new lang_string('navfilter_desc', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configtextarea('custommenuitems', new lang_string('custommenuitems', 'admin'),
|
||||
new lang_string('configcustommenuitems', 'admin'), '', PARAM_RAW, '50', '10'));
|
||||
$defaultsettingcustomusermenuitems = [
|
||||
@@ -361,6 +355,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
|
||||
new lang_string('themeselector', 'admin'), $CFG->wwwroot . '/admin/themeselector.php'));
|
||||
|
||||
// Settings page for each theme.
|
||||
$ADMIN->add('appearance', new admin_category('themes', new lang_string('themesettingscustom', 'admin')));
|
||||
foreach (core_component::get_plugin_list('theme') as $theme => $themedir) {
|
||||
$settingspath = "$themedir/settings.php";
|
||||
if (file_exists($settingspath)) {
|
||||
|
||||
@@ -65,21 +65,6 @@ if (($hassiteconfig || has_any_capability(array(
|
||||
new lang_string('allowexternalbackpack', 'badges'),
|
||||
new lang_string('allowexternalbackpack_desc', 'badges'), 1));
|
||||
|
||||
$defaultcanvasregions = [
|
||||
'Australia|https://au.badgr.io|https://api.au.badgr.io/v2',
|
||||
'Canada|https://ca.badgr.io|https://api.ca.badgr.io/v2',
|
||||
'Europe|https://eu.badgr.io|https://api.eu.badgr.io/v2',
|
||||
'Singapore|https://sg.badgr.io|https://api.sg.badgr.io/v2',
|
||||
'United States|https://badgr.io|https://api.badgr.io/v2',
|
||||
];
|
||||
$globalsettings->add(new admin_setting_configtextarea(
|
||||
'badges_canvasregions',
|
||||
new lang_string('canvasregions', 'badges'),
|
||||
new lang_string('canvasregions_desc', 'badges'),
|
||||
implode("\n", $defaultcanvasregions),
|
||||
PARAM_RAW,
|
||||
));
|
||||
|
||||
$ADMIN->add('badges', $globalsettings);
|
||||
|
||||
$ADMIN->add('badges',
|
||||
|
||||
+13
-15
@@ -28,22 +28,13 @@ require_once($CFG->libdir . '/pdflib.php');
|
||||
|
||||
use core_admin\local\settings\filesize;
|
||||
|
||||
$ADMIN->add('courses', new admin_category('coursedefaultsettings', new lang_string('defaultsettingscategory', 'course')));
|
||||
$ADMIN->add('courses', new admin_category('groups', new lang_string('groups')));
|
||||
$ADMIN->add('courses', new admin_category('activitychooser', new lang_string('activitychoosercategory', 'course')));
|
||||
$ADMIN->add('courses', new admin_category('backups', new lang_string('backups', 'admin')));
|
||||
|
||||
$capabilities = [
|
||||
$capabilities = array(
|
||||
'moodle/backup:backupcourse',
|
||||
'moodle/category:manage',
|
||||
'moodle/course:create',
|
||||
'moodle/site:approvecourse',
|
||||
'moodle/restore:restorecourse',
|
||||
'moodle/course:manageactivities',
|
||||
'moodle/course:configurecustomfields',
|
||||
'moodle/group:configurecustomfields',
|
||||
'moodle/course:recommendactivity',
|
||||
];
|
||||
'moodle/restore:restorecourse'
|
||||
);
|
||||
if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
// Speedup for non-admins, add all caps used on this page.
|
||||
$ADMIN->add('courses',
|
||||
@@ -113,6 +104,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
}
|
||||
|
||||
// Add a category for the course Default settings.
|
||||
$ADMIN->add('courses', new admin_category('coursedefaultsettings', new lang_string('defaultsettingscategory', 'course')));
|
||||
// Course Default Settings Page.
|
||||
// NOTE: these settings must be applied after all other settings because they depend on them.
|
||||
|
||||
@@ -306,7 +298,8 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
)
|
||||
);
|
||||
|
||||
// Add to the 'Groups' category.
|
||||
// Add a category for the Groups.
|
||||
$ADMIN->add('courses', new admin_category('groups', new lang_string('groups')));
|
||||
$ADMIN->add(
|
||||
'groups',
|
||||
new admin_externalpage(
|
||||
@@ -326,7 +319,8 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
)
|
||||
);
|
||||
|
||||
// Add to the 'Activity Chooser' category.
|
||||
// Add a category for the Activity Chooser.
|
||||
$ADMIN->add('courses', new admin_category('activitychooser', new lang_string('activitychoosercategory', 'course')));
|
||||
$temp = new admin_settingpage('activitychoosersettings', new lang_string('activitychoosersettings', 'course'));
|
||||
// Tab mode for the activity chooser.
|
||||
$temp->add(
|
||||
@@ -378,7 +372,8 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
)
|
||||
);
|
||||
|
||||
// Add to the 'Backups' category.
|
||||
// Add a category for backups.
|
||||
$ADMIN->add('courses', new admin_category('backups', new lang_string('backups','admin')));
|
||||
|
||||
// Create a page for general backups configuration and defaults.
|
||||
$temp = new admin_settingpage('backupgeneralsettings', new lang_string('generalbackdefaults', 'backup'), 'moodle/backup:backupcourse');
|
||||
@@ -420,6 +415,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_userscompletion', new lang_string('generaluserscompletion','backup'), new lang_string('configgeneraluserscompletion','backup'), array('value'=>1, 'locked'=>0)));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_logs', new lang_string('generallogs','backup'), new lang_string('configgenerallogs','backup'), array('value'=>0, 'locked'=>0)));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_histories', new lang_string('generalhistories','backup'), new lang_string('configgeneralhistories','backup'), array('value'=>0, 'locked'=>0)));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_questionbank', new lang_string('generalquestionbank','backup'), new lang_string('configgeneralquestionbank','backup'), array('value'=>1, 'locked'=>0)));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_groups',
|
||||
new lang_string('generalgroups', 'backup'), new lang_string('configgeneralgroups', 'backup'),
|
||||
array('value' => 1, 'locked' => 0)));
|
||||
@@ -470,6 +466,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
['value' => 0, 'locked' => 0],
|
||||
));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_calendarevents', new lang_string('generalcalendarevents','backup'), new lang_string('configgeneralcalendarevents','backup'), array('value'=>1, 'locked'=>0)));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_questionbank', new lang_string('generalquestionbank','backup'), new lang_string('configgeneralquestionbank','backup'), array('value'=>1, 'locked'=>0)));
|
||||
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_groups',
|
||||
new lang_string('generalgroups', 'backup'), new lang_string('configgeneralgroups', 'backup'),
|
||||
array('value' => 1, 'locked' => 0)));
|
||||
@@ -605,6 +602,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_userscompletion', new lang_string('generaluserscompletion','backup'), new lang_string('configgeneraluserscompletion','backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_logs', new lang_string('generallogs', 'backup'), new lang_string('configgenerallogs', 'backup'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_histories', new lang_string('generalhistories','backup'), new lang_string('configgeneralhistories','backup'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_questionbank', new lang_string('generalquestionbank','backup'), new lang_string('configgeneralquestionbank','backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_groups', new lang_string('generalgroups', 'backup'),
|
||||
new lang_string('configgeneralgroups', 'backup'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_competencies', new lang_string('generalcompetencies','backup'), new lang_string('configgeneralcompetencies','backup'), 1));
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
// * Miscellaneous settings
|
||||
|
||||
// Experimental settings page.
|
||||
$ADMIN->add('development', new admin_category('experimental', new lang_string('experimental', 'admin')));
|
||||
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
|
||||
if ($hassiteconfig) { // Speedup for non-admins, add all caps used on this page.
|
||||
// Experimental settings page
|
||||
$ADMIN->add('development', new admin_category('experimental', new lang_string('experimental','admin')));
|
||||
|
||||
$temp = new admin_settingpage('experimentalsettings', new lang_string('experimentalsettings', 'admin'));
|
||||
//TODO: Re-enable cc-import once re-implemented in 2.0.x
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
if (!$ADMIN->locate('file_redactor')) {
|
||||
$ADMIN->add('server', new admin_category('file_redactor', get_string('redactor', 'core_files')));
|
||||
}
|
||||
if ($hassiteconfig) {
|
||||
if (!$ADMIN->locate('file_redactor')) {
|
||||
$ADMIN->add('server', new admin_category('file_redactor', get_string('redactor', 'core_files')));
|
||||
}
|
||||
|
||||
$manager = \core\di::get(\core_files\redactor\manager::class);
|
||||
|
||||
|
||||
@@ -2,13 +2,6 @@
|
||||
|
||||
// This file defines settingpages and externalpages under the "grades" section
|
||||
|
||||
use core\plugininfo\gradepenalty;
|
||||
|
||||
$ADMIN->add('grades', new admin_category('gradereports', new lang_string('reportsettings', 'grades')));
|
||||
$ADMIN->add('grades', new admin_category('gradeimports', new lang_string('importsettings', 'grades')));
|
||||
$ADMIN->add('grades', new admin_category('gradeexports', new lang_string('exportsettings', 'grades')));
|
||||
$ADMIN->add('grades', new admin_category('gradepenalty', new lang_string('gradepenalty', 'grades')));
|
||||
|
||||
if (has_capability('moodle/grade:manage', $systemcontext)
|
||||
or has_capability('moodle/grade:manageletters', $systemcontext)) { // speedup for non-admins, add all caps used on this page
|
||||
|
||||
@@ -98,7 +91,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
|
||||
$temp->add(new admin_setting_my_grades_report());
|
||||
|
||||
$temp->add(new admin_setting_configtext('gradereport_mygradeurl', new lang_string('externalurl', 'grades'),
|
||||
new lang_string('externalurl_desc', 'grades'), ''));
|
||||
new lang_string('externalurl_desc', 'grades'), ''));
|
||||
}
|
||||
$ADMIN->add('grades', $temp);
|
||||
|
||||
@@ -188,6 +181,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
|
||||
// The plugins must implement a settings.php file that adds their admin settings to the $settings object
|
||||
|
||||
// Reports
|
||||
$ADMIN->add('grades', new admin_category('gradereports', new lang_string('reportsettings', 'grades')));
|
||||
foreach (core_component::get_plugin_list('gradereport') as $plugin => $plugindir) {
|
||||
// Include all the settings commands for this plugin if there are any
|
||||
if (file_exists($plugindir.'/settings.php')) {
|
||||
@@ -200,6 +194,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
|
||||
}
|
||||
|
||||
// Imports
|
||||
$ADMIN->add('grades', new admin_category('gradeimports', new lang_string('importsettings', 'grades')));
|
||||
foreach (core_component::get_plugin_list('gradeimport') as $plugin => $plugindir) {
|
||||
|
||||
// Include all the settings commands for this plugin if there are any
|
||||
@@ -214,6 +209,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
|
||||
|
||||
|
||||
// Exports
|
||||
$ADMIN->add('grades', new admin_category('gradeexports', new lang_string('exportsettings', 'grades')));
|
||||
foreach (core_component::get_plugin_list('gradeexport') as $plugin => $plugindir) {
|
||||
// Include all the settings commands for this plugin if there are any
|
||||
if (file_exists($plugindir.'/settings.php')) {
|
||||
@@ -225,42 +221,5 @@ if (has_capability('moodle/grade:manage', $systemcontext)
|
||||
}
|
||||
}
|
||||
|
||||
// Penalty.
|
||||
|
||||
// Supported modules.
|
||||
$modules = core_grades\penalty_manager::get_supported_modules();
|
||||
if (!empty($modules)) {
|
||||
$temp = new admin_settingpage('supportedplugins', new lang_string('gradepenalty_supportedplugins', 'grades'),
|
||||
'moodle/grade:manage');
|
||||
|
||||
$options = [];
|
||||
foreach ($modules as $module) {
|
||||
$options[$module] = new lang_string('modulename', $module);
|
||||
}
|
||||
$temp->add(new admin_setting_configmultiselect('gradepenalty_enabledmodules',
|
||||
new lang_string('gradepenalty_enabledmodules', 'grades'),
|
||||
new lang_string('gradepenalty_enabledmodules_help', 'grades'), [], $options));
|
||||
|
||||
$ADMIN->add('gradepenalty', $temp);
|
||||
}
|
||||
|
||||
// External page to manage the penalty plugins.
|
||||
$temp = new admin_externalpage(
|
||||
'managepenaltyplugins',
|
||||
get_string('managepenaltyplugins', 'grades'),
|
||||
new moodle_url('/grade/penalty/manage_penalty_plugins.php'),
|
||||
'moodle/grade:manage'
|
||||
);
|
||||
$ADMIN->add('gradepenalty', $temp);
|
||||
|
||||
// Settings from each penalty plugin.
|
||||
foreach (core_component::get_plugin_list('gradepenalty') as $plugin => $plugindir) {
|
||||
// Check if the plugin is enabled.
|
||||
if (gradepenalty::is_plugin_enabled($plugin)) {
|
||||
// Include all the settings commands for this plugin if there are any.
|
||||
if (file_exists($plugindir . '/settings.php')) {
|
||||
include($plugindir . '/settings.php');
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end of speedup
|
||||
|
||||
|
||||
@@ -70,14 +70,6 @@ if ($hassiteconfig) {
|
||||
|
||||
$temp->add(new admin_setting_configtext('googlemapkey3', new lang_string('googlemapkey3', 'core_admin'),
|
||||
new lang_string('googlemapkey3_help', 'core_admin'), '', PARAM_RAW, 60));
|
||||
|
||||
$temp->add(new admin_setting_configtext(
|
||||
'geopluginapikey',
|
||||
new lang_string('geopluginapikey', 'core_admin'),
|
||||
new lang_string('geopluginapikey_desc', 'core_admin'),
|
||||
'',
|
||||
PARAM_TEXT,
|
||||
));
|
||||
}
|
||||
|
||||
$ADMIN->add('location', $temp);
|
||||
|
||||
@@ -39,6 +39,9 @@ if (isset($CFG->mnet_dispatcher_mode) and $CFG->mnet_dispatcher_mode !== 'off')
|
||||
$ADMIN->add('mnet', new admin_externalpage('ssoaccesscontrol', new lang_string('ssoaccesscontrol', 'mnet'),
|
||||
"$CFG->wwwroot/$CFG->admin/mnet/access_control.php",
|
||||
'moodle/site:config'));
|
||||
$ADMIN->add('mnet', new admin_externalpage('mnetenrol', new lang_string('clientname', 'mnetservice_enrol'),
|
||||
"$CFG->wwwroot/mnet/service/enrol/index.php",
|
||||
'moodle/site:config'));
|
||||
$ADMIN->add('mnet', new admin_externalpage('trustedhosts', new lang_string('trustedhosts', 'mnet'),
|
||||
"$CFG->wwwroot/$CFG->admin/mnet/trustedhosts.php",
|
||||
'moodle/site:config'));
|
||||
|
||||
+42
-34
@@ -24,40 +24,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$ADMIN->add('modules', new admin_category('modsettings', new lang_string('activitymodules')));
|
||||
$ADMIN->add('modules', new admin_category('formatsettings', new lang_string('courseformats')));
|
||||
$ADMIN->add('modules', new admin_category('customfieldsettings', new lang_string('customfields', 'core_customfield')));
|
||||
$ADMIN->add('modules', new admin_category('blocksettings', new lang_string('blocks')));
|
||||
$ADMIN->add('modules', new admin_category('authsettings', new lang_string('authentication', 'admin')));
|
||||
$ADMIN->add('modules', new admin_category('enrolments', new lang_string('enrolments', 'enrol')));
|
||||
$ADMIN->add('modules', new admin_category('editorsettings', new lang_string('editors', 'editor')));
|
||||
$ADMIN->add('modules', new admin_category('antivirussettings', new lang_string('antiviruses', 'antivirus')));
|
||||
$ADMIN->add('modules', new admin_category('mlbackendsettings', new lang_string('mlbackendsettings', 'admin')));
|
||||
$ADMIN->add('modules', new admin_category('filtersettings', new lang_string('managefilters')));
|
||||
$ADMIN->add('modules', new admin_category('mediaplayers', new lang_string('type_media_plural', 'plugin')));
|
||||
$ADMIN->add('modules', new admin_category('fileconverterplugins', new lang_string('type_fileconverter_plural', 'plugin')));
|
||||
$ADMIN->add('modules', new admin_category('paymentgateways', new lang_string('type_paygw_plural', 'plugin')));
|
||||
$ADMIN->add('modules', new admin_category('dataformatsettings', new lang_string('dataformats')));
|
||||
$ADMIN->add('modules', new admin_category('portfoliosettings', new lang_string('portfolios', 'portfolio'),
|
||||
empty($CFG->enableportfolios)));
|
||||
$ADMIN->add('modules', new admin_category('repositorysettings', new lang_string('repositories', 'repository')));
|
||||
$ADMIN->add('modules', new admin_category('qbanksettings', new lang_string('type_qbank_plural', 'plugin')));
|
||||
$ADMIN->add('modules', new admin_category('qbehavioursettings', new lang_string('questionbehaviours', 'admin')));
|
||||
$ADMIN->add('modules', new admin_category('qtypesettings', new lang_string('questiontypes', 'admin')));
|
||||
$ADMIN->add('modules', new admin_category('plagiarism', new lang_string('plagiarism', 'plagiarism')));
|
||||
$ADMIN->add('modules', new admin_category('coursereports', new lang_string('coursereports')));
|
||||
$ADMIN->add('modules', new admin_category('reportplugins', new lang_string('reports')));
|
||||
$ADMIN->add('modules', new admin_category('searchplugins', new lang_string('search', 'admin')));
|
||||
$ADMIN->add('modules', new admin_category('tools', new lang_string('tools', 'admin')));
|
||||
$ADMIN->add('modules', new admin_category('cache', new lang_string('caching', 'cache')));
|
||||
$ADMIN->add('cache', new admin_category('cachestores', new lang_string('cachestores', 'cache')));
|
||||
$ADMIN->add('modules', new admin_category('calendartype', new lang_string('calendartypes', 'calendar')));
|
||||
$ADMIN->add('modules', new admin_category('communicationsettings', new lang_string('communication', 'core_communication')));
|
||||
$ADMIN->add('modules', new admin_category('sms', new lang_string('sms', 'core_sms')));
|
||||
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
|
||||
$ADMIN->add('modules', new admin_category('localplugins', new lang_string('localplugins')));
|
||||
|
||||
|
||||
if ($hassiteconfig) {
|
||||
/* @var admin_root $ADMIN */
|
||||
$ADMIN->locate('modules')->set_sorting(true);
|
||||
@@ -65,6 +31,7 @@ if ($hassiteconfig) {
|
||||
$ADMIN->add('modules', new admin_page_pluginsoverview());
|
||||
|
||||
// activity modules
|
||||
$ADMIN->add('modules', new admin_category('modsettings', new lang_string('activitymodules')));
|
||||
|
||||
$ADMIN->add('modsettings', new admin_page_managemods());
|
||||
|
||||
@@ -81,6 +48,7 @@ if ($hassiteconfig) {
|
||||
}
|
||||
|
||||
// course formats
|
||||
$ADMIN->add('modules', new admin_category('formatsettings', new lang_string('courseformats')));
|
||||
$temp = new admin_settingpage('manageformats', new lang_string('manageformats', 'core_admin'));
|
||||
$temp->add(new admin_setting_manageformats());
|
||||
$ADMIN->add('formatsettings', $temp);
|
||||
@@ -92,6 +60,7 @@ if ($hassiteconfig) {
|
||||
}
|
||||
|
||||
// Custom fields.
|
||||
$ADMIN->add('modules', new admin_category('customfieldsettings', new lang_string('customfields', 'core_customfield')));
|
||||
$temp = new admin_settingpage('managecustomfields', new lang_string('managecustomfields', 'core_admin'));
|
||||
$temp->add(new admin_setting_managecustomfields());
|
||||
$ADMIN->add('customfieldsettings', $temp);
|
||||
@@ -103,6 +72,7 @@ if ($hassiteconfig) {
|
||||
}
|
||||
|
||||
// blocks
|
||||
$ADMIN->add('modules', new admin_category('blocksettings', new lang_string('blocks')));
|
||||
$ADMIN->add('blocksettings', new admin_page_manageblocks());
|
||||
$plugins = core_plugin_manager::instance()->get_plugins_of_type('block');
|
||||
core_collator::asort_objects_by_property($plugins, 'displayname');
|
||||
@@ -112,6 +82,8 @@ if ($hassiteconfig) {
|
||||
}
|
||||
|
||||
// authentication plugins
|
||||
$ADMIN->add('modules', new admin_category('authsettings', new lang_string('authentication', 'admin')));
|
||||
|
||||
$temp = new admin_settingpage('manageauths', new lang_string('authsettings', 'admin'));
|
||||
$temp->add(new admin_setting_manageauths());
|
||||
$temp->add(new admin_setting_heading('manageauthscommonheading', new lang_string('commonsettings', 'admin'), ''));
|
||||
@@ -188,6 +160,7 @@ if ($hassiteconfig) {
|
||||
}
|
||||
|
||||
// Enrolment plugins
|
||||
$ADMIN->add('modules', new admin_category('enrolments', new lang_string('enrolments', 'enrol')));
|
||||
$temp = new admin_settingpage('manageenrols', new lang_string('manageenrols', 'enrol'));
|
||||
$temp->add(new admin_setting_manageenrols());
|
||||
$ADMIN->add('enrolments', $temp);
|
||||
@@ -204,6 +177,7 @@ if ($hassiteconfig) {
|
||||
|
||||
|
||||
/// Editor plugins
|
||||
$ADMIN->add('modules', new admin_category('editorsettings', new lang_string('editors', 'editor')));
|
||||
$temp = new admin_settingpage('manageeditors', new lang_string('editorsettings', 'editor'));
|
||||
$temp->add(new \core_admin\admin\admin_setting_plugin_manager(
|
||||
'editor',
|
||||
@@ -220,6 +194,7 @@ if ($hassiteconfig) {
|
||||
}
|
||||
|
||||
// Antivirus plugins.
|
||||
$ADMIN->add('modules', new admin_category('antivirussettings', new lang_string('antiviruses', 'antivirus')));
|
||||
$temp = new admin_settingpage('manageantiviruses', new lang_string('antivirussettings', 'antivirus'));
|
||||
$temp->add(new admin_setting_manageantiviruses());
|
||||
|
||||
@@ -291,12 +266,14 @@ if ($hassiteconfig) {
|
||||
}
|
||||
|
||||
// Machine learning backend plugins.
|
||||
$ADMIN->add('modules', new admin_category('mlbackendsettings', new lang_string('mlbackendsettings', 'admin')));
|
||||
$plugins = core_plugin_manager::instance()->get_plugins_of_type('mlbackend');
|
||||
foreach ($plugins as $plugin) {
|
||||
$plugin->load_settings($ADMIN, 'mlbackendsettings', $hassiteconfig);
|
||||
}
|
||||
|
||||
/// Filter plugins
|
||||
$ADMIN->add('modules', new admin_category('filtersettings', new lang_string('managefilters')));
|
||||
|
||||
$ADMIN->add('filtersettings', new admin_page_managefilters());
|
||||
|
||||
@@ -326,6 +303,7 @@ if ($hassiteconfig) {
|
||||
}
|
||||
|
||||
// Media players.
|
||||
$ADMIN->add('modules', new admin_category('mediaplayers', new lang_string('type_media_plural', 'plugin')));
|
||||
$temp = new admin_settingpage('managemediaplayers', new lang_string('managemediaplayers', 'media'));
|
||||
$temp->add(new admin_setting_heading('mediaformats', get_string('mediaformats', 'core_media'),
|
||||
format_text(get_string('mediaformats_desc', 'core_media'), FORMAT_MARKDOWN)));
|
||||
@@ -345,6 +323,7 @@ if ($hassiteconfig) {
|
||||
$ADMIN->add('mediaplayers', $temp);
|
||||
|
||||
// Convert plugins.
|
||||
$ADMIN->add('modules', new admin_category('fileconverterplugins', new lang_string('type_fileconverter_plural', 'plugin')));
|
||||
$temp = new admin_settingpage('managefileconverterplugins', new lang_string('type_fileconvertermanage', 'plugin'));
|
||||
$temp->add(new admin_setting_manage_fileconverter_plugins());
|
||||
$ADMIN->add('fileconverterplugins', $temp);
|
||||
@@ -364,6 +343,7 @@ if ($hassiteconfig) {
|
||||
}
|
||||
|
||||
// Payment gateway plugins.
|
||||
$ADMIN->add('modules', new admin_category('paymentgateways', new lang_string('type_paygw_plural', 'plugin')));
|
||||
$temp = new admin_settingpage('managepaymentgateways', new lang_string('type_paygwmanage', 'plugin'));
|
||||
$temp->add(new \core_admin\local\settings\manage_payment_gateway_plugins());
|
||||
$temp->add(new admin_setting_description(
|
||||
@@ -382,6 +362,7 @@ if ($hassiteconfig) {
|
||||
}
|
||||
|
||||
// Data format settings.
|
||||
$ADMIN->add('modules', new admin_category('dataformatsettings', new lang_string('dataformats')));
|
||||
$temp = new admin_settingpage('managedataformats', new lang_string('managedataformats'));
|
||||
$temp->add(new admin_setting_managedataformats());
|
||||
$ADMIN->add('dataformatsettings', $temp);
|
||||
@@ -395,9 +376,12 @@ if ($hassiteconfig) {
|
||||
|
||||
//== Portfolio settings ==
|
||||
require_once($CFG->libdir. '/portfoliolib.php');
|
||||
$catname = new lang_string('portfolios', 'portfolio');
|
||||
$manage = new lang_string('manageportfolios', 'portfolio');
|
||||
$url = "$CFG->wwwroot/$CFG->admin/portfolio.php";
|
||||
|
||||
$ADMIN->add('modules', new admin_category('portfoliosettings', $catname, empty($CFG->enableportfolios)));
|
||||
|
||||
// Add manage page (with table)
|
||||
$temp = new admin_page_manageportfolios();
|
||||
$ADMIN->add('portfoliosettings', $temp);
|
||||
@@ -451,8 +435,10 @@ if ($hassiteconfig) {
|
||||
|
||||
// repository setting
|
||||
require_once("$CFG->dirroot/repository/lib.php");
|
||||
$catname =new lang_string('repositories', 'repository');
|
||||
$managerepo = new lang_string('manage', 'repository');
|
||||
$url = $CFG->wwwroot.'/'.$CFG->admin.'/repository.php';
|
||||
$ADMIN->add('modules', new admin_category('repositorysettings', $catname));
|
||||
|
||||
// Add main page (with table)
|
||||
$temp = new admin_page_managerepositories();
|
||||
@@ -488,6 +474,8 @@ if ($hassiteconfig) {
|
||||
|
||||
// Question bank settings.
|
||||
if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
|
||||
$ADMIN->add('modules', new admin_category('qbanksettings',
|
||||
new lang_string('type_qbank_plural', 'plugin')));
|
||||
$temp = new admin_settingpage('manageqbanks', new lang_string('manageqbanks', 'admin'));
|
||||
$temp->add(new \core_question\admin\manage_qbank_plugins_page());
|
||||
$ADMIN->add('qbanksettings', $temp);
|
||||
@@ -503,9 +491,11 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
|
||||
if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
|
||||
|
||||
// Question behaviour settings.
|
||||
$ADMIN->add('modules', new admin_category('qbehavioursettings', new lang_string('questionbehaviours', 'admin')));
|
||||
$ADMIN->add('qbehavioursettings', new admin_page_manageqbehaviours());
|
||||
|
||||
// Question type settings.
|
||||
$ADMIN->add('modules', new admin_category('qtypesettings', new lang_string('questiontypes', 'admin')));
|
||||
$ADMIN->add('qtypesettings', new admin_page_manageqtypes());
|
||||
|
||||
// Question preview defaults.
|
||||
@@ -577,6 +567,7 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
|
||||
|
||||
// Plagiarism plugin settings
|
||||
if ($hassiteconfig && !empty($CFG->enableplagiarism)) {
|
||||
$ADMIN->add('modules', new admin_category('plagiarism', new lang_string('plagiarism', 'plagiarism')));
|
||||
$ADMIN->add('plagiarism', new admin_externalpage('manageplagiarismplugins', new lang_string('manageplagiarism', 'plagiarism'),
|
||||
$CFG->wwwroot . '/' . $CFG->admin . '/plagiarism.php'));
|
||||
|
||||
@@ -608,6 +599,7 @@ if ($hassiteconfig) {
|
||||
}
|
||||
}
|
||||
if (!empty($pages)) {
|
||||
$ADMIN->add('modules', new admin_category('coursereports', new lang_string('coursereports')));
|
||||
core_collator::asort_objects_by_property($pages, 'visiblename');
|
||||
foreach ($pages as $page) {
|
||||
$ADMIN->add('coursereports', $page);
|
||||
@@ -629,6 +621,7 @@ foreach (core_component::get_plugin_list('report') as $report => $plugindir) {
|
||||
}
|
||||
}
|
||||
}
|
||||
$ADMIN->add('modules', new admin_category('reportplugins', new lang_string('reports')));
|
||||
$ADMIN->add('reportplugins', new admin_externalpage('managereports', new lang_string('reportsmanage', 'admin'),
|
||||
$CFG->wwwroot . '/' . $CFG->admin . '/reports.php'));
|
||||
core_collator::asort_objects_by_property($pages, 'visiblename');
|
||||
@@ -638,6 +631,7 @@ foreach ($pages as $page) {
|
||||
|
||||
if ($hassiteconfig) {
|
||||
// Global Search engine plugins.
|
||||
$ADMIN->add('modules', new admin_category('searchplugins', new lang_string('search', 'admin')));
|
||||
$temp = new admin_settingpage('manageglobalsearch', new lang_string('globalsearchmanage', 'admin'));
|
||||
|
||||
$pages = array();
|
||||
@@ -779,6 +773,7 @@ if ($hassiteconfig) {
|
||||
|
||||
/// Add all admin tools
|
||||
if ($hassiteconfig) {
|
||||
$ADMIN->add('modules', new admin_category('tools', new lang_string('tools', 'admin')));
|
||||
$settingspage = new admin_settingpage('toolsmanagement', new lang_string('toolsmanage', 'admin'));
|
||||
$ADMIN->add('tools', $settingspage);
|
||||
$settingspage->add(new \core_admin\admin\admin_setting_plugin_manager(
|
||||
@@ -799,10 +794,12 @@ foreach ($plugins as $plugin) {
|
||||
|
||||
// Now add the Cache plugins
|
||||
if ($hassiteconfig) {
|
||||
$ADMIN->add('modules', new admin_category('cache', new lang_string('caching', 'cache')));
|
||||
$ADMIN->add('cache', new admin_externalpage('cacheconfig', new lang_string('cacheconfig', 'cache'), $CFG->wwwroot .'/cache/admin.php'));
|
||||
$ADMIN->add('cache', new admin_externalpage('cachetestperformance', new lang_string('testperformance', 'cache'), $CFG->wwwroot . '/cache/testperformance.php'));
|
||||
$ADMIN->add('cache', new admin_externalpage('cacheusage',
|
||||
new lang_string('cacheusage', 'cache'), $CFG->wwwroot . '/cache/usage.php'));
|
||||
$ADMIN->add('cache', new admin_category('cachestores', new lang_string('cachestores', 'cache')));
|
||||
$ADMIN->locate('cachestores')->set_sorting(true);
|
||||
foreach (core_component::get_plugin_list('cachestore') as $plugin => $path) {
|
||||
$settingspath = $path.'/settings.php';
|
||||
@@ -816,6 +813,7 @@ if ($hassiteconfig) {
|
||||
|
||||
// Add Calendar type settings.
|
||||
if ($hassiteconfig) {
|
||||
$ADMIN->add('modules', new admin_category('calendartype', new lang_string('calendartypes', 'calendar')));
|
||||
$plugins = core_plugin_manager::instance()->get_plugins_of_type('calendartype');
|
||||
core_collator::asort_objects_by_property($plugins, 'displayname');
|
||||
foreach ($plugins as $plugin) {
|
||||
@@ -826,6 +824,7 @@ if ($hassiteconfig) {
|
||||
|
||||
// Communication plugins.
|
||||
if ($hassiteconfig && core_communication\api::is_available()) {
|
||||
$ADMIN->add('modules', new admin_category('communicationsettings', new lang_string('communication', 'core_communication')));
|
||||
$temp = new admin_settingpage('managecommunicationproviders',
|
||||
new lang_string('managecommunicationproviders', 'core_communication'));
|
||||
$temp->add(new \core_communication\admin\manage_communication_providers_page());
|
||||
@@ -839,6 +838,13 @@ if ($hassiteconfig && core_communication\api::is_available()) {
|
||||
|
||||
// SMS plugins.
|
||||
if ($hassiteconfig) {
|
||||
$ADMIN->add(
|
||||
'modules',
|
||||
new admin_category(
|
||||
'sms',
|
||||
new lang_string('sms', 'core_sms'),
|
||||
),
|
||||
);
|
||||
$ADMIN->add(
|
||||
'sms',
|
||||
new admin_externalpage(
|
||||
@@ -863,6 +869,7 @@ if ($hassiteconfig) {
|
||||
|
||||
// Content bank content types.
|
||||
if ($hassiteconfig) {
|
||||
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
|
||||
$temp = new admin_settingpage('managecontentbanktypes', new lang_string('managecontentbanktypes'));
|
||||
$temp->add(new admin_setting_managecontentbankcontenttypes());
|
||||
$ADMIN->add('contentbanksettings', $temp);
|
||||
@@ -881,6 +888,7 @@ if ($hassiteconfig) {
|
||||
|
||||
/// Add all local plugins - must be always last!
|
||||
if ($hassiteconfig) {
|
||||
$ADMIN->add('modules', new admin_category('localplugins', new lang_string('localplugins')));
|
||||
$ADMIN->add('localplugins', new admin_externalpage('managelocalplugins', new lang_string('localpluginsmanage'),
|
||||
$CFG->wwwroot . '/' . $CFG->admin . '/localplugins.php'));
|
||||
}
|
||||
|
||||
@@ -64,15 +64,3 @@ $settings->add(new admin_setting_configcheckbox(
|
||||
new lang_string('customreportsliveediting_desc', 'core_reportbuilder'), 1));
|
||||
|
||||
$ADMIN->add('reportbuilder', $settings);
|
||||
|
||||
$ADMIN->add(
|
||||
'reportbuilder', new accesscallback(
|
||||
'reportbuildercustomfields',
|
||||
get_string('reportbuildercustomfields', 'core_reportbuilder'),
|
||||
(new moodle_url('/reportbuilder/customfield.php'))->out(),
|
||||
static function(): bool {
|
||||
return has_capability('moodle/reportbuilder:configurecustomfields', context_system::instance());
|
||||
},
|
||||
empty($CFG->enablecustomreports)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -147,7 +147,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
$sensiblesettingsdefault .= 'secretphrase@@url, cronremotepassword@@none, smtpuser@@none, ';
|
||||
$sensiblesettingsdefault .= 'smtppass@@none, proxypassword@@none, quizpassword@@quiz, allowedip@@none, blockedip@@none, ';
|
||||
$sensiblesettingsdefault .= 'dbpass@@logstore_database, messageinbound_hostpass@@none, ';
|
||||
$sensiblesettingsdefault .= 'pass@@auth_db, bind_pw@@auth_ldap, ';
|
||||
$sensiblesettingsdefault .= 'bind_pw@@auth_cas, pass@@auth_db, bind_pw@@auth_ldap, ';
|
||||
$sensiblesettingsdefault .= 'dbpass@@enrol_database, bind_pw@@enrol_ldap, ';
|
||||
$sensiblesettingsdefault .= 'server_password@@search_solr, ssl_keypassword@@search_solr, ';
|
||||
$sensiblesettingsdefault .= 'alternateserver_password@@search_solr, alternatessl_keypassword@@search_solr, ';
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$ADMIN->add('server', new admin_category('taskconfig', new lang_string('taskadmintitle', 'admin')));
|
||||
$ADMIN->add('server', new admin_category('email', new lang_string('categoryemail', 'admin')));
|
||||
$ADMIN->add('server', new admin_category('webservicesettings', new lang_string('webservices', 'webservice')));
|
||||
|
||||
if ($hassiteconfig) {
|
||||
// System paths.
|
||||
$temp = new admin_settingpage('systempaths', new lang_string('systempaths', 'admin'));
|
||||
@@ -337,6 +333,7 @@ if ($hassiteconfig) {
|
||||
$ADMIN->add('server', $temp);
|
||||
|
||||
// Tasks.
|
||||
$ADMIN->add('server', new admin_category('taskconfig', new lang_string('taskadmintitle', 'admin')));
|
||||
|
||||
// Task processing.
|
||||
$temp = new admin_settingpage('taskprocessing', new lang_string('taskprocessing', 'admin'));
|
||||
@@ -470,6 +467,7 @@ if ($hassiteconfig) {
|
||||
}
|
||||
|
||||
// Email.
|
||||
$ADMIN->add('server', new admin_category('email', new lang_string('categoryemail', 'admin')));
|
||||
|
||||
// Outgoing mail configuration.
|
||||
$temp = new admin_settingpage('outgoingmailconfig', new lang_string('outgoingmailconfig', 'admin'));
|
||||
@@ -641,6 +639,7 @@ if ($hassiteconfig) {
|
||||
}
|
||||
|
||||
// Web services.
|
||||
$ADMIN->add('server', new admin_category('webservicesettings', new lang_string('webservices', 'webservice')));
|
||||
|
||||
// Web services > Overview.
|
||||
$temp = new admin_settingpage('webservicesoverview', new lang_string('webservicesoverview', 'webservice'));
|
||||
|
||||
@@ -46,9 +46,9 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
|
||||
$optionalsubsystems->add(new admin_setting_configcheckbox('allowstealth', new lang_string('allowstealthmodules'),
|
||||
new lang_string('allowstealthmodules_help'), 0, 1, 0));
|
||||
// TODO: Analytics is now disable on new installs until MDL-84481 overcomes the config of mlbackend_python.
|
||||
|
||||
$optionalsubsystems->add(new admin_setting_configcheckbox('enableanalytics', new lang_string('enableanalytics', 'admin'),
|
||||
new lang_string('configenableanalytics', 'admin'), 0, 1, 0));
|
||||
new lang_string('configenableanalytics', 'admin'), 1, 1, 0));
|
||||
|
||||
$optionalsubsystems->add(new admin_setting_configcheckbox('core_competency/enabled',
|
||||
new lang_string('enablecompetencies', 'core_competency'),
|
||||
|
||||
@@ -6,20 +6,14 @@ $ADMIN->add('users', new admin_category('accounts', new lang_string('accounts',
|
||||
$ADMIN->add('users', new admin_category('roles', new lang_string('permissions', 'role')));
|
||||
$ADMIN->add('users', new admin_category('privacy', new lang_string('privacyandpolicies', 'admin')));
|
||||
|
||||
$capabilities = [
|
||||
'moodle/user:create',
|
||||
'moodle/user:update',
|
||||
'moodle/user:delete',
|
||||
'moodle/role:manage',
|
||||
'moodle/role:assign',
|
||||
'moodle/cohort:manage',
|
||||
'moodle/cohort:view',
|
||||
'moodle/cohort:configurecustomfields',
|
||||
'moodle/role:safeoverride',
|
||||
'moodle/role:override',
|
||||
];
|
||||
|
||||
if ($hassiteconfig || has_any_capability($capabilities, $systemcontext)) { // Speedup for non-admins, all caps used on this page.
|
||||
if ($hassiteconfig
|
||||
or has_capability('moodle/user:create', $systemcontext)
|
||||
or has_capability('moodle/user:update', $systemcontext)
|
||||
or has_capability('moodle/user:delete', $systemcontext)
|
||||
or has_capability('moodle/role:manage', $systemcontext)
|
||||
or has_capability('moodle/role:assign', $systemcontext)
|
||||
or has_capability('moodle/cohort:manage', $systemcontext)
|
||||
or has_capability('moodle/cohort:view', $systemcontext)) { // Speedup for non-admins, add all caps used on this page.
|
||||
|
||||
|
||||
// Stuff under the "accounts" subcategory.
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
<div class="simplesearchform d-flex justify-content-end">
|
||||
<form autocomplete="off" action="{{action}}" method="get" accept-charset="utf-8" class="mform d-flex flex-wrap align-items-center simplesearchform">
|
||||
<div class="input-group">
|
||||
<label for="searchinput-{{uniqid}}">
|
||||
<span class="sr-only">{{#str}} search, core {{/str}}</span>
|
||||
</label>
|
||||
<input type="text"
|
||||
id="searchinput-{{uniqid}}"
|
||||
class="form-control"
|
||||
@@ -38,13 +41,12 @@
|
||||
autocomplete="off"
|
||||
{{#query}}value="{{.}}"{{/query}}
|
||||
>
|
||||
<label for="searchinput-{{uniqid}}">
|
||||
<span class="visually-hidden">{{#str}} search, core {{/str}}</span>
|
||||
</label>
|
||||
<button type="submit" class="btn btn-primary search-icon">
|
||||
{{#pix}} a/search, core {{/pix}}
|
||||
<span class="visually-hidden">{{#str}} search, core {{/str}}</span>
|
||||
</button>
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-primary search-icon">
|
||||
{{#pix}} a/search, core {{/pix}}
|
||||
<span class="sr-only">{{#str}} search, core {{/str}}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -59,9 +59,9 @@
|
||||
Setting autocomplete.
|
||||
}}
|
||||
|
||||
<div class="defaultsnext">
|
||||
<div class="form-select defaultsnext">
|
||||
<input type="hidden" name="{{name}}[xxxxx]" value="_qf__force_multiselect_submission">
|
||||
<select class="form-select" name="{{name}}[]"
|
||||
<select class="custom-select" name="{{name}}[]"
|
||||
id="{{id}}"
|
||||
{{#multiple}}multiple{{/multiple}}>
|
||||
{{#options}}
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
{{#default}}
|
||||
<div class="form-defaultinfo text-muted {{#forceltr}}text-ltr{{/forceltr}}">{{{default}}}</div>
|
||||
{{/default}}
|
||||
<div class="form-text mt-2">{{{description}}}</div>
|
||||
<div class="form-description mt-3">{{{description}}}</div>
|
||||
{{#dependenton}}<div class="form-dependenton mb-4 text-muted">{{{.}}}</div>{{/dependenton}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
<div class="form-duration defaultsnext">
|
||||
<div class="d-flex flex-wrap align-items-center">
|
||||
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
|
||||
<label class="visually-hidden" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label>
|
||||
<select id="{{id}}u" name="{{name}}[u]" class="form-control form-select" {{#readonly}}disabled{{/readonly}}>
|
||||
<label class="sr-only" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label>
|
||||
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
|
||||
{{#options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/options}}
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
<div class="form-filesize defaultsnext">
|
||||
<div class="d-flex flex-wrap align-items-center">
|
||||
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
|
||||
<label class="visually-hidden" for="{{id}}u">{{#str}}filesizeunits, admin{{/str}}</label>
|
||||
<select id="{{id}}u" name="{{name}}[u]" class="form-control form-select" {{#readonly}}disabled{{/readonly}}>
|
||||
<label class="sr-only" for="{{id}}u">{{#str}}filesizeunits, admin{{/str}}</label>
|
||||
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
|
||||
{{#options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/options}}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
{{!
|
||||
Setting configmultiselect.
|
||||
}}
|
||||
<div>
|
||||
<div class="form-select">
|
||||
{{^readonly}}<input type="hidden" name="{{name}}[xxxxx]" value="1">{{/readonly}}
|
||||
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
|
||||
{{#options}}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
{{!
|
||||
Setting configmultiselect with optgroup support.
|
||||
}}
|
||||
<div>
|
||||
<div class="form-select">
|
||||
{{^readonly}}<input type="hidden" name="{{name}}[xxxxx]" value="1">{{/readonly}}
|
||||
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
|
||||
{{#options}}
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
{{!
|
||||
Setting configselect.
|
||||
}}
|
||||
<div class="defaultsnext">
|
||||
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="form-select">
|
||||
<div class="form-select defaultsnext">
|
||||
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
|
||||
{{#options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/options}}
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
{{!
|
||||
Setting configselect with optgroup support.
|
||||
}}
|
||||
<div class="defaultsnext">
|
||||
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="form-select">
|
||||
<div class="form-select defaultsnext">
|
||||
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
|
||||
{{#options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/options}}
|
||||
|
||||
@@ -46,14 +46,14 @@
|
||||
}}
|
||||
<div class="form-time defaultsnext">
|
||||
<div class="d-flex flex-wrap align-items-center text-ltr">
|
||||
<label class="visually-hidden" for="{{id}}h">{{#str}}hours{{/str}}</label>
|
||||
<select id="{{id}}h" name="{{name}}[h]" class="form-select" {{#readonly}}disabled{{/readonly}}>
|
||||
<label class="sr-only" for="{{id}}h">{{#str}}hours{{/str}}</label>
|
||||
<select id="{{id}}h" name="{{name}}[h]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
|
||||
{{#hours}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/hours}}
|
||||
</select>:
|
||||
<label class="visually-hidden" for="{{id}}m">{{#str}}minutes{{/str}}</label>
|
||||
<select id="{{id}}m" name="{{name}}[m]" class="form-select" {{#readonly}}disabled{{/readonly}}>
|
||||
<label class="sr-only" for="{{id}}m">{{#str}}minutes{{/str}}</label>
|
||||
<select id="{{id}}m" name="{{name}}[m]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
|
||||
{{#minutes}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/minutes}}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
* state - state of the toggle
|
||||
* title - title of the toggle tooltip
|
||||
* label - label of the toggle
|
||||
* labelclasses - classes for the label (visually-hidden for screen readers)
|
||||
* labelclasses - classes for the label (sr-only for screen readers)
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
@@ -44,7 +44,7 @@
|
||||
}],
|
||||
"title": "Title example",
|
||||
"label": "Enable/disable reality",
|
||||
"labelclasses": "visually-hidden"
|
||||
"labelclasses": "sr-only"
|
||||
}
|
||||
}}
|
||||
<div id="container-{{id}}"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
}}
|
||||
<div class="mb-3">
|
||||
{{#selects}}
|
||||
<select id="{{id}}{{key}}" name="{{name}}[]" class="form-select mb-1">
|
||||
<select id="{{id}}{{key}}" name="{{name}}[]" class="custom-select mb-1">
|
||||
{{#options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/options}}
|
||||
|
||||
@@ -41,6 +41,6 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-setting col-sm-9">
|
||||
<div class="form-text">{{{description}}}</div>
|
||||
<div class="form-description">{{{description}}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
Setting configselect.
|
||||
}}
|
||||
<div class="mb-3">
|
||||
<select id="{{id}}" name="{{name}}[value]" class="form-select">
|
||||
<select id="{{id}}" name="{{name}}[value]" class="form-select custom-select">
|
||||
{{#options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/options}}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
{{!
|
||||
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/>.
|
||||
}}
|
||||
{{!
|
||||
@template core_admin/settings_showhide
|
||||
|
||||
Passes the necessary data to show/hide dependant settings.
|
||||
|
||||
Context variables required for this template:
|
||||
* dependencies - JSON-serialized data structure describing the dependencies between settings
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"dependencies": {
|
||||
"s__setting1":{
|
||||
"eq":[
|
||||
[
|
||||
"s__setting0"
|
||||
]
|
||||
]
|
||||
},
|
||||
"s__setting2":{
|
||||
"eq":[
|
||||
[
|
||||
"s__setting1"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
<span id="settings-showhide-{{uniqid}}" data-dependencies="{{dependencies}}"></span>
|
||||
|
||||
{{#js}}
|
||||
require(['core/showhidesettings'], function(ShowHideSettings) {
|
||||
ShowHideSettings.init("settings-showhide-{{uniqid}}");
|
||||
});
|
||||
{{/js}}
|
||||
@@ -52,7 +52,7 @@
|
||||
data-choose="{{choose}}"
|
||||
data-sesskey="{{sesskey}}">
|
||||
<i class="icon fa fa-info-circle m-0" aria-hidden="true"></i>
|
||||
<span class="visually-hidden">{{#str}}previewthemename, moodle, {{name}}{{/str}}</span>
|
||||
<span class="sr-only">{{#str}}previewthemename, moodle, {{name}}{{/str}}</span>
|
||||
</button>
|
||||
{{#reporturl}}
|
||||
<a
|
||||
@@ -61,7 +61,7 @@
|
||||
class="btn btn-link p-0 ms-2"
|
||||
title="{{#str}}themeusagereportname, admin, {{name}}{{/str}}">
|
||||
<i class="icon fa fa-area-chart m-0" aria-hidden="true"></i>
|
||||
<span class="visually-hidden">{{#str}}themeusagereportname, admin, {{name}}{{/str}}</span>
|
||||
<span class="sr-only">{{#str}}themeusagereportname, admin, {{name}}{{/str}}</span>
|
||||
</a>
|
||||
{{/reporturl}}
|
||||
{{#settingsurl}}
|
||||
@@ -71,7 +71,7 @@
|
||||
class="btn btn-link p-0 ms-2"
|
||||
title="{{#str}}themeeditsettingsname, admin, {{name}}{{/str}}">
|
||||
<i class="icon fa fa-cog m-0" aria-hidden="true"></i>
|
||||
<span class="visually-hidden">{{#str}}themeeditsettingsname, admin, {{name}}{{/str}}</span>
|
||||
<span class="sr-only">{{#str}}themeeditsettingsname, admin, {{name}}{{/str}}</span>
|
||||
</a>
|
||||
{{/settingsurl}}
|
||||
</div>
|
||||
@@ -91,7 +91,7 @@
|
||||
<input type="hidden" name="choose" value="{{choose}}">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<span aria-hidden="true">{{#str}}selecttheme, moodle{{/str}}</span>
|
||||
<span class="visually-hidden">{{#str}}selectthemename, moodle, {{name}}{{/str}}</span>
|
||||
<span class="sr-only">{{#str}}selectthemename, moodle, {{name}}{{/str}}</span>
|
||||
</button>
|
||||
</form>
|
||||
{{/actionurl}}
|
||||
|
||||
@@ -81,8 +81,6 @@ class behat_admin extends behat_base {
|
||||
|
||||
$this->execute('behat_forms::i_set_the_field_with_xpath_to', [$fieldxpath, $value]);
|
||||
$this->execute("behat_general::i_click_on", [get_string('savechanges'), 'button']);
|
||||
// Wait for the page to be redirected.
|
||||
$this->execute("behat_general::i_wait_to_be_redirected");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ Feature: An administrator can browse user accounts
|
||||
Scenario: Delete a user account
|
||||
Given I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I press "Delete" action in the "User One" report row
|
||||
And I should see "Are you sure you want to delete user User One" in the "Delete user" "dialogue"
|
||||
And I should see "Are you absolutely sure you want to completely delete the user User One" in the "Delete user" "dialogue"
|
||||
And I click on "Delete" "button" in the "Delete user" "dialogue"
|
||||
Then I should see "Deleted user User One"
|
||||
And I should not see "User One" in the "reportbuilder-table" "table"
|
||||
@@ -90,7 +90,6 @@ Feature: An administrator can browse user accounts
|
||||
| username | firstname | lastname | email | confirmed |
|
||||
| user3 | User | Three | three@example.com | 0 |
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I change window size to "large"
|
||||
Then I should see "Confirmation pending" in the "User Three" "table_row"
|
||||
And I press "Resend confirmation email" action in the "User Three" report row
|
||||
And I should see "Confirmation email sent successfully"
|
||||
@@ -172,7 +171,9 @@ Feature: An administrator can browse user accounts
|
||||
| User Two | two@example.com |
|
||||
| User Three | three@example.com |
|
||||
And I click on "Filters" "button"
|
||||
And I set the field "System role value" in the "System role" "core_reportbuilder > Filter" to "Course creator"
|
||||
And I set the following fields in the "System role" "core_reportbuilder > Filter" to these values:
|
||||
| System role operator | Is equal to |
|
||||
| System role value | Course creator |
|
||||
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
||||
And I click on "Filters" "button"
|
||||
And I should see "User One" in the "reportbuilder-table" "table"
|
||||
@@ -180,7 +181,8 @@ Feature: An administrator can browse user accounts
|
||||
And I should not see "User Three" in the "reportbuilder-table" "table"
|
||||
And I click on "Filters" "button"
|
||||
And I click on "Reset all" "button" in the "[data-region='report-filters']" "css_element"
|
||||
And I set the field "Role name" in the "Course role" "core_reportbuilder > Filter" to "Teacher"
|
||||
And I set the following fields in the "Course role" "core_reportbuilder > Filter" to these values:
|
||||
| Role name | Teacher |
|
||||
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
||||
And I click on "Filters" "button"
|
||||
And I should not see "User One" in the "reportbuilder-table" "table"
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
@core @core_admin
|
||||
Feature: Toggle campaign banner visibility
|
||||
In order to control the visibility of the campaign banner content
|
||||
As an admin
|
||||
I need to be able to disable the campaign banner display
|
||||
|
||||
Scenario Outline: Admin can disable the campaign banner display
|
||||
Given the following config values are set as admin:
|
||||
| showcampaigncontent | <showcampaigncontent> |
|
||||
And I log in as "admin"
|
||||
When I navigate to "Notifications" in site administration
|
||||
Then "//iframe[@id='campaign-content']" "xpath_element" <display> exist
|
||||
|
||||
Examples:
|
||||
| showcampaigncontent | display |
|
||||
| true | should |
|
||||
| false | should not |
|
||||
+12
-32
@@ -86,69 +86,49 @@ final class set_plugin_order_test extends \externallib_advanced_testcase {
|
||||
return [
|
||||
[
|
||||
'initialstate' => 'textarea,tiny',
|
||||
'plugin' => 'editor_textarea',
|
||||
'pluginname' => 'editor_textarea',
|
||||
'direction' => 1, // DOWN.
|
||||
'neworder' => $getorder([
|
||||
'expected' => $getorder([
|
||||
'tiny',
|
||||
'textarea',
|
||||
]),
|
||||
'newstate' => 'tiny,textarea',
|
||||
'newtexteditors' => 'tiny,textarea',
|
||||
],
|
||||
[
|
||||
'initialstate' => 'textarea,tiny',
|
||||
'plugin' => 'editor_textarea',
|
||||
'pluginname' => 'editor_textarea',
|
||||
'direction' => -1, // UP.
|
||||
'neworder' => $getorder([
|
||||
'expected' => $getorder([
|
||||
'textarea',
|
||||
'tiny',
|
||||
]),
|
||||
'newstate' => 'textarea,tiny',
|
||||
'newtexteditors' => 'textarea,tiny',
|
||||
],
|
||||
[
|
||||
'initialstate' => 'textarea,tiny',
|
||||
'plugin' => 'editor_tiny',
|
||||
'pluginname' => 'editor_tiny',
|
||||
'direction' => 1, // DOWN.
|
||||
// Tiny is already at the bottom of the list of enabled plugins.
|
||||
'neworder' => $getorder([
|
||||
'expected' => $getorder([
|
||||
'textarea',
|
||||
'tiny',
|
||||
]),
|
||||
'newstate' => 'textarea,tiny',
|
||||
'newtexteditors' => 'textarea,tiny',
|
||||
],
|
||||
[
|
||||
'initialstate' => 'textarea,tiny',
|
||||
'plugin' => 'editor_atto',
|
||||
'pluginname' => 'editor_atto',
|
||||
'direction' => 1, // DOWN.
|
||||
// Atto is not enabled. Disabled editors are listed lexically after enabled editors.
|
||||
'neworder' => $getorder([
|
||||
'expected' => $getorder([
|
||||
'textarea',
|
||||
'tiny',
|
||||
]),
|
||||
'newstate' => 'textarea,tiny',
|
||||
'newtexteditors' => 'textarea,tiny',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Test re-ordering plugins where one plugin is not enabled.
|
||||
*
|
||||
* Media plugins are ordered by rank, with enabled plugins first.
|
||||
* This is similar to the editors test but covers a scenario that cannot be covered by the editors test due to
|
||||
* not having enough plugins.
|
||||
*/
|
||||
public function test_execute_media_including_disabled(): void {
|
||||
global $CFG;
|
||||
|
||||
$this->resetAfterTest();
|
||||
$this->setAdminUser();
|
||||
|
||||
$CFG->media_plugins_sortorder = 'videojs,vimeo,html5video';
|
||||
|
||||
set_plugin_order::execute('youtube', -1);
|
||||
|
||||
$this->assertSame('videojs,vimeo,html5video', $CFG->media_plugins_sortorder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Text execute method for plugins which do not support ordering.
|
||||
*
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace core_admin\reportbuilder\datasource;
|
||||
|
||||
use core\task\database_logger;
|
||||
use core_reportbuilder_generator;
|
||||
use core_reportbuilder\local\filters\{date, duration, number, select, text};
|
||||
use core_reportbuilder\local\filters\{boolean_select, date, duration, number, select, text};
|
||||
use core_reportbuilder\task\send_schedules;
|
||||
use core_reportbuilder\tests\core_reportbuilder_testcase;
|
||||
|
||||
@@ -136,12 +136,10 @@ final class task_logs_test extends core_reportbuilder_testcase {
|
||||
'task_log:output_operator' => text::IS_EMPTY,
|
||||
], false],
|
||||
'Filter result' => ['task_log:result', [
|
||||
'task_log:result_operator' => select::EQUAL_TO,
|
||||
'task_log:result_value' => 0,
|
||||
'task_log:result_operator' => boolean_select::CHECKED,
|
||||
], true],
|
||||
'Filter result (no match)' => ['task_log:result', [
|
||||
'task_log:result_operator' => select::EQUAL_TO,
|
||||
'task_log:result_value' => 1,
|
||||
'task_log:result_operator' => boolean_select::NOT_CHECKED,
|
||||
], false],
|
||||
'Filter time start' => ['task_log:timestart', [
|
||||
'task_log:timestart_operator' => date::DATE_RANGE,
|
||||
|
||||
@@ -47,7 +47,7 @@ $table->head = array(
|
||||
get_string('thirdpartylibrarylocation', 'core_admin'), get_string('license'));
|
||||
$table->align = array('left', 'left', 'left', 'left');
|
||||
$table->id = 'thirdpartylibs';
|
||||
$table->attributes['class'] = 'admintable generaltable table table-hover';
|
||||
$table->attributes['class'] = 'admintable generaltable';
|
||||
$table->data = array();
|
||||
|
||||
foreach ($files as $component => $xmlpath) {
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# tool_admin_presets Upgrade notes
|
||||
|
||||
## 5.0
|
||||
|
||||
### Deprecated
|
||||
|
||||
- behat_admin_presets::following_in_the_should_download_between_and_bytes is deprecated. Use: the following element should download a file that:
|
||||
|
||||
For more information see [MDL-83035](https://tracker.moodle.org/browse/MDL-83035)
|
||||
@@ -81,6 +81,7 @@ class admin_preset extends base {
|
||||
* @return column[]
|
||||
*/
|
||||
protected function get_all_columns(): array {
|
||||
global $DB;
|
||||
$apalias = $this->get_table_alias('adminpresets');
|
||||
|
||||
// Name.
|
||||
@@ -105,6 +106,10 @@ class admin_preset extends base {
|
||||
});
|
||||
|
||||
// Description.
|
||||
$descriptionfieldsql = "{$apalias}.comments";
|
||||
if ($DB->get_dbfamily() === 'oracle') {
|
||||
$descriptionfieldsql = $DB->sql_order_by_text($descriptionfieldsql, 1024);
|
||||
}
|
||||
$columns[] = (new column(
|
||||
'description',
|
||||
new lang_string('description'),
|
||||
@@ -112,9 +117,9 @@ class admin_preset extends base {
|
||||
))
|
||||
->add_joins($this->get_joins())
|
||||
->set_type(column::TYPE_LONGTEXT)
|
||||
->add_field("{$apalias}.comments")
|
||||
->add_field($descriptionfieldsql, 'description')
|
||||
->set_is_sortable(true)
|
||||
->set_callback(static function(?string $description): string {
|
||||
->set_callback(static function(?string $description, \stdClass $row): string {
|
||||
return format_text($description, FORMAT_HTML, ['context' => \context_system::instance()]);
|
||||
});
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user