Compare commits
678 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 97dd32edd6 | |||
| a0b2c28080 | |||
| bddf27de35 | |||
| 406a0efd37 | |||
| eb7715d16f | |||
| 4db8407d3e | |||
| 61da84e414 | |||
| a034f66e0b | |||
| 1452f1e1d3 | |||
| d59b91c6a8 | |||
| 85380c6b61 | |||
| 9aff357438 | |||
| e567d6eda3 | |||
| a51a17c846 | |||
| 5dbd593d3a | |||
| 484d8abc22 | |||
| 6e036a74b0 | |||
| 38dfee06dd | |||
| 475362630b | |||
| b643f44415 | |||
| 314d105c16 | |||
| 61ba63d516 | |||
| 16e85de11f | |||
| b46e8a7b32 | |||
| 0766509ab0 | |||
| 56a067e7c1 | |||
| c7f7b18ade | |||
| 3328dc32a7 | |||
| 783e695e00 | |||
| de60fc23ae | |||
| 04576de946 | |||
| 0c5c778ae7 | |||
| 4d2eab6932 | |||
| 7f81a8388a | |||
| 76dad4b0a2 | |||
| 857919df34 | |||
| 0b1455e93b | |||
| fba7a51461 | |||
| 7fa00f860e | |||
| 3ce4502093 | |||
| 5739b1b6b9 | |||
| 7097828ac7 | |||
| 438995ddc1 | |||
| 53c59fae82 | |||
| eb0a4127d4 | |||
| 8eaea8e878 | |||
| cb23ec3e1c | |||
| f4f44fb59d | |||
| 850a632505 | |||
| cc52eadad9 | |||
| 0b1c48f422 | |||
| d64639a987 | |||
| 50aff07c9f | |||
| 87568b0cfa | |||
| dea510bfe0 | |||
| 4fb283dea5 | |||
| b2a2dfe8ae | |||
| 62bdb2b8ec | |||
| bce722a96d | |||
| 7266f8301e | |||
| e102b4c4d9 | |||
| 4abf4d9ada | |||
| 477cad6875 | |||
| 7ce4f46db6 | |||
| 471da1eca2 | |||
| efc68f119d | |||
| b18af92a44 | |||
| 0e88a593fd | |||
| 9125eef5b4 | |||
| d2c16cde78 | |||
| 787aa4333a | |||
| a8ee2c885d | |||
| 14a0b42eec | |||
| a6a982d798 | |||
| a09f722564 | |||
| df64a2ca06 | |||
| c490457a71 | |||
| 06b13fb79f | |||
| 260c6b548c | |||
| e50cd7c14f | |||
| 66427af8b7 | |||
| 54472938c1 | |||
| 873fcd7abf | |||
| 5ea1c8027c | |||
| 6b36cd591e | |||
| c896607100 | |||
| f0944e4f7a | |||
| c82a5b3692 | |||
| a6d32ec56e | |||
| 40565791ff | |||
| 650071c3c3 | |||
| 52db4dbd91 | |||
| 1823daac03 | |||
| 7a6ba516c8 | |||
| 6ca319debc | |||
| 351fed869c | |||
| dd0af0fad5 | |||
| 6d27533ac0 | |||
| d04d763594 | |||
| 6f17dd18c8 | |||
| 560d38c251 | |||
| 1ab7bb3c6f | |||
| 2410893797 | |||
| 6c735bd4bb | |||
| 51089c2079 | |||
| 70cfad6550 | |||
| 93d9e77b73 | |||
| 9026f8aa42 | |||
| 36fd5a2e74 | |||
| 86ebfb0bb5 | |||
| a6a46d4fc3 | |||
| f64c024648 | |||
| 8d42058734 | |||
| 06ad488970 | |||
| cca7714daf | |||
| 7080a26ecc | |||
| 56b8a5c80c | |||
| 0a43324230 | |||
| b14945cc2f | |||
| c25eb5d673 | |||
| 4741ff9810 | |||
| 5dc2d2eb4e | |||
| 3bb2f388bb | |||
| 611c47c861 | |||
| 29e70c0ffa | |||
| a8615c22c8 | |||
| 5d14c00774 | |||
| 60a26ddf42 | |||
| db57772b2f | |||
| e7a4135526 | |||
| 5e86ebcd3b | |||
| 0682e95c72 | |||
| a4112f7906 | |||
| 2cc9af244b | |||
| 6ad63c6a2b | |||
| 4ff024c5ab | |||
| 0c92dc487f | |||
| 3277a55bd5 | |||
| 6f55d77ab1 | |||
| 22fcbd1f22 | |||
| b1f4f5bae8 | |||
| 15ba94e132 | |||
| 76996862ed | |||
| a900614082 | |||
| af56a3c5b8 | |||
| 76c73a9895 | |||
| c063da3610 | |||
| a027928b32 | |||
| 8fefce40e2 | |||
| 23cd87285b | |||
| 58a10b8e47 | |||
| 288f92e8bd | |||
| 87fa90f7a5 | |||
| 9a5b9c76fc | |||
| 70a52304db | |||
| e271dc1e96 | |||
| c8b4b14574 | |||
| 925c6bba13 | |||
| 60f89a0364 | |||
| 4b3f09c081 | |||
| f47289bc99 | |||
| 8d6b7362e2 | |||
| 78ede65849 | |||
| a52191b36b | |||
| 166c123bc3 | |||
| 01707afd17 | |||
| b3995066ad | |||
| 587d575de1 | |||
| d5df4d045f | |||
| 5ed3f867eb | |||
| 80e7dc9740 | |||
| d25ef0fbde | |||
| 3468942807 | |||
| 65b930fcbd | |||
| 0e1df382a5 | |||
| db80cf54a6 | |||
| be82fa5053 | |||
| 7fa20a8f2e | |||
| 87935201fe | |||
| bf60b24c82 | |||
| bed63ca74f | |||
| bf209aea14 | |||
| 27802334e2 | |||
| 4d51f843be | |||
| a40195b455 | |||
| f94c215231 | |||
| 3bfe6aa877 | |||
| 5d09708b25 | |||
| 10bf1500da | |||
| 091fc5259b | |||
| 3286622534 | |||
| fd6d42de20 | |||
| 8275f30231 | |||
| 6d425afa4f | |||
| e4e7acde8b | |||
| a80a00aa08 | |||
| 18b2d9d2f9 | |||
| c577e1af6a | |||
| b704533f0a | |||
| 117ee3a064 | |||
| c0abaa9fdf | |||
| ca86656416 | |||
| 22fa1056d7 | |||
| 628462b78d | |||
| 6944c07406 | |||
| 74e7fab22e | |||
| 6b6d2633b0 | |||
| b0f5eb7d36 | |||
| 162c33d75e | |||
| 641eab45e0 | |||
| 18ff1708e4 | |||
| 39396934da | |||
| a6a883df2d | |||
| 3e5db201a5 | |||
| 5a8f2ba046 | |||
| 3c63c2c900 | |||
| 96c7474eb0 | |||
| 20e102773f | |||
| 36719a497f | |||
| 1d1d4952b0 | |||
| faef5d14c7 | |||
| 61358a918d | |||
| 1a6dac81ed | |||
| df443f4d83 | |||
| 5677aedfd3 | |||
| 20f2e2ec6a | |||
| 6309e63d41 | |||
| fb0a1132c9 | |||
| 3b5f57029b | |||
| 859d6e470e | |||
| 8e114d80fb | |||
| f41a364e27 | |||
| 33cd0e15f1 | |||
| a6c941f063 | |||
| d0090576e1 | |||
| 2feef8ec73 | |||
| ca7c500826 | |||
| ec4dc1d0c2 | |||
| c10119a059 | |||
| 54405a604f | |||
| 00a3d0bdcf | |||
| 5b647d65f2 | |||
| 4d9adf0f60 | |||
| 59dd3269fb | |||
| 70ddb4e2c6 | |||
| d55eb769e4 | |||
| 08610c078f | |||
| 1f3f47fe97 | |||
| 15ccd59dc1 | |||
| f8f27a5013 | |||
| 42d5dcb5c3 | |||
| da3aaf3a63 | |||
| 3ab644e94e | |||
| 1d188cb1d3 | |||
| d5dd5bd085 | |||
| cb61fdd961 | |||
| 4c2746d752 | |||
| 9e065db83d | |||
| aa720a52ed | |||
| 963681fdc0 | |||
| de7454d413 | |||
| c327cc5c77 | |||
| bc77304aa5 | |||
| 7b30d1e84a | |||
| 4ffe9d1bd3 | |||
| be932909b5 | |||
| 665db4c894 | |||
| 960c5cce5c | |||
| e2baf7ed8a | |||
| 0ef9c59d09 | |||
| c3d1a15532 | |||
| e65317c3f3 | |||
| 32f27a6c69 | |||
| d3ea8cbc07 | |||
| 73f2ca5411 | |||
| 7b30789ce7 | |||
| 0de2b00a8a | |||
| f71446f628 | |||
| 26933d15b0 | |||
| f769b21680 | |||
| 0c6c844cb8 | |||
| 2940d926a5 | |||
| 4e65da4a2f | |||
| 229072cc77 | |||
| 79b58bee2b | |||
| 4b13200c2f | |||
| f70eede993 | |||
| 1414b0a7d4 | |||
| f80cf7dcf1 | |||
| c8393f44df | |||
| 63453ea129 | |||
| 974ccb5121 | |||
| 9604b3e9d8 | |||
| 3516f2b3ef | |||
| 2622aa2f9d | |||
| 31bbc4db30 | |||
| a52a2d3b26 | |||
| d4bb5da618 | |||
| 591eb7449f | |||
| a46efc23a3 | |||
| 4784153309 | |||
| d780b39188 | |||
| 9cb7b278af | |||
| 114ebc3742 | |||
| 6a01418aa1 | |||
| ce87f75cf6 | |||
| a5289915ca | |||
| 2381a9327f | |||
| 934a6d94ef | |||
| a24477c30a | |||
| cdfcaa4876 | |||
| 994ad03eb4 | |||
| e8047b8876 | |||
| ce9eec227b | |||
| 1e9de38a74 | |||
| 1db782af87 | |||
| 6e120bba12 | |||
| cad2583872 | |||
| 60d47c2170 | |||
| 572eca5748 | |||
| 03f2be3e3d | |||
| 6b6487eeed | |||
| 63265e4709 | |||
| 140b58502c | |||
| dfa680442c | |||
| 81df060697 | |||
| ac0f173e2e | |||
| 70d41bafa1 | |||
| 418a05d706 | |||
| 0761304d2f | |||
| 6b1ca71974 | |||
| 7f7b3c1b5b | |||
| 1abbe2a268 | |||
| 2086e272e8 | |||
| f2cd45004b | |||
| efee20c43b | |||
| 6ab7e0d283 | |||
| da3ca5041f | |||
| 841db8ec77 | |||
| 5d35d7b884 | |||
| ac70fb827a | |||
| 21b17fe49c | |||
| c4c0518d90 | |||
| bad5905952 | |||
| 7817f82c15 | |||
| cabf0dbd40 | |||
| ec6f81207a | |||
| 4cae8e7a30 | |||
| cd326efb57 | |||
| ab430ba5fd | |||
| 4c395d5b09 | |||
| 39f2c0f711 | |||
| 3e1089a7f1 | |||
| 02dae40716 | |||
| 408beb96d6 | |||
| c4e2c3ba9b | |||
| 48db5765ac | |||
| 4d59af4afa | |||
| f9758178c6 | |||
| 695ecfc67d | |||
| e02155048a | |||
| 0177319237 | |||
| e5f8c4d2e3 | |||
| edbb4f6e53 | |||
| 07b51eebf3 | |||
| 5240013d21 | |||
| ee687f8919 | |||
| 4c2336663a | |||
| a0984c46a1 | |||
| 4077d3e696 | |||
| d9e423dc82 | |||
| c58421208c | |||
| f361d3e20f | |||
| b238a8658f | |||
| 4513906883 | |||
| 1052567d7e | |||
| 1f43996636 | |||
| 0d18a2c74d | |||
| 3302964844 | |||
| 70d71d3af7 | |||
| 0b841c0c72 | |||
| bc66f3d7b2 | |||
| f3008d2a08 | |||
| 7de2aa1a95 | |||
| 69b2e68d27 | |||
| b7327c6c19 | |||
| f06196976a | |||
| 44f9a36089 | |||
| d92624e11f | |||
| 2264a0454c | |||
| 0944647413 | |||
| 8917f657a1 | |||
| b8b43072c2 | |||
| a85c16aea5 | |||
| aade13141c | |||
| 41d53f9bd5 | |||
| 0d3baf5f8e | |||
| 793d034c4a | |||
| 92236e4345 | |||
| c14c042aca | |||
| 45b9bcd9a0 | |||
| f45a62e469 | |||
| 650d4000cb | |||
| a411fd9ad7 | |||
| 9c35910821 | |||
| 47e5ed8e30 | |||
| b2e6bee53e | |||
| e217f4914a | |||
| 1ba350d146 | |||
| ec921c9d7b | |||
| ec3be4584c | |||
| e8f73b9edd | |||
| e9716eda2f | |||
| df8d12b685 | |||
| 1c529d9897 | |||
| 4ac2ded44b | |||
| f11ab3b3ed | |||
| 471b5b73a3 | |||
| ebc7b73150 | |||
| a06ed7e888 | |||
| 92a25cff43 | |||
| e5549f4f16 | |||
| 0d4fda7843 | |||
| f083859e96 | |||
| 29d83deae9 | |||
| 2217e2fea9 | |||
| 68927e83e5 | |||
| 819020ac57 | |||
| 1e5a066247 | |||
| 24a7fc2f07 | |||
| 03f0b4fc14 | |||
| 8c1261bd97 | |||
| 17af025b52 | |||
| ac56855bbc | |||
| 6f6ef56253 | |||
| 79d202c36d | |||
| 962aca6ad6 | |||
| 7473e54a3d | |||
| 105370c407 | |||
| 869ffde772 | |||
| 73d2934ba5 | |||
| 74a51dd48a | |||
| 9005a3bb96 | |||
| 6fccd1fe35 | |||
| ea78dbdf50 | |||
| db3cdb6d25 | |||
| ccc297f01a | |||
| 8dd7e73294 | |||
| f2087a7fcb | |||
| b1fe9348db | |||
| c3183cb6fe | |||
| d47064c4b2 | |||
| 66a28fbaa4 | |||
| d5d7d57d6d | |||
| db3bcaba14 | |||
| 145467fadf | |||
| 07021369d7 | |||
| 836172f366 | |||
| 2c3d0c3b6f | |||
| 1388dece19 | |||
| 41ec284720 | |||
| 62e799ac84 | |||
| 2945fe403b | |||
| 6af9a4e21c | |||
| 86c5e56baf | |||
| bde99c5a4b | |||
| abde041907 | |||
| bba453b9ed | |||
| 8abf3701a6 | |||
| d607b840b8 | |||
| c65d2ccb13 | |||
| 9149eaae18 | |||
| b35e24e254 | |||
| 8a0c8192c8 | |||
| f5f86a68ac | |||
| 57b1d3ea85 | |||
| 9611df0f92 | |||
| 74c19577c9 | |||
| c7231d5235 | |||
| 3cf111c8d3 | |||
| e0518a0940 | |||
| b000642c03 | |||
| aae5800486 | |||
| 9ef2475cdd | |||
| 8513fdd0ba | |||
| 19da0bad13 | |||
| ff64873ece | |||
| 7bd6de4822 | |||
| eb127e0b21 | |||
| 9797983c6f | |||
| 6767a5d631 | |||
| 1507697d9f | |||
| daf7e2a478 | |||
| 771e49de0c | |||
| c19896ff95 | |||
| 68494c8ef2 | |||
| 0a44e7d8cc | |||
| 345f365555 | |||
| 8079f3343f | |||
| 005f7c8b24 | |||
| a6f084c9c5 | |||
| 0e7a5b346f | |||
| 8640c059d8 | |||
| a3f65f8b5b | |||
| 88cece4bd7 | |||
| ddfebd633e | |||
| ac4baac8b9 | |||
| a0ef20cfe4 | |||
| e819a58b6e | |||
| 2adbbcac0a | |||
| 4e5e185f80 | |||
| 68cbd0599d | |||
| 2134746dea | |||
| 4d56fe7d60 | |||
| 1c4bc77d44 | |||
| bc91b91ab1 | |||
| 9887a4cbae | |||
| 7d8fb1962e | |||
| 07fbf4515c | |||
| e81e12cd79 | |||
| f318ef32bc | |||
| 696f3dcc83 | |||
| 804a5f59ce | |||
| 3f45d8fece | |||
| dfe989c826 | |||
| ed6277f9f7 | |||
| 48db0e02cd | |||
| 6ace0f59ae | |||
| fbf528eb95 | |||
| 220ea7cd09 | |||
| 7f1c642112 | |||
| 6530c22a11 | |||
| ab37a1c815 | |||
| 75b13bba36 | |||
| 2cebc825e9 | |||
| ffe7dd3769 | |||
| f41205a84c | |||
| 3046ae85cc | |||
| 536892fd4c | |||
| 2cae0d3b15 | |||
| bdb1cab348 | |||
| d08bcc4ded | |||
| 2f1473ac6d | |||
| 899f21fc26 | |||
| c60a3ef656 | |||
| 8262d6133a | |||
| e662941230 | |||
| 89feea07d3 | |||
| 9c2784ca30 | |||
| e18b4b0918 | |||
| 14d8971cd6 | |||
| 7c8149d6af | |||
| 096a908dbe | |||
| 68dfa89fea | |||
| e64751fb8a | |||
| 490c5cabb4 | |||
| 4269cac414 | |||
| cd319f3f2f | |||
| da14ce45dd | |||
| 818f90abd3 | |||
| 8ab3584274 | |||
| 13ce9a38a2 | |||
| d5699018b0 | |||
| fbb8579c1a | |||
| f248c81e5a | |||
| 7d05696b12 | |||
| 716c7536cb | |||
| 4cdf94a602 | |||
| c9f2b241e0 | |||
| 8dbe8449e0 | |||
| 4841169211 | |||
| 3fe4b72c34 | |||
| 3c1e7a0759 | |||
| 98ad5c6191 | |||
| 0872bf3175 | |||
| 6e8ca8a6ce | |||
| e2de9c6b6d | |||
| 59b25acd22 | |||
| af145cdac1 | |||
| bf68d558af | |||
| f3d159dea1 | |||
| 3af4f54efb | |||
| 6698b06b11 | |||
| 545d2c9290 | |||
| 7cac3f6fe9 | |||
| db198f615a | |||
| bbf7cf2c44 | |||
| 0f62dd32c7 | |||
| 67e82ebe0b | |||
| ac16eaa936 | |||
| bfe6b3cdd1 | |||
| f1bf39c2f8 | |||
| 6064114c32 | |||
| e0d74e610a | |||
| 8948d04695 | |||
| 9993c6bcc0 | |||
| 1da82165ef | |||
| cf139e224e | |||
| f8bce590ba | |||
| 715eb9438c | |||
| 9c461eae4e | |||
| fe6a3c0531 | |||
| 793c80165d | |||
| a4f457e111 | |||
| 4110561f3e | |||
| b1549e4127 | |||
| 724513e5d8 | |||
| c14fbe69f5 | |||
| 8b4e2418f6 | |||
| 8568798f76 | |||
| 66533b249e | |||
| e5baddebcd | |||
| 0efd3318b2 | |||
| 16acfc55f4 | |||
| 31328e3ede | |||
| c83c1ee838 | |||
| 95f83b70b0 | |||
| 53253aea3a | |||
| c244cd14b7 | |||
| a1b7cd7090 | |||
| e4ffce07cf | |||
| 6b4ce43d1d | |||
| 107ab59c29 | |||
| 4cd0bc7ece | |||
| 42952482c9 | |||
| 3804a59fb6 | |||
| 174faea612 | |||
| dec56ff204 | |||
| c6d3f0d107 | |||
| 8f36db0be5 | |||
| f554e04a27 | |||
| 20c532caf8 | |||
| a1b0938c16 | |||
| 3e1da76d54 | |||
| e3dcc260fb | |||
| ae50bef5e6 | |||
| 1b1e4d2670 | |||
| c31a650aad | |||
| 76943b900c | |||
| c05a3e254c | |||
| 63385ff2b5 | |||
| 42d7bc64f5 | |||
| f0aa5b7e3b | |||
| 40e33b6e75 | |||
| e06768b331 | |||
| ab58f3ee49 | |||
| 6a30312beb | |||
| 8c4dbdfd56 | |||
| e9b0443000 | |||
| fab5233096 | |||
| 2748bf5900 | |||
| 2adf914723 | |||
| 96a2e4086f | |||
| a2d94f3d20 | |||
| 33784bd64b | |||
| 4e5efb5c0c | |||
| 5cb434f62b | |||
| 6117291e6b | |||
| 4e342f5397 | |||
| 6b85e6affd | |||
| e71116f768 | |||
| a0172a28fc | |||
| 60020ccaa9 | |||
| 3987e19c3f | |||
| 2068b31847 | |||
| 9a5f3f7672 | |||
| 75aa0f73db | |||
| 2efce29560 | |||
| a4c6ffd85f | |||
| 184169cd76 | |||
| 55d5b4168e | |||
| 6ccff3ba5d | |||
| 44f23c7ec1 | |||
| 492b025f5f | |||
| 7f98e36008 | |||
| f53c016704 | |||
| 64b9afa6a5 | |||
| da91de7821 |
+10
-42
@@ -12,21 +12,12 @@ notifications:
|
||||
language: php
|
||||
|
||||
php:
|
||||
# Moodle supports versions 5.4, 5.5, and 5.6 of PHP.
|
||||
# Order by fastest to slowest.
|
||||
# We currently only run the highest and lowest versions to reduce the load on travis-ci.org.
|
||||
- 5.6
|
||||
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
|
||||
- 7.0
|
||||
# - 5.6
|
||||
# - 5.5
|
||||
- 5.4
|
||||
|
||||
# We hope to offer PHP 7 support in the near future.
|
||||
- nightly
|
||||
|
||||
services:
|
||||
# Ensure that memcached and mongodb are running for testing of those MUC stores.
|
||||
- memcached
|
||||
- mongodb
|
||||
|
||||
env:
|
||||
# Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
|
||||
# start first so that the total run time is not too high.
|
||||
@@ -50,34 +41,26 @@ matrix:
|
||||
# It will not stop the jobs from running.
|
||||
fast_finish: true
|
||||
|
||||
# Always allow failure on nightly.
|
||||
# It's a nightly build and failures can happen.
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
|
||||
exclude:
|
||||
# PHP 7 is not yet supported for actual runs.
|
||||
# Exclude it by default - we include it for CITEST only later.
|
||||
- php: nightly
|
||||
|
||||
# MySQL - it's just too slow.
|
||||
# Exclude it on all versions except for 5.6.
|
||||
# Exclude it on all versions except for 7.0
|
||||
# - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
|
||||
# php: 5.6
|
||||
#
|
||||
# - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
|
||||
# php: 5.5
|
||||
|
||||
- env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
|
||||
php: 5.4
|
||||
|
||||
include:
|
||||
# Attempt to run the CITEST set on PHP 7.
|
||||
- php: nightly
|
||||
env: DB=none PHPUNIT=false INSTALL=false CITEST=true
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
|
||||
install:
|
||||
# Disable xdebug. We aren't generating code coverage, and it has a huge impact upon test performance.
|
||||
- rm /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
|
||||
|
||||
# Set the encrypted GITHUB_TOKEN if it's available to raise the API limit.
|
||||
- if [ -n "$GITHUB_APITOKEN" ]; then composer config github-oauth.github.com $GITHUB_APITOKEN; fi
|
||||
|
||||
@@ -86,10 +69,6 @@ install:
|
||||
# Typically it should be able to use the Composer cache if any other job has already completed before we started here.
|
||||
- travis_retry composer install --prefer-dist --no-interaction
|
||||
|
||||
- echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
|
||||
before_script:
|
||||
- >
|
||||
if [ "$INSTALL" = 'true' -o "$PHPUNIT" = 'true' ];
|
||||
@@ -144,9 +123,6 @@ before_script:
|
||||
sed -i \
|
||||
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
|
||||
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
|
||||
-e "/require_once/i define('TEST_CACHESTORE_MEMCACHE_TESTSERVERS', '127.0.0.1:11211');" \
|
||||
-e "/require_once/i define('TEST_CACHESTORE_MEMCACHED_TESTSERVERS', '127.0.0.1:11211');" \
|
||||
-e "/require_once/i define('TEST_CACHESTORE_MONGODB_TESTSERVER', 'mongodb://localhost:27017');" \
|
||||
config.php ;
|
||||
|
||||
# Initialise PHPUnit for Moodle.
|
||||
@@ -191,14 +167,6 @@ script:
|
||||
export phpcmd=`which php`;
|
||||
fi
|
||||
|
||||
- >
|
||||
if [ "$CITEST" = "true" -a "$GIT_PREVIOUS_COMMIT" != "$UPSTREAM_FETCH_HEAD" ];
|
||||
then
|
||||
# This is a CI test, but it is based on an older weekly release.
|
||||
# Warn in a way that will fail the test.
|
||||
echo "Current commit is based on an older weekly release" && false;
|
||||
fi
|
||||
|
||||
# Actually run the CI Tests - do this outside of the main test to make output clearer.
|
||||
- >
|
||||
if [ "$CITEST" = 'true' ];
|
||||
|
||||
+162
-141
@@ -12,6 +12,7 @@
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* jshint node: true, browser: false */
|
||||
|
||||
/**
|
||||
* @copyright 2014 Andrew Nicols
|
||||
@@ -24,100 +25,163 @@
|
||||
|
||||
module.exports = function(grunt) {
|
||||
var path = require('path'),
|
||||
fs = require('fs'),
|
||||
tasks = {},
|
||||
cwd = process.env.PWD || process.cwd();
|
||||
|
||||
// Windows users can't run grunt in a subdirectory, so allow them to set
|
||||
// the root by passing --root=path/to/dir.
|
||||
if (grunt.option('root')) {
|
||||
var root = grunt.option('root');
|
||||
if (grunt.file.exists(__dirname, root)) {
|
||||
cwd = path.join(__dirname, root);
|
||||
grunt.log.ok('Setting root to '+cwd);
|
||||
} else {
|
||||
grunt.fail.fatal('Setting root to '+root+' failed - path does not exist');
|
||||
}
|
||||
}
|
||||
|
||||
var inAMD = path.basename(cwd) == 'amd';
|
||||
|
||||
// Globbing pattern for matching all AMD JS source files.
|
||||
var amdSrc = [inAMD ? cwd + '/src/*.js' : '**/amd/src/*.js'];
|
||||
|
||||
/**
|
||||
* Function to generate the destination for the uglify task
|
||||
* (e.g. build/file.min.js). This function will be passed to
|
||||
* the rename property of files array when building dynamically:
|
||||
* http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
|
||||
*
|
||||
* @param {String} destPath the current destination
|
||||
* @param {String} srcPath the matched src path
|
||||
* @return {String} The rewritten destination path.
|
||||
*/
|
||||
var uglify_rename = function (destPath, srcPath) {
|
||||
destPath = srcPath.replace('src', 'build');
|
||||
destPath = destPath.replace('.js', '.min.js');
|
||||
destPath = path.resolve(cwd, destPath);
|
||||
return destPath;
|
||||
};
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
jshint: {
|
||||
options: {jshintrc: '.jshintrc'},
|
||||
files: ['**/amd/src/*.js']
|
||||
amd: { src: amdSrc }
|
||||
},
|
||||
uglify: {
|
||||
dynamic_mappings: {
|
||||
files: grunt.file.expandMapping(
|
||||
['**/src/*.js', '!**/node_modules/**'],
|
||||
'',
|
||||
{
|
||||
cwd: cwd,
|
||||
rename: function(destBase, destPath) {
|
||||
destPath = destPath.replace('src', 'build');
|
||||
destPath = destPath.replace('.js', '.min.js');
|
||||
destPath = path.resolve(cwd, destPath);
|
||||
return destPath;
|
||||
}
|
||||
}
|
||||
)
|
||||
amd: {
|
||||
files: [{
|
||||
expand: true,
|
||||
src: amdSrc,
|
||||
rename: uglify_rename
|
||||
}]
|
||||
}
|
||||
},
|
||||
less: {
|
||||
bootstrapbase: {
|
||||
files: {
|
||||
"theme/bootstrapbase/style/moodle.css": "theme/bootstrapbase/less/moodle.less",
|
||||
"theme/bootstrapbase/style/editor.css": "theme/bootstrapbase/less/editor.less",
|
||||
},
|
||||
options: {
|
||||
compress: true
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
nospawn: true // We need not to spawn so config can be changed dynamically.
|
||||
},
|
||||
amd: {
|
||||
files: ['**/amd/src/**/*.js'],
|
||||
tasks: ['amd']
|
||||
},
|
||||
bootstrapbase: {
|
||||
files: ["theme/bootstrapbase/less/**/*.less"],
|
||||
tasks: ["less:bootstrapbase"]
|
||||
},
|
||||
yui: {
|
||||
files: ['**/yui/src/**/*.js'],
|
||||
tasks: ['shifter']
|
||||
},
|
||||
},
|
||||
shifter: {
|
||||
options: {
|
||||
recursive: true,
|
||||
paths: [cwd]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Shifter task. Is configured with a path to a specific file or a directory,
|
||||
* in the case of a specific file it will work out the right module to be built.
|
||||
*
|
||||
* Note that this task runs the invidiaul shifter jobs async (becase it spawns
|
||||
* so be careful to to call done().
|
||||
*/
|
||||
tasks.shifter = function() {
|
||||
var exec = require('child_process').spawn,
|
||||
var async = require('async'),
|
||||
done = this.async(),
|
||||
args = [],
|
||||
options = {
|
||||
recursive: true,
|
||||
watch: false,
|
||||
walk: false,
|
||||
module: false
|
||||
},
|
||||
shifter;
|
||||
options = grunt.config('shifter.options');
|
||||
|
||||
// Run the shifter processes one at a time to avoid confusing output.
|
||||
async.eachSeries(options.paths, function (src, filedone) {
|
||||
var args = [];
|
||||
args.push( path.normalize(__dirname + '/node_modules/shifter/bin/shifter'));
|
||||
|
||||
// Determine the most appropriate options to run with based upon the current location.
|
||||
if (path.basename(cwd) === 'src') {
|
||||
// Detect whether we're in a src directory.
|
||||
grunt.log.debug('In a src directory');
|
||||
args.push('--walk');
|
||||
options.walk = true;
|
||||
} else if (path.basename(path.dirname(cwd)) === 'src') {
|
||||
// Detect whether we're in a module directory.
|
||||
grunt.log.debug('In a module directory');
|
||||
options.module = true;
|
||||
}
|
||||
|
||||
if (grunt.option('watch')) {
|
||||
if (!options.walk && !options.module) {
|
||||
grunt.fail.fatal('Unable to watch unless in a src or module directory');
|
||||
}
|
||||
|
||||
// It is not advisable to run with recursivity and watch - this
|
||||
// leads to building the build directory in a race-like fashion.
|
||||
grunt.log.debug('Detected a watch - disabling recursivity');
|
||||
options.recursive = false;
|
||||
args.push('--watch');
|
||||
}
|
||||
|
||||
if (options.recursive) {
|
||||
args.push('--recursive');
|
||||
}
|
||||
|
||||
// Always ignore the node_modules directory.
|
||||
args.push('--excludes', 'node_modules');
|
||||
|
||||
// Determine the most appropriate options to run with based upon the current location.
|
||||
if (grunt.file.isMatch('**/yui/**/*.js', src)) {
|
||||
// When passed a JS file, build our containing module (this happen with
|
||||
// watch).
|
||||
grunt.log.debug('Shifter passed a specific JS file');
|
||||
src = path.dirname(path.dirname(src));
|
||||
options.recursive = false;
|
||||
} else if (grunt.file.isMatch('**/yui/src', src)) {
|
||||
// When in a src directory --walk all modules.
|
||||
grunt.log.debug('In a src directory');
|
||||
args.push('--walk');
|
||||
options.recursive = false;
|
||||
} else if (grunt.file.isMatch('**/yui/src/*', src)) {
|
||||
// When in module, only build our module.
|
||||
grunt.log.debug('In a module directory');
|
||||
options.recursive = false;
|
||||
} else if (grunt.file.isMatch('**/yui/src/*/js', src)) {
|
||||
// When in module src, only build our module.
|
||||
grunt.log.debug('In a source directory');
|
||||
src = path.dirname(src);
|
||||
options.recursive = false;
|
||||
}
|
||||
|
||||
if (grunt.option('watch')) {
|
||||
grunt.fail.fatal('The --watch option has been removed, please use `grunt watch` instead');
|
||||
}
|
||||
|
||||
// Add the stderr option if appropriate
|
||||
if (grunt.option('verbose')) {
|
||||
args.push('--lint-stderr');
|
||||
}
|
||||
|
||||
if (grunt.option('no-color')) {
|
||||
args.push('--color=false');
|
||||
}
|
||||
|
||||
var execShifter = function() {
|
||||
|
||||
shifter = exec("node", args, {
|
||||
cwd: cwd,
|
||||
stdio: 'inherit',
|
||||
env: process.env
|
||||
});
|
||||
|
||||
// Tidy up after exec.
|
||||
shifter.on('exit', function (code) {
|
||||
grunt.log.ok("Running shifter on " + src);
|
||||
grunt.util.spawn({
|
||||
cmd: "node",
|
||||
args: args,
|
||||
opts: {cwd: src, stdio: 'inherit', env: process.env}
|
||||
}, function (error, result, code) {
|
||||
if (code) {
|
||||
grunt.fail.fatal('Shifter failed with code: ' + code);
|
||||
} else {
|
||||
grunt.log.ok('Shifter build complete.');
|
||||
done();
|
||||
filedone();
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -127,79 +191,15 @@ module.exports = function(grunt) {
|
||||
execShifter();
|
||||
} else {
|
||||
// Check that there are yui modules otherwise shifter ends with exit code 1.
|
||||
var found = false;
|
||||
var hasYuiModules = function(directory, callback) {
|
||||
fs.readdir(directory, function(err, files) {
|
||||
if (err) {
|
||||
return callback(err, null);
|
||||
}
|
||||
|
||||
// If we already found a match there is no need to continue scanning.
|
||||
if (found === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We need to track the number of files to know when we return a result.
|
||||
var pending = files.length;
|
||||
|
||||
// We first check files, so if there is a match we don't need further
|
||||
// async calls and we just return a true.
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
if (files[i] === 'yui') {
|
||||
return callback(null, true);
|
||||
}
|
||||
}
|
||||
|
||||
// Iterate through subdirs if there were no matches.
|
||||
files.forEach(function (file) {
|
||||
|
||||
var p = path.join(directory, file);
|
||||
stat = fs.statSync(p);
|
||||
if (!stat.isDirectory()) {
|
||||
pending--;
|
||||
} else {
|
||||
|
||||
// We defer the pending-1 until we scan the whole dir and subdirs.
|
||||
hasYuiModules(p, function(err, result) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
if (result === true) {
|
||||
// Once we get a true we notify the caller.
|
||||
found = true;
|
||||
return callback(null, true);
|
||||
}
|
||||
|
||||
pending--;
|
||||
if (pending === 0) {
|
||||
// Notify the caller that the whole dir has been scaned and there are no matches.
|
||||
return callback(null, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// No subdirs here, otherwise the return would be deferred until all subdirs are scanned.
|
||||
if (pending === 0) {
|
||||
return callback(null, false);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
hasYuiModules(cwd, function(err, result) {
|
||||
if (err) {
|
||||
grunt.fail.fatal(err.message);
|
||||
}
|
||||
|
||||
if (result === true) {
|
||||
execShifter();
|
||||
} else {
|
||||
grunt.log.ok('No YUI modules to build.');
|
||||
done();
|
||||
}
|
||||
});
|
||||
if (grunt.file.expand({cwd: src}, '**/yui/src/**/*.js').length > 0) {
|
||||
args.push('--recursive');
|
||||
execShifter();
|
||||
} else {
|
||||
grunt.log.ok('No YUI modules to build.');
|
||||
filedone();
|
||||
}
|
||||
}
|
||||
}, done);
|
||||
};
|
||||
|
||||
tasks.startup = function() {
|
||||
@@ -207,24 +207,45 @@ module.exports = function(grunt) {
|
||||
if (path.basename(path.resolve(cwd, '../../')) == 'yui') {
|
||||
grunt.task.run('shifter');
|
||||
// Are we in an AMD directory?
|
||||
} else if (path.basename(cwd) == 'amd') {
|
||||
grunt.task.run('jshint');
|
||||
grunt.task.run('uglify');
|
||||
} else if (inAMD) {
|
||||
grunt.task.run('amd');
|
||||
} else {
|
||||
// Run them all!.
|
||||
grunt.task.run('shifter');
|
||||
grunt.task.run('jshint');
|
||||
grunt.task.run('uglify');
|
||||
grunt.task.run('css');
|
||||
grunt.task.run('js');
|
||||
}
|
||||
};
|
||||
|
||||
// On watch, we dynamically modify config to build only affected files. This
|
||||
// method is slightly complicated to deal with multiple changed files at once (copied
|
||||
// from the grunt-contrib-watch readme).
|
||||
var changedFiles = Object.create(null);
|
||||
var onChange = grunt.util._.debounce(function() {
|
||||
var files = Object.keys(changedFiles);
|
||||
grunt.config('jshint.amd.src', files);
|
||||
grunt.config('uglify.amd.files', [{ expand: true, src: files, rename: uglify_rename }]);
|
||||
grunt.config('shifter.options.paths', files);
|
||||
changedFiles = Object.create(null);
|
||||
}, 200);
|
||||
|
||||
grunt.event.on('watch', function(action, filepath) {
|
||||
changedFiles[filepath] = action;
|
||||
onChange();
|
||||
});
|
||||
|
||||
// Register NPM tasks.
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-less');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
|
||||
// Register the shifter task.
|
||||
// Register JS tasks.
|
||||
grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter);
|
||||
grunt.registerTask('amd', ['jshint', 'uglify']);
|
||||
grunt.registerTask('js', ['amd', 'shifter']);
|
||||
|
||||
// Register CSS taks.
|
||||
grunt.registerTask('css', ['less:bootstrapbase']);
|
||||
|
||||
// Register the startup task.
|
||||
grunt.registerTask('startup', 'Run the correct tasks for the current directory', tasks.startup);
|
||||
|
||||
+138
-1
@@ -1434,7 +1434,144 @@
|
||||
<VENDOR name="oracle" version="10.2" />
|
||||
</DATABASE>
|
||||
<PHP version="5.4.4" level="required">
|
||||
<RESTRICT function="restrict_php_version_7" message="unsupportedphpversion7" />
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="pcreunicodewarning" />
|
||||
</FEEDBACK>
|
||||
</PCREUNICODE>
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="mbstringrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="opensslrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="tokenizer" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="tokenizerrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xmlrpc" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="xmlrpcrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="soap" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="soaprecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="ctype" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ctyperequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="zip" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ziprequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="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="intl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="intlrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="json" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="hash" level="required"/>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="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_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_CHECKS>
|
||||
</MOODLE>
|
||||
<MOODLE version="3.1" requires="2.7">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mariadb" version="5.5.31" />
|
||||
<VENDOR name="mysql" version="5.5.31" />
|
||||
<VENDOR name="postgres" version="9.1" />
|
||||
<VENDOR name="mssql" version="10.0" />
|
||||
<VENDOR name="oracle" version="10.2" />
|
||||
</DATABASE>
|
||||
<PHP version="5.4.4" level="required">
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
|
||||
@@ -413,7 +413,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
|
||||
}
|
||||
|
||||
public function save_changes() {
|
||||
global $DB;
|
||||
global $DB, $CFG;
|
||||
|
||||
if (!$this->roleid) {
|
||||
// Creating role.
|
||||
@@ -422,6 +422,13 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
|
||||
} else {
|
||||
// Updating role.
|
||||
$DB->update_record('role', $this->role);
|
||||
|
||||
// This will ensure the course contacts cache is purged so name changes get updated in
|
||||
// the UI. It would be better to do this only when we know that fields affected are
|
||||
// updated. But thats getting into the weeds of the coursecat cache and role edits
|
||||
// should not be that frequent, so here is the ugly brutal approach.
|
||||
require_once($CFG->libdir . '/coursecatlib.php');
|
||||
coursecat::role_assignment_changed($this->role->id, context_system::instance());
|
||||
}
|
||||
|
||||
// Assignable contexts.
|
||||
|
||||
@@ -201,7 +201,7 @@ if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey() && $de
|
||||
$event = \core\event\role_capabilities_updated::create(
|
||||
array(
|
||||
'context' => $systemcontext,
|
||||
'objectid' => $roleid
|
||||
'objectid' => $tableroleid
|
||||
)
|
||||
);
|
||||
$event->set_legacy_logdata(array(SITEID, 'role', $action, 'admin/roles/define.php?action=view&roleid=' . $tableroleid,
|
||||
|
||||
@@ -205,6 +205,9 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
// Create a page for general import configuration and defaults.
|
||||
$temp = new admin_settingpage('importgeneralsettings', new lang_string('importgeneralsettings', 'backup'), 'moodle/backup:backupcourse');
|
||||
$temp->add(new admin_setting_configtext('backup/import_general_maxresults', new lang_string('importgeneralmaxresults', 'backup'), new lang_string('importgeneralmaxresults_desc', 'backup'), 10));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/import_general_duplicate_admin_allowed',
|
||||
new lang_string('importgeneralduplicateadminallowed', 'backup'),
|
||||
new lang_string('importgeneralduplicateadminallowed_desc', 'backup'), 0));
|
||||
$ADMIN->add('backups', $temp);
|
||||
|
||||
// Create a page for automated backups configuration and defaults.
|
||||
|
||||
@@ -424,9 +424,9 @@ Feature: Set up contextual data for tests
|
||||
And the following "grade categories" exist:
|
||||
| fullname | course |
|
||||
| Grade category 1 | C1 |
|
||||
And the following "grade items" exist:
|
||||
| itemname | course | outcome | gradecategory |
|
||||
| Test Outcome Grade Item 1 | C1 | OT1 | Grade category 1 |
|
||||
And the following "grade items" exist:
|
||||
| itemname | course | outcome | gradecategory |
|
||||
| Test Outcome Grade Item 1 | C1 | OT1 | Grade category 1 |
|
||||
And the following config values are set as admin:
|
||||
| enableoutcomes | 1 |
|
||||
When I log in as "admin"
|
||||
@@ -441,3 +441,15 @@ Feature: Set up contextual data for tests
|
||||
And I expand all fieldsets
|
||||
And "//div[contains(@class, 'fitem')]/div[contains(@class, 'fitemtitle')]/div[contains(@class, fstaticlabel) and contains(., 'Grade category')]/../../div[contains(@class, 'felement') and contains(., 'Grade category 1')]" "xpath_element" should exist
|
||||
And I press "Cancel"
|
||||
|
||||
Scenario: Add a block
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname |
|
||||
| Course 1 | C1 |
|
||||
And the following "blocks" exist:
|
||||
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
||||
| online_users | Course | C1 | course-view-* | site-pre |
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
Then I should see "Online users"
|
||||
|
||||
@@ -54,5 +54,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ echo html_writer::end_tag('td');
|
||||
$options = array();
|
||||
foreach ($availablelangs as $alang) {
|
||||
if (!empty($alang[0]) and trim($alang[0]) !== 'en' and !$controller->is_installed_lang($alang[0], $alang[1])) {
|
||||
$options[$alang[0]] = $alang[2].' ('.$alang[0].')';
|
||||
$options[$alang[0]] = $alang[2].' ‎('.$alang[0].')‎';
|
||||
}
|
||||
}
|
||||
if (!empty($options)) {
|
||||
|
||||
@@ -52,5 +52,8 @@ function xmldb_tool_log_upgrade($oldversion) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -42,5 +42,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -120,5 +120,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -56,5 +56,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -103,10 +103,12 @@ function tool_monitor_get_user_courses() {
|
||||
if (has_capability('tool/monitor:subscribe', context_system::instance())) {
|
||||
$options[0] = get_string('site');
|
||||
}
|
||||
if ($courses = get_user_capability_course('tool/monitor:subscribe', null, true, 'fullname', $orderby)) {
|
||||
if ($courses = get_user_capability_course('tool/monitor:subscribe', null, true, 'fullname, visible', $orderby)) {
|
||||
foreach ($courses as $course) {
|
||||
$options[$course->id] = format_string($course->fullname, true,
|
||||
array('context' => context_course::instance($course->id)));
|
||||
$coursectx = context_course::instance($course->id);
|
||||
if ($course->visible || has_capability('moodle/course:viewhiddencourses', $coursectx)) {
|
||||
$options[$course->id] = format_string($course->fullname, true, array('context' => $coursectx));
|
||||
}
|
||||
}
|
||||
}
|
||||
// If there are no courses and there is no site permission then return false.
|
||||
|
||||
@@ -232,8 +232,8 @@ if ($formdata = $mform2->is_cancelled()) {
|
||||
if (isset($USER->$key) and is_array($USER->$key)) {
|
||||
// this must be some hacky field that is abusing arrays to store content and format
|
||||
$user->$key = array();
|
||||
$user->$key['text'] = $value;
|
||||
$user->$key['format'] = FORMAT_MOODLE;
|
||||
$user->{$key['text']} = $value;
|
||||
$user->{$key['format']} = FORMAT_MOODLE;
|
||||
} else {
|
||||
$user->$key = trim($value);
|
||||
}
|
||||
|
||||
+23
-1
@@ -1,4 +1,4 @@
|
||||
@core @core_admin @_file_upload
|
||||
@tool @tool_uploaduser @_file_upload
|
||||
Feature: Upload users
|
||||
In order to add users to the system
|
||||
As an admin
|
||||
@@ -39,3 +39,25 @@ Feature: Upload users
|
||||
And I follow "Groups"
|
||||
And I set the field "groups" to "Section 1 (1)"
|
||||
And the "members" select box should contain "Tom Jones"
|
||||
|
||||
@javascript
|
||||
Scenario: Upload users with custom profile fields
|
||||
# Create user profile field.
|
||||
Given I log in as "admin"
|
||||
And I navigate to "User profile fields" node in "Site administration > Users > Accounts"
|
||||
And I set the field "datatype" to "Text area"
|
||||
And I set the following fields to these values:
|
||||
| Short name | superfield |
|
||||
| Name | Super field |
|
||||
And I click on "Save changes" "button"
|
||||
# Upload users.
|
||||
When I navigate to "Upload users" node in "Site administration > Users > Accounts"
|
||||
And I upload "lib/tests/fixtures/upload_users_profile.csv" file to "File" filemanager
|
||||
And I press "Upload users"
|
||||
And I press "Upload users"
|
||||
# Check that users were created and the superfield is filled.
|
||||
And I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
|
||||
And I follow "Tom Jones"
|
||||
And I should see "Super field"
|
||||
And I should see "The big guy"
|
||||
And I log out
|
||||
+8
-1
@@ -39,13 +39,20 @@ class auth_plugin_cas extends auth_plugin_ldap {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_cas() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'cas';
|
||||
$this->roleauth = 'auth_cas';
|
||||
$this->errorlogtag = '[AUTH CAS] ';
|
||||
$this->init_plugin($this->authtype);
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_cas() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
function prevent_local_passwords() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -74,5 +74,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -328,6 +328,7 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
$updateuser = new stdClass();
|
||||
$updateuser->id = $user->id;
|
||||
$updateuser->suspended = 1;
|
||||
$updateuser = $this->clean_data($updateuser);
|
||||
user_update_user($updateuser, false);
|
||||
$trace->output(get_string('auth_dbsuspenduser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)), 1);
|
||||
}
|
||||
@@ -414,6 +415,7 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
$updateuser = new stdClass();
|
||||
$updateuser->id = $olduser->id;
|
||||
$updateuser->suspended = 0;
|
||||
$updateuser = $this->clean_data($updateuser);
|
||||
user_update_user($updateuser);
|
||||
$trace->output(get_string('auth_dbreviveduser', 'auth_db', array('name' => $username,
|
||||
'id' => $olduser->id)), 1);
|
||||
@@ -436,6 +438,7 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
$trace->output(get_string('auth_dbinsertuserduplicate', 'auth_db', array('username'=>$user->username, 'auth'=>$collision->auth)), 1);
|
||||
continue;
|
||||
}
|
||||
$user = $this->clean_data($user);
|
||||
try {
|
||||
$id = user_create_user($user, false); // It is truly a new user.
|
||||
$trace->output(get_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)), 1);
|
||||
@@ -577,6 +580,7 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
}
|
||||
if ($needsupdate) {
|
||||
require_once($CFG->dirroot . '/user/lib.php');
|
||||
$updateuser = $this->clean_data($updateuser);
|
||||
user_update_user($updateuser);
|
||||
}
|
||||
return $DB->get_record('user', array('id'=>$userid, 'deleted'=>0));
|
||||
@@ -906,6 +910,30 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
error_reporting($CFG->debug);
|
||||
ob_end_flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean the user data that comes from an external database.
|
||||
*
|
||||
* @param array $user the user data to be validated against properties definition.
|
||||
* @return stdClass $user the cleaned user data.
|
||||
*/
|
||||
public function clean_data($user) {
|
||||
if (empty($user)) {
|
||||
return $user;
|
||||
}
|
||||
|
||||
foreach ($user as $field => $value) {
|
||||
// Get the property parameter type and do the cleaning.
|
||||
try {
|
||||
$property = core_user::get_property_definition($field);
|
||||
$user->$field = clean_param($value, $property['type']);
|
||||
} catch (coding_exception $e) {
|
||||
debugging("The property '$field' could not be cleaned.", DEBUG_DEVELOPER);
|
||||
}
|
||||
}
|
||||
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ class auth_db_testcase extends advanced_testcase {
|
||||
require_once($CFG->libdir.'/password_compat/lib/password.php');
|
||||
set_config('passtype', 'saltedcrypt', 'auth/db');
|
||||
$auth->config->passtype = 'saltedcrypt';
|
||||
$user3->pass = password_hash('heslo', PASSWORD_BCRYPT, array('salt' => 'best_salt_ever_moodle_rocks_dont_tell'));
|
||||
$user3->pass = password_hash('heslo', PASSWORD_BCRYPT);
|
||||
$DB->update_record('auth_db_users', $user3);
|
||||
$this->assertTrue($auth->user_login('u3', 'heslo'));
|
||||
|
||||
@@ -381,4 +381,95 @@ class auth_db_testcase extends advanced_testcase {
|
||||
|
||||
$this->cleanup_auth_database();
|
||||
}
|
||||
|
||||
/**
|
||||
* Testing the function _colonscope() from ADOdb.
|
||||
*/
|
||||
public function test_adodb_colonscope() {
|
||||
global $CFG;
|
||||
require_once($CFG->libdir.'/adodb/adodb.inc.php');
|
||||
require_once($CFG->libdir.'/adodb/drivers/adodb-odbc.inc.php');
|
||||
require_once($CFG->libdir.'/adodb/drivers/adodb-db2ora.inc.php');
|
||||
|
||||
$this->resetAfterTest(false);
|
||||
|
||||
$sql = "select * from table WHERE column=:1 AND anothercolumn > :0";
|
||||
$arr = array('b', 1);
|
||||
list($sqlout, $arrout) = _colonscope($sql,$arr);
|
||||
$this->assertEquals("select * from table WHERE column=? AND anothercolumn > ?", $sqlout);
|
||||
$this->assertEquals(array(1, 'b'), $arrout);
|
||||
}
|
||||
|
||||
/**
|
||||
* Testing the clean_data() method.
|
||||
*/
|
||||
public function test_clean_data() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(false);
|
||||
$this->preventResetByRollback();
|
||||
$this->init_auth_database();
|
||||
$auth = get_auth_plugin('db');
|
||||
$auth->db_init();
|
||||
|
||||
// Create users on external table.
|
||||
$extdbuser1 = (object)array('name'=>'u1', 'pass'=>'heslo', 'email'=>'u1@example.com');
|
||||
$extdbuser1->id = $DB->insert_record('auth_db_users', $extdbuser1);
|
||||
|
||||
// User with malicious data on the name.
|
||||
$extdbuser2 = (object)array('name'=>'user<script>alert(1);</script>xss', 'pass'=>'heslo', 'email'=>'xssuser@example.com');
|
||||
$extdbuser2->id = $DB->insert_record('auth_db_users', $extdbuser2);
|
||||
|
||||
$trace = new null_progress_trace();
|
||||
|
||||
// Let's test user sync make sure still works as expected..
|
||||
$auth->sync_users($trace, true);
|
||||
|
||||
// Get the user on moodle user table.
|
||||
$user2 = $DB->get_record('user', array('email'=> $extdbuser2->email, 'auth'=>'db'));
|
||||
|
||||
// The malicious code should be sanitized.
|
||||
$this->assertEquals($user2->username, 'userscriptalert1scriptxss');
|
||||
$this->assertNotEquals($user2->username, $extdbuser2->name);
|
||||
|
||||
// User with correct data, should be equal to external db.
|
||||
$user1 = $DB->get_record('user', array('email'=> $extdbuser1->email, 'auth'=>'db'));
|
||||
$this->assertEquals($extdbuser1->name, $user1->username);
|
||||
$this->assertEquals($extdbuser1->email, $user1->email);
|
||||
|
||||
// Now, let's update the name.
|
||||
$extdbuser2->name = 'user no xss anymore';
|
||||
$DB->update_record('auth_db_users', $extdbuser2);
|
||||
|
||||
// Run sync again to update the user data.
|
||||
$auth->sync_users($trace, true);
|
||||
|
||||
// The user information should be updated.
|
||||
$user2 = $DB->get_record('user', array('username' => 'usernoxssanymore', 'auth' => 'db'));
|
||||
// The spaces should be removed, as it's the username.
|
||||
$this->assertEquals($user2->username, 'usernoxssanymore');
|
||||
|
||||
// Now let's test just the clean_data() method isolated.
|
||||
// Testing PARAM_USERNAME, PARAM_NOTAGS, PARAM_RAW_TRIMMED and others.
|
||||
$user3 = new stdClass();
|
||||
$user3->firstname = 'John <script>alert(1)</script> Doe';
|
||||
$user3->username = 'john%#&~%*_doe';
|
||||
$user3->email = ' john@testing.com ';
|
||||
$user3->deleted = 'no';
|
||||
$user3->description = '<b>A description <script>alert(123)</script>about myself.</b>';
|
||||
$user3cleaned = $auth->clean_data($user3);
|
||||
|
||||
// Expected results.
|
||||
$this->assertEquals($user3cleaned->firstname, 'John alert(1) Doe');
|
||||
$this->assertEquals($user3cleaned->email, 'john@testing.com');
|
||||
$this->assertEquals($user3cleaned->deleted, 0);
|
||||
$this->assertEquals($user3->description, '<b>A description about myself.</b>');
|
||||
$this->assertEquals($user3->username, 'john_doe');
|
||||
|
||||
// Try to clean an invalid property (fullname).
|
||||
$user3->fullname = 'John Doe';
|
||||
$auth->clean_data($user3);
|
||||
$this->assertDebuggingCalled("The property 'fullname' could not be cleaned.");
|
||||
$this->cleanup_auth_database();
|
||||
}
|
||||
}
|
||||
|
||||
+8
-1
@@ -34,11 +34,18 @@ class auth_plugin_email extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_email() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'email';
|
||||
$this->config = get_config('auth/email');
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_email() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the username and password work and false if they are
|
||||
* wrong or don't exist.
|
||||
|
||||
+8
-1
@@ -37,11 +37,18 @@ class auth_plugin_fc extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_fc() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'fc';
|
||||
$this->config = get_config('auth/fc');
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_fc() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the username and password work and false if they are
|
||||
* wrong or don't exist.
|
||||
|
||||
+7
-1
@@ -30,7 +30,7 @@ class fcFPP
|
||||
var $_debug = FALSE; // set to true to see some debug info
|
||||
|
||||
// class constructor
|
||||
function fcFPP($host="localhost", $port="3333")
|
||||
public function __construct($host="localhost", $port="3333")
|
||||
{
|
||||
$this->_hostname = $host;
|
||||
$this->_port = $port;
|
||||
@@ -38,6 +38,12 @@ class fcFPP
|
||||
$this->_pwd = "";
|
||||
}
|
||||
|
||||
function fcFPP($host="localhost", $port="3333")
|
||||
{
|
||||
debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
|
||||
self::__construct($host, $port);
|
||||
}
|
||||
|
||||
// open a connection to the FirstClass server
|
||||
function open()
|
||||
{
|
||||
|
||||
+8
-1
@@ -35,11 +35,18 @@ class auth_plugin_imap extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_imap() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'imap';
|
||||
$this->config = get_config('auth/imap');
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_imap() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the username and password work and false if they are
|
||||
* wrong or don't exist.
|
||||
|
||||
+8
-1
@@ -143,13 +143,20 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor with initialisation.
|
||||
*/
|
||||
function auth_plugin_ldap() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'ldap';
|
||||
$this->roleauth = 'auth_ldap';
|
||||
$this->errorlogtag = '[AUTH LDAP] ';
|
||||
$this->init_plugin($this->authtype);
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_ldap() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the username and password work and false if they are
|
||||
* wrong or don't exist.
|
||||
|
||||
@@ -64,5 +64,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,13 +46,20 @@ class auth_plugin_manual extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_manual() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'manual';
|
||||
$config = get_config(self::COMPONENT_NAME);
|
||||
$legacyconfig = get_config(self::LEGACY_COMPONENT_NAME);
|
||||
$this->config = (object)array_merge((array)$legacyconfig, (array)$config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_manual() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the username and password work and false if they are
|
||||
* wrong or don't exist. (Non-mnet accounts only!)
|
||||
|
||||
@@ -56,5 +56,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+8
-1
@@ -35,12 +35,19 @@ class auth_plugin_mnet extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_mnet() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'mnet';
|
||||
$this->config = get_config('auth_mnet');
|
||||
$this->mnet = get_mnet_environment();
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_mnet() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is normally used to determine if the username and password
|
||||
* are correct for local logins. Always returns false, as local users do not
|
||||
|
||||
@@ -56,5 +56,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ $wantsremoteurl = optional_param('remoteurl', false, PARAM_BOOL);
|
||||
$url = new moodle_url('/auth/mnet/jump.php', array('token'=>$token, 'idp'=>$remotewwwroot, 'wantsurl'=>$wantsurl));
|
||||
if ($wantsremoteurl !== false) $url->param('remoteurl', $wantsremoteurl);
|
||||
$PAGE->set_url($url);
|
||||
$PAGE->set_context(context_system::instance());
|
||||
|
||||
$site = get_site();
|
||||
|
||||
|
||||
+8
-1
@@ -35,11 +35,18 @@ class auth_plugin_nntp extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_nntp() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'nntp';
|
||||
$this->config = get_config('auth/nntp');
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_nntp() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the username and password work and false if they are
|
||||
* wrong or don't exist.
|
||||
|
||||
@@ -35,10 +35,17 @@ class auth_plugin_nologin extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_nologin() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'nologin';
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_nologin() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not allow any login.
|
||||
*
|
||||
|
||||
+8
-1
@@ -34,11 +34,18 @@ class auth_plugin_none extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_none() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'none';
|
||||
$this->config = get_config('auth/none');
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_none() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the username and password work or don't exist and false
|
||||
* if the user exists and the password is wrong.
|
||||
|
||||
+8
-1
@@ -53,12 +53,19 @@ class auth_plugin_pam extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_pam() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'pam';
|
||||
$this->config = get_config('auth/pam');
|
||||
$this->errormessage = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_pam() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the username and password work and false if they are
|
||||
* wrong or don't exist.
|
||||
|
||||
+8
-1
@@ -35,11 +35,18 @@ class auth_plugin_pop3 extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_pop3() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'pop3';
|
||||
$this->config = get_config('auth/pop3');
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_pop3() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the username and password work and false if they are
|
||||
* wrong or don't exist.
|
||||
|
||||
@@ -38,11 +38,18 @@ class auth_plugin_radius extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_radius() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'radius';
|
||||
$this->config = get_config('auth/radius');
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_radius() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the username and password work and false if they are
|
||||
* wrong or don't exist.
|
||||
|
||||
@@ -38,11 +38,18 @@ class auth_plugin_shibboleth extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_shibboleth() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'shibboleth';
|
||||
$this->config = get_config('auth/shibboleth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_shibboleth() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the username and password work and false if they are
|
||||
* wrong or don't exist.
|
||||
|
||||
@@ -35,11 +35,18 @@ class auth_plugin_webservice extends auth_plugin_base {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function auth_plugin_webservice() {
|
||||
public function __construct() {
|
||||
$this->authtype = 'webservice';
|
||||
$this->config = get_config('auth/webservice');
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor for backward compatibility.
|
||||
*/
|
||||
public function auth_plugin_webservice() {
|
||||
self::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the username and password work and false if they are
|
||||
* wrong or don't exist.
|
||||
|
||||
+3
-1
@@ -138,7 +138,9 @@ if ($backup->get_stage() == backup_ui::STAGE_FINAL) {
|
||||
}
|
||||
|
||||
// Get HTML from logger.
|
||||
$loghtml = $logger->get_html();
|
||||
if ($CFG->debugdisplay) {
|
||||
$loghtml = $logger->get_html();
|
||||
}
|
||||
|
||||
// Hide the progress display and first backup step bar (the 'finished' step will show next).
|
||||
echo html_writer::end_div();
|
||||
|
||||
@@ -18,13 +18,20 @@ class cssparser {
|
||||
private $css;
|
||||
private $html;
|
||||
|
||||
function cssparser($html = true) {
|
||||
public function __construct($html = true) {
|
||||
// Register "destructor"
|
||||
core_shutdown_manager::register_function(array(&$this, "finalize"));
|
||||
$this->html = ($html != false);
|
||||
$this->Clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor. Deprecated in PHP7.
|
||||
*/
|
||||
public function cssparser($html = true) {
|
||||
self::__construct($html);
|
||||
}
|
||||
|
||||
function finalize() {
|
||||
unset($this->css);
|
||||
}
|
||||
@@ -258,4 +265,4 @@ class cssparser {
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -110,7 +110,9 @@ if (!$restore->is_independent()) {
|
||||
// Do actual restore.
|
||||
$restore->execute();
|
||||
// Get HTML from logger.
|
||||
$loghtml = $logger->get_html();
|
||||
if ($CFG->debugdisplay) {
|
||||
$loghtml = $logger->get_html();
|
||||
}
|
||||
// Hide this section because we are now going to make the page show 'finished'.
|
||||
echo html_writer::end_div();
|
||||
echo html_writer::script('document.getElementById("executionprogress").style.display = "none";');
|
||||
|
||||
@@ -1287,7 +1287,11 @@ abstract class restore_dbops {
|
||||
* 1F - None of the above, return true => User needs to be created
|
||||
*
|
||||
* if restoring from another site backup (cannot match by id here, replace it by email/firstaccess combination):
|
||||
* 2A - Normal check: If match by username and mnethost and (email or non-zero firstaccess) => ok, return target user
|
||||
* 2A - Normal check:
|
||||
* 2A1 - If match by username and mnethost and (email or non-zero firstaccess) => ok, return target user
|
||||
* 2A2 - Exceptional handling (MDL-21912): Match "admin" username. Then, if import_general_duplicate_admin_allowed is
|
||||
* enabled, attempt to map the admin user to the user 'admin_[oldsiteid]' if it exists. If not,
|
||||
* the user 'admin_[oldsiteid]' will be created in precheck_included users
|
||||
* 2B - Handle users deleted in DB and "alive" in backup file:
|
||||
* 2B1 - If match by mnethost and user is deleted in DB and not empty email = md5(username) and
|
||||
* (username LIKE 'backup_email.%' or non-zero firstaccess) => ok, return target user
|
||||
@@ -1305,7 +1309,7 @@ abstract class restore_dbops {
|
||||
* Note: for DB deleted users md5(username) is stored *sometimes* in the email field,
|
||||
* hence we are looking there for usernames if not empty. See delete_user()
|
||||
*/
|
||||
protected static function precheck_user($user, $samesite) {
|
||||
protected static function precheck_user($user, $samesite, $siteid = null) {
|
||||
global $CFG, $DB;
|
||||
|
||||
// Handle checks from same site backups
|
||||
@@ -1376,7 +1380,7 @@ abstract class restore_dbops {
|
||||
// Handle checks from different site backups
|
||||
} else {
|
||||
|
||||
// 2A - If match by username and mnethost and
|
||||
// 2A1 - If match by username and mnethost and
|
||||
// (email or non-zero firstaccess) => ok, return target user
|
||||
if ($rec = $DB->get_record_sql("SELECT *
|
||||
FROM {user} u
|
||||
@@ -1393,6 +1397,14 @@ abstract class restore_dbops {
|
||||
return $rec; // Matching user found, return it
|
||||
}
|
||||
|
||||
// 2A2 - If we're allowing conflicting admins, attempt to map user to admin_[oldsiteid].
|
||||
if (get_config('backup', 'import_general_duplicate_admin_allowed') && $user->username === 'admin' && $siteid
|
||||
&& $user->mnethostid == $CFG->mnet_localhost_id) {
|
||||
if ($rec = $DB->get_record('user', array('username' => 'admin_' . $siteid))) {
|
||||
return $rec;
|
||||
}
|
||||
}
|
||||
|
||||
// 2B - Handle users deleted in DB and "alive" in backup file
|
||||
// Note: for DB deleted users email is stored in username field, hence we
|
||||
// are looking there for emails. See delete_user()
|
||||
@@ -1500,6 +1512,9 @@ abstract class restore_dbops {
|
||||
// Calculate the context we are going to use for capability checking
|
||||
$context = context_course::instance($courseid);
|
||||
|
||||
// When conflicting users are detected we may need original site info.
|
||||
$restoreinfo = restore_controller_dbops::load_controller($restoreid)->get_info();
|
||||
|
||||
// Calculate if we have perms to create users, by checking:
|
||||
// to 'moodle/restore:createuser' and 'moodle/restore:userinfo'
|
||||
// and also observe $CFG->disableusercreationonrestore
|
||||
@@ -1535,14 +1550,28 @@ abstract class restore_dbops {
|
||||
}
|
||||
|
||||
// Now, precheck that user and, based on returned results, annotate action/problem
|
||||
$usercheck = self::precheck_user($user, $samesite);
|
||||
$usercheck = self::precheck_user($user, $samesite, $restoreinfo->original_site_identifier_hash);
|
||||
|
||||
if (is_object($usercheck)) { // No problem, we have found one user in DB to be mapped to
|
||||
// Annotate it, for later process. Set newitemid to mapping user->id
|
||||
self::set_backup_ids_record($restoreid, 'user', $recuser->itemid, $usercheck->id);
|
||||
|
||||
} else if ($usercheck === false) { // Found conflict, report it as problem
|
||||
$problems[] = get_string('restoreuserconflict', '', $user->username);
|
||||
if (!get_config('backup', 'import_general_duplicate_admin_allowed')) {
|
||||
$problems[] = get_string('restoreuserconflict', '', $user->username);
|
||||
} else if ($user->username == 'admin') {
|
||||
if (!$cancreateuser) {
|
||||
$problems[] = get_string('restorecannotcreateuser', '', $user->username);
|
||||
}
|
||||
if ($user->mnethostid != $CFG->mnet_localhost_id) {
|
||||
$problems[] = get_string('restoremnethostidmismatch', '', $user->username);
|
||||
}
|
||||
if (!$problems) {
|
||||
// Duplicate admin allowed, append original site idenfitier to username.
|
||||
$user->username .= '_' . $restoreinfo->original_site_identifier_hash;
|
||||
self::set_backup_ids_record($restoreid, 'user', $recuser->itemid, 0, null, (array)$user);
|
||||
}
|
||||
}
|
||||
|
||||
} else if ($usercheck === true) { // User needs to be created, check if we are able
|
||||
if ($cancreateuser) { // Can create user, set newitemid to 0 so will be created later
|
||||
|
||||
@@ -97,7 +97,10 @@ class restore_log_rule implements processable {
|
||||
return $this->module . '-' . $this->action;
|
||||
}
|
||||
|
||||
public function process($log) {
|
||||
public function process($inputlog) {
|
||||
|
||||
// There might be multiple rules that process this log, we can't alter it in the process of checking it.
|
||||
$log = clone($inputlog);
|
||||
|
||||
// Reset the allpairs array
|
||||
$this->allpairs = array();
|
||||
|
||||
@@ -89,11 +89,12 @@ class restore_logs_processor {
|
||||
}
|
||||
// Arrived here log is empty, no rule was able to perform the conversion, log the problem
|
||||
if (empty($newlog)) {
|
||||
self::$task->log('Log module-action "' . $keyname . '" process problem. Not restored', backup::LOG_DEBUG);
|
||||
self::$task->log('Log module-action "' . $keyname . '" process problem. Not restored. ' .
|
||||
json_encode($log), backup::LOG_DEBUG);
|
||||
}
|
||||
|
||||
} else { // Action not found log the problem
|
||||
self::$task->log('Log module-action "' . $keyname . '" unknown. Not restored', backup::LOG_DEBUG);
|
||||
self::$task->log('Log module-action "' . $keyname . '" unknown. Not restored. '.json_encode($log), backup::LOG_DEBUG);
|
||||
$newlog = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package core_backup
|
||||
* @category test
|
||||
* @copyright 2015 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
// Include all the needed stuff
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
|
||||
|
||||
|
||||
class backup_restore_log_rule_testcase extends basic_testcase {
|
||||
|
||||
function test_process_keeps_log_unmodified() {
|
||||
|
||||
// Prepare a tiny log entry.
|
||||
$originallog = new stdClass();
|
||||
$originallog->url = 'original';
|
||||
$originallog->info = 'original';
|
||||
$log = clone($originallog);
|
||||
|
||||
// Process it with a tiny log rule, only modifying url and info.
|
||||
$lr = new restore_log_rule('test', 'test', 'changed', 'changed');
|
||||
$result = $lr->process($log);
|
||||
|
||||
// The log has been processed.
|
||||
$this->assertEquals('changed', $result->url);
|
||||
$this->assertEquals('changed', $result->info);
|
||||
|
||||
// But the original log has been kept unmodified by the process() call.
|
||||
$this->assertEquals($originallog, $log);
|
||||
}
|
||||
}
|
||||
@@ -183,6 +183,10 @@ abstract class backup_structure_step extends backup_step {
|
||||
* @return void
|
||||
*/
|
||||
protected function add_subplugin_structure($subplugintype, $element, $multiple, $plugintype = null, $pluginname = null) {
|
||||
global $CFG;
|
||||
// This global declaration is required, because where we do require_once($backupfile);
|
||||
// That file may in turn try to do require_once($CFG->dirroot ...).
|
||||
// That worked in the past, we should keep it working.
|
||||
|
||||
// Verify if this is a BC call for an activity backup. See NOTE above for this special case.
|
||||
if ($plugintype === null and $pluginname === null) {
|
||||
|
||||
@@ -313,6 +313,10 @@ abstract class restore_structure_step extends restore_step {
|
||||
* @return void
|
||||
*/
|
||||
protected function add_subplugin_structure($subplugintype, $element, $plugintype = null, $pluginname = null) {
|
||||
global $CFG;
|
||||
// This global declaration is required, because where we do require_once($backupfile);
|
||||
// That file may in turn try to do require_once($CFG->dirroot ...).
|
||||
// That worked in the past, we should keep it working.
|
||||
|
||||
// Verify if this is a BC call for an activity restore. See NOTE above for this special case.
|
||||
if ($plugintype === null and $pluginname === null) {
|
||||
|
||||
@@ -126,6 +126,9 @@ class backp_settings_testcase extends basic_testcase {
|
||||
} catch (exception $e) {
|
||||
$this->assertTrue($e instanceof base_setting_exception);
|
||||
$this->assertEquals($e->errorcode, 'incorrect_object_passed');
|
||||
} catch (TypeError $e) {
|
||||
// On PHP7+ we get a TypeError raised, lets check we've the right error.
|
||||
$this->assertRegexp('/must be an instance of backup_setting_ui/', $e->getMessage());
|
||||
}
|
||||
restore_error_handler();
|
||||
|
||||
@@ -140,6 +143,9 @@ class backp_settings_testcase extends basic_testcase {
|
||||
} catch (exception $e) {
|
||||
$this->assertTrue($e instanceof base_setting_exception);
|
||||
$this->assertEquals($e->errorcode, 'incorrect_object_passed');
|
||||
} catch (TypeError $e) {
|
||||
// On PHP7+ we get a TypeError raised, lets check we've the right error.
|
||||
$this->assertRegexp('/must be an instance of backup_setting_ui/', $e->getMessage());
|
||||
}
|
||||
restore_error_handler();
|
||||
|
||||
@@ -302,6 +308,9 @@ class backp_settings_testcase extends basic_testcase {
|
||||
} catch (exception $e) {
|
||||
$this->assertTrue($e instanceof backup_setting_exception);
|
||||
$this->assertEquals($e->errorcode, 'incorrect_object_passed');
|
||||
} catch (TypeError $e) {
|
||||
// On PHP7+ we get a TypeError raised, lets check we've the right error.
|
||||
$this->assertRegexp('/must be an instance of base_setting/', $e->getMessage());
|
||||
}
|
||||
restore_error_handler();
|
||||
|
||||
|
||||
@@ -172,8 +172,8 @@ class behat_backup extends behat_base {
|
||||
"/descendant::tr[contains(., $fromcourse)]" .
|
||||
"/descendant::input[@type='radio']";
|
||||
$radionode = $this->find('xpath', $xpath, $exception);
|
||||
$radionode->check();
|
||||
$radionode->click();
|
||||
$radiofield = new behat_form_field($this->getSession(), $radionode);
|
||||
$radiofield->set_value(1);
|
||||
|
||||
$this->find_button(get_string('continue'))->press();
|
||||
$this->wait();
|
||||
|
||||
@@ -4,7 +4,6 @@ Feature: Import course's contents into another course
|
||||
As a teacher
|
||||
I need to import a course contents into another course selecting what I want to import
|
||||
|
||||
@javascript
|
||||
Scenario: Import course's contents to another course
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
|
||||
@@ -28,7 +28,6 @@ Feature: Option to include groups and groupings when importing a course to anoth
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
|
||||
@javascript
|
||||
Scenario: Include groups and groupings when importing a course to another course
|
||||
When I import "Course 1" course into "Course 2" course using this options:
|
||||
| Initial | Include groups and groupings | 1 |
|
||||
@@ -40,7 +39,6 @@ Feature: Option to include groups and groupings when importing a course to anoth
|
||||
And I should see "Grouping 1"
|
||||
And I should see "Grouping 2"
|
||||
|
||||
@javascript
|
||||
Scenario: Do not include groups and groupings when importing a course to another course
|
||||
When I import "Course 1" course into "Course 2" course using this options:
|
||||
| Initial | Include groups and groupings | 0 |
|
||||
|
||||
@@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
global $CFG;
|
||||
require_once($CFG->libdir . '/badgeslib.php');
|
||||
require_once($CFG->dirroot . '/badges/lib.php');
|
||||
|
||||
class core_badges_badgeslib_testcase extends advanced_testcase {
|
||||
protected $badgeid;
|
||||
@@ -472,4 +473,69 @@ class core_badges_badgeslib_testcase extends advanced_testcase {
|
||||
$this->assertStringMatchesFormat($testassertion->class, json_encode($assertion->get_badge_class()));
|
||||
$this->assertStringMatchesFormat($testassertion->issuer, json_encode($assertion->get_issuer()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the core_badges_myprofile_navigation() function.
|
||||
*/
|
||||
public function test_core_badges_myprofile_navigation() {
|
||||
// Set up the test.
|
||||
$tree = new \core_user\output\myprofile\tree();
|
||||
$this->setAdminUser();
|
||||
$badge = new badge($this->badgeid);
|
||||
$badge->issue($this->user->id, true);
|
||||
$iscurrentuser = true;
|
||||
$course = null;
|
||||
|
||||
// Enable badges.
|
||||
set_config('enablebadges', true);
|
||||
|
||||
// Check the node tree is correct.
|
||||
core_badges_myprofile_navigation($tree, $this->user, $iscurrentuser, $course);
|
||||
$reflector = new ReflectionObject($tree);
|
||||
$nodes = $reflector->getProperty('nodes');
|
||||
$nodes->setAccessible(true);
|
||||
$this->assertArrayHasKey('localbadges', $nodes->getValue($tree));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the core_badges_myprofile_navigation() function with badges disabled..
|
||||
*/
|
||||
public function test_core_badges_myprofile_navigation_badges_disabled() {
|
||||
// Set up the test.
|
||||
$tree = new \core_user\output\myprofile\tree();
|
||||
$this->setAdminUser();
|
||||
$badge = new badge($this->badgeid);
|
||||
$badge->issue($this->user->id, true);
|
||||
$iscurrentuser = false;
|
||||
$course = null;
|
||||
|
||||
// Disable badges.
|
||||
set_config('enablebadges', false);
|
||||
|
||||
// Check the node tree is correct.
|
||||
core_badges_myprofile_navigation($tree, $this->user, $iscurrentuser, $course);
|
||||
$reflector = new ReflectionObject($tree);
|
||||
$nodes = $reflector->getProperty('nodes');
|
||||
$nodes->setAccessible(true);
|
||||
$this->assertArrayNotHasKey('localbadges', $nodes->getValue($tree));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the core_badges_myprofile_navigation() function with a course badge.
|
||||
*/
|
||||
public function test_core_badges_myprofile_navigation_with_course_badge() {
|
||||
// Set up the test.
|
||||
$tree = new \core_user\output\myprofile\tree();
|
||||
$this->setAdminUser();
|
||||
$badge = new badge($this->coursebadge);
|
||||
$badge->issue($this->user->id, true);
|
||||
$iscurrentuser = false;
|
||||
|
||||
// Check the node tree is correct.
|
||||
core_badges_myprofile_navigation($tree, $this->user, $iscurrentuser, $this->course);
|
||||
$reflector = new ReflectionObject($tree);
|
||||
$nodes = $reflector->getProperty('nodes');
|
||||
$nodes->setAccessible(true);
|
||||
$this->assertArrayHasKey('localbadges', $nodes->getValue($tree));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,16 +221,13 @@ Feature: Award badges
|
||||
And I follow "Course 1"
|
||||
And I press "Mark as complete: Test assignment name"
|
||||
And I log out
|
||||
And I log in as "admin"
|
||||
# We can't wait for cron to happen, so the admin manually triggers it.
|
||||
And I trigger cron
|
||||
# The admin needs to trigger cron twice to see the completion status as completed.
|
||||
# We wait more than 1 minute because of the next cron run scheduled time.
|
||||
And I wait "61" seconds
|
||||
And I trigger cron
|
||||
# Finally the admin goes back to homepage to continue the user story.
|
||||
And I am on site homepage
|
||||
And I log out
|
||||
# Completion cron won't mark the whole course completed unless the
|
||||
# individual criteria was marked completed more than a second ago. So
|
||||
# run it twice, first to mark the criteria and second for the course.
|
||||
And I run the scheduled task "core\task\completion_regular_task"
|
||||
And I wait "1" seconds
|
||||
And I run the scheduled task "core\task\completion_regular_task"
|
||||
# The student should now see their badge.
|
||||
And I log in as "student1"
|
||||
And I follow "Profile" in the user menu
|
||||
Then I should see "Course Badge"
|
||||
|
||||
@@ -35,6 +35,6 @@ Feature: The activity results block displays student scores
|
||||
When I follow "Test assignment"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I set the following fields to these values:
|
||||
| id_modgrade_type | None |
|
||||
| id_grade_modgrade_type | None |
|
||||
And I press "Save and return to course"
|
||||
Then I should see "Error: the activity selected uses a grading method that is not supported by this block." in the "Activity results" "block"
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
@block @block_activity_results
|
||||
Feature: The activity results block displays student scores as scales
|
||||
In order to be display student scores as scales
|
||||
As a user
|
||||
I need to see the activity results block
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email | idnumber |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
|
||||
| student1 | Student | 1 | student1@example.com | S1 |
|
||||
| student2 | Student | 2 | student2@example.com | S2 |
|
||||
| student3 | Student | 3 | student3@example.com | S3 |
|
||||
| student4 | Student | 4 | student4@example.com | S4 |
|
||||
| student5 | Student | 5 | student5@example.com | S5 |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
| student3 | C1 | student |
|
||||
| student4 | C1 | student |
|
||||
| student5 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I navigate to "Scales" node in "Grade administration"
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| id_grade_modgrade_type | Scale |
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "Good" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "Average" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
|
||||
Scenario: Configure the block on the course page to show 1 high score
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 1 |
|
||||
| id_config_showworst | 0 |
|
||||
| id_config_nameformat | Display full names |
|
||||
| id_config_decimalpoints | 0 |
|
||||
And I press "Save changes"
|
||||
Then I should see "Student 1" in the "Activity results" "block"
|
||||
And I should see "Excellent!" in the "Activity results" "block"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using full names
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
| id_config_showworst | 0 |
|
||||
| id_config_nameformat | Display full names |
|
||||
And I press "Save changes"
|
||||
Then I should see "Student 1" in the "Activity results" "block"
|
||||
And I should see "Excellent!" in the "Activity results" "block"
|
||||
And I should see "Student 2" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
And I should see "Student 3" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
| id_config_showworst | 0 |
|
||||
| id_config_nameformat | Display only ID numbers |
|
||||
And I press "Save changes"
|
||||
Then I should see "User S1" in the "Activity results" "block"
|
||||
And I should see "Excellent!" in the "Activity results" "block"
|
||||
And I should see "User S2" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
And I should see "User S3" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
| id_config_showworst | 0 |
|
||||
| id_config_nameformat | Anonymous results |
|
||||
And I press "Save changes"
|
||||
Then I should see "User" in the "Activity results" "block"
|
||||
And I should not see "Student 1" in the "Activity results" "block"
|
||||
And I should see "Excellent!" in the "Activity results" "block"
|
||||
And I should not see "Student 2" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
And I should not see "Student 3" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
@@ -0,0 +1,153 @@
|
||||
@block @block_activity_results
|
||||
Feature: The activity results block displays student scores as scales
|
||||
In order to be display student scores as scales
|
||||
As a user
|
||||
I need to see the activity results block
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email | idnumber |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
|
||||
| student1 | Student | 1 | student1@example.com | S1 |
|
||||
| student2 | Student | 2 | student2@example.com | S2 |
|
||||
| student3 | Student | 3 | student3@example.com | S3 |
|
||||
| student4 | Student | 4 | student4@example.com | S4 |
|
||||
| student5 | Student | 5 | student5@example.com | S5 |
|
||||
| student6 | Student | 6 | student6@example.com | S6 |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "groups" exist:
|
||||
| name | course | idnumber |
|
||||
| Group 1 | C1 | G1 |
|
||||
| Group 2 | C1 | G2 |
|
||||
| Group 3 | C1 | G3 |
|
||||
| Group 4 | C1 | G4 |
|
||||
| Group 5 | C1 | G5 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
| student3 | C1 | student |
|
||||
| student4 | C1 | student |
|
||||
| student5 | C1 | student |
|
||||
| student6 | C1 | student |
|
||||
And the following "group members" exist:
|
||||
| user | group |
|
||||
| student1 | G1 |
|
||||
| student2 | G1 |
|
||||
| student3 | G2 |
|
||||
| student4 | G2 |
|
||||
| student5 | G3 |
|
||||
| student6 | G3 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I navigate to "Scales" node in "Grade administration"
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| id_grade_modgrade_type | Scale |
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "Good" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "Good" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "Average" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show 1 high score
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 1 |
|
||||
| id_config_showworst | 0 |
|
||||
| id_config_nameformat | Display full names |
|
||||
| id_config_usegroups | Yes |
|
||||
And I press "Save changes"
|
||||
Then I should see "Group 1" in the "Activity results" "block"
|
||||
And I should see "Excellent!" in the "Activity results" "block"
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I should see "Student 1" in the "Activity results" "block"
|
||||
And I should see "Excellent!" in the "Activity results" "block"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using full names
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
| id_config_showworst | 0 |
|
||||
| id_config_nameformat | Display full names |
|
||||
| id_config_usegroups | Yes |
|
||||
And I press "Save changes"
|
||||
Then I should see "Group 1" in the "Activity results" "block"
|
||||
And I should see "Excellent!" in the "Activity results" "block"
|
||||
And I should see "Group 2" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
And I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
And I log out
|
||||
And I log in as "student3"
|
||||
And I follow "Course 1"
|
||||
And I should see "Student 3" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
And I should see "Student 4" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
| id_config_showworst | 0 |
|
||||
| id_config_nameformat | Display only ID numbers |
|
||||
| id_config_usegroups | Yes |
|
||||
And I press "Save changes"
|
||||
Then I should see "Group" in the "Activity results" "block"
|
||||
And I should see "Excellent!" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I should see "User S1" in the "Activity results" "block"
|
||||
And I should see "Excellent!" in the "Activity results" "block"
|
||||
And I should see "User S2" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
| id_config_showworst | 0 |
|
||||
| id_config_nameformat | Anonymous results |
|
||||
| id_config_usegroups | Yes |
|
||||
And I press "Save changes"
|
||||
Then I should see "Group" in the "Activity results" "block"
|
||||
And I should see "Excellent!" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I should see "User" in the "Activity results" "block"
|
||||
And I should see "Excellent!" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
@@ -33,19 +33,15 @@ Feature: The activity results block displays student scores
|
||||
| student4 | C1 | student |
|
||||
| student5 | C1 | student |
|
||||
| student6 | C1 | student |
|
||||
|
||||
@javascript
|
||||
Scenario: Configure the block on the course page to show 1 high score
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And the following "group members" exist:
|
||||
| user | group |
|
||||
| student1 | G1 |
|
||||
| student2 | G1 |
|
||||
| student3 | G2 |
|
||||
| student4 | G2 |
|
||||
| student5 | G3 |
|
||||
| student6 | G3 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
@@ -64,7 +60,9 @@ Feature: The activity results block displays student scores
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
|
||||
Scenario: Configure the block on the course page to show 1 high score
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 1 |
|
||||
@@ -77,37 +75,8 @@ Feature: The activity results block displays student scores
|
||||
Then I should see "Group 1" in the "Activity results" "block"
|
||||
And I should see "95%" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show 1 high score as a fraction
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 1 |
|
||||
@@ -124,37 +93,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Student 1" in the "Activity results" "block"
|
||||
And I should see "100.00/100.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show 1 high score as a absolute numbers
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 1 |
|
||||
@@ -171,37 +111,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Student 1" in the "Activity results" "block"
|
||||
And I should see "100.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores as percentages
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
@@ -225,37 +136,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Student 2" in the "Activity results" "block"
|
||||
And I should see "90%" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores as fractions
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
@@ -278,37 +160,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Student 4" in the "Activity results" "block"
|
||||
And I should see "80.00/100.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores as absolute numbers
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
@@ -331,37 +184,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Student 2" in the "Activity results" "block"
|
||||
And I should see "90.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
@@ -382,37 +206,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "User S2" in the "Activity results" "block"
|
||||
And I should see "90.00%" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
|
||||
@@ -33,19 +33,15 @@ Feature: The activity results block displays student scores
|
||||
| student4 | C1 | student |
|
||||
| student5 | C1 | student |
|
||||
| student6 | C1 | student |
|
||||
|
||||
@javascript
|
||||
Scenario: Configure the block on the course page to show 1 high score
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And the following "group members" exist:
|
||||
| user | group |
|
||||
| student1 | G1 |
|
||||
| student2 | G1 |
|
||||
| student3 | G2 |
|
||||
| student4 | G2 |
|
||||
| student5 | G3 |
|
||||
| student6 | G3 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
@@ -64,7 +60,9 @@ Feature: The activity results block displays student scores
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
|
||||
Scenario: Configure the block on the course page to show 1 high score
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 1 |
|
||||
@@ -77,37 +75,8 @@ Feature: The activity results block displays student scores
|
||||
Then I should see "Group 1" in the "Activity results" "block"
|
||||
And I should see "95%" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show 1 high score as a fraction
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 1 |
|
||||
@@ -122,37 +91,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Group 1" in the "Activity results" "block"
|
||||
And I should see "95.00/100.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show 1 high score as a absolute numbers
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 1 |
|
||||
@@ -167,37 +107,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Group 1" in the "Activity results" "block"
|
||||
And I should see "95.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores as percentages
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
@@ -217,37 +128,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "75%" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores as fractions
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
@@ -266,37 +148,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "75.00/100.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores as absolute numbers
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
@@ -315,37 +168,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "75.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
@@ -362,37 +186,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "85.00%" in the "Activity results" "block"
|
||||
And I should see "75.00%" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 3 |
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
@block @block_activity_results
|
||||
Feature: The activity results block displays student scores as scales
|
||||
In order to be display student scores as scales
|
||||
As a user
|
||||
I need to see the activity results block
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email | idnumber |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
|
||||
| student1 | Student | 1 | student1@example.com | S1 |
|
||||
| student2 | Student | 2 | student2@example.com | S2 |
|
||||
| student3 | Student | 3 | student3@example.com | S3 |
|
||||
| student4 | Student | 4 | student4@example.com | S4 |
|
||||
| student5 | Student | 5 | student5@example.com | S5 |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
| student3 | C1 | student |
|
||||
| student4 | C1 | student |
|
||||
| student5 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I navigate to "Scales" node in "Grade administration"
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| id_grade_modgrade_type | Scale |
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "Good" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "Average" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
|
||||
Scenario: Configure the block on the course page to show 1 low score
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
| id_config_showworst | 1 |
|
||||
| id_config_gradeformat | Percentages |
|
||||
| id_config_nameformat | Display full names |
|
||||
| id_config_decimalpoints | 0 |
|
||||
And I press "Save changes"
|
||||
Then I should see "Student 5" in the "Activity results" "block"
|
||||
And I should see "Not good enough" in the "Activity results" "block"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores using full names
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
| id_config_showworst | 3 |
|
||||
| id_config_nameformat | Display full names |
|
||||
And I press "Save changes"
|
||||
Then I should see "Student 5" in the "Activity results" "block"
|
||||
And I should see "Not good enough" in the "Activity results" "block"
|
||||
And I should see "Student 4" in the "Activity results" "block"
|
||||
And I should see "Average" in the "Activity results" "block"
|
||||
And I should see "Student 3" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
| id_config_showworst | 3 |
|
||||
| id_config_nameformat | Display only ID numbers |
|
||||
And I press "Save changes"
|
||||
Then I should see "User S5" in the "Activity results" "block"
|
||||
And I should see "Not good enough" in the "Activity results" "block"
|
||||
And I should see "User S4" in the "Activity results" "block"
|
||||
And I should see "Average" in the "Activity results" "block"
|
||||
And I should see "User S3" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
| id_config_showworst | 3 |
|
||||
| id_config_nameformat | Anonymous results |
|
||||
And I press "Save changes"
|
||||
Then I should see "User" in the "Activity results" "block"
|
||||
And I should not see "Student 5" in the "Activity results" "block"
|
||||
And I should see "Not good enough" in the "Activity results" "block"
|
||||
And I should not see "Student 4" in the "Activity results" "block"
|
||||
And I should see "Average" in the "Activity results" "block"
|
||||
And I should not see "Student 3" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
@@ -0,0 +1,150 @@
|
||||
@block @block_activity_results
|
||||
Feature: The activity results block displays student scores as scales
|
||||
In order to be display student scores as scales
|
||||
As a user
|
||||
I need to see the activity results block
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email | idnumber |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
|
||||
| student1 | Student | 1 | student1@example.com | S1 |
|
||||
| student2 | Student | 2 | student2@example.com | S2 |
|
||||
| student3 | Student | 3 | student3@example.com | S3 |
|
||||
| student4 | Student | 4 | student4@example.com | S4 |
|
||||
| student5 | Student | 5 | student5@example.com | S5 |
|
||||
| student6 | Student | 6 | student6@example.com | S6 |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "groups" exist:
|
||||
| name | course | idnumber |
|
||||
| Group 1 | C1 | G1 |
|
||||
| Group 2 | C1 | G2 |
|
||||
| Group 3 | C1 | G3 |
|
||||
| Group 4 | C1 | G4 |
|
||||
| Group 5 | C1 | G5 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
| student3 | C1 | student |
|
||||
| student4 | C1 | student |
|
||||
| student5 | C1 | student |
|
||||
| student6 | C1 | student |
|
||||
And the following "group members" exist:
|
||||
| user | group |
|
||||
| student1 | G1 |
|
||||
| student2 | G1 |
|
||||
| student3 | G2 |
|
||||
| student4 | G2 |
|
||||
| student5 | G3 |
|
||||
| student6 | G3 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I navigate to "Scales" node in "Grade administration"
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| id_grade_modgrade_type | Scale |
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "Good" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "Good" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "Average" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show 1 low score
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
| id_config_showworst | 1 |
|
||||
| id_config_nameformat | Display full names |
|
||||
| id_config_usegroups | Yes |
|
||||
And I press "Save changes"
|
||||
Then I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
And I log out
|
||||
And I log in as "student5"
|
||||
And I follow "Course 1"
|
||||
And I should see "Student 6" in the "Activity results" "block"
|
||||
And I should see "Average" in the "Activity results" "block"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using full names
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
| id_config_showworst | 2 |
|
||||
| id_config_nameformat | Display full names |
|
||||
| id_config_usegroups | Yes |
|
||||
And I press "Save changes"
|
||||
Then I should see "Group 2" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
And I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
And I log out
|
||||
And I log in as "student3"
|
||||
And I follow "Course 1"
|
||||
And I should see "Student 3" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
And I should see "Student 4" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
| id_config_showworst | 2 |
|
||||
| id_config_nameformat | Display only ID numbers |
|
||||
| id_config_usegroups | Yes |
|
||||
And I press "Save changes"
|
||||
Then I should see "Group" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
And I log out
|
||||
And I log in as "student5"
|
||||
And I follow "Course 1"
|
||||
And I should see "User S5" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
And I should see "User S6" in the "Activity results" "block"
|
||||
And I should see "Average" in the "Activity results" "block"
|
||||
|
||||
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
| id_config_showworst | 2 |
|
||||
| id_config_nameformat | Anonymous results |
|
||||
| id_config_usegroups | Yes |
|
||||
And I press "Save changes"
|
||||
Then I should see "Group" in the "Activity results" "block"
|
||||
And I should see "Very good" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
And I log out
|
||||
And I log in as "student5"
|
||||
And I follow "Course 1"
|
||||
And I should see "User" in the "Activity results" "block"
|
||||
And I should see "Good" in the "Activity results" "block"
|
||||
And I should see "Average" in the "Activity results" "block"
|
||||
|
||||
@@ -33,19 +33,15 @@ Feature: The activity results block displays student scores
|
||||
| student4 | C1 | student |
|
||||
| student5 | C1 | student |
|
||||
| student6 | C1 | student |
|
||||
|
||||
@javascript
|
||||
Scenario: Configure the block on the course page to show 1 low score
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And the following "group members" exist:
|
||||
| user | group |
|
||||
| student1 | G1 |
|
||||
| student2 | G1 |
|
||||
| student3 | G2 |
|
||||
| student4 | G2 |
|
||||
| student5 | G3 |
|
||||
| student6 | G3 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
@@ -64,7 +60,9 @@ Feature: The activity results block displays student scores
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
|
||||
Scenario: Configure the block on the course page to show 1 low score
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -77,37 +75,8 @@ Feature: The activity results block displays student scores
|
||||
Then I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "75%" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show 1 low score as a fraction
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -124,37 +93,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Student 6" in the "Activity results" "block"
|
||||
And I should see "70.00/100.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show 1 low score as a absolute numbers
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -171,37 +111,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Student 6" in the "Activity results" "block"
|
||||
And I should see "70.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores as percentages
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -223,37 +134,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Student 5" in the "Activity results" "block"
|
||||
And I should see "80%" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores as fractions
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -274,37 +156,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Student 4" in the "Activity results" "block"
|
||||
And I should see "80.00/100.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores as absolute numbers
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -325,37 +178,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Student 6" in the "Activity results" "block"
|
||||
And I should see "70.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -375,37 +199,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "User S2" in the "Activity results" "block"
|
||||
And I should see "90.00%" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
|
||||
@@ -33,19 +33,15 @@ Feature: The activity results block displays student scores
|
||||
| student4 | C1 | student |
|
||||
| student5 | C1 | student |
|
||||
| student6 | C1 | student |
|
||||
|
||||
@javascript
|
||||
Scenario: Configure the block on the course page to show 1 low score
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And the following "group members" exist:
|
||||
| user | group |
|
||||
| student1 | G1 |
|
||||
| student2 | G1 |
|
||||
| student3 | G2 |
|
||||
| student4 | G2 |
|
||||
| student5 | G3 |
|
||||
| student6 | G3 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
@@ -64,7 +60,9 @@ Feature: The activity results block displays student scores
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
|
||||
Scenario: Configure the block on the course page to show 1 low score
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -77,37 +75,8 @@ Feature: The activity results block displays student scores
|
||||
Then I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "75%" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show 1 low score as a fraction
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -122,37 +91,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "75.00/100.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show 1 low score as a absolute numbers
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -167,37 +107,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "75.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores as percentages
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -219,37 +130,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "75%" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores as fractions
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -266,37 +148,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "75.00/100.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores as absolute numbers
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -313,37 +166,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Group 3" in the "Activity results" "block"
|
||||
And I should see "75.00" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
@@ -359,37 +183,8 @@ Feature: The activity results block displays student scores
|
||||
And I should see "85.00%" in the "Activity results" "block"
|
||||
And I should see "75.00%" in the "Activity results" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
|
||||
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
|
||||
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
|
||||
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
|
||||
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
|
||||
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assignment |
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
|
||||
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add the "Activity results" block
|
||||
Given I add the "Activity results" block
|
||||
When I configure the "Activity results" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_showbest | 0 |
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
@block @block_admin_bookmarks
|
||||
Feature: Add a bookmarks to an admin pages
|
||||
In order to speed up common tasks
|
||||
As an admin
|
||||
I need to add and access pages through bookmarks
|
||||
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I navigate to "Scheduled tasks" node in "Site administration > Server"
|
||||
And I click on "Bookmark this page" "link" in the "Admin bookmarks" "block"
|
||||
And I log out
|
||||
|
||||
# Test bookmark functionality using the "User profile fields" page as our bookmark.
|
||||
Scenario: Admin page can be bookmarked
|
||||
Given I log in as "admin"
|
||||
And I navigate to "User profile fields" node in "Site administration > Users > Accounts"
|
||||
When I click on "Bookmark this page" "link" in the "Admin bookmarks" "block"
|
||||
Then I should see "User profile fields" in the "Admin bookmarks" "block"
|
||||
# See the existing bookmark is there too.
|
||||
And I should see "Scheduled tasks" in the "Admin bookmarks" "block"
|
||||
|
||||
Scenario: Admin page can be accessed through bookmarks block
|
||||
Given I log in as "admin"
|
||||
And I navigate to "Notifications" node in "Site administration"
|
||||
And I click on "Scheduled tasks" "link" in the "Admin bookmarks" "block"
|
||||
# Verify that we are on the right page.
|
||||
Then I should see "Scheduled tasks" in the "h1" "css_element"
|
||||
|
||||
Scenario: Admin page can be removed from bookmarks
|
||||
Given I log in as "admin"
|
||||
And I navigate to "Notifications" node in "Site administration"
|
||||
And I click on "Scheduled tasks" "link" in the "Admin bookmarks" "block"
|
||||
When I click on "Unbookmark this page" "link" in the "Admin bookmarks" "block"
|
||||
Then I should see "Bookmark deleted"
|
||||
And I wait to be redirected
|
||||
And I should not see "Scheduled tasks" in the "Admin bookmarks" "block"
|
||||
@@ -79,5 +79,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
@block @block_blog_menu
|
||||
Feature: Enable Block blog menu in a course
|
||||
In order to enable the blog menu in a course
|
||||
As a teacher
|
||||
I can add blog menu block to a course
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email | idnumber |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
|
||||
Scenario: Add the block to a the course when blogs are disabled
|
||||
Given I log in as "admin"
|
||||
And the following config values are set as admin:
|
||||
| enableblogs | 0 |
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
When I add the "Blog menu" block
|
||||
Then I should see "Blogging is disabled!" in the "Blog menu" "block"
|
||||
|
||||
Scenario: Add the block to a the course when blog associations are disabled
|
||||
Given I log in as "admin"
|
||||
And the following config values are set as admin:
|
||||
| useblogassociations | 0 |
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
When I add the "Blog menu" block
|
||||
Then I should see "Blog entries" in the "Blog menu" "block"
|
||||
And I should see "Add a new entry" in the "Blog menu" "block"
|
||||
And I should not see "View all entries for this course" in the "Blog menu" "block"
|
||||
And I should not see "View my entries about this course" in the "Blog menu" "block"
|
||||
And I should not see "Add an entry about this course" in the "Blog menu" "block"
|
||||
|
||||
Scenario: Add the block to a the course when blog associations are enabled
|
||||
Given I log in as "admin"
|
||||
And the following config values are set as admin:
|
||||
| useblogassociations | 1 |
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
When I add the "Blog menu" block
|
||||
Then I should see "Blog entries" in the "Blog menu" "block"
|
||||
And I should see "Add a new entry" in the "Blog menu" "block"
|
||||
And I should see "View all entries for this course" in the "Blog menu" "block"
|
||||
And I should see "View my entries about this course" in the "Blog menu" "block"
|
||||
And I should see "Add an entry about this course" in the "Blog menu" "block"
|
||||
|
||||
Scenario: Add the block to a the course when RSS is disabled
|
||||
Given I log in as "admin"
|
||||
And the following config values are set as admin:
|
||||
| enablerssfeeds | 0 |
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
When I add the "Blog menu" block
|
||||
Then I should not see "Blog RSS feed" in the "Blog menu" "block"
|
||||
And I should see "Add a new entry" in the "Blog menu" "block"
|
||||
|
||||
Scenario: Add the block to a the course when RSS is enabled
|
||||
Given I log in as "admin"
|
||||
And the following config values are set as admin:
|
||||
| enablerssfeeds | 1 |
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
When I add the "Blog menu" block
|
||||
Then I should see "Blog RSS feed" in the "Blog menu" "block"
|
||||
And I should see "Add a new entry" in the "Blog menu" "block"
|
||||
@@ -0,0 +1,199 @@
|
||||
@block @block_blog_menu
|
||||
Feature: Enable Block blog menu in a course
|
||||
In order to enable the blog menu in a course
|
||||
As a teacher
|
||||
I can add blog menu block to a course
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email | idnumber |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
|
||||
| student1 | Student | 1 | student1@example.com | S1 |
|
||||
| student2 | Student | 2 | student2@example.com | S2 |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add the "Blog menu" block
|
||||
And I log out
|
||||
|
||||
Scenario: Students use the blog menu block to post blogs
|
||||
Given I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add a new entry"
|
||||
When I set the following fields to these values:
|
||||
| Entry title | S1 First Blog |
|
||||
| Blog entry body | This is my awesome blog! |
|
||||
And I press "Save changes"
|
||||
Then I should see "S1 First Blog"
|
||||
And I should see "This is my awesome blog!"
|
||||
And I follow "Dashboard"
|
||||
And I follow "Course 1"
|
||||
And I follow "Blog entries"
|
||||
And I should see "S1 First Blog"
|
||||
And I should see "This is my awesome blog!"
|
||||
|
||||
Scenario: Students use the blog menu block to view their blogs about the course
|
||||
Given I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add an entry about this course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | S1 First Blog |
|
||||
| Blog entry body | This is my awesome blog about this course! |
|
||||
And I press "Save changes"
|
||||
And I should see "S1 First Blog"
|
||||
And I should see "This is my awesome blog about this course!"
|
||||
And I should see "Associated Course: C1"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add a new entry"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | S2 Second Blog |
|
||||
| Blog entry body | My unrelated blog! |
|
||||
And I press "Save changes"
|
||||
And I should see "S2 Second Blog"
|
||||
And I should see "My unrelated blog!"
|
||||
And I should not see "Associated Course: C1"
|
||||
And I follow "Dashboard"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add an entry about this course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | S2 First Blog |
|
||||
| Blog entry body | My course blog is better! |
|
||||
And I press "Save changes"
|
||||
And I should see "S2 First Blog"
|
||||
And I should see "My course blog is better!"
|
||||
And I should see "Associated Course: C1"
|
||||
And I follow "Dashboard"
|
||||
And I follow "Course 1"
|
||||
When I follow "View my entries about this course"
|
||||
Then I should see "S2 First Blog"
|
||||
And I should not see "S2 Second Blog"
|
||||
And I should not see "S1 First Blog"
|
||||
|
||||
Scenario: Students use the blog menu block to view all blogs about the course
|
||||
Given I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add an entry about this course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | S1 First Blog |
|
||||
| Blog entry body | This is my awesome blog about this course! |
|
||||
And I press "Save changes"
|
||||
And I should see "S1 First Blog"
|
||||
And I should see "This is my awesome blog about this course!"
|
||||
And I should see "Associated Course: C1"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add a new entry"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | S2 Second Blog |
|
||||
| Blog entry body | My unrelated blog! |
|
||||
And I press "Save changes"
|
||||
And I should see "S2 Second Blog"
|
||||
And I should see "My unrelated blog!"
|
||||
And I should not see "Associated Course: C1"
|
||||
And I follow "Dashboard"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add an entry about this course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | S2 First Blog |
|
||||
| Blog entry body | My course blog is better! |
|
||||
And I press "Save changes"
|
||||
And I should see "S2 First Blog"
|
||||
And I should see "My course blog is better!"
|
||||
And I should see "Associated Course: C1"
|
||||
And I follow "Dashboard"
|
||||
And I follow "Course 1"
|
||||
When I follow "View all entries for this course"
|
||||
Then I should see "S1 First Blog"
|
||||
And I should see "S2 First Blog"
|
||||
And I should not see "S2 Second Blog"
|
||||
|
||||
Scenario: Students use the blog menu block to view all their blog entries
|
||||
Given I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add an entry about this course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | S1 First Blog |
|
||||
| Blog entry body | This is my awesome blog about this course! |
|
||||
And I press "Save changes"
|
||||
And I should see "S1 First Blog"
|
||||
And I should see "This is my awesome blog about this course!"
|
||||
And I should see "Associated Course: C1"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add a new entry"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | S2 Second Blog |
|
||||
| Blog entry body | My unrelated blog! |
|
||||
And I press "Save changes"
|
||||
And I should see "S2 Second Blog"
|
||||
And I should see "My unrelated blog!"
|
||||
And I should not see "Associated Course: C1"
|
||||
And I follow "Dashboard"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add an entry about this course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | S2 First Blog |
|
||||
| Blog entry body | My course blog is better! |
|
||||
And I press "Save changes"
|
||||
And I should see "S2 First Blog"
|
||||
And I should see "My course blog is better!"
|
||||
And I should see "Associated Course: C1"
|
||||
And I follow "Dashboard"
|
||||
And I follow "Course 1"
|
||||
When I follow "Blog entries"
|
||||
Then I should see "S2 First Blog"
|
||||
And I should see "S2 Second Blog"
|
||||
And I should not see "S1 First Blog"
|
||||
|
||||
Scenario: Teacher searches for student blogs
|
||||
Given I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add an entry about this course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | S1 First Blog |
|
||||
| Blog entry body | This is my awesome blog about this course! |
|
||||
And I press "Save changes"
|
||||
And I should see "S1 First Blog"
|
||||
And I should see "This is my awesome blog about this course!"
|
||||
And I should see "Associated Course: C1"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add a new entry"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | S2 Second Blog |
|
||||
| Blog entry body | My unrelated blog! |
|
||||
And I press "Save changes"
|
||||
And I should see "S2 Second Blog"
|
||||
And I should see "My unrelated blog!"
|
||||
And I should not see "Associated Course: C1"
|
||||
And I follow "Dashboard"
|
||||
And I follow "Course 1"
|
||||
And I follow "Add an entry about this course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | S2 First Blog |
|
||||
| Blog entry body | My course blog is better! |
|
||||
And I press "Save changes"
|
||||
And I should see "S2 First Blog"
|
||||
And I should see "My course blog is better!"
|
||||
And I should see "Associated Course: C1"
|
||||
And I log out
|
||||
When I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I set the field "blogsearchquery" to "First"
|
||||
And I press "Search"
|
||||
Then I should see "S1 First Blog"
|
||||
And I should see "S2 First Blog"
|
||||
And I should not see "S2 Second Blog"
|
||||
@@ -0,0 +1,30 @@
|
||||
@block @block_blog_menu
|
||||
Feature: Enable Block blog menu on the frontpage
|
||||
In order to enable the blog menu on the frontpage
|
||||
As an admin
|
||||
I can add blog menu block to the frontpage
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email | idnumber |
|
||||
| student1 | Student | 1 | student1@example.com | S1 |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I navigate to "Turn editing on" node in "Front page settings"
|
||||
And I add the "Blog menu" block
|
||||
And I log out
|
||||
|
||||
Scenario: Students use the blog menu block to post blogs
|
||||
Given I log in as "student1"
|
||||
And I am on site homepage
|
||||
And I follow "Add a new entry"
|
||||
When I set the following fields to these values:
|
||||
| Entry title | S1 First Blog |
|
||||
| Blog entry body | This is my awesome blog! |
|
||||
And I press "Save changes"
|
||||
Then I should see "S1 First Blog"
|
||||
And I should see "This is my awesome blog!"
|
||||
And I am on site homepage
|
||||
And I follow "Blog entries"
|
||||
And I should see "S1 First Blog"
|
||||
And I should see "This is my awesome blog!"
|
||||
@@ -79,5 +79,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -79,5 +79,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -69,5 +69,8 @@ function xmldb_block_community_upgrade($oldversion) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -76,5 +76,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -80,5 +80,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ class block_edit_form extends moodleform {
|
||||
global $CFG;
|
||||
$this->block = $block;
|
||||
$this->page = $page;
|
||||
parent::moodleform($actionurl);
|
||||
parent::__construct($actionurl);
|
||||
}
|
||||
|
||||
function definition() {
|
||||
|
||||
@@ -62,9 +62,16 @@ class restore_glossary_random_block_task extends restore_block_task {
|
||||
if (!empty($config->glossary)) {
|
||||
// Get glossary mapping and replace it in config
|
||||
if ($glossarymap = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'glossary', $config->glossary)) {
|
||||
$config->glossary = $glossarymap->newitemid;
|
||||
$mappedglossary = $DB->get_record('glossary', array('id' => $glossarymap->newitemid),
|
||||
'id,course,globalglossary', MUST_EXIST);
|
||||
$config->glossary = $mappedglossary->id;
|
||||
$config->courseid = $mappedglossary->course;
|
||||
$config->globalglossary = $mappedglossary->globalglossary;
|
||||
$configdata = base64_encode(serialize($config));
|
||||
$DB->set_field('block_instances', 'configdata', $configdata, array('id' => $blockid));
|
||||
} else {
|
||||
// The block refers to a glossary not present in the backup file.
|
||||
$DB->set_field('block_instances', 'configdata', '', array('id' => $blockid));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,14 +84,13 @@ class block_glossary_random extends block_base {
|
||||
$limitfrom = 0;
|
||||
$limitnum = 1;
|
||||
|
||||
$BROWSE = 'timemodified';
|
||||
$orderby = 'timemodified ASC';
|
||||
|
||||
switch ($this->config->type) {
|
||||
|
||||
case BGR_RANDOMLY:
|
||||
$i = rand(1,$numberofentries);
|
||||
$limitfrom = $i-1;
|
||||
$SORT = 'ASC';
|
||||
break;
|
||||
|
||||
case BGR_NEXTONE:
|
||||
@@ -104,11 +103,10 @@ class block_glossary_random extends block_base {
|
||||
$i = 1;
|
||||
}
|
||||
$limitfrom = $i-1;
|
||||
$SORT = 'ASC';
|
||||
break;
|
||||
|
||||
case BGR_NEXTALPHA:
|
||||
$BROWSE = 'concept';
|
||||
$orderby = 'concept ASC';
|
||||
if (isset($this->config->previous)) {
|
||||
$i = $this->config->previous + 1;
|
||||
} else {
|
||||
@@ -118,20 +116,19 @@ class block_glossary_random extends block_base {
|
||||
$i = 1;
|
||||
}
|
||||
$limitfrom = $i-1;
|
||||
$SORT = 'ASC';
|
||||
break;
|
||||
|
||||
default: // BGR_LASTMODIFIED
|
||||
$i = $numberofentries;
|
||||
$limitfrom = 0;
|
||||
$SORT = 'DESC';
|
||||
$orderby = 'timemodified DESC, id DESC';
|
||||
break;
|
||||
}
|
||||
|
||||
if ($entry = $DB->get_records_sql("SELECT id, concept, definition, definitionformat, definitiontrust
|
||||
FROM {glossary_entries}
|
||||
WHERE glossaryid = ? AND approved = 1
|
||||
ORDER BY $BROWSE $SORT", array($this->config->glossary), $limitfrom, $limitnum)) {
|
||||
ORDER BY $orderby", array($this->config->glossary), $limitfrom, $limitnum)) {
|
||||
|
||||
$entry = reset($entry);
|
||||
|
||||
|
||||
@@ -56,5 +56,8 @@ function xmldb_block_html_upgrade($oldversion) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -81,5 +81,8 @@ function xmldb_block_navigation_upgrade($oldversion, $block) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -36,31 +36,6 @@ defined('MOODLE_INTERNAL') || die();
|
||||
*/
|
||||
class block_online_users_generator extends testing_block_generator {
|
||||
|
||||
/**
|
||||
* Create new block instance
|
||||
* @param array|stdClass $record
|
||||
* @param array $options
|
||||
* @return stdClass activity record with extra cmid field
|
||||
*/
|
||||
public function create_instance($record = null, array $options = null) {
|
||||
global $DB, $CFG;
|
||||
require_once("$CFG->dirroot/mod/page/locallib.php");
|
||||
|
||||
$this->instancecount++;
|
||||
|
||||
$record = (object)(array)$record;
|
||||
$options = (array)$options;
|
||||
|
||||
$record = $this->prepare_record($record);
|
||||
|
||||
$id = $DB->insert_record('block_instances', $record);
|
||||
context_block::instance($id);
|
||||
|
||||
$instance = $DB->get_record('block_instances', array('id'=>$id), '*', MUST_EXIST);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create (simulated) logged in users and add some of them to groups in a course
|
||||
*/
|
||||
|
||||
@@ -104,5 +104,8 @@ function xmldb_block_quiz_results_upgrade($oldversion, $block) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -90,5 +90,8 @@ function xmldb_block_recent_activity_upgrade($oldversion, $block) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -50,5 +50,8 @@ function xmldb_block_rss_client_upgrade($oldversion) {
|
||||
upgrade_block_savepoint(true, 2015071700, 'rss_client');
|
||||
}
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class feed_edit_form extends moodleform {
|
||||
function __construct($actionurl, $isadding, $caneditshared) {
|
||||
$this->isadding = $isadding;
|
||||
$this->caneditshared = $caneditshared;
|
||||
parent::moodleform($actionurl);
|
||||
parent::__construct($actionurl);
|
||||
}
|
||||
|
||||
function definition() {
|
||||
|
||||
@@ -40,7 +40,7 @@ class block_rss_client_cron_testcase extends advanced_testcase {
|
||||
* than the current time the attempt is skipped.
|
||||
*/
|
||||
public function test_skip() {
|
||||
global $DB;
|
||||
global $DB, $CFG;
|
||||
$this->resetAfterTest();
|
||||
// Create a RSS feed record with a skip until time set to the future.
|
||||
$record = (object) array(
|
||||
@@ -57,8 +57,12 @@ class block_rss_client_cron_testcase extends advanced_testcase {
|
||||
|
||||
$block = new block_rss_client();
|
||||
ob_start();
|
||||
|
||||
// Silence SimplePie php notices.
|
||||
@$block->cron();
|
||||
$errorlevel = error_reporting($CFG->debug & ~E_USER_NOTICE);
|
||||
$block->cron();
|
||||
error_reporting($errorlevel);
|
||||
|
||||
$cronoutput = ob_get_clean();
|
||||
$this->assertContains('skipping until ' . userdate($record->skipuntil), $cronoutput);
|
||||
$this->assertContains('0 feeds refreshed (took ', $cronoutput);
|
||||
@@ -68,7 +72,7 @@ class block_rss_client_cron_testcase extends advanced_testcase {
|
||||
* Test that when a feed has an error the skip time is increaed correctly.
|
||||
*/
|
||||
public function test_error() {
|
||||
global $DB;
|
||||
global $DB, $CFG;
|
||||
$this->resetAfterTest();
|
||||
$time = time();
|
||||
// A record that has failed before.
|
||||
@@ -113,8 +117,12 @@ class block_rss_client_cron_testcase extends advanced_testcase {
|
||||
// Run the cron.
|
||||
$block = new block_rss_client();
|
||||
ob_start();
|
||||
|
||||
// Silence SimplePie php notices.
|
||||
@$block->cron();
|
||||
$errorlevel = error_reporting($CFG->debug & ~E_USER_NOTICE);
|
||||
$block->cron();
|
||||
error_reporting($errorlevel);
|
||||
|
||||
$cronoutput = ob_get_clean();
|
||||
$skiptime1 = $record->skiptime * 2;
|
||||
$message1 = 'http://example.com/rss Error: could not load/find the RSS feed - skipping for ' . $skiptime1 . ' seconds.';
|
||||
|
||||
@@ -92,5 +92,8 @@ function xmldb_block_section_links_upgrade($oldversion, $block) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -80,5 +80,8 @@ function xmldb_block_selfcompletion_upgrade($oldversion, $block) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -81,5 +81,8 @@ function xmldb_block_settings_upgrade($oldversion, $block) {
|
||||
// Moodle v2.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -48,11 +48,11 @@ Feature: Add and configure blocks throughout the site
|
||||
# The first block matching the pattern should be top-left block
|
||||
And I should see "Comments" in the "//*[@id='region-pre' or @id='block-region-side-pre']/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' block ')]" "xpath_element"
|
||||
|
||||
Scenario: Blocks on the dashboard page cannot have roles assigned to them
|
||||
Scenario: Blocks on the dashboard page can have roles assigned to them
|
||||
Given I log in as "manager1"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I press "Customise this page"
|
||||
Then I should not see "Assign roles in Navigation block"
|
||||
Then I should see "Assign roles in Navigation block"
|
||||
|
||||
Scenario: Blocks on courses can have roles assigned to them
|
||||
Given I log in as "teacher1"
|
||||
|
||||
+5
-4
@@ -141,14 +141,15 @@ if ($action === 'delete') {
|
||||
// Output edit mode title.
|
||||
echo $OUTPUT->heading($strblogs . ': ' . get_string('deleteentry', 'blog'), 2);
|
||||
|
||||
echo $OUTPUT->confirm(get_string('blogdeleteconfirm', 'blog'),
|
||||
new moodle_url('edit.php', $optionsyes),
|
||||
new moodle_url('index.php', $optionsno));
|
||||
|
||||
echo '<br />';
|
||||
// Output the entry.
|
||||
$entry->prepare_render();
|
||||
echo $output->render($entry);
|
||||
|
||||
echo '<br />';
|
||||
echo $OUTPUT->confirm(get_string('blogdeleteconfirm', 'blog'),
|
||||
new moodle_url('edit.php', $optionsyes),
|
||||
new moodle_url('index.php', $optionsno));
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
|
||||
@@ -94,14 +94,16 @@ if (!empty($blogs)) {
|
||||
$editurl = new moodle_url('/blog/external_blog_edit.php', array('id' => $blog->id));
|
||||
$editicon = $OUTPUT->action_icon($editurl, new pix_icon('t/edit', get_string('editexternalblog', 'blog')));
|
||||
|
||||
$deletelink = new moodle_url('/blog/external_blogs.php', array('delete' => $blog->id, 'sesskey'=>sesskey()));
|
||||
$deleteicon = $OUTPUT->action_icon($deletelink, new pix_icon('t/delete', get_string('deleteexternalblog', 'blog')));
|
||||
$deletelink = new moodle_url('/blog/external_blogs.php', array('delete' => $blog->id, 'sesskey' => sesskey()));
|
||||
$action = new confirm_action(get_string('externalblogdeleteconfirm', 'blog'));
|
||||
$deleteicon = $OUTPUT->action_icon($deletelink, new pix_icon('t/delete', get_string('deleteexternalblog', 'blog')),
|
||||
$action);
|
||||
|
||||
$table->data[] = new html_table_row(array($blog->name,
|
||||
$blog->url,
|
||||
userdate($blog->timefetched),
|
||||
$validicon,
|
||||
$editicon . ' '. $deleteicon));
|
||||
$editicon . $deleteicon));
|
||||
}
|
||||
echo html_writer::table($table);
|
||||
}
|
||||
|
||||
+2
-2
@@ -63,9 +63,9 @@ if ($entryid and !isset($userid)) {
|
||||
$userid = $entry->userid;
|
||||
}
|
||||
|
||||
if (isset($userid) && !isset($courseid)) {
|
||||
if (isset($userid) && empty($courseid)) {
|
||||
$context = context_user::instance($userid);
|
||||
} else if (isset($courseid) && $courseid != SITEID) {
|
||||
} else if (!empty($courseid) && $courseid != SITEID) {
|
||||
$context = context_course::instance($courseid);
|
||||
} else {
|
||||
$context = context_system::instance();
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
@core @core_blog
|
||||
Feature: Delete a blog entry
|
||||
In order to manage my blog entries
|
||||
As a user
|
||||
I need to be able to delete entries I no longer wish to appear
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| testuser | Test | User | moodle@example.com |
|
||||
And I log in as "testuser"
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I follow "Add a new entry"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | Blog post one |
|
||||
| Blog entry body | User 1 blog post content |
|
||||
And I press "Save changes"
|
||||
And I follow "Add a new entry"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | Blog post two |
|
||||
| Blog entry body | User 1 blog post content |
|
||||
And I press "Save changes"
|
||||
And I am on site homepage
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
|
||||
Scenario: Delete blog post results in post deleted
|
||||
Given I follow "Blog post one"
|
||||
And I follow "Delete"
|
||||
And I should see "Delete this blog entry?"
|
||||
When I press "Continue"
|
||||
Then I should not see "Blog post one"
|
||||
And I should see "Blog post two"
|
||||
|
||||
Scenario: Delete confirmation screen works and allows cancel
|
||||
Given I follow "Blog post one"
|
||||
When I follow "Delete"
|
||||
Then I should see "Delete this blog entry?"
|
||||
And I press "Cancel"
|
||||
And I should see "Blog post one"
|
||||
And I should see "Blog post two"
|
||||
|
||||
@@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/blog/lib.php');
|
||||
/**
|
||||
* Test functions that rely on the DB tables
|
||||
*/
|
||||
class core_bloglib_testcase extends advanced_testcase {
|
||||
class core_blog_lib_testcase extends advanced_testcase {
|
||||
|
||||
private $courseid;
|
||||
private $cmid;
|
||||
@@ -472,5 +472,73 @@ class core_bloglib_testcase extends advanced_testcase {
|
||||
$this->assertEquals($url, $event->get_url());
|
||||
$this->assertEventContextNotUsed($event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the core_blog_myprofile_navigation() function.
|
||||
*/
|
||||
public function test_core_blog_myprofile_navigation() {
|
||||
global $USER;
|
||||
|
||||
// Set up the test.
|
||||
$tree = new \core_user\output\myprofile\tree();
|
||||
$this->setAdminUser();
|
||||
$iscurrentuser = true;
|
||||
$course = null;
|
||||
|
||||
// Enable blogs.
|
||||
set_config('enableblogs', true);
|
||||
|
||||
// Check the node tree is correct.
|
||||
core_blog_myprofile_navigation($tree, $USER, $iscurrentuser, $course);
|
||||
$reflector = new ReflectionObject($tree);
|
||||
$nodes = $reflector->getProperty('nodes');
|
||||
$nodes->setAccessible(true);
|
||||
$this->assertArrayHasKey('blogs', $nodes->getValue($tree));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the core_blog_myprofile_navigation() function as a guest.
|
||||
*/
|
||||
public function test_core_blog_myprofile_navigation_as_guest() {
|
||||
global $USER;
|
||||
|
||||
// Set up the test.
|
||||
$tree = new \core_user\output\myprofile\tree();
|
||||
$iscurrentuser = false;
|
||||
$course = null;
|
||||
|
||||
// Set user as guest.
|
||||
$this->setGuestUser();
|
||||
|
||||
// Check the node tree is correct.
|
||||
core_blog_myprofile_navigation($tree, $USER, $iscurrentuser, $course);
|
||||
$reflector = new ReflectionObject($tree);
|
||||
$nodes = $reflector->getProperty('nodes');
|
||||
$nodes->setAccessible(true);
|
||||
$this->assertArrayNotHasKey('blogs', $nodes->getValue($tree));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the core_blog_myprofile_navigation() function when blogs are disabled.
|
||||
*/
|
||||
public function test_core_blog_myprofile_navigation_blogs_disabled() {
|
||||
global $USER;
|
||||
|
||||
// Set up the test.
|
||||
$tree = new \core_user\output\myprofile\tree();
|
||||
$this->setAdminUser();
|
||||
$iscurrentuser = false;
|
||||
$course = null;
|
||||
|
||||
// Disable blogs.
|
||||
set_config('enableblogs', false);
|
||||
|
||||
// Check the node tree is correct.
|
||||
core_blog_myprofile_navigation($tree, $USER, $iscurrentuser, $course);
|
||||
$reflector = new ReflectionObject($tree);
|
||||
$nodes = $reflector->getProperty('nodes');
|
||||
$nodes->setAccessible(true);
|
||||
$this->assertArrayNotHasKey('blogs', $nodes->getValue($tree));
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -190,9 +190,9 @@ class cachestore_dummy extends cache_store {
|
||||
foreach ($keyvaluearray as $pair) {
|
||||
$this->store[$pair['key']] = $pair['value'];
|
||||
}
|
||||
return count($keyvaluearray);
|
||||
|
||||
}
|
||||
return 0;
|
||||
return count($keyvaluearray);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+13
@@ -450,6 +450,13 @@ class cache implements cache_loader {
|
||||
// Create an array with the original keys and the found values. This will be what we return.
|
||||
$fullresult = array();
|
||||
foreach ($result as $key => $value) {
|
||||
if (!is_scalar($value)) {
|
||||
// If data is an object it will be a reference.
|
||||
// If data is an array if may contain references.
|
||||
// We want to break references so that the cache cannot be modified outside of itself.
|
||||
// Call the function to unreference it (in the best way possible).
|
||||
$value = $this->unref($value);
|
||||
}
|
||||
$fullresult[$parsedkeys[$key]] = $value;
|
||||
}
|
||||
unset($result);
|
||||
@@ -1922,6 +1929,12 @@ class cache_session extends cache {
|
||||
if ($value instanceof cache_cached_object) {
|
||||
/* @var cache_cached_object $value */
|
||||
$value = $value->restore_object();
|
||||
} else if (!is_scalar($value)) {
|
||||
// If data is an object it will be a reference.
|
||||
// If data is an array if may contain references.
|
||||
// We want to break references so that the cache cannot be modified outside of itself.
|
||||
// Call the function to unreference it (in the best way possible).
|
||||
$value = $this->unref($value);
|
||||
}
|
||||
$return[$key] = $value;
|
||||
if ($value === false) {
|
||||
|
||||
Vendored
+27
-1
@@ -407,7 +407,7 @@ class core_cache_testcase extends advanced_testcase {
|
||||
$this->assertEquals('pork', $var->subobj->subobj->key);
|
||||
$this->assertTrue($cache->delete('obj'));
|
||||
|
||||
// Death reference test... basicaly we don't want this to die.
|
||||
// Death reference test... basically we don't want this to die.
|
||||
$obj = new stdClass;
|
||||
$obj->key = 'value';
|
||||
$obj->self =& $obj;
|
||||
@@ -433,6 +433,32 @@ class core_cache_testcase extends advanced_testcase {
|
||||
|
||||
$this->assertTrue($cache->delete('obj'));
|
||||
|
||||
// Death reference test on get_many... basically we don't want this to die.
|
||||
$obj = new stdClass;
|
||||
$obj->key = 'value';
|
||||
$obj->self =& $obj;
|
||||
$this->assertEquals(1, $cache->set_many(array('obj' => $obj)));
|
||||
$var = $cache->get_many(array('obj'));
|
||||
$this->assertInstanceOf('stdClass', $var['obj']);
|
||||
$this->assertEquals('value', $var['obj']->key);
|
||||
|
||||
// Reference test after retrieve.
|
||||
$obj = new stdClass;
|
||||
$obj->key = 'value';
|
||||
$this->assertEquals(1, $cache->set_many(array('obj' => $obj)));
|
||||
|
||||
$var1 = $cache->get_many(array('obj'));
|
||||
$this->assertInstanceOf('stdClass', $var1['obj']);
|
||||
$this->assertEquals('value', $var1['obj']->key);
|
||||
$var1['obj']->key = 'eulav';
|
||||
$this->assertEquals('eulav', $var1['obj']->key);
|
||||
|
||||
$var2 = $cache->get_many(array('obj'));
|
||||
$this->assertInstanceOf('stdClass', $var2['obj']);
|
||||
$this->assertEquals('value', $var2['obj']->key);
|
||||
|
||||
$this->assertTrue($cache->delete('obj'));
|
||||
|
||||
// Test strictness exceptions.
|
||||
try {
|
||||
$cache->get('exception', MUST_EXIST);
|
||||
|
||||
@@ -227,21 +227,21 @@ class core_calendar_external extends external_api {
|
||||
$params['options']['timeend'] = PHP_INT_MAX;
|
||||
}
|
||||
|
||||
// Event list does not check visibility and permissions, we'll check that later.
|
||||
$eventlist = calendar_get_events($params['options']['timestart'], $params['options']['timeend'], $funcparam['users'], $funcparam['groups'],
|
||||
$funcparam['courses'], true, $params['options']['ignorehidden']);
|
||||
|
||||
// WS expects arrays.
|
||||
$events = array();
|
||||
foreach ($eventlist as $id => $event) {
|
||||
$events[$id] = (array) $event;
|
||||
}
|
||||
|
||||
// We need to get events asked for eventids.
|
||||
$eventsbyid = calendar_get_events_by_id($params['events']['eventids']);
|
||||
foreach ($eventsbyid as $eventid => $eventobj) {
|
||||
if ($eventsbyid = calendar_get_events_by_id($params['events']['eventids'])) {
|
||||
$eventlist += $eventsbyid;
|
||||
}
|
||||
|
||||
foreach ($eventlist as $eventid => $eventobj) {
|
||||
$event = (array) $eventobj;
|
||||
if (isset($events[$eventid])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($hassystemcap) {
|
||||
// User can see everything, no further check is needed.
|
||||
$events[$eventid] = $event;
|
||||
|
||||
+2
-2
@@ -693,8 +693,8 @@ function calendar_get_events($tstart, $tend, $users, $groups, $courses, $withdur
|
||||
|
||||
$whereclause = '';
|
||||
$params = array();
|
||||
// Quick test
|
||||
if(is_bool($users) && is_bool($groups) && is_bool($courses)) {
|
||||
// Quick test.
|
||||
if (empty($users) && empty($groups) && empty($courses)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
@@ -370,6 +370,30 @@ class core_calendar_externallib_testcase extends externallib_advanced_testcase {
|
||||
$events = external_api::clean_returnvalue(core_calendar_external::get_calendar_events_returns(), $events);
|
||||
$this->assertEquals(1, count($events['events']));
|
||||
$this->assertEquals(0, count($events['warnings']));
|
||||
|
||||
// Now, create an activity event.
|
||||
$this->setAdminUser();
|
||||
$nexttime = time() + DAYSECS;
|
||||
$assign = $this->getDataGenerator()->create_module('assign', array('course' => $course->id, 'duedate' => $nexttime));
|
||||
|
||||
$this->setUser($user);
|
||||
$paramevents = array ('courseids' => array($course->id));
|
||||
$options = array ('siteevents' => true, 'userevents' => true, 'timeend' => time() + WEEKSECS);
|
||||
$events = core_calendar_external::get_calendar_events($paramevents, $options);
|
||||
$events = external_api::clean_returnvalue(core_calendar_external::get_calendar_events_returns(), $events);
|
||||
|
||||
$this->assertCount(5, $events['events']);
|
||||
|
||||
// Hide the assignment.
|
||||
set_coursemodule_visible($assign->cmid, 0);
|
||||
// Empty all the caches that may be affected by this change.
|
||||
accesslib_clear_all_caches_for_unit_testing();
|
||||
course_modinfo::clear_instance_cache();
|
||||
|
||||
$events = core_calendar_external::get_calendar_events($paramevents, $options);
|
||||
$events = external_api::clean_returnvalue(core_calendar_external::get_calendar_events_returns(), $events);
|
||||
// Expect one less.
|
||||
$this->assertCount(4, $events['events']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -68,10 +68,10 @@ if (!empty($day) && !empty($mon) && !empty($year)) {
|
||||
if (checkdate($mon, $day, $year)) {
|
||||
$time = make_timestamp($year, $mon, $day);
|
||||
} else {
|
||||
$time = time();
|
||||
$time = usergetmidnight(time());
|
||||
}
|
||||
} else if (empty($time)) {
|
||||
$time = time();
|
||||
$time = usergetmidnight(time());
|
||||
}
|
||||
|
||||
$url->param('time', $time);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user