Compare commits
402 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3966291cd5 | |||
| 0c9f0c4bbf | |||
| 35edd02d74 | |||
| be2c290b2f | |||
| 9ec4f4b386 | |||
| 52d90156aa | |||
| 44757023a1 | |||
| 061049e5cf | |||
| 1ce514e02f | |||
| 5eb65b8a7c | |||
| 2b41fcb73d | |||
| 5f2880ea13 | |||
| edd9c78756 | |||
| 7c3b3af98c | |||
| 3d3f842be3 | |||
| 4fd6963185 | |||
| 4e7263a65a | |||
| 5cb86be37b | |||
| a9cf9eb991 | |||
| 9269de8830 | |||
| 4d2b0e8e17 | |||
| 71a794bec6 | |||
| ba9ed2e56e | |||
| ae15c3d214 | |||
| 80c8402050 | |||
| 53e2ba10f2 | |||
| ccf93c9b86 | |||
| dfa1545e4c | |||
| 206a64a376 | |||
| 1a2eab4adb | |||
| 3a68cb5ec1 | |||
| 7b79251c63 | |||
| 8adb42acb7 | |||
| 3491e73f43 | |||
| 16fe869164 | |||
| 6b56bfbb2f | |||
| 6e37aba2f1 | |||
| ad38a2d971 | |||
| 5f47dc23ff | |||
| 70fe9e2361 | |||
| 3dada91163 | |||
| 34309b79a3 | |||
| 4f5a6d3c5b | |||
| 2eb2524353 | |||
| f669d7619b | |||
| 93c7b15257 | |||
| 88d3c6e72b | |||
| 3342f23b29 | |||
| d450f05832 | |||
| c5900cbe2e | |||
| 220d1d7a23 | |||
| b56058f1d5 | |||
| 27396dc954 | |||
| f489998aec | |||
| 8b2c1e4297 | |||
| 44f0e44d8b | |||
| 7251cc06d3 | |||
| 4f61b2974b | |||
| 88d166ba77 | |||
| 13a23c43aa | |||
| 4e3a28c454 | |||
| a0a0458154 | |||
| 58d1571e08 | |||
| 75283557ad | |||
| 7d23d3ae3a | |||
| af2c368089 | |||
| 3b7f2aa473 | |||
| 00bef0f91d | |||
| 26e53e8cc2 | |||
| be0dea2892 | |||
| e522e7fc67 | |||
| 7e19a2a640 | |||
| 724275abbc | |||
| ea79441d28 | |||
| ca580b25b9 | |||
| 2f785afb00 | |||
| 7b6fddd811 | |||
| ac77c1c217 | |||
| 71bbfc2495 | |||
| c56c08e9ce | |||
| 4c3df551a4 | |||
| 516b81954a | |||
| 4caed80b37 | |||
| 7f6e49af41 | |||
| 69cca28118 | |||
| 3e30033749 | |||
| d61b9111fa | |||
| 07a30d6650 | |||
| 6f25549278 | |||
| 5ee4098ce5 | |||
| 44956b2463 | |||
| e65075c421 | |||
| 3d95f94ca6 | |||
| 1b51d716e2 | |||
| 7602fa7ad9 | |||
| f2ef4c6808 | |||
| 757f0a56c9 | |||
| e22f3d47c2 | |||
| 1ef498d989 | |||
| 747fff61c4 | |||
| 0f368a42cc | |||
| 186284ec1f | |||
| cdfdfc30d9 | |||
| 6c95086bc9 | |||
| 45ef55471b | |||
| ac270cb26f | |||
| b2ba6624ce | |||
| b57eb5dd88 | |||
| 9bf42e7aad | |||
| 4318e21563 | |||
| 2a900d6ed9 | |||
| 385721f105 | |||
| 83c5af5001 | |||
| 1b995b811d | |||
| 52ad957d74 | |||
| edb68975d1 | |||
| 9d84286479 | |||
| 7b8be76dd9 | |||
| c2bcdedbd6 | |||
| ca40241461 | |||
| 5e7ec29c65 | |||
| 193e6b0fad | |||
| b7a8375e65 | |||
| 10e93d074b | |||
| 0e6246db29 | |||
| 58efa0fa10 | |||
| afc3bfc296 | |||
| 9af8958b03 | |||
| 896da8f473 | |||
| 90fa1113f2 | |||
| aaf985001e | |||
| 9b81be597c | |||
| 998f6ce060 | |||
| 881ad82c44 | |||
| 5c163fff89 | |||
| 1ac64c87f9 | |||
| ce35013ebf | |||
| 8de6b2d6f4 | |||
| 81fc25e7fa | |||
| 5efe1cbf3c | |||
| 5deff67cea | |||
| 14cb950ff3 | |||
| 374028b418 | |||
| f0133eaae1 | |||
| 18998a6051 | |||
| 00b94dec34 | |||
| 71269d9c8f | |||
| 61c44c40d8 | |||
| b05bd11a84 | |||
| 57fc983d37 | |||
| eef27680b9 | |||
| c57def5dd1 | |||
| 67c6b85e1f | |||
| 57daa7a932 | |||
| 4629c45815 | |||
| 0fcd9f04cc | |||
| 2342c3f0c8 | |||
| 5bf1fb6564 | |||
| 4a719ac83a | |||
| df1e1b6fb2 | |||
| dc57f7a253 | |||
| 509b1110d3 | |||
| 45cc6fe44d | |||
| 593e08c20d | |||
| d6841046f1 | |||
| e768e90859 | |||
| 0ad8ac1c3b | |||
| 8bd8b19e00 | |||
| 023694ac28 | |||
| ed789da14a | |||
| 0d78d3dde0 | |||
| 648f9ab53e | |||
| 99445f3724 | |||
| abe5b83ef4 | |||
| 244db143eb | |||
| baa20b3778 | |||
| 0e45b4e1e1 | |||
| 70fc4013bd | |||
| 75f6669217 | |||
| b498552116 | |||
| 346e9a792b | |||
| 0fe4411848 | |||
| f74a599586 | |||
| cbc56fd8f3 | |||
| b3e26daa43 | |||
| 737a3ea643 | |||
| 5742a54a93 | |||
| 30c1019ab3 | |||
| d328504273 | |||
| c89cedc548 | |||
| 38657e7cab | |||
| 92cab9906d | |||
| 2b58d92bac | |||
| 16c162352d | |||
| affa5dbfb3 | |||
| 4ab2ebfd52 | |||
| 7e75e0f6e6 | |||
| 44971ebf69 | |||
| acaabbd33a | |||
| 284d10b1a0 | |||
| 14c8090b55 | |||
| 9e03548e75 | |||
| 68377be294 | |||
| 0c1a24258e | |||
| 88e8a31d77 | |||
| 875d4627ee | |||
| ddf5aa14c0 | |||
| 33b1fce7ed | |||
| 2eb2f70d5b | |||
| 56a423e014 | |||
| 6a47c68934 | |||
| 14917f6e76 | |||
| b8f287220e | |||
| 7557fbb2b1 | |||
| 2a753faf06 | |||
| cb763e4270 | |||
| 16d54354e1 | |||
| 9ac07d439b | |||
| 2eea1e66aa | |||
| 4ff4908e9c | |||
| 12e921f0ca | |||
| 5a14c6fdb1 | |||
| b634baaca3 | |||
| 263b3c3f0e | |||
| e41dad9423 | |||
| 80bd52733a | |||
| 4c69d9d3b6 | |||
| 79fcb4562d | |||
| b12debf39d | |||
| 6148d59278 | |||
| e438eac610 | |||
| b201cd1603 | |||
| ed0ebd5aaf | |||
| f2095ad725 | |||
| 3814817723 | |||
| a1f26cacb7 | |||
| 61a36cf0f8 | |||
| 02b8c94671 | |||
| f1fbfdf610 | |||
| 98ecdb47bc | |||
| 3bd7bbbcba | |||
| 87020c31c0 | |||
| 5eb2c8adc5 | |||
| 59dd6799e0 | |||
| 07bdf06dd0 | |||
| 2c408afd03 | |||
| a413dc47c8 | |||
| 353e63d902 | |||
| 1979f51374 | |||
| e63a6df97e | |||
| 59d0291ff5 | |||
| 9f9cad60e4 | |||
| 181630c47b | |||
| fc71e94526 | |||
| a2b4d0cf9b | |||
| f37a6cecc8 | |||
| 534b2b1c69 | |||
| 7648029803 | |||
| a82da7dc45 | |||
| 4ce1d4e0b7 | |||
| 84cdeff486 | |||
| 5be481d1d0 | |||
| 76d4b498db | |||
| f0c5dc196d | |||
| f08bf60442 | |||
| 3d7496dacd | |||
| 253eece808 | |||
| 65e7470b92 | |||
| bd115c5e1a | |||
| 3b680fa554 | |||
| 0b0f121e89 | |||
| 7c98470586 | |||
| 6807076172 | |||
| b34c006bfd | |||
| 9555192935 | |||
| e25bcf9ede | |||
| 311adf5f6f | |||
| 6fb1e19c1e | |||
| 585780a182 | |||
| 52ce316caa | |||
| bb31fe88fb | |||
| 4fdafd4263 | |||
| 6374ec5013 | |||
| 329357ccff | |||
| 2d69b8442e | |||
| 953d1b8254 | |||
| 693115bebb | |||
| 76d24aed1e | |||
| 3d51aed3e2 | |||
| 7a16d88a4e | |||
| eaa25cf51b | |||
| 249bc5b8f9 | |||
| c519d282f4 | |||
| 660bdcc5ec | |||
| 3e906fea06 | |||
| 6f07919b5f | |||
| 89e9b922aa | |||
| 3087133bb6 | |||
| 364460d796 | |||
| 7cde7d004f | |||
| 644b843a94 | |||
| ddade6e964 | |||
| 672602d1e7 | |||
| 60a0d854ba | |||
| 925c451f1a | |||
| dc92cc0e20 | |||
| 3c8b723fdb | |||
| 24d86db351 | |||
| 68b4f0ea52 | |||
| 319efddb99 | |||
| b0496fb383 | |||
| a6117d4b44 | |||
| f7d43b77b1 | |||
| cae79de01c | |||
| 8ce983c55b | |||
| 84d15d73a5 | |||
| c783413759 | |||
| e3c328c91f | |||
| 8b772d1436 | |||
| a29d0ee99c | |||
| fd5ddee7ed | |||
| ba88242f5f | |||
| 0c9999bd22 | |||
| 29dc0bb3f6 | |||
| d56aa41e9e | |||
| 5778558dae | |||
| b7bf868042 | |||
| 06c20c4675 | |||
| f30a2bb18e | |||
| 5733851176 | |||
| 92a2dcc96a | |||
| 3a694fd6bf | |||
| bb6a65da42 | |||
| a11ffea697 | |||
| 90d7307872 | |||
| 453dfc4f94 | |||
| 75bffe9d96 | |||
| 22dc6301f0 | |||
| 7266fa1524 | |||
| e0a09f31b1 | |||
| 72526c6f49 | |||
| 5c0f33209e | |||
| 943ee4d484 | |||
| acd31294f4 | |||
| b409287479 | |||
| 13d98b9f6e | |||
| 2b19e45d49 | |||
| 7bde04468b | |||
| 80b23a2afd | |||
| da8e201e17 | |||
| d6950db0d9 | |||
| 661d66b452 | |||
| 74a5cc0965 | |||
| 768a82b583 | |||
| 04d3db34ee | |||
| c871b4d5f8 | |||
| d3749a82ab | |||
| d7610a257f | |||
| 62b840648d | |||
| 5f93e6ab03 | |||
| 69beec3d2a | |||
| d2c9c79c0e | |||
| 1ce15ab9b1 | |||
| a24d8a0d2a | |||
| 8835ecef16 | |||
| 86c79ed091 | |||
| d4f5e92ee1 | |||
| 2c58f9533b | |||
| 34077a9190 | |||
| 42726d645c | |||
| 02d08d2e4d | |||
| 9b90cf6584 | |||
| bdbc077efc | |||
| fb06894e75 | |||
| 6b4946e0a8 | |||
| 057f63909f | |||
| ea84a13152 | |||
| 9639feb9a3 | |||
| f009e2621e | |||
| 3449379bca | |||
| c77d6a79ec | |||
| d8558b1d42 | |||
| b8614dee98 | |||
| b852d34285 | |||
| 250ef211f0 | |||
| 2ebcdda606 | |||
| ce89c63b0b | |||
| 8acc343fb8 | |||
| 15a54747b9 | |||
| 7666131199 | |||
| 8b54213ad0 | |||
| 561a371423 | |||
| 6cc39f8e94 | |||
| 58e54a3d33 | |||
| eb1c1e79a1 | |||
| e7c973a195 | |||
| a982ebad0c | |||
| 27692e70b5 | |||
| 05db16c24d | |||
| 0aaf7fe953 | |||
| 05fe39a88f | |||
| 7ad936dcbf |
@@ -1,3 +1,6 @@
|
||||
**/yui/build/** -diff
|
||||
**/amd/build/** -diff
|
||||
lib/dml/oci_native_moodle_package.sql text eol=lf
|
||||
**.js.map -diff
|
||||
**-min.js -diff
|
||||
**.min.js -diff
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
# Primary donations pages.
|
||||
custom: ["https://moodle.com/donations/", moodle.org]
|
||||
custom: ["https://moodle.com/donations/", "https://fund.moodle.org"]
|
||||
|
||||
@@ -3,7 +3,7 @@ name: Core
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- master
|
||||
- main
|
||||
- MOODLE_[0-9]+_STABLE
|
||||
tags-ignore:
|
||||
- v[0-9]+.[0-9]+.[0-9]+*
|
||||
@@ -19,7 +19,7 @@ env:
|
||||
|
||||
jobs:
|
||||
Grunt:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Checking out code
|
||||
@@ -60,11 +60,12 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
- os: ubuntu-24.04
|
||||
php: 7.4
|
||||
extensions:
|
||||
db: mysqli
|
||||
- os: ubuntu-22.04
|
||||
- os: ubuntu-24.04
|
||||
extensions: mongodb-1.19.4
|
||||
php: 8.1
|
||||
db: pgsql
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
define('CLI_SCRIPT', true);
|
||||
define('IGNORE_COMPONENT_CACHE', true);
|
||||
|
||||
require(__DIR__.'/../../config.php');
|
||||
require_once($CFG->libdir.'/clilib.php');
|
||||
|
||||
@@ -4703,4 +4703,399 @@
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
<MOODLE version="5.0" requires="4.2.3">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mariadb" version="10.11.0" />
|
||||
<VENDOR name="mysql" version="8.4" />
|
||||
<VENDOR name="postgres" version="14" />
|
||||
<VENDOR name="mssql" version="14.0" />
|
||||
<VENDOR name="auroramysql" version="8.0" />
|
||||
</DATABASE>
|
||||
<PHP version="8.2.0" level="required">
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="pcreunicodewarning" />
|
||||
</FEEDBACK>
|
||||
</PCREUNICODE>
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="mbstringrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="opensslrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="tokenizer" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="tokenizerrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="soap" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="soaprecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="ctype" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ctyperequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="zip" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ziprequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="zlib" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="gd" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="gdrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="dom" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xml" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xmlreader" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="intl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="intlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="json" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="hash" level="required"/>
|
||||
<PHP_EXTENSION name="fileinfo" level="required"/>
|
||||
<PHP_EXTENSION name="sodium" level="required"/>
|
||||
<PHP_EXTENSION name="exif" level="optional"/>
|
||||
</PHP_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_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="unoconvwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="libcurlwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddbfileformat" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddbfilepertable" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddblargeprefix" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="ishttpswarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="incompleteunicodesupport" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="sixtyfourbitsrequired" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_admin_dir_usage" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iscustomadminwarnings" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mod_assignment" level="required">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_db_prefix_length" level="required">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_aurora_version" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
<MOODLE version="5.1" requires="4.2.3">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mariadb" version="10.11.0" />
|
||||
<VENDOR name="mysql" version="8.4" />
|
||||
<VENDOR name="postgres" version="15" />
|
||||
<VENDOR name="mssql" version="14.0" />
|
||||
<VENDOR name="auroramysql" version="8.0" />
|
||||
</DATABASE>
|
||||
<PHP version="8.2.0" level="required">
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="pcreunicodewarning" />
|
||||
</FEEDBACK>
|
||||
</PCREUNICODE>
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="mbstringrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="opensslrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="tokenizer" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="tokenizerrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="soap" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="soaprecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="ctype" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ctyperequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="zip" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ziprequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="zlib" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="gd" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="gdrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="dom" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xml" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xmlreader" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="intl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="intlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="json" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="hash" level="required"/>
|
||||
<PHP_EXTENSION name="fileinfo" level="required"/>
|
||||
<PHP_EXTENSION name="sodium" level="required"/>
|
||||
<PHP_EXTENSION name="exif" level="optional"/>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="96M" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="settingmemorylimit" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="file_uploads" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingfileuploads" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="opcache.enable" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="opcacherecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="zend.exception_ignore_args" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingzendexceptionignoreargs" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
</PHP_SETTINGS>
|
||||
<CUSTOM_CHECKS>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddbstorageengine" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="quizattemptsupgradedmessage" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="slashargumentswarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="unsupporteddbtablerowformat" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="unoconvwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="libcurlwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddbfileformat" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddbfilepertable" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddblargeprefix" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="ishttpswarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="incompleteunicodesupport" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="sixtyfourbitsrequired" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_admin_dir_usage" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iscustomadminwarnings" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mod_assignment" level="required">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_db_prefix_length" level="required">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_aurora_version" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
</COMPATIBILITY_MATRIX>
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace core_adminpresets;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass core_adminpresets_generator
|
||||
*/
|
||||
class generator_test extends \advanced_testcase {
|
||||
final class generator_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the behaviour of create_preset() method.
|
||||
@@ -180,7 +180,7 @@ class generator_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function create_preset_provider(): array {
|
||||
public static function create_preset_provider(): array {
|
||||
return [
|
||||
'Default values' => [
|
||||
],
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace core_adminpresets;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass helper
|
||||
*/
|
||||
class helper_test extends \advanced_testcase {
|
||||
final class helper_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the behaviour of create_preset() method.
|
||||
@@ -84,7 +84,7 @@ class helper_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function create_preset_provider(): array {
|
||||
public static function create_preset_provider(): array {
|
||||
return [
|
||||
'Default values' => [
|
||||
],
|
||||
@@ -177,7 +177,7 @@ class helper_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function add_item_provider(): array {
|
||||
public static function add_item_provider(): array {
|
||||
return [
|
||||
'Setting without plugin' => [
|
||||
'name' => 'settingname',
|
||||
@@ -239,7 +239,7 @@ class helper_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function add_plugin_provider(): array {
|
||||
public static function add_plugin_provider(): array {
|
||||
return [
|
||||
'Plugin: enabled (using int)' => [
|
||||
'type' => 'plugintype',
|
||||
@@ -321,7 +321,7 @@ class helper_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function change_default_preset_provider(): array {
|
||||
public static function change_default_preset_provider(): array {
|
||||
return [
|
||||
'Starter preset' => [
|
||||
'preset' => 'starter',
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace core_adminpresets\local\setting;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \core_adminpresets\local\setting\adminpresets_admin_setting_bloglevel
|
||||
*/
|
||||
class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase {
|
||||
final class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the behaviour of save_value() method.
|
||||
@@ -72,7 +72,7 @@ class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function save_value_provider(): array {
|
||||
public static function save_value_provider(): array {
|
||||
return [
|
||||
'Save the bloglevel and set blog_menu block visibility to true' => [
|
||||
'setttingvalue' => BLOG_USER_LEVEL,
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace core_adminpresets\local\setting;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \core_adminpresets\local\setting\adminpresets_admin_setting_sitesettext
|
||||
*/
|
||||
class adminpresets_admin_setting_sitesettext_test extends \advanced_testcase {
|
||||
final class adminpresets_admin_setting_sitesettext_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the behaviour of save_value() method.
|
||||
@@ -66,7 +66,7 @@ class adminpresets_admin_setting_sitesettext_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function save_value_provider(): array {
|
||||
public static function save_value_provider(): array {
|
||||
return [
|
||||
'Fullname: different value' => [
|
||||
'settingname' => 'fullname',
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace core_adminpresets\local\setting;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \core_adminpresets\local\setting\adminpresets_setting
|
||||
*/
|
||||
class adminpresets_setting_test extends \advanced_testcase {
|
||||
final class adminpresets_setting_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the behaviour of save_value() method.
|
||||
@@ -77,7 +77,7 @@ class adminpresets_setting_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function save_value_provider(): array {
|
||||
public static function save_value_provider(): array {
|
||||
return [
|
||||
'Core setting with the same value is not saved' => [
|
||||
'category' => 'optionalsubsystems',
|
||||
@@ -167,7 +167,7 @@ class adminpresets_setting_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function save_attributes_values_provider(): array {
|
||||
public static function save_attributes_values_provider(): array {
|
||||
return [
|
||||
'Plugin setting with the same value is not saved' => [
|
||||
'category' => 'modsettinglesson',
|
||||
|
||||
@@ -27,7 +27,7 @@ use stdClass;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \core_adminpresets\manager
|
||||
*/
|
||||
class manager_test extends \advanced_testcase {
|
||||
final class manager_test extends \advanced_testcase {
|
||||
/**
|
||||
* Test the behaviour of protected get_site_settings method.
|
||||
*
|
||||
@@ -358,7 +358,7 @@ class manager_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function export_preset_provider(): array {
|
||||
public static function export_preset_provider(): array {
|
||||
return [
|
||||
'Export settings and plugins, excluding sensible' => [
|
||||
'includesensible' => false,
|
||||
@@ -521,7 +521,7 @@ class manager_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function import_preset_provider(): array {
|
||||
public static function import_preset_provider(): array {
|
||||
return [
|
||||
'Import settings from an empty file' => [
|
||||
'filecontents' => '',
|
||||
|
||||
@@ -30,7 +30,7 @@ use core_privacy\tests\provider_testcase;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \core_adminpresets\privacy\provider
|
||||
*/
|
||||
class privacy_provider_test extends provider_testcase {
|
||||
final class privacy_provider_test extends provider_testcase {
|
||||
|
||||
/**
|
||||
* Test for provider::get_metadata().
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
define('IGNORE_COMPONENT_CACHE', true);
|
||||
|
||||
require_once('../config.php');
|
||||
require_once($CFG->libdir.'/adminlib.php');
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ use core_role_preset;
|
||||
* @copyright 2013 Petr Skoda {@link http://skodak.org}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class preset_test extends \advanced_testcase {
|
||||
public function test_xml() {
|
||||
final class preset_test extends \advanced_testcase {
|
||||
public function test_xml(): void {
|
||||
global $DB;
|
||||
|
||||
$roles = $DB->get_records('role');
|
||||
|
||||
@@ -40,7 +40,7 @@ use core_privacy\local\request\approved_userlist;
|
||||
* @copyright 2018 Carlos Escobedo <carlos@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class provider_test extends provider_testcase {
|
||||
final class provider_test extends provider_testcase {
|
||||
/**
|
||||
* Test to check export_user_preferences.
|
||||
* returns user preferences data.
|
||||
|
||||
@@ -82,6 +82,8 @@ class behat_admin extends behat_base {
|
||||
|
||||
$this->execute('behat_forms::i_set_the_field_with_xpath_to', [$fieldxpath, $value]);
|
||||
$this->execute("behat_general::i_click_on", [get_string('savechanges'), 'button']);
|
||||
// Wait for the page to be redirected.
|
||||
$this->execute("behat_general::i_wait_to_be_redirected");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
@core @core_admin
|
||||
Feature: Plugins overview page
|
||||
In order to manage plugin and settings
|
||||
As an admin
|
||||
I can access the plugins overview page
|
||||
|
||||
Background:
|
||||
Given I am logged in as "admin"
|
||||
And I navigate to "Plugins > Plugins overview" in site administration
|
||||
|
||||
Scenario: An administrator can view plugins overview page
|
||||
Then "Plugins overview" "text" should exist
|
||||
And "Check for available updates" "button" should exist
|
||||
And "All plugins" "link" should exist
|
||||
And "Additional plugins" "link" should exist
|
||||
|
||||
Scenario: An administrator can access list of activities when activity modules cog icon is pressed
|
||||
When I click on "Settings" "link" in the "Activity modules" "table_row"
|
||||
Then "Activities" "text" should exist
|
||||
And "Manage activities" "text" should exist in the ".breadcrumb" "css_element"
|
||||
And "Activity modules" "link" should exist in the ".breadcrumb" "css_element"
|
||||
|
||||
Scenario: An administrator can access plugin settings
|
||||
When I click on "Settings" "link" in the "Assignment" "table_row"
|
||||
Then "Assignment settings" "text" should exist
|
||||
And "Assignment settings" "text" should exist in the ".breadcrumb" "css_element"
|
||||
And "Assignment" "link" should exist in the ".breadcrumb" "css_element"
|
||||
And "Activity modules" "link" should exist in the ".breadcrumb" "css_element"
|
||||
|
||||
Scenario: Plugins with dependencies cannot be uninstalled
|
||||
When I navigate to "Plugins > Plugins overview" in site administration
|
||||
Then "Uninstall" "link" should not exist in the "Database" "table_row"
|
||||
And "Required by: filter_data" "text" should exist in the "Database" "table_row"
|
||||
|
||||
Scenario: Cancelling plugin uninstall does not uninstall the selected plugin
|
||||
When I click on "Uninstall" "link" in the "Assignment" "table_row"
|
||||
Then "Uninstalling Assignment" "text" should exist
|
||||
And "You are about to uninstall the plugin Assignment. This will completely delete everything in the database associated with this plugin, including its configuration, log records, user files managed by the plugin etc. There is no way back and Moodle itself does not create any recovery backup. Are you SURE you want to continue?" "text" should exist
|
||||
And I click on "Cancel" "button"
|
||||
And "Uninstall" "link" should exist in the "Assignment" "table_row"
|
||||
@@ -18,6 +18,7 @@ Feature: Verify the breadcrumbs in webservice tokens site administration pages
|
||||
And "Manage tokens" "link" should exist in the ".breadcrumb" "css_element"
|
||||
And "Web services" "link" should exist in the ".breadcrumb" "css_element"
|
||||
And I set the field "User" to "John Doe"
|
||||
And I set the field "Service" to "Moodle mobile web service"
|
||||
And I press "Save changes"
|
||||
When I click on "Delete" "link"
|
||||
Then "Delete token" "text" should exist in the ".breadcrumb" "css_element"
|
||||
|
||||
@@ -48,25 +48,3 @@ Feature: View task logs report and use its filters
|
||||
| operator | shouldornotsee |
|
||||
| Less than | should not see |
|
||||
| Greater than | should see |
|
||||
|
||||
@javascript
|
||||
Scenario: Reset task log filters
|
||||
Given I log in as "admin"
|
||||
And I change window size to "large"
|
||||
And I navigate to "Server > Tasks > Task logs" in site administration
|
||||
When I click on "Filters" "button"
|
||||
And I set the following fields in the "Result" "core_reportbuilder > Filter" to these values:
|
||||
| Result operator | Is equal to |
|
||||
| Result value | Fail |
|
||||
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
||||
Then I should see "Filters applied"
|
||||
And I should see "Filters (1)" in the "#dropdownFiltersButton" "css_element"
|
||||
And I should see "Nothing to display"
|
||||
And I click on "Reset all" "button" in the "[data-region='report-filters']" "css_element"
|
||||
And I should see "Filters reset"
|
||||
And I should not see "Filters (1)" in the "#dropdownFiltersButton" "css_element"
|
||||
And I should see "Filters" in the "#dropdownFiltersButton" "css_element"
|
||||
And "[data-region='report-filters']" "css_element" should be visible
|
||||
And the following fields in the "Result" "core_reportbuilder > Filter" match these values:
|
||||
| Result operator | Is any value |
|
||||
And I should not see "Nothing to display"
|
||||
|
||||
@@ -20,14 +20,9 @@ namespace core_admin\reportbuilder\datasource;
|
||||
|
||||
use core\task\database_logger;
|
||||
use core_reportbuilder_generator;
|
||||
use core_reportbuilder_testcase;
|
||||
use core_reportbuilder\local\filters\{boolean_select, date, duration, number, select, text};
|
||||
use core_reportbuilder\task\send_schedules;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
global $CFG;
|
||||
require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php");
|
||||
use core_reportbuilder\tests\core_reportbuilder_testcase;
|
||||
|
||||
/**
|
||||
* Unit tests for task logs datasource
|
||||
@@ -37,7 +32,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php");
|
||||
* @copyright 2022 Paul Holden <paulh@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class task_logs_test extends core_reportbuilder_testcase {
|
||||
final class task_logs_test extends core_reportbuilder_testcase {
|
||||
|
||||
/**
|
||||
* Test default datasource
|
||||
@@ -103,7 +98,7 @@ class task_logs_test extends core_reportbuilder_testcase {
|
||||
*
|
||||
* @return array[]
|
||||
*/
|
||||
public function datasource_filters_provider(): array {
|
||||
public static function datasource_filters_provider(): array {
|
||||
return [
|
||||
'Filter name' => ['task_log:name', [
|
||||
'task_log:name_values' => [send_schedules::class],
|
||||
|
||||
@@ -5,16 +5,18 @@ Feature: I can download a preset
|
||||
| name |
|
||||
| Custom preset |
|
||||
|
||||
@javascript
|
||||
Scenario: Custom preset settings can be downloaded
|
||||
Given I log in as "admin"
|
||||
And I navigate to "Site admin presets" in site administration
|
||||
When I open the action menu in "Custom preset" "table_row"
|
||||
Then following "Download" "link" in the "Custom preset" "table_row" should download between "0" and "5000" bytes
|
||||
Then following "Download" in the "Custom preset" "table_row" should download a file that:
|
||||
| Has mimetype | text/xml |
|
||||
| Contains text in xml element | Custom preset |
|
||||
|
||||
@javascript
|
||||
Scenario: Core preset settings can be downloaded
|
||||
Given I log in as "admin"
|
||||
And I navigate to "Site admin presets" in site administration
|
||||
When I open the action menu in "Starter" "table_row"
|
||||
Then following "Download" "link" in the "Starter" "table_row" should download between "0" and "5000" bytes
|
||||
Then following "Download" in the "Starter" "table_row" should download a file that:
|
||||
| Has mimetype | text/xml |
|
||||
| Contains text in xml element | Starter |
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @covers \tool_admin_presets\event\preset_deleted
|
||||
*/
|
||||
class preset_deleted_test extends \advanced_testcase {
|
||||
final class preset_deleted_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test preset_deleted event.
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @covers \tool_admin_presets\event\preset_downloaded
|
||||
*/
|
||||
class preset_downloaded_test extends \advanced_testcase {
|
||||
final class preset_downloaded_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test preset_downloaded event.
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @covers \tool_admin_presets\event\preset_exported
|
||||
*/
|
||||
class preset_exported_test extends \advanced_testcase {
|
||||
final class preset_exported_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test preset_exported event.
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @covers \tool_admin_presets\event\preset_imported
|
||||
*/
|
||||
class preset_imported_test extends \advanced_testcase {
|
||||
final class preset_imported_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test preset_imported event.
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @covers \tool_admin_presets\event\preset_loaded
|
||||
*/
|
||||
class preset_loaded_test extends \advanced_testcase {
|
||||
final class preset_loaded_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test preset_loaded event.
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @covers \tool_admin_presets\event\preset_previewed
|
||||
*/
|
||||
class preset_previewed_test extends \advanced_testcase {
|
||||
final class preset_previewed_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test preset_previewed event.
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @covers \tool_admin_presets\event\preset_reverted
|
||||
*/
|
||||
class preset_reverted_test extends \advanced_testcase {
|
||||
final class preset_reverted_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test preset_reverted event.
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @covers \tool_admin_presets\event\presets_listed
|
||||
*/
|
||||
class presets_listed_test extends \advanced_testcase {
|
||||
final class presets_listed_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test presets_listed event.
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \tool_admin_presets\local\action\base
|
||||
*/
|
||||
class base_test extends \advanced_testcase {
|
||||
final class base_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the behaviour of log() method.
|
||||
@@ -70,7 +70,7 @@ class base_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function log_provider(): array {
|
||||
public static function log_provider(): array {
|
||||
return [
|
||||
// Action = base.
|
||||
'action=base and mode = show' => [
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \tool_admin_presets\local\action\delete
|
||||
*/
|
||||
class delete_test extends \advanced_testcase {
|
||||
final class delete_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the behaviour of execute() method.
|
||||
|
||||
@@ -27,7 +27,7 @@ use core_adminpresets\manager;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \tool_admin_presets\local\action\export
|
||||
*/
|
||||
class export_test extends \advanced_testcase {
|
||||
final class export_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the behaviour of execute() method.
|
||||
@@ -156,7 +156,7 @@ class export_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function export_execute_provider(): array {
|
||||
public static function export_execute_provider(): array {
|
||||
return [
|
||||
'Export settings and plugins, excluding sensible' => [
|
||||
'includesensible' => false,
|
||||
|
||||
@@ -27,7 +27,7 @@ use core_adminpresets\manager;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \tool_admin_presets\local\action\import
|
||||
*/
|
||||
class import_test extends \advanced_testcase {
|
||||
final class import_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the behaviour of execute() method.
|
||||
@@ -190,7 +190,7 @@ class import_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function import_execute_provider(): array {
|
||||
public static function import_execute_provider(): array {
|
||||
$fixturesfolder = __DIR__ . '/../../../../../presets/tests/fixtures/';
|
||||
|
||||
return [
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \tool_admin_presets\local\action\load
|
||||
*/
|
||||
class load_test extends \advanced_testcase {
|
||||
final class load_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the behaviour of show() method when the preset id doesn't exist.
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \tool_admin_presets\local\action\rollback
|
||||
*/
|
||||
class rollback_test extends \advanced_testcase {
|
||||
final class rollback_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the behaviour of execute() method.
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
@tool @tool_analytics
|
||||
Feature: Manager can obtain prediction models insights
|
||||
In order to view prediction models insights
|
||||
As a manager
|
||||
I should be able to obtain the prediction models insights
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| s1 | Student | One | s1@example.com |
|
||||
| m1 | Manager | One | m1@example.com |
|
||||
| m2 | Manager | Two | m2@example.com |
|
||||
| t1 | Teacher | One | t1@example.com |
|
||||
And the following "role assigns" exist:
|
||||
| user | role | contextlevel | reference |
|
||||
| m1 | manager | System | |
|
||||
| m2 | manager | System | |
|
||||
# To ensure that course start date is in the future, set course start date to "tomorrow".
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | startdate |
|
||||
| Course 1 | C1 | ##tomorrow## |
|
||||
| Course 2 | C2 | ##tomorrow## |
|
||||
| Course 3 | C3 | ##tomorrow## |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| s1 | C1 | student |
|
||||
| s1 | C2 | student |
|
||||
| s1 | C3 | student |
|
||||
| t1 | C3 | editingteacher |
|
||||
# Disable "Analytics processes execution via command line only".
|
||||
And the following config values are set as admin:
|
||||
| onlycli | 0 | analytics |
|
||||
|
||||
@javascript
|
||||
Scenario: Manager can obtain prediction models insights
|
||||
Given I log in as "m1"
|
||||
And I navigate to "Analytics > Analytics models" in site administration
|
||||
And I click on "Actions" "link" in the "Courses at risk of not starting" "table_row"
|
||||
And I click on "Execute scheduled analysis" "link" in the "Courses at risk of not starting" "table_row"
|
||||
And I press "Continue"
|
||||
When I select "All predictions" from the "contextid" singleselect
|
||||
# Confirm that only courses without teachers, Course 1 and Course 2, are listed.
|
||||
Then "Course 1" "text" should exist
|
||||
And "Course 2" "text" should exist
|
||||
And "Course 3" "text" should not exist
|
||||
And I click on "Select Course 1 for bulk action" "checkbox"
|
||||
And I press "Not applicable"
|
||||
And I press "Confirm"
|
||||
# After m1 marks Course 1 as Not applicable, only Course 2 should be listed in the predictions for manager 1.
|
||||
And "Course 1" "text" should not exist
|
||||
And "Course 2" "text" should exist
|
||||
And I log in as "m2"
|
||||
And I click on ".popover-region-notifications" "css_element"
|
||||
# Notification of new insight exists.
|
||||
And "Upcoming courses have no teachers or students" "text" should exist
|
||||
And I click on "View full notification" "link" in the ".popover-region-notifications" "css_element"
|
||||
And I click on "View insight" "link"
|
||||
# Course 1, previously marked as Not applicable by manager 1, is still listed for manager 2.
|
||||
And "Course 1" "text" should exist
|
||||
And I click on "View details" "link" in the "Course 1" "table_row"
|
||||
# Prediction details and indicators are displayed for the selected course.
|
||||
And the following should exist in the "insights-list" table:
|
||||
| Description |
|
||||
| Course 1 |
|
||||
And the following should exist in the "prediction-calculations" table:
|
||||
| -1- | -2- |
|
||||
| Teacher availability | No |
|
||||
| Student enrolments | Yes |
|
||||
# Date of prediction analysis execution.
|
||||
And "##today##%A, %d %B %Y##" "text" should exist in the "Time predicted" "table_row"
|
||||
And I click on "Select Course 1 for bulk action" "checkbox"
|
||||
And I press "Accept"
|
||||
And I press "Confirm"
|
||||
# Verify that you end up on the page listing predictions for 'No teaching'.
|
||||
And "Courses at risk of not starting" "text" should exist
|
||||
And "The following courses due to start in the upcoming days are at risk of not starting because they don't have teachers or students enrolled." "text" should exist
|
||||
And the following should not exist in the "insights-list" table:
|
||||
| Description |
|
||||
| Course 1 |
|
||||
+1
-1
@@ -45,7 +45,7 @@ require_once($CFG->dirroot . '/analytics/tests/fixtures/test_target_course_level
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @since Moodle 3.8
|
||||
*/
|
||||
class external_test extends externallib_advanced_testcase {
|
||||
final class external_test extends externallib_advanced_testcase {
|
||||
|
||||
/**
|
||||
* test_potential_contexts description
|
||||
|
||||
@@ -36,6 +36,10 @@ if (function_exists('opcache_reset')) {
|
||||
define('CLI_SCRIPT', true);
|
||||
define('CACHE_DISABLE_ALL', true);
|
||||
|
||||
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
|
||||
// from the normal environment), so in case user has set tne environment variable, disable it.
|
||||
putenv('BEHAT_CLI=0');
|
||||
|
||||
// Basic functions.
|
||||
require_once(__DIR__ . '/../../../../lib/clilib.php');
|
||||
require_once(__DIR__ . '/../../../../lib/behat/lib.php');
|
||||
|
||||
@@ -31,6 +31,10 @@ define('ABORT_AFTER_CONFIG', true);
|
||||
define('CACHE_DISABLE_ALL', true);
|
||||
define('NO_OUTPUT_BUFFERING', true);
|
||||
|
||||
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
|
||||
// from the normal environment), so in case user has set tne environment variable, disable it.
|
||||
putenv('BEHAT_CLI=0');
|
||||
|
||||
require_once(__DIR__ .'/../../../../config.php');
|
||||
require_once(__DIR__.'/../../../../lib/clilib.php');
|
||||
require_once(__DIR__.'/../../../../lib/behat/lib.php');
|
||||
|
||||
@@ -39,6 +39,10 @@ define('NO_OUTPUT_BUFFERING', true);
|
||||
define('IGNORE_COMPONENT_CACHE', true);
|
||||
define('ABORT_AFTER_CONFIG', true);
|
||||
|
||||
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
|
||||
// from the normal environment), so in case user has set tne environment variable, disable it.
|
||||
putenv('BEHAT_CLI=0');
|
||||
|
||||
require_once(__DIR__ . '/../../../../lib/clilib.php');
|
||||
|
||||
// CLI options.
|
||||
|
||||
@@ -33,6 +33,10 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
|
||||
die(); // No access from web!.
|
||||
}
|
||||
|
||||
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
|
||||
// from the normal environment), so in case user has set tne environment variable, disable it.
|
||||
putenv('BEHAT_CLI=0');
|
||||
|
||||
// Basic functions.
|
||||
require_once(__DIR__ . '/../../../../lib/clilib.php');
|
||||
require_once(__DIR__ . '/../../../../lib/behat/lib.php');
|
||||
|
||||
@@ -46,14 +46,14 @@ require_once($CFG->libdir . '/behat/form_field/behat_form_text.php');
|
||||
* @covers \behat_form_text
|
||||
* @covers \behat_form_field
|
||||
*/
|
||||
class behat_form_text_test extends \basic_testcase {
|
||||
final class behat_form_text_test extends \basic_testcase {
|
||||
|
||||
/**
|
||||
* Data provider for the test_set_get_value() method.
|
||||
*
|
||||
* @return array of value and expectation pairs to be tested.
|
||||
*/
|
||||
public function provider_test_set_get_value() {
|
||||
public static function provider_test_set_get_value(): array {
|
||||
return [
|
||||
'null' => [null, null],
|
||||
'int' => [3, 3],
|
||||
@@ -68,7 +68,7 @@ class behat_form_text_test extends \basic_testcase {
|
||||
*
|
||||
* @param mixed $value value to be set.
|
||||
* @param mixed $expectation value to be checked.
|
||||
* @dataProvider provider_test_set_get_value()
|
||||
* @dataProvider provider_test_set_get_value
|
||||
*/
|
||||
public function test_set_get_value($value, $expectation) {
|
||||
$session = $this->createMock(Session::class);
|
||||
@@ -85,7 +85,7 @@ class behat_form_text_test extends \basic_testcase {
|
||||
*
|
||||
* @return array of decsep, value, match and result pairs to be tested.
|
||||
*/
|
||||
public function provider_test_matches() {
|
||||
public static function provider_test_matches(): array {
|
||||
return [
|
||||
'lazy true' => ['.', 'hello', 'hello', true],
|
||||
'lazy false' => ['.', 'hello', 'bye', false],
|
||||
@@ -113,7 +113,7 @@ class behat_form_text_test extends \basic_testcase {
|
||||
* @param mixed $value value to be set.
|
||||
* @param mixed $match value to be matched.
|
||||
* @param bool $result expected return status of the function.
|
||||
* @dataProvider provider_test_matches()
|
||||
* @dataProvider provider_test_matches
|
||||
*/
|
||||
public function test_matches($decsep, $value, $match, $result) {
|
||||
global $CFG;
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace tool_behat\external;
|
||||
*
|
||||
* @covers \tool_behat\external\get_entity_generator
|
||||
*/
|
||||
class get_entity_generator_test extends \advanced_testcase {
|
||||
final class get_entity_generator_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Log in as admin
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
<?php
|
||||
// phpcs:ignoreFile
|
||||
// @codeCoverageIgnoreStart
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -39,8 +36,7 @@ require_once($CFG->libdir . '/behat/classes/behat_config_manager.php');
|
||||
* @copyright 2016 Rajesh Taneja
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class tool_behat_manager_util_testcase extends advanced_testcase {
|
||||
|
||||
final class manager_util_test extends \advanced_testcase {
|
||||
/** @var array Fixtures features which are available. */
|
||||
private $featurepaths = array(
|
||||
'default' => array(
|
||||
|
||||
@@ -87,6 +87,7 @@ $action = optional_param('action', '', PARAM_ALPHA);
|
||||
// Handle any single operation actions.
|
||||
if ($action == 'requestanalysis') {
|
||||
if ($courseid != 0) {
|
||||
require_sesskey();
|
||||
scheduler::request_course_analysis($courseid);
|
||||
if ($courseid == SITEID) {
|
||||
redirect(accessibility::get_plugin_url());
|
||||
|
||||
@@ -26,7 +26,7 @@ use tool_brickfield\local\tool\filter;
|
||||
* @author Jay Churchward (jay@brickfieldlabs.ie)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class accessibility_test extends \advanced_testcase {
|
||||
final class accessibility_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test get_title().
|
||||
|
||||
@@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/admin/tool/brickfield/tests/area_test_base.php');
|
||||
* @copyright 2020 onward: Brickfield Education Labs, https://www.brickfield.ie
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class area_test extends area_test_base {
|
||||
final class area_test extends area_test_base {
|
||||
/**
|
||||
* Test for the area assign intro
|
||||
*/
|
||||
|
||||
@@ -26,8 +26,8 @@ use tool_brickfield\local\tool\filter;
|
||||
* @author Jay Churchward (jay.churchward@poetopensource.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class filters_test extends \advanced_testcase {
|
||||
public function test_constructor() {
|
||||
final class filters_test extends \advanced_testcase {
|
||||
public function test_constructor(): void {
|
||||
$this->resetAfterTest();
|
||||
|
||||
// Variables.
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace tool_brickfield\local\areas\core_question;
|
||||
* @copyright 2020 onward: Brickfield Education Labs, https://www.brickfield.ie
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class questionanswers_test extends \advanced_testcase {
|
||||
final class questionanswers_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Set up before class.
|
||||
|
||||
@@ -30,7 +30,7 @@ use tool_brickfield\area_test_base;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \tool_brickfield\local\areas\core_question\base
|
||||
*/
|
||||
class questiontext_test extends area_test_base {
|
||||
final class questiontext_test extends area_test_base {
|
||||
/**
|
||||
* Set up before class.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class a_links_dont_open_new_window_testcase
|
||||
*/
|
||||
class a_links_dont_open_new_window_test extends all_checks {
|
||||
final class a_links_dont_open_new_window_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'a_links_dont_open_new_window';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class a_must_contain_text_testcase
|
||||
*/
|
||||
class a_must_contain_text_test extends all_checks {
|
||||
final class a_must_contain_text_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'a_must_contain_text';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class a_suspicious_link_text
|
||||
*/
|
||||
class a_suspicious_link_text_test extends all_checks {
|
||||
final class a_suspicious_link_text_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'a_suspicious_link_text';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class area_dont_open_new_window_testcase
|
||||
*/
|
||||
class area_dont_open_new_window_test extends all_checks {
|
||||
final class area_dont_open_new_window_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'area_dont_open_new_window';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class area_has_alt_value_testcase
|
||||
*/
|
||||
class area_has_alt_value_test extends all_checks {
|
||||
final class area_has_alt_value_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'area_has_alt_value';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class basefont_is_not_used_testcase
|
||||
*/
|
||||
class basefont_is_not_used_test extends all_checks {
|
||||
final class basefont_is_not_used_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'basefont_is_not_used';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class blink_is_not_used_testcase
|
||||
*/
|
||||
class blink_is_not_used_test extends all_checks {
|
||||
final class blink_is_not_used_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'blink_is_not_used';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class bold_is_not_used_testcase
|
||||
*/
|
||||
class bold_is_not_used_test extends all_checks {
|
||||
final class bold_is_not_used_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'bold_is_not_used';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class content_too_long_testcase
|
||||
*/
|
||||
class content_too_long_test extends all_checks {
|
||||
final class content_too_long_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'content_too_long';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class embed_has_associated_no_embed_testcase
|
||||
*/
|
||||
class embed_has_associated_no_embed_test extends all_checks {
|
||||
final class embed_has_associated_no_embed_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'embed_has_associated_no_embed';
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class header_h3_testcase
|
||||
*/
|
||||
class header_h3_test extends all_checks {
|
||||
final class header_h3_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'header_h3';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class headers_have_text_testcase
|
||||
*/
|
||||
class headers_have_text_test extends all_checks {
|
||||
final class headers_have_text_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'headers_have_text';
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class i_is_not_used_testcase
|
||||
*/
|
||||
class i_is_not_used_test extends all_checks {
|
||||
final class i_is_not_used_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'i_is_not_used';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class img_alt_is_different_testcase
|
||||
*/
|
||||
class img_alt_is_different_test extends all_checks {
|
||||
final class img_alt_is_different_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'img_alt_is_different';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class img_alt_is_too_long_testcase
|
||||
*/
|
||||
class img_alt_is_too_long_test extends all_checks {
|
||||
final class img_alt_is_too_long_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'img_alt_is_too_long';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class img_alt_not_empty_in_anchor_testcase
|
||||
*/
|
||||
class img_alt_not_empty_in_anchor_test extends all_checks {
|
||||
final class img_alt_not_empty_in_anchor_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'img_alt_not_empty_in_anchor';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class img_alt_not_placeholder_testcase
|
||||
*/
|
||||
class img_alt_not_place_holder_test extends all_checks {
|
||||
final class img_alt_not_place_holder_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
protected $checktype = 'img_alt_not_place_holder';
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class test_css_text_has_contrast_testcase
|
||||
*/
|
||||
class img_has_alt_test extends all_checks {
|
||||
final class img_has_alt_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
public $checktype = 'img_has_alt';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class img_with_map_has_use_map_test
|
||||
*/
|
||||
class img_with_map_has_use_map_test extends all_checks {
|
||||
final class img_with_map_has_use_map_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
public $checktype = 'img_with_map_has_use_map';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class legend_text_not_empty_test
|
||||
*/
|
||||
class legend_text_not_empty_test extends all_checks {
|
||||
final class legend_text_not_empty_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
public $checktype = 'legend_text_not_empty';
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class no_headings_test
|
||||
*/
|
||||
class no_headings_test extends all_checks {
|
||||
final class no_headings_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
public $checktype = 'no_headings';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class object_must_have_embeded_test
|
||||
*/
|
||||
class object_must_have_embed_test extends all_checks {
|
||||
final class object_must_have_embed_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
public $checktype = 'object_must_have_embed';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class object_must_have_title_test
|
||||
*/
|
||||
class object_must_have_title_test extends all_checks {
|
||||
final class object_must_have_title_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
public $checktype = 'object_must_have_title';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class object_must_have_valid_title_test
|
||||
*/
|
||||
class object_must_have_valid_title_test extends all_checks {
|
||||
final class object_must_have_valid_title_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
public $checktype = 'object_must_have_valid_title';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class strike_is_not_used_testcase
|
||||
*/
|
||||
class strike_is_not_used_test extends all_checks {
|
||||
final class strike_is_not_used_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
public $checktype = 'strike_is_not_used';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class table_data_should_have_th_test
|
||||
*/
|
||||
class table_data_should_have_th_test extends all_checks {
|
||||
final class table_data_should_have_th_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
public $checktype = 'table_data_should_have_th';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class table_summary_does_not_duplicate_caption_test
|
||||
*/
|
||||
class table_summary_does_not_duplicate_caption_test extends all_checks {
|
||||
final class table_summary_does_not_duplicate_caption_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
public $checktype = 'table_summary_does_not_duplicate_caption';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class table_td_should_not_merge_test
|
||||
*/
|
||||
class table_td_should_not_merge_test extends all_checks {
|
||||
final class table_td_should_not_merge_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
public $checktype = 'table_td_should_not_merge';
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ require_once('all_checks.php');
|
||||
/**
|
||||
* Class table_th_should_have_scope_test
|
||||
*/
|
||||
class table_th_should_have_scope_test extends all_checks {
|
||||
final class table_th_should_have_scope_test extends all_checks {
|
||||
/** @var string Check type */
|
||||
public $checktype = 'table_th_should_have_scope';
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool;
|
||||
* @author Jay Churchward (jay.churchward@poetopensource.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class activityresults_test extends \advanced_testcase {
|
||||
final class activityresults_test extends \advanced_testcase {
|
||||
|
||||
public function test_toolname() {
|
||||
$this->resetAfterTest();
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool;
|
||||
* @author Jay Churchward (jay.churchward@poetopensource.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class checktyperesults_test extends \advanced_testcase {
|
||||
final class checktyperesults_test extends \advanced_testcase {
|
||||
|
||||
public function test_toolname() {
|
||||
$this->resetAfterTest();
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool;
|
||||
* @author Jay Churchward (jay.churchward@poetopensource.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class errors_test extends \advanced_testcase {
|
||||
final class errors_test extends \advanced_testcase {
|
||||
|
||||
public function test_toolname() {
|
||||
$this->resetAfterTest();
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool;
|
||||
* @author Jay Churchward (jay.churchward@poetopensource.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class printable_test extends \advanced_testcase {
|
||||
final class printable_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test tool name.
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace tool_brickfield;
|
||||
* @copyright 2020 onward: Brickfield Education Labs, https://www.brickfield.ie
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class manager_test extends \advanced_testcase {
|
||||
final class manager_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Tests for the function manager::get_all_areas()
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace tool_brickfield;
|
||||
* Unit tests for {@registration tool_brickfield\registration.php}.
|
||||
* @group tool_brickfield
|
||||
*/
|
||||
class registration_test extends \advanced_testcase {
|
||||
final class registration_test extends \advanced_testcase {
|
||||
public static function setUpBeforeClass(): void {
|
||||
global $CFG;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace tool_brickfield;
|
||||
* @author Jay Churchward (jay@brickfieldlabs.ie)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class scheduler_test extends \advanced_testcase {
|
||||
final class scheduler_test extends \advanced_testcase {
|
||||
|
||||
public function test_request_analysis() {
|
||||
$this->resetAfterTest();
|
||||
|
||||
@@ -27,10 +27,10 @@ use tool_brickfield\local\tool\tool;
|
||||
* @author Jay Churchward (jay.churchward@poetopensource.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class tool_test extends \advanced_testcase {
|
||||
final class tool_test extends \advanced_testcase {
|
||||
|
||||
/** @var string base 64 image */
|
||||
protected $base64img = <<<EOF
|
||||
protected static string $base64img = <<<EOF
|
||||
<img src="data:image/gif;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/
|
||||
8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5N
|
||||
WvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29u
|
||||
@@ -118,11 +118,11 @@ EOF;
|
||||
* Base64 image provider.
|
||||
* @return array
|
||||
*/
|
||||
public function base64_img_provider(): array {
|
||||
public static function base64_img_provider(): array {
|
||||
$img = '<img src="myimage.jpg" />';
|
||||
return [
|
||||
'Image tag alone (base64)' => [
|
||||
$this->base64img,
|
||||
self::$base64img,
|
||||
true,
|
||||
],
|
||||
'Image tag alone (link)' => [
|
||||
@@ -130,7 +130,7 @@ EOF;
|
||||
false,
|
||||
],
|
||||
'Image tag in string (base64)' => [
|
||||
"This is my image {$this->base64img}.",
|
||||
"This is my image " . self::$base64img,
|
||||
true,
|
||||
],
|
||||
'Image tag in string (link)' => [
|
||||
@@ -162,7 +162,7 @@ EOF;
|
||||
}
|
||||
|
||||
public function test_truncate_base64() {
|
||||
$truncated = tool::truncate_base64($this->base64img);
|
||||
$truncated = tool::truncate_base64(self::$base64img);
|
||||
$this->assertStringContainsString('<img src="data:image/gif;base64..."', $truncated);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace tool_capability\event;
|
||||
* @copyright 2014 Petr Skoda
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
|
||||
*/
|
||||
class events_test extends \advanced_testcase {
|
||||
final class events_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Setup testcase.
|
||||
|
||||
@@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/capability/locallib.php'
|
||||
/**
|
||||
* Tests for the capability overview helper functions.
|
||||
*/
|
||||
class locallib_test extends \advanced_testcase {
|
||||
final class locallib_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the function that gets the data - simple case.
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
// This file is part of Moodle - https://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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
namespace tool_capability;
|
||||
|
||||
// phpcs:disable moodle.PHPUnit.TestCaseProvider.dataProviderSyntaxMethodNotFound
|
||||
|
||||
/**
|
||||
* Detect common problems in capability definitions of plugins.
|
||||
*
|
||||
* @group plugin_checks
|
||||
* @package tool_capability
|
||||
* @copyright 2025 Petr Skoda
|
||||
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
final class plugin_checks_test extends \core\tests\plugin_checks_testcase {
|
||||
/**
|
||||
* Verify contents of plugin db/access.php file.
|
||||
*
|
||||
* @dataProvider all_plugins_provider
|
||||
* @coversNothing
|
||||
*
|
||||
* @param string $component
|
||||
* @param string $plugintype
|
||||
* @param string $pluginname
|
||||
* @param string $dir
|
||||
*/
|
||||
public function test_db_access_file(string $component, string $plugintype, string $pluginname, string $dir): void {
|
||||
global $CFG;
|
||||
|
||||
$stringmanager = get_string_manager();
|
||||
$corerolefile = "$CFG->dirroot/lang/en/role.php";
|
||||
$langfile = "$dir/lang/en/$component.php";
|
||||
|
||||
$file = "$dir/db/access.php";
|
||||
$capabilities = $this->fetch_array_from_file($file, 'capabilities');
|
||||
if (!$capabilities) {
|
||||
$this->expectNotToPerformAssertions();
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($capabilities as $capname => $capability) {
|
||||
if ($plugintype === 'qbank' && str_starts_with($capname, 'moodle/question:')) {
|
||||
// Question bank capabilities are irregular.
|
||||
$strname = explode('/', $capname, 2)[1];
|
||||
$this->assertTrue($stringmanager->string_exists($strname, 'core_role'),
|
||||
"Missing capability name string '$strname' in $corerolefile");
|
||||
continue;
|
||||
}
|
||||
$this->assertMatchesRegularExpression("|^$plugintype/$pluginname:[a-z0-9_]+$|", $capname);
|
||||
$strname = substr($capname, strlen($plugintype) + 1);
|
||||
$this->assertTrue($stringmanager->string_exists($strname, $component),
|
||||
"Missing capability name string '$strname' in $langfile");
|
||||
$this->assertSame($capname, clean_param($capname, PARAM_CAPABILITY));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ namespace tool_cohortroles;
|
||||
* @copyright 2015 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class api_test extends \advanced_testcase {
|
||||
final class api_test extends \advanced_testcase {
|
||||
/** @var \stdClass $cohort */
|
||||
protected $cohort = null;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ use core_privacy\local\request\approved_userlist;
|
||||
* @copyright 2018 Zig Tan <zig@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class provider_test extends \core_privacy\tests\provider_testcase {
|
||||
final class provider_test extends \core_privacy\tests\provider_testcase {
|
||||
|
||||
/**
|
||||
* Overriding setUp() function to always reset after tests.
|
||||
|
||||
@@ -36,7 +36,7 @@ use moodle_exception;
|
||||
* @copyright 2020 Ferran Recio <ferran@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class langstring_test extends advanced_testcase {
|
||||
final class langstring_test extends advanced_testcase {
|
||||
|
||||
/**
|
||||
* Sanity 1.x string
|
||||
@@ -60,7 +60,7 @@ class langstring_test extends advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fix_syntax_data() : array {
|
||||
public static function fix_syntax_data(): array {
|
||||
return [
|
||||
// Syntax sanity v1 strings.
|
||||
[
|
||||
|
||||
@@ -34,7 +34,7 @@ use moodle_exception;
|
||||
* @copyright 2015 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class phpparser_test extends advanced_testcase {
|
||||
final class phpparser_test extends advanced_testcase {
|
||||
|
||||
|
||||
/**
|
||||
@@ -79,7 +79,7 @@ class phpparser_test extends advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function parse_provider() : array {
|
||||
public static function parse_provider(): array {
|
||||
return [
|
||||
'Invalid PHP code' => [
|
||||
'No PHP code', [], false
|
||||
|
||||
@@ -30,7 +30,7 @@ use tool_dataprivacy\task\process_data_request_task;
|
||||
* @copyright 2018 Jun Pataleta
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class api_test extends \advanced_testcase {
|
||||
final class api_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Ensure that the check_can_manage_data_registry function fails cap testing when a user without capabilities is
|
||||
@@ -545,7 +545,7 @@ class api_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function data_request_creation_provider() {
|
||||
public static function data_request_creation_provider(): array {
|
||||
return [
|
||||
'Export request by user, automatic approval off' => [
|
||||
false, api::DATAREQUEST_TYPE_EXPORT, 'automaticdataexportapproval', false, 0,
|
||||
@@ -705,7 +705,7 @@ class api_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_data_requests_provider() {
|
||||
public static function get_data_requests_provider(): array {
|
||||
$completeonly = [api::DATAREQUEST_STATUS_COMPLETE, api::DATAREQUEST_STATUS_DOWNLOAD_READY, api::DATAREQUEST_STATUS_DELETED];
|
||||
$completeandcancelled = array_merge($completeonly, [api::DATAREQUEST_STATUS_CANCELLED]);
|
||||
|
||||
@@ -842,7 +842,7 @@ class api_test extends \advanced_testcase {
|
||||
/**
|
||||
* Data provider for test_has_ongoing_request.
|
||||
*/
|
||||
public function status_provider() {
|
||||
public static function status_provider(): array {
|
||||
return [
|
||||
[api::DATAREQUEST_STATUS_AWAITING_APPROVAL, true],
|
||||
[api::DATAREQUEST_STATUS_APPROVED, true],
|
||||
@@ -932,7 +932,7 @@ class api_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function notify_dpo_provider() {
|
||||
public static function notify_dpo_provider(): array {
|
||||
return [
|
||||
[false, api::DATAREQUEST_TYPE_EXPORT, 'requesttypeexport', 'Export my user data'],
|
||||
[false, api::DATAREQUEST_TYPE_DELETE, 'requesttypedelete', 'Delete my user data'],
|
||||
@@ -1284,7 +1284,7 @@ class api_test extends \advanced_testcase {
|
||||
/**
|
||||
* Data provider for invalid contextlevel fetchers.
|
||||
*/
|
||||
public function invalid_effective_contextlevel_provider() {
|
||||
public static function invalid_effective_contextlevel_provider(): array {
|
||||
return [
|
||||
[CONTEXT_COURSECAT],
|
||||
[CONTEXT_COURSE],
|
||||
@@ -1844,7 +1844,7 @@ class api_test extends \advanced_testcase {
|
||||
/**
|
||||
* Data provider for \tool_dataprivacy_api_testcase::test_set_context_defaults
|
||||
*/
|
||||
public function set_context_defaults_provider() {
|
||||
public static function set_context_defaults_provider(): array {
|
||||
$contextlevels = [
|
||||
[CONTEXT_COURSECAT],
|
||||
[CONTEXT_COURSE],
|
||||
@@ -2319,7 +2319,7 @@ class api_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function queue_data_request_task_provider() {
|
||||
public static function queue_data_request_task_provider(): array {
|
||||
return [
|
||||
'With user ID provided' => [true],
|
||||
'Without user ID provided' => [false],
|
||||
@@ -2356,7 +2356,7 @@ class api_test extends \advanced_testcase {
|
||||
/**
|
||||
* Data provider for test_is_automatic_request_approval_on().
|
||||
*/
|
||||
public function automatic_request_approval_setting_provider() {
|
||||
public static function automatic_request_approval_setting_provider(): array {
|
||||
return [
|
||||
'Data export, not set' => [
|
||||
'automaticdataexportapproval', api::DATAREQUEST_TYPE_EXPORT, null, false
|
||||
|
||||
@@ -54,6 +54,7 @@ Feature: Data delete from the privacy API
|
||||
And I should see "Awaiting approval" in the "Victim User 1" "table_row"
|
||||
And I open the action menu in "Victim User 1" "table_row"
|
||||
And I follow "Approve request"
|
||||
And I wait until "Approve request" "button" exists
|
||||
And I press "Approve request"
|
||||
And I should see "Approved" in the "Victim User 1" "table_row"
|
||||
And I run all adhoc tasks
|
||||
@@ -80,6 +81,7 @@ Feature: Data delete from the privacy API
|
||||
And I navigate to "Users > Privacy and policies > Data requests" in site administration
|
||||
And I open the action menu in "Victim User 1" "table_row"
|
||||
And I follow "Approve request"
|
||||
And I wait until "Approve request" "button" exists
|
||||
And I press "Approve request"
|
||||
|
||||
And I log out
|
||||
@@ -115,6 +117,7 @@ Feature: Data delete from the privacy API
|
||||
And I navigate to "Users > Privacy and policies > Data requests" in site administration
|
||||
And I open the action menu in "Victim User 1" "table_row"
|
||||
And I follow "Approve request"
|
||||
And I wait until "Approve request" "button" exists
|
||||
And I press "Approve request"
|
||||
|
||||
And I log out
|
||||
|
||||
@@ -48,13 +48,15 @@ Feature: Data export from the privacy API
|
||||
And I should see "Awaiting approval" in the "Victim User 1" "table_row"
|
||||
And I open the action menu in "Victim User 1" "table_row"
|
||||
And I follow "Approve request"
|
||||
And I wait until "Approve request" "button" exists
|
||||
And I press "Approve request"
|
||||
And I should see "Approved" in the "Victim User 1" "table_row"
|
||||
And I run all adhoc tasks
|
||||
And I reload the page
|
||||
And I should see "Download ready" in the "Victim User 1" "table_row"
|
||||
And I open the action menu in "Victim User 1" "table_row"
|
||||
And following "Download" should download between "1" and "150000" bytes
|
||||
And following "Download" should download a file that:
|
||||
| Contains file in zip | index.html |
|
||||
And the following config values are set as admin:
|
||||
| privacyrequestexpiry | 1 | tool_dataprivacy |
|
||||
And I wait "1" seconds
|
||||
@@ -89,7 +91,8 @@ Feature: Data export from the privacy API
|
||||
And I reload the page
|
||||
And I should see "Download ready" in the "Export all of my personal data" "table_row"
|
||||
And I open the action menu in "Victim User 1" "table_row"
|
||||
And following "Download" should download between "1" and "155000" bytes
|
||||
And following "Download" should download a file that:
|
||||
| Contains file in zip | index.html |
|
||||
|
||||
And the following config values are set as admin:
|
||||
| privacyrequestexpiry | 1 | tool_dataprivacy |
|
||||
@@ -115,6 +118,7 @@ Feature: Data export from the privacy API
|
||||
And I navigate to "Users > Privacy and policies > Data requests" in site administration
|
||||
And I open the action menu in "Victim User 1" "table_row"
|
||||
And I follow "Approve request"
|
||||
And I wait until "Approve request" "button" exists
|
||||
And I press "Approve request"
|
||||
|
||||
And I log out
|
||||
@@ -126,7 +130,8 @@ Feature: Data export from the privacy API
|
||||
And I reload the page
|
||||
And I should see "Download ready" in the "Victim User 1" "table_row"
|
||||
And I open the action menu in "Victim User 1" "table_row"
|
||||
And following "Download" should download between "1" and "150000" bytes
|
||||
And following "Download" should download a file that:
|
||||
| Contains file in zip | index.html |
|
||||
|
||||
And the following config values are set as admin:
|
||||
| privacyrequestexpiry | 1 | tool_dataprivacy |
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace tool_dataprivacy;
|
||||
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class data_registry_test extends \advanced_testcase {
|
||||
final class data_registry_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Ensure that the get_effective_context_value only errors if provided an inappropriate element.
|
||||
|
||||
@@ -28,14 +28,14 @@ require_once('data_privacy_testcase.php');
|
||||
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class data_request_test extends data_privacy_testcase {
|
||||
final class data_request_test extends data_privacy_testcase {
|
||||
|
||||
/**
|
||||
* Data provider for testing is_resettable, and is_active.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function status_state_provider() : array {
|
||||
public static function status_state_provider(): array {
|
||||
return [
|
||||
[
|
||||
'state' => api::DATAREQUEST_STATUS_PENDING,
|
||||
@@ -138,9 +138,9 @@ class data_request_test extends data_privacy_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function non_resettable_provider() : array {
|
||||
public static function non_resettable_provider(): array {
|
||||
$states = [];
|
||||
foreach ($this->status_state_provider() as $thisstatus) {
|
||||
foreach (self::status_state_provider() as $thisstatus) {
|
||||
if (!$thisstatus['resettable']) {
|
||||
$states[] = $thisstatus;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user