Compare commits
438 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ccd4ef8ddd | |||
| b9371d7bf6 | |||
| 1ec406cbd7 | |||
| b1c1119743 | |||
| 3d45f2c083 | |||
| 1f5da975e2 | |||
| ee0106f70b | |||
| ab43412ae9 | |||
| 3d01fc77de | |||
| 08d7552f4d | |||
| 8983d50bd1 | |||
| 9fb8221fb3 | |||
| 4b60cede1e | |||
| 4514918c33 | |||
| 86d6bdf079 | |||
| f5d75c8e24 | |||
| bfeb6f3bac | |||
| ec52cca8b1 | |||
| 6bbb402129 | |||
| 7375466f51 | |||
| 8635e2cefa | |||
| 52bad33356 | |||
| 5c155ba8f7 | |||
| ffa17ad17d | |||
| 5d6fcc67cf | |||
| a37dc94598 | |||
| 1e08e046e2 | |||
| 4ff5d5ef17 | |||
| 84ef6eb8d9 | |||
| 3b45e0db41 | |||
| 535523f21f | |||
| 9c50ccbf7e | |||
| b676817a64 | |||
| 8eca15c5f1 | |||
| 1bb4c59adc | |||
| 2332ac5f87 | |||
| 0700b8510f | |||
| 7bc82ad672 | |||
| 92b9900d6e | |||
| 312ca07bb7 | |||
| bea621d6c6 | |||
| 28a8eb3856 | |||
| fb39317a64 | |||
| 6e7f80363b | |||
| 82bd2ff5a9 | |||
| e657192d31 | |||
| 85782cffd7 | |||
| fac004cfe9 | |||
| 221c293ac7 | |||
| 5ad20a0633 | |||
| d63bdf9bb9 | |||
| bc29f1c98a | |||
| 4830f55122 | |||
| 48508e4ecc | |||
| fbb2d6592d | |||
| 581a497189 | |||
| 3d3314d433 | |||
| a1f21bad0d | |||
| 189810269a | |||
| e592c6dd9d | |||
| 563cfa0e1e | |||
| 863fb96ffa | |||
| 10f03d2a99 | |||
| b3b04e083b | |||
| 9262b490ee | |||
| f37d0629ea | |||
| 6d9518cf56 | |||
| 0d8bf37407 | |||
| 159115b7c7 | |||
| 930dba73c3 | |||
| 22217ac42f | |||
| d46ee17722 | |||
| 5f1d9df828 | |||
| 95cc0d562b | |||
| 3584cd786a | |||
| fa92e6a809 | |||
| 1257e39d92 | |||
| 65c7339199 | |||
| 2cb720a3d2 | |||
| 138ed9c1fa | |||
| 3c7a4833e5 | |||
| 0400b5ef3f | |||
| 122ed3beaf | |||
| b58a45df37 | |||
| 2d450e9a3b | |||
| 3513964883 | |||
| fde9d44286 | |||
| ba8185cb2a | |||
| 362c598d1b | |||
| 185fc93ed5 | |||
| 8b254440d6 | |||
| 5989a94787 | |||
| e290345cd6 | |||
| 4c48bccbad | |||
| ef1bb2b193 | |||
| 9e103451e2 | |||
| 832f5f7019 | |||
| 40f92ac55d | |||
| 887efbd939 | |||
| 6305c7b83c | |||
| 6bbb4e4df2 | |||
| 79e98f6ac4 | |||
| 1c1a96981d | |||
| 6e9d203e52 | |||
| c02fc98d06 | |||
| 895e5748e1 | |||
| 96805ec18e | |||
| 010f1eff60 | |||
| a713a68af8 | |||
| 1547225e52 | |||
| cc52ff7703 | |||
| 3f51798192 | |||
| 8578e19aff | |||
| e4ffa5f3f6 | |||
| 8cc9ebea1e | |||
| 2cb5248ac3 | |||
| 43a9717a33 | |||
| 4fd5a7bfcb | |||
| 3c2c15d4dc | |||
| 7969cfb39f | |||
| f2fe8b1664 | |||
| 23dc056578 | |||
| 6e37e120fc | |||
| 091a6ca62e | |||
| a8cdc38272 | |||
| 2296b4b16e | |||
| 4e873c2ab6 | |||
| 130d29bb5f | |||
| 3ae4d6e824 | |||
| be1847d075 | |||
| 68810e04c6 | |||
| b8b894dd36 | |||
| a12b0aff07 | |||
| 3523edfd90 | |||
| fbaab99733 | |||
| 6408db6427 | |||
| 2cd36e8ea0 | |||
| 6a930e2c88 | |||
| 78079c3f2b | |||
| a88c706d98 | |||
| b9d20f8481 | |||
| 545b24fa52 | |||
| 2f6437ec5c | |||
| 806042d58a | |||
| 58e66823a2 | |||
| 119010b16d | |||
| c6895d7dd4 | |||
| 1f7f5e368d | |||
| b80006b600 | |||
| 9e42721660 | |||
| 0f13aee6fb | |||
| 8cc4708c2a | |||
| 507d51eebf | |||
| 89d8f73703 | |||
| f0f37cb2e7 | |||
| 62cd827dc5 | |||
| 1b682b3b6a | |||
| 5e372ecd61 | |||
| 4401c891e8 | |||
| 61a17c94be | |||
| 75911e67bd | |||
| 3a2eb35800 | |||
| 5ae88aba9d | |||
| dbd0a1dbf7 | |||
| d1e4c0fecc | |||
| 522dd18e62 | |||
| 563bfb4582 | |||
| f03d9e1aab | |||
| 454a93cbbf | |||
| a64f376595 | |||
| f620bbf2f5 | |||
| 4ddbc1ee38 | |||
| f9bd169b6e | |||
| 332fdda507 | |||
| 77f46da53a | |||
| ebacd8353f | |||
| a97c45a15d | |||
| f307dc23d7 | |||
| b21f182106 | |||
| 0991b0a091 | |||
| 54eb1f8f23 | |||
| 97df1db020 | |||
| 8c1eb6cfd3 | |||
| 4eeb1bbd8f | |||
| 5778aa1fa1 | |||
| a0c582342c | |||
| cf13f285e4 | |||
| 08d7dd1db4 | |||
| a6908c3ee8 | |||
| cc91fe0988 | |||
| f66e6749ae | |||
| f3fd372584 | |||
| e29a887814 | |||
| f1743d9179 | |||
| 73827e8eda | |||
| abb81c79d7 | |||
| 8b55712485 | |||
| f967acc533 | |||
| 61d4bf3f88 | |||
| 94dc00614c | |||
| 976ec609bc | |||
| 7cc4f8883a | |||
| 9b48e7420e | |||
| eae4f24877 | |||
| 72e24ec057 | |||
| da2cb39c15 | |||
| 695b470305 | |||
| 076bbff5a7 | |||
| 023064558f | |||
| a934784741 | |||
| 13a31a6b83 | |||
| f29c1bee74 | |||
| 3c5ba23f7f | |||
| 777c810671 | |||
| 9a642c49e1 | |||
| a5708767a0 | |||
| 1117eb6579 | |||
| f131e22bc4 | |||
| 76fd40f2f9 | |||
| 52925cb9df | |||
| 3d68237956 | |||
| b79b33c664 | |||
| 8a6b5024a1 | |||
| f51dcd3c96 | |||
| 7a4f10ddda | |||
| 2d7f517b5b | |||
| 3161583d89 | |||
| 9e3b1f2d7e | |||
| ff2d425711 | |||
| 95c4f624c8 | |||
| 7882fff01a | |||
| d68848383e | |||
| f395c5b238 | |||
| a9782addfc | |||
| d093887447 | |||
| f0be299db3 | |||
| 6a3edc34bd | |||
| 135dfe2144 | |||
| 13de4b94dc | |||
| c6ec3c048e | |||
| 6d1680998d | |||
| bbfcb91b1f | |||
| 7d1f5e81ea | |||
| 5f9d183b46 | |||
| 646ebff5dd | |||
| 8f6f312d65 | |||
| 5762e5ec3e | |||
| 52dbe51339 | |||
| dfaad3e8ca | |||
| 7da6f2675d | |||
| 9ae2623d89 | |||
| e64f37c3c5 | |||
| b39ed13500 | |||
| 532a81f846 | |||
| 2b96f7b343 | |||
| 6a07b3c08c | |||
| 744726275d | |||
| 07afdeedac | |||
| b8c3fefd02 | |||
| ac7cb0921b | |||
| 6b6a083916 | |||
| 6acd719f0f | |||
| 455e7f50d8 | |||
| f49fe84488 | |||
| 5ce4bd05df | |||
| b9f2e3d99b | |||
| 42bcf62000 | |||
| 86f5acdc88 | |||
| 45aa8db99d | |||
| d35fc78761 | |||
| d8b0be3eb3 | |||
| 12e884c5b3 | |||
| 115d6033fc | |||
| 9ffeab1ad1 | |||
| 7bad9a9f15 | |||
| 5a003a1da9 | |||
| 9e96129104 | |||
| 5068d59b13 | |||
| bf9c4ab68a | |||
| 44022305cc | |||
| 0595cfb07d | |||
| c8098c7a80 | |||
| 2e71c132fe | |||
| 7c3522f902 | |||
| 4dcb3165e7 | |||
| 4fbe8bec4a | |||
| 4a723a329e | |||
| 592b8980aa | |||
| 1e63a97698 | |||
| 9d41810bed | |||
| 8cdebcf4e0 | |||
| 9744e6e8cb | |||
| f4d6bd1188 | |||
| d8c8c75ec4 | |||
| 9eaaa8997b | |||
| ef2a7d7302 | |||
| b660b92b3f | |||
| 87ae4833c4 | |||
| 4f9d34da81 | |||
| 13ad9d1f5b | |||
| 8cf328dc54 | |||
| af1f371aa7 | |||
| 3e78b603a5 | |||
| 50da793d5b | |||
| 4affbe94be | |||
| d18eacbd35 | |||
| 3de3755281 | |||
| 04a1611139 | |||
| 0b5889d299 | |||
| aa6bf0f367 | |||
| 7164e1626e | |||
| a869415180 | |||
| b39f2de8ad | |||
| b02b1f3ea9 | |||
| 72ad5d94ea | |||
| 1c2358de43 | |||
| ba56dfb574 | |||
| da48e72353 | |||
| 3c5757b0e2 | |||
| e1a310bde7 | |||
| a040f29f03 | |||
| 3f3262c76e | |||
| 5018c4e4db | |||
| 6e5ae126af | |||
| a0b8d8c0ff | |||
| 1636ee5980 | |||
| a092131b73 | |||
| b4a73ff47f | |||
| 73c4f6c2a5 | |||
| d8a886d75a | |||
| 480f26720d | |||
| 333d17b8e1 | |||
| f78caa59d2 | |||
| 1f09dea479 | |||
| 8e619076cb | |||
| d80e9d463d | |||
| 6a17f29147 | |||
| cafc042bf6 | |||
| d2e303436b | |||
| fb0d5acf4c | |||
| 376d34142f | |||
| 8eb7f7e366 | |||
| 762e8afa6f | |||
| c3018e9ee7 | |||
| 996c94fd08 | |||
| fd7c3c4834 | |||
| c3b7f2f974 | |||
| 8589fbda8c | |||
| f1a681c983 | |||
| a17188f51c | |||
| 8a66849a57 | |||
| 20318b8b7d | |||
| d84d6f57a3 | |||
| 619e11c07a | |||
| 01ec0ee85b | |||
| 91b23a2caa | |||
| 053a433d74 | |||
| 3725a41b39 | |||
| fe5ca8e768 | |||
| b1a2e67326 | |||
| 40553ed459 | |||
| ae9e1f1888 | |||
| 9127c17778 | |||
| 8f28fbee11 | |||
| be7bda671e | |||
| c58101cde3 | |||
| 4a16804df7 | |||
| ff92024ec2 | |||
| 6e5b0b5c20 | |||
| c201456f20 | |||
| 02b3d5aacf | |||
| dde1ead9fe | |||
| 3915147b9b | |||
| 55c7fe15a0 | |||
| 82dba4d510 | |||
| 9ecff3766a | |||
| 4fb85c9c9f | |||
| 6ea5922916 | |||
| 287e8f16e6 | |||
| 846422a90f | |||
| ea6621e00e | |||
| 44ffa8a801 | |||
| a1d5911159 | |||
| c38e38d6b4 | |||
| f5b5f97f56 | |||
| 5528302282 | |||
| 995f0a3a58 | |||
| 894ebe38a2 | |||
| 0609febf16 | |||
| 1d6c1cc0ae | |||
| 50b076c4af | |||
| d783f12861 | |||
| f324c2d16c | |||
| 5486975097 | |||
| d4b6b26f4f | |||
| 996dd0b0b9 | |||
| b44588aaba | |||
| 95fbf4d8e5 | |||
| 6f78024717 | |||
| 7b2e257157 | |||
| bb344d07e7 | |||
| 959c2cb84e | |||
| ee7b438f61 | |||
| dc0241306b | |||
| 89ce4db476 | |||
| 55a1405a84 | |||
| fb21fc9274 | |||
| 57b920b8b7 | |||
| bae07c1bfb | |||
| 4f7016f2da | |||
| 7af8441403 | |||
| 7ba95339a6 | |||
| b6c37f2926 | |||
| b8408c3582 | |||
| fb625069cf | |||
| d4297993a4 | |||
| 2104324ded | |||
| 153b2cb484 | |||
| c72adaa749 | |||
| 3c2ed1533c | |||
| b9518bf811 | |||
| 4f0f1bd84f | |||
| e2ef786003 | |||
| 5b134b5de5 | |||
| 62c4da281a | |||
| 4c27f858b9 | |||
| 6ced5c26d0 | |||
| ccd504115d | |||
| 647e5d8021 | |||
| 6a7042d980 | |||
| 7532b032bb | |||
| b5c1d17da5 | |||
| 56a7d91066 | |||
| 93d636a95b | |||
| 7ca771e4ac | |||
| 6e7e7e1241 | |||
| 8b43f32f8c | |||
| a30eb7d16c |
+17
-1
@@ -15,6 +15,7 @@ dist: xenial
|
||||
|
||||
services:
|
||||
- mysql
|
||||
- docker
|
||||
|
||||
php:
|
||||
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
|
||||
@@ -61,8 +62,9 @@ cache:
|
||||
- $HOME/.npm
|
||||
|
||||
before_install:
|
||||
- docker run -d -p 127.0.0.1:8080:80 --name exttests moodlehq/moodle-exttests
|
||||
# Avoid IPv6 default binding as service (causes redis not to start).
|
||||
sudo service redis-server start --bind 127.0.0.1
|
||||
- sudo service redis-server start --bind 127.0.0.1
|
||||
|
||||
install:
|
||||
- >
|
||||
@@ -169,6 +171,12 @@ before_script:
|
||||
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
|
||||
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
|
||||
config.php ;
|
||||
# Enable test external resources
|
||||
sed -i \
|
||||
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://127.0.0.1:8080');" \
|
||||
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://127.0.0.1:8080');" \
|
||||
config.php ;
|
||||
|
||||
# Redis cache store tests
|
||||
sed -i \
|
||||
-e "/require_once/i \\define('TEST_CACHESTORE_REDIS_TESTSERVERS', '127.0.0.1');" \
|
||||
@@ -284,3 +292,11 @@ script:
|
||||
exit 1 ;
|
||||
fi
|
||||
fi
|
||||
|
||||
after_script:
|
||||
- >
|
||||
if [ "$TASK" = 'PHPUNIT' ];
|
||||
then
|
||||
EXTTESTS_HITS=$(docker logs exttests 2>&1 | grep -Fv -e 'AH00558' -e '[pid 1]' | wc -l)
|
||||
echo -e "\nTest local resources number of hits: ${EXTTESTS_HITS}.\n"
|
||||
fi
|
||||
|
||||
+99
-90
@@ -266,6 +266,7 @@ list($options, $unrecognized) = cli_get_params(
|
||||
);
|
||||
|
||||
$interactive = empty($options['non-interactive']);
|
||||
$skipdatabase = $options['skip-database'];
|
||||
|
||||
// set up language
|
||||
$lang = clean_param($options['lang'], PARAM_SAFEDIR);
|
||||
@@ -637,96 +638,100 @@ do {
|
||||
}
|
||||
} while ($hintdatabase !== '');
|
||||
|
||||
// ask for fullname
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('fullsitename', 'moodle'));
|
||||
// If --skip-database option is provided, we do not need to ask for site fullname, shortname, adminuser, adminpass, adminemail.
|
||||
// These fields will be requested during the database install part.
|
||||
if (!$skipdatabase) {
|
||||
// Ask for fullname.
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('fullsitename', 'moodle'));
|
||||
|
||||
if ($options['fullname'] !== '') {
|
||||
$prompt = get_string('clitypevaluedefault', 'admin', $options['fullname']);
|
||||
if ($options['fullname'] !== '') {
|
||||
$prompt = get_string('clitypevaluedefault', 'admin', $options['fullname']);
|
||||
} else {
|
||||
$prompt = get_string('clitypevalue', 'admin');
|
||||
}
|
||||
|
||||
do {
|
||||
$options['fullname'] = cli_input($prompt, $options['fullname']);
|
||||
} while (empty($options['fullname']));
|
||||
} else {
|
||||
$prompt = get_string('clitypevalue', 'admin');
|
||||
if (empty($options['fullname'])) {
|
||||
$a = (object)['option' => 'fullname', 'value' => $options['fullname']];
|
||||
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
$options['fullname'] = cli_input($prompt, $options['fullname']);
|
||||
} while (empty($options['fullname']));
|
||||
} else {
|
||||
if (empty($options['fullname'])) {
|
||||
$a = (object)array('option'=>'fullname', 'value'=>$options['fullname']);
|
||||
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
|
||||
}
|
||||
}
|
||||
// Ask for shortname.
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('shortsitename', 'moodle'));
|
||||
|
||||
// ask for shortname
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('shortsitename', 'moodle'));
|
||||
if ($options['shortname'] !== '') {
|
||||
$prompt = get_string('clitypevaluedefault', 'admin', $options['shortname']);
|
||||
} else {
|
||||
$prompt = get_string('clitypevalue', 'admin');
|
||||
}
|
||||
|
||||
if ($options['shortname'] !== '') {
|
||||
$prompt = get_string('clitypevaluedefault', 'admin', $options['shortname']);
|
||||
do {
|
||||
$options['shortname'] = cli_input($prompt, $options['shortname']);
|
||||
} while (empty($options['shortname']));
|
||||
} else {
|
||||
$prompt = get_string('clitypevalue', 'admin');
|
||||
if (empty($options['shortname'])) {
|
||||
$a = (object)['option' => 'shortname', 'value' => $options['shortname']];
|
||||
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
$options['shortname'] = cli_input($prompt, $options['shortname']);
|
||||
} while (empty($options['shortname']));
|
||||
} else {
|
||||
if (empty($options['shortname'])) {
|
||||
$a = (object)array('option'=>'shortname', 'value'=>$options['shortname']);
|
||||
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
|
||||
}
|
||||
}
|
||||
|
||||
// ask for admin user name
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('cliadminusername', 'install'));
|
||||
if (!empty($options['adminuser'])) {
|
||||
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminuser']);
|
||||
// Ask for admin user name.
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('cliadminusername', 'install'));
|
||||
if (!empty($options['adminuser'])) {
|
||||
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminuser']);
|
||||
} else {
|
||||
$prompt = get_string('clitypevalue', 'admin');
|
||||
}
|
||||
do {
|
||||
$options['adminuser'] = cli_input($prompt, $options['adminuser']);
|
||||
} while (empty($options['adminuser']) or $options['adminuser'] === 'guest');
|
||||
} else {
|
||||
if ((empty($options['adminuser']) || $options['adminuser'] === 'guest')) {
|
||||
$a = (object)['option' => 'adminuser', 'value' => $options['adminuser']];
|
||||
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
|
||||
}
|
||||
}
|
||||
|
||||
// Ask for admin user password.
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('cliadminpassword', 'install'));
|
||||
$prompt = get_string('clitypevalue', 'admin');
|
||||
do {
|
||||
$options['adminpass'] = cli_input($prompt);
|
||||
} while (empty($options['adminpass']) or $options['adminpass'] === 'admin');
|
||||
} else {
|
||||
if ((empty($options['adminpass']) or $options['adminpass'] === 'admin')) {
|
||||
$a = (object)['option' => 'adminpass', 'value' => $options['adminpass']];
|
||||
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
|
||||
}
|
||||
}
|
||||
do {
|
||||
$options['adminuser'] = cli_input($prompt, $options['adminuser']);
|
||||
} while (empty($options['adminuser']) or $options['adminuser'] === 'guest');
|
||||
} else {
|
||||
if (empty($options['adminuser']) or $options['adminuser'] === 'guest') {
|
||||
$a = (object)array('option'=>'adminuser', 'value'=>$options['adminuser']);
|
||||
|
||||
// Ask for the admin email address.
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('cliadminemail', 'install'));
|
||||
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
|
||||
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
|
||||
}
|
||||
|
||||
// Validate that the address provided was an e-mail address.
|
||||
if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
|
||||
$a = (object)['option' => 'adminemail', 'value' => $options['adminemail']];
|
||||
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
|
||||
}
|
||||
}
|
||||
|
||||
// ask for admin user password
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('cliadminpassword', 'install'));
|
||||
$prompt = get_string('clitypevalue', 'admin');
|
||||
do {
|
||||
$options['adminpass'] = cli_input($prompt);
|
||||
} while (empty($options['adminpass']) or $options['adminpass'] === 'admin');
|
||||
} else {
|
||||
if (empty($options['adminpass']) or $options['adminpass'] === 'admin') {
|
||||
$a = (object)array('option'=>'adminpass', 'value'=>$options['adminpass']);
|
||||
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
|
||||
}
|
||||
}
|
||||
|
||||
// Ask for the admin email address.
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('cliadminemail', 'install'));
|
||||
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
|
||||
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
|
||||
}
|
||||
|
||||
// Validate that the address provided was an e-mail address.
|
||||
if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
|
||||
$a = (object) array('option' => 'adminemail', 'value' => $options['adminemail']);
|
||||
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
|
||||
}
|
||||
|
||||
// Ask for the upgrade key.
|
||||
if ($interactive) {
|
||||
cli_separator();
|
||||
@@ -745,22 +750,26 @@ if ($options['upgradekey'] !== '') {
|
||||
$CFG->upgradekey = $options['upgradekey'];
|
||||
}
|
||||
|
||||
if ($interactive) {
|
||||
if (!$options['agree-license']) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('copyrightnotice'));
|
||||
echo "Moodle - Modular Object-Oriented Dynamic Learning Environment\n";
|
||||
echo get_string('gpl3')."\n\n";
|
||||
echo get_string('doyouagree')."\n";
|
||||
$prompt = get_string('cliyesnoprompt', 'admin');
|
||||
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
|
||||
if ($input == get_string('clianswerno', 'admin')) {
|
||||
exit(1);
|
||||
// The user does not also need to pass agree-license when --skip-database is provided as the user will need to accept
|
||||
// the license again in the database install part.
|
||||
if (!$skipdatabase) {
|
||||
if ($interactive) {
|
||||
if (!$options['agree-license']) {
|
||||
cli_separator();
|
||||
cli_heading(get_string('copyrightnotice'));
|
||||
echo "Moodle - Modular Object-Oriented Dynamic Learning Environment\n";
|
||||
echo get_string('gpl3')."\n\n";
|
||||
echo get_string('doyouagree')."\n";
|
||||
$prompt = get_string('cliyesnoprompt', 'admin');
|
||||
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
|
||||
if ($input == get_string('clianswerno', 'admin')) {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!$options['agree-license'] && !$skipdatabase) {
|
||||
cli_error(get_string('climustagreelicense', 'install'));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!$options['agree-license']) {
|
||||
cli_error(get_string('climustagreelicense', 'install'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -809,7 +818,7 @@ if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
|
||||
cli_error(get_string('pluginschecktodo', 'admin'));
|
||||
}
|
||||
|
||||
if (!$options['skip-database']) {
|
||||
if (!$skipdatabase) {
|
||||
install_cli_database($options, $interactive);
|
||||
// This needs to happen at the end to ensure it occurs after all caches
|
||||
// have been purged for the last time.
|
||||
|
||||
@@ -3163,4 +3163,185 @@
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
<MOODLE version="3.10" requires="3.5">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mariadb" version="10.2.29" />
|
||||
<VENDOR name="mysql" version="5.7" />
|
||||
<VENDOR name="postgres" version="9.6" />
|
||||
<VENDOR name="mssql" version="11.0" />
|
||||
<VENDOR name="oracle" version="11.2" />
|
||||
</DATABASE>
|
||||
<PHP version="7.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="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="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_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="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="sixtyfourbitswarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
</COMPATIBILITY_MATRIX>
|
||||
|
||||
+4
-2
@@ -509,7 +509,8 @@ if (!$cache and $version > $CFG->version) { // upgrade
|
||||
// Always verify plugin dependencies!
|
||||
$failed = array();
|
||||
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed, $CFG->branch)) {
|
||||
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
|
||||
echo $output->unsatisfied_dependencies_page($version, $failed, new moodle_url($PAGE->url,
|
||||
array('confirmplugincheck' => 0)));
|
||||
die();
|
||||
}
|
||||
unset($failed);
|
||||
@@ -701,7 +702,8 @@ if (!$cache and moodle_needs_upgrading()) {
|
||||
$failed = array();
|
||||
if (!$pluginman->all_plugins_ok($version, $failed, $CFG->branch)) {
|
||||
$output = $PAGE->get_renderer('core', 'admin');
|
||||
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
|
||||
echo $output->unsatisfied_dependencies_page($version, $failed, new moodle_url($PAGE->url,
|
||||
array('confirmplugincheck' => 0)));
|
||||
die();
|
||||
}
|
||||
unset($failed);
|
||||
|
||||
+2
-2
@@ -1110,7 +1110,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
|
||||
if (!empty($installabortable[$plugin->component])) {
|
||||
$status .= $this->output->single_button(
|
||||
new moodle_url($this->page->url, array('abortinstall' => $plugin->component)),
|
||||
new moodle_url($this->page->url, array('abortinstall' => $plugin->component, 'confirmplugincheck' => 0)),
|
||||
get_string('cancelinstallone', 'core_plugin'),
|
||||
'post',
|
||||
array('class' => 'actionbutton cancelinstallone d-block mt-1')
|
||||
@@ -1209,7 +1209,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
|
||||
if ($installabortable) {
|
||||
$out .= $this->output->single_button(
|
||||
new moodle_url($this->page->url, array('abortinstallx' => 1)),
|
||||
new moodle_url($this->page->url, array('abortinstallx' => 1, 'confirmplugincheck' => 0)),
|
||||
get_string('cancelinstallall', 'core_plugin', count($installabortable)),
|
||||
'post',
|
||||
array('class' => 'singlebutton cancelinstallall mr-1')
|
||||
|
||||
@@ -645,14 +645,14 @@ if ($hassiteconfig) {
|
||||
|
||||
// Content bank content types.
|
||||
if ($hassiteconfig) {
|
||||
$ADMIN->add('modules', new admin_category('contenbanksettings', new lang_string('contentbank')));
|
||||
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
|
||||
$temp = new admin_settingpage('managecontentbanktypes', new lang_string('managecontentbanktypes'));
|
||||
$temp->add(new admin_setting_managecontentbankcontenttypes());
|
||||
$ADMIN->add('contenbanksettings', $temp);
|
||||
$ADMIN->add('contentbanksettings', $temp);
|
||||
$plugins = core_plugin_manager::instance()->get_plugins_of_type('contenttype');
|
||||
foreach ($plugins as $plugin) {
|
||||
/** @var \core\plugininfo\contentbank $plugin */
|
||||
$plugin->load_settings($ADMIN, 'contenbanksettings', $hassiteconfig);
|
||||
$plugin->load_settings($ADMIN, 'contentbanksettings', $hassiteconfig);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ $options = array(
|
||||
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR|GETREMOTEADDR_SKIP_HTTP_CLIENT_IP => 'REMOTE_ADDR');
|
||||
$temp->add(new admin_setting_configselect('getremoteaddrconf', new lang_string('getremoteaddrconf', 'admin'),
|
||||
new lang_string('configgetremoteaddrconf', 'admin'),
|
||||
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR|GETREMOTEADDR_SKIP_HTTP_CLIENT_IP, $options));
|
||||
GETREMOTEADDR_SKIP_DEFAULT, $options));
|
||||
$temp->add(new admin_setting_configtext('reverseproxyignore', new lang_string('reverseproxyignore', 'admin'), new lang_string('configreverseproxyignore', 'admin'), ''));
|
||||
|
||||
$temp->add(new admin_setting_heading('webproxy', new lang_string('webproxy', 'admin'), new lang_string('webproxyinfo', 'admin')));
|
||||
|
||||
@@ -261,10 +261,28 @@ if ($hassiteconfig) {
|
||||
$temp->add($setting);
|
||||
|
||||
// See {@link https://gdpr-info.eu/art-8-gdpr/}.
|
||||
// See {@link https://www.betterinternetforkids.eu/web/portal/practice/awareness/detail?articleId=3017751}.
|
||||
$ageofdigitalconsentmap = implode(PHP_EOL, [
|
||||
'*, 16',
|
||||
'AT, 14',
|
||||
'BE, 13',
|
||||
'BG, 14',
|
||||
'CY, 14',
|
||||
'CZ, 15',
|
||||
'DK, 13',
|
||||
'EE, 13',
|
||||
'ES, 14',
|
||||
'FI, 13',
|
||||
'FR, 15',
|
||||
'GB, 13',
|
||||
'GR, 15',
|
||||
'IT, 14',
|
||||
'LT, 14',
|
||||
'LV, 13',
|
||||
'MT, 13',
|
||||
'NO, 13',
|
||||
'PT, 13',
|
||||
'SE, 13',
|
||||
'US, 13'
|
||||
]);
|
||||
$setting = new admin_setting_agedigitalconsentmap('agedigitalconsentmap',
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ echo $OUTPUT->header();
|
||||
// Output the search form.
|
||||
echo $OUTPUT->render_from_template('core_admin/tasklogs', (object) [
|
||||
'action' => $pageurl->out(),
|
||||
'filter' => $filter,
|
||||
'filter' => htmlentities($filter),
|
||||
'resultfilteroptions' => [
|
||||
(object) [
|
||||
'value' => -1,
|
||||
|
||||
@@ -164,6 +164,8 @@ if ($options['install']) {
|
||||
mtrace("Acceptance tests site installed");
|
||||
}
|
||||
|
||||
// Note: Do not build the themes here. This is done during the 'enable' stage.
|
||||
|
||||
} else if ($options['drop']) {
|
||||
// Ensure no tests are running.
|
||||
test_lock::acquire('behat');
|
||||
@@ -182,6 +184,10 @@ if ($options['install']) {
|
||||
// Enable test mode.
|
||||
behat_util::start_test_mode($options['add-core-features-to-theme'], $options['optimize-runs'], $parallel, $run);
|
||||
|
||||
// Themes are only built in the 'enable' command.
|
||||
behat_util::build_themes();
|
||||
mtrace("Testing environment themes built");
|
||||
|
||||
// This is only displayed once for parallel install.
|
||||
if (empty($run)) {
|
||||
// Notify user that 2.5 profile has been converted to 3.5.
|
||||
|
||||
@@ -41,5 +41,8 @@ function xmldb_tool_cohortroles_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2020020600, 'tool', 'cohortroles');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -41,5 +41,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ $string['customlang:view'] = 'View local translation';
|
||||
$string['filter'] = 'Filter strings';
|
||||
$string['filtercomponent'] = 'Show strings of these components';
|
||||
$string['filtercustomized'] = 'Customised only';
|
||||
$string['filtermodified'] = 'Modified only';
|
||||
$string['filtermodified'] = 'Modified in this session only';
|
||||
$string['filteronlyhelps'] = 'Help only';
|
||||
$string['filtershowstrings'] = 'Show strings';
|
||||
$string['filterstringid'] = 'String identifier';
|
||||
|
||||
@@ -26,10 +26,11 @@ namespace tool_dataprivacy;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
use lang_string;
|
||||
use core\persistent;
|
||||
|
||||
/**
|
||||
* Class for loading/storing competencies from the DB.
|
||||
* Class for loading/storing data requests from the DB.
|
||||
*
|
||||
* @copyright 2018 Jun Pataleta
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
@@ -62,6 +63,7 @@ class data_request extends persistent {
|
||||
],
|
||||
'comments' => [
|
||||
'type' => PARAM_TEXT,
|
||||
'message' => new lang_string('errorinvalidrequestcomments', 'tool_dataprivacy'),
|
||||
'default' => ''
|
||||
],
|
||||
'commentsformat' => [
|
||||
@@ -75,7 +77,10 @@ class data_request extends persistent {
|
||||
'default' => FORMAT_PLAIN
|
||||
],
|
||||
'userid' => [
|
||||
'default' => 0,
|
||||
'default' => function() {
|
||||
global $USER;
|
||||
return $USER->id;
|
||||
},
|
||||
'type' => PARAM_INT
|
||||
],
|
||||
'requestedby' => [
|
||||
|
||||
@@ -67,8 +67,8 @@ if (!$manage && !\tool_dataprivacy\api::can_contact_dpo()) {
|
||||
redirect($returnurl, get_string('contactdpoviaprivacypolicy', 'tool_dataprivacy'), 0, \core\output\notification::NOTIFY_ERROR);
|
||||
}
|
||||
|
||||
$mform = new tool_dataprivacy_data_request_form($url->out(false), ['manage' => !empty($manage)]);
|
||||
$mform->set_data(['type' => $requesttype]);
|
||||
$mform = new tool_dataprivacy_data_request_form($url->out(false), ['manage' => !empty($manage),
|
||||
'persistent' => new \tool_dataprivacy\data_request(0, (object) ['type' => $requesttype])]);
|
||||
|
||||
// Data request cancelled.
|
||||
if ($mform->is_cancelled()) {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
use tool_dataprivacy\api;
|
||||
use tool_dataprivacy\data_request;
|
||||
use tool_dataprivacy\local\helper;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
@@ -36,7 +37,10 @@ require_once($CFG->libdir.'/formslib.php');
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
* @package tool_dataprivacy
|
||||
*/
|
||||
class tool_dataprivacy_data_request_form extends moodleform {
|
||||
class tool_dataprivacy_data_request_form extends \core\form\persistent {
|
||||
|
||||
/** @var string Name of the persistent class. */
|
||||
protected static $persistentclass = data_request::class;
|
||||
|
||||
/** @var bool Flag to indicate whether this form is being rendered for managing data requests or for regular requests. */
|
||||
protected $manage = false;
|
||||
@@ -96,14 +100,13 @@ class tool_dataprivacy_data_request_form extends moodleform {
|
||||
api::DATAREQUEST_TYPE_EXPORT => get_string('requesttypeexport', 'tool_dataprivacy'),
|
||||
api::DATAREQUEST_TYPE_DELETE => get_string('requesttypedelete', 'tool_dataprivacy')
|
||||
];
|
||||
|
||||
$mform->addElement('select', 'type', get_string('requesttype', 'tool_dataprivacy'), $options);
|
||||
$mform->setType('type', PARAM_INT);
|
||||
$mform->addHelpButton('type', 'requesttype', 'tool_dataprivacy');
|
||||
|
||||
// Request comments text area.
|
||||
$textareaoptions = ['cols' => 60, 'rows' => 10];
|
||||
$mform->addElement('textarea', 'comments', get_string('requestcomments', 'tool_dataprivacy'), $textareaoptions);
|
||||
$mform->setType('type', PARAM_ALPHANUM);
|
||||
$mform->addHelpButton('comments', 'requestcomments', 'tool_dataprivacy');
|
||||
|
||||
// Action buttons.
|
||||
@@ -129,34 +132,49 @@ class tool_dataprivacy_data_request_form extends moodleform {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default data. Unset the default userid if managing data requests
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
protected function get_default_data() {
|
||||
$data = parent::get_default_data();
|
||||
if ($this->manage) {
|
||||
unset($data->userid);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Form validation.
|
||||
*
|
||||
* @param array $data
|
||||
* @param stdClass $data
|
||||
* @param array $files
|
||||
* @param array $errors
|
||||
* @return array
|
||||
* @throws coding_exception
|
||||
* @throws dml_exception
|
||||
*/
|
||||
public function validation($data, $files) {
|
||||
public function extra_validation($data, $files, array &$errors) {
|
||||
global $USER;
|
||||
$errors = [];
|
||||
|
||||
$validrequesttypes = [
|
||||
api::DATAREQUEST_TYPE_EXPORT,
|
||||
api::DATAREQUEST_TYPE_DELETE
|
||||
];
|
||||
if (!in_array($data['type'], $validrequesttypes)) {
|
||||
if (!in_array($data->type, $validrequesttypes)) {
|
||||
$errors['type'] = get_string('errorinvalidrequesttype', 'tool_dataprivacy');
|
||||
}
|
||||
|
||||
if (api::has_ongoing_request($data['userid'], $data['type'])) {
|
||||
$userid = $data->userid;
|
||||
|
||||
if (api::has_ongoing_request($userid, $data->type)) {
|
||||
$errors['type'] = get_string('errorrequestalreadyexists', 'tool_dataprivacy');
|
||||
}
|
||||
|
||||
// Check if current user can create data deletion request.
|
||||
$userid = $data['userid'];
|
||||
if ($data['type'] == api::DATAREQUEST_TYPE_DELETE) {
|
||||
if ($data->type == api::DATAREQUEST_TYPE_DELETE) {
|
||||
if ($userid == $USER->id) {
|
||||
if (!api::can_create_data_deletion_request_for_self()) {
|
||||
$errors['type'] = get_string('errorcannotrequestdeleteforself', 'tool_dataprivacy');
|
||||
|
||||
@@ -322,10 +322,29 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2019121700) {
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2020061501) {
|
||||
|
||||
// Define field commentsformat to be added to tool_dataprivacy_request.
|
||||
$table = new xmldb_table('tool_dataprivacy_request');
|
||||
$field = new xmldb_field('commentsformat', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'comments');
|
||||
|
||||
// Conditionally launch add field commentsformat.
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
// Define field dpocommentformat to be added to tool_dataprivacy_request.
|
||||
$field = new xmldb_field('dpocommentformat', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'dpocomment');
|
||||
|
||||
// Conditionally launch add field dpocommentformat.
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
// Define field systemapproved to be added to tool_dataprivacy_request.
|
||||
$table = new xmldb_table('tool_dataprivacy_request');
|
||||
$field = new xmldb_field('systemapproved', XMLDB_TYPE_INTEGER, '4', null, XMLDB_NOTNULL, null, '0', 'dpocommentformat');
|
||||
|
||||
// Conditionally launch add field systemapproved.
|
||||
@@ -334,7 +353,7 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
|
||||
}
|
||||
|
||||
// Dataprivacy savepoint reached.
|
||||
upgrade_plugin_savepoint(true, 2019121700, 'tool', 'dataprivacy');
|
||||
upgrade_plugin_savepoint(true, 2020061501, 'tool', 'dataprivacy');
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -135,6 +135,7 @@ $string['effectiveretentionperioduser'] = '{$a} (since the last time the user ac
|
||||
$string['emailsalutation'] = 'Dear {$a},';
|
||||
$string['errorcannotrequestdeleteforself'] = 'You don\'t have permission to create deletion request for yourself.';
|
||||
$string['errorcannotrequestdeleteforother'] = 'You don\'t have permission to create deletion request for this user.';
|
||||
$string['errorinvalidrequestcomments'] = 'The comments field may contain plain text only.';
|
||||
$string['errorinvalidrequestcreationmethod'] = 'Invalid request creation method!';
|
||||
$string['errorinvalidrequeststatus'] = 'Invalid request status!';
|
||||
$string['errorinvalidrequesttype'] = 'Invalid request type!';
|
||||
|
||||
@@ -95,7 +95,7 @@ function tool_dataprivacy_myprofile_navigation(tree $tree, $user, $iscurrentuser
|
||||
$showsummary = true;
|
||||
}
|
||||
|
||||
if ($showsummary) {
|
||||
if ($showsummary && $iscurrentuser) {
|
||||
$summaryurl = new moodle_url('/admin/tool/dataprivacy/summary.php');
|
||||
$summarynode = new core_user\output\myprofile\node('privacyandpolicies', 'retentionsummary',
|
||||
get_string('dataretentionsummary', 'tool_dataprivacy'), null, $summaryurl);
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2020061500;
|
||||
$plugin->version = 2020061501;
|
||||
$plugin->requires = 2020060900;
|
||||
$plugin->component = 'tool_dataprivacy';
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_tool_log_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,5 +46,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,5 +46,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("tool_lp/dialogue",["core/yui"],function(a){var b=function(b,c,d,e,f){this.yuiDialogue=null;var g=this;if("undefined"==typeof f){f=!1}a.use("moodle-core-notification","timers",function(){var h="480px";if(f){h="800px"}g.yuiDialogue=new M.core.dialogue({headerContent:b,bodyContent:c,draggable:!0,visible:!1,center:!0,modal:!0,width:h});g.yuiDialogue.after("visibleChange",function(b){if(b.newVal){if("undefined"!=typeof d){a.soon(function(){d(g);g.yuiDialogue.centerDialogue()})}}else{if("undefined"!=typeof e){a.soon(function(){e(g)})}}});g.yuiDialogue.show()})};b.prototype.close=function(){this.yuiDialogue.hide();this.yuiDialogue.destroy()};b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()};return b});
|
||||
define ("tool_lp/dialogue",["core/yui"],function(a){var b=function(b,c,d,e,f){M.util.js_pending("tool_lp/dialogue:dialogue");this.yuiDialogue=null;var g=this;if("undefined"==typeof f){f=!1}a.use("moodle-core-notification","timers",function(){var h="480px";if(f){h="800px"}g.yuiDialogue=new M.core.dialogue({headerContent:b,bodyContent:c,draggable:!0,visible:!1,center:!0,modal:!0,width:h});g.yuiDialogue.before("visibleChange",function(){M.util.js_pending("tool_lp/dialogue:before:visibleChange")});g.yuiDialogue.after("visibleChange",function(b){if(b.newVal){if("undefined"!=typeof d){a.soon(function(){d(g);g.yuiDialogue.centerDialogue();M.util.js_complete("tool_lp/dialogue:before:visibleChange")})}else{M.util.js_complete("tool_lp/dialogue:before:visibleChange")}}else{if("undefined"!=typeof e){a.soon(function(){e(g);M.util.js_complete("tool_lp/dialogue:before:visibleChange")})}else{M.util.js_complete("tool_lp/dialogue:before:visibleChange")}}});g.yuiDialogue.show();M.util.js_complete("tool_lp/dialogue:dialogue")})};b.prototype.close=function(){this.yuiDialogue.hide();this.yuiDialogue.destroy()};b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()};return b});
|
||||
//# sourceMappingURL=dialogue.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("tool_lp/grade_dialogue",["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]);this._ratingOptions=a};g.prototype=Object.create(e.prototype);g.prototype._popup=null;g.prototype._ratingOptions=null;g.prototype._afterRender=function(){var b=this._find("[data-action=\"rate\"]"),c=this._find("[name=\"rating\"]"),d=this._find("[name=\"comment\"]");this._find("[data-action=\"cancel\"]").click(function(a){a.preventDefault();this._trigger("cancelled");this.close()}.bind(this));c.change(function(){var c=a(this);if(!c.val()){b.prop("disabled",!0)}else{b.prop("disabled",!1)}}).change();b.click(function(a){a.preventDefault();var b=c.val();if(!b){return}this._trigger("rated",{rating:b,note:d.val()});this.close()}.bind(this))};g.prototype.close=function(){this._popup.close();this._popup=null};g.prototype.display=function(){return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){this._popup=new d(a,b[0],this._afterRender.bind(this));return this._popup}.bind(this)).catch(b.exception)};g.prototype._find=function(b){return a(this._popup.getContent()).find(b)};g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)};return g});
|
||||
define ("tool_lp/grade_dialogue",["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]);this._ratingOptions=a};g.prototype=Object.create(e.prototype);g.prototype._popup=null;g.prototype._ratingOptions=null;g.prototype._afterRender=function(){var b=this._find("[data-action=\"rate\"]"),c=this._find("[name=\"rating\"]"),d=this._find("[name=\"comment\"]");this._find("[data-action=\"cancel\"]").click(function(a){a.preventDefault();this._trigger("cancelled");this.close()}.bind(this));c.change(function(){var c=a(this);if(!c.val()){b.prop("disabled",!0)}else{b.prop("disabled",!1)}}).change();b.click(function(a){a.preventDefault();var b=c.val();if(!b){return}this._trigger("rated",{rating:b,note:d.val()});this.close()}.bind(this))};g.prototype.close=function(){this._popup.close();this._popup=null};g.prototype.display=function(){M.util.js_pending("tool_lp/grade_dialogue:display");return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){this._popup=new d(a,b[0],function(){this._afterRender();M.util.js_complete("tool_lp/grade_dialogue:display")}.bind(this));return this._popup}.bind(this)).catch(b.exception)};g.prototype._find=function(b){return a(this._popup.getContent()).find(b)};g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)};return g});
|
||||
//# sourceMappingURL=grade_dialogue.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
define ("tool_lp/grade_user_competency_inline",["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length){throw new Error("Could not find the trigger")}this._scaleId=c;this._competencyId=d;this._userId=e;this._planId=g;this._courseId=h;this._chooseStr=i;this._setUp();j.click(function(a){a.preventDefault();this._dialogue.display()}.bind(this));if(this._planId){this._methodName="core_competency_grade_competency_in_plan";this._args={competencyid:this._competencyId,planid:this._planId}}else if(this._courseId){this._methodName="core_competency_grade_competency_in_course";this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}}else{this._methodName="core_competency_grade_competency";this._args={userid:this._userId,competencyid:this._competencyId}}};h.prototype=Object.create(f.prototype);h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0,e;c<b.length;c++){e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){a.on("rated",function(a,e){var f=d._args;f.grade=e.rating;f.note=e.note;c.call([{methodname:d._methodName,args:f,done:function done(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])});return a}).then(function(a){d._dialogue=a}).fail(b.exception)};h.prototype._scaleId=null;h.prototype._competencyId=null;h.prototype._userId=null;h.prototype._planId=null;h.prototype._courseId=null;h.prototype._chooseStr=null;h.prototype._dialogue=null;return h});
|
||||
define ("tool_lp/grade_user_competency_inline",["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length){throw new Error("Could not find the trigger")}this._scaleId=c;this._competencyId=d;this._userId=e;this._planId=g;this._courseId=h;this._chooseStr=i;this._setUp();j.click(function(a){a.preventDefault();this._dialogue.display()}.bind(this));if(this._planId){this._methodName="core_competency_grade_competency_in_plan";this._args={competencyid:this._competencyId,planid:this._planId}}else if(this._courseId){this._methodName="core_competency_grade_competency_in_course";this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}}else{this._methodName="core_competency_grade_competency";this._args={userid:this._userId,competencyid:this._competencyId}}};h.prototype=Object.create(f.prototype);h.prototype._setUp=function(){var a=[],d=this;M.util.js_pending("tool_lp/grade_user_competency_inline:_setUp");var f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0,e;c<b.length;c++){e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){a.on("rated",function(a,e){var f=d._args;f.grade=e.rating;f.note=e.note;c.call([{methodname:d._methodName,args:f,done:function done(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])});return a}).then(function(a){d._dialogue=a;M.util.js_complete("tool_lp/grade_user_competency_inline:_setUp")}).fail(b.exception)};h.prototype._scaleId=null;h.prototype._competencyId=null;h.prototype._userId=null;h.prototype._planId=null;h.prototype._courseId=null;h.prototype._chooseStr=null;h.prototype._dialogue=null;return h});
|
||||
//# sourceMappingURL=grade_user_competency_inline.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -35,6 +35,8 @@ define(['core/yui'], function(Y) {
|
||||
* @param {Boolean} wide Specify we want an extra wide dialogue (the size is standard, but wider than the default).
|
||||
*/
|
||||
var dialogue = function(title, content, afterShow, afterHide, wide) {
|
||||
M.util.js_pending('tool_lp/dialogue:dialogue');
|
||||
|
||||
this.yuiDialogue = null;
|
||||
var parent = this;
|
||||
|
||||
@@ -59,6 +61,10 @@ define(['core/yui'], function(Y) {
|
||||
width: width
|
||||
});
|
||||
|
||||
parent.yuiDialogue.before('visibleChange', function() {
|
||||
M.util.js_pending('tool_lp/dialogue:before:visibleChange');
|
||||
});
|
||||
|
||||
parent.yuiDialogue.after('visibleChange', function(e) {
|
||||
if (e.newVal) {
|
||||
// Delay the callback call to the next tick, otherwise it can happen that it is
|
||||
@@ -67,18 +73,25 @@ define(['core/yui'], function(Y) {
|
||||
Y.soon(function() {
|
||||
afterShow(parent);
|
||||
parent.yuiDialogue.centerDialogue();
|
||||
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
|
||||
});
|
||||
} else {
|
||||
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
|
||||
}
|
||||
} else {
|
||||
if ((typeof afterHide !== 'undefined')) {
|
||||
Y.soon(function() {
|
||||
afterHide(parent);
|
||||
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
|
||||
});
|
||||
} else {
|
||||
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
parent.yuiDialogue.show();
|
||||
M.util.js_complete('tool_lp/dialogue:dialogue');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ define(['jquery',
|
||||
* @return {Promise}
|
||||
*/
|
||||
Grade.prototype.display = function() {
|
||||
M.util.js_pending('tool_lp/grade_dialogue:display');
|
||||
return $.when(
|
||||
Str.get_string('rate', 'tool_lp'),
|
||||
this._render()
|
||||
@@ -110,7 +111,10 @@ define(['jquery',
|
||||
this._popup = new Dialogue(
|
||||
title,
|
||||
templateResult[0],
|
||||
this._afterRender.bind(this)
|
||||
function() {
|
||||
this._afterRender();
|
||||
M.util.js_complete('tool_lp/grade_dialogue:display');
|
||||
}.bind(this)
|
||||
);
|
||||
|
||||
return this._popup;
|
||||
|
||||
@@ -94,6 +94,7 @@ define(['jquery',
|
||||
var options = [],
|
||||
self = this;
|
||||
|
||||
M.util.js_pending('tool_lp/grade_user_competency_inline:_setUp');
|
||||
var promise = ScaleValues.get_values(self._scaleId);
|
||||
promise.then(function(scalevalues) {
|
||||
options.push({
|
||||
@@ -134,6 +135,7 @@ define(['jquery',
|
||||
.then(function(dialogue) {
|
||||
self._dialogue = dialogue;
|
||||
|
||||
M.util.js_complete('tool_lp/grade_user_competency_inline:_setUp');
|
||||
return;
|
||||
})
|
||||
.fail(notification.exception);
|
||||
|
||||
@@ -12,8 +12,8 @@ Feature: See the competencies for an activity on the course competencies page.
|
||||
| Test-Comp1 | ID-FW1 |
|
||||
| Test-Comp2 | ID-FW1 |
|
||||
Given the following "courses" exist:
|
||||
| shortname | fullname |
|
||||
| C1 | Course 1 |
|
||||
| shortname | fullname | enablecompletion |
|
||||
| C1 | Course 1 | 1 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
@@ -21,9 +21,9 @@ Feature: See the competencies for an activity on the course competencies page.
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| page | PageName1 | PageDesc1 | C1 | PAGE1 |
|
||||
| page | PageName2 | PageDesc2 | C1 | PAGE2 |
|
||||
| activity | name | intro | course | idnumber | completion | completionview |
|
||||
| page | PageName1 | PageDesc1 | C1 | PAGE1 | 1 | 1 |
|
||||
| page | PageName2 | PageDesc2 | C1 | PAGE2 | 1 | 1 |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
@@ -61,3 +61,15 @@ Feature: See the competencies for an activity on the course competencies page.
|
||||
And I should not see "Test-Comp1"
|
||||
And I should not see "Test-Comp2"
|
||||
And I should see "No competencies have been linked to this activity or resource."
|
||||
|
||||
@javascript
|
||||
Scenario: None course competencies page.
|
||||
When I log in as "student1"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I follow "PageName1"
|
||||
Then I should see "Test page content"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I follow "PageName1"
|
||||
Then I should see "Test page content"
|
||||
|
||||
@@ -489,6 +489,7 @@ class api {
|
||||
'$mmSideMenuDelegate_mmaFiles' => new lang_string('files'),
|
||||
'$mmSideMenuDelegate_website' => new lang_string('webpage'),
|
||||
'$mmSideMenuDelegate_help' => new lang_string('help'),
|
||||
'CoreMainMenuDelegate_QrReader' => new lang_string('scanqrcode', 'tool_mobile'),
|
||||
),
|
||||
"$course" => array(
|
||||
'NoDelegate_CourseBlocks' => new lang_string('blocks'),
|
||||
@@ -527,6 +528,12 @@ class api {
|
||||
$features["$remoteaddons"] = $remoteaddonslist;
|
||||
}
|
||||
|
||||
if (!empty($availablemods['lti'])) {
|
||||
$ltidisplayname = $availablemods['lti']->displayname;
|
||||
$features["$ltidisplayname"]['CoreCourseModuleDelegate_AddonModLti:openInAppBrowser'] =
|
||||
new lang_string('openusingembeddedbrowser', 'tool_mobile');
|
||||
}
|
||||
|
||||
// Display OAuth 2 identity providers.
|
||||
if (is_enabled_auth('oauth2')) {
|
||||
$identityproviderslist = array();
|
||||
|
||||
@@ -184,6 +184,13 @@ class subscription implements \renderable, \templatable {
|
||||
'type' => 'danger', 'message' => get_string('subscriptionfeaturenotapplied', 'tool_mobile')];
|
||||
}
|
||||
break;
|
||||
// Check QR automatic login.
|
||||
case 'qrautomaticlogin':
|
||||
if ($ms->qrcodetype == \tool_mobile\api::QR_CODE_LOGIN) {
|
||||
$feature['message'] = [
|
||||
'type' => 'danger', 'message' => get_string('subscriptionfeaturenotapplied', 'tool_mobile')];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,5 +48,8 @@ function xmldb_tool_mobile_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -105,6 +105,7 @@ $string['notificationssentnotifications'] = 'Notifications sent';
|
||||
$string['notificationscurrentactivedevices'] = 'Devices receiving notifications this month';
|
||||
$string['oauth2identityproviders'] = 'OAuth 2 identity providers';
|
||||
$string['offlineuse'] = 'Offline use';
|
||||
$string['openusingembeddedbrowser'] = 'Open using embedded browser';
|
||||
$string['pluginname'] = 'Moodle app tools';
|
||||
$string['pluginnotenabledorconfigured'] = 'Plugin not enabled or configured.';
|
||||
$string['qrcodedisabled'] = 'Access via QR code disabled';
|
||||
@@ -113,11 +114,12 @@ $string['qrcodeformobileapploginabout'] = 'Scan the QR code with your mobile app
|
||||
$string['qrcodeformobileappurlabout'] = 'Scan the QR code with your mobile app to fill in the site URL in your app.';
|
||||
$string['qrsiteadminsnotallowed'] = 'For security reasons login via QR code is not allowed for site administrators or if you are logged in as another user.';
|
||||
$string['qrcodetype'] = 'QR code access';
|
||||
$string['qrcodetype_desc'] = 'A QR code can be provided for mobile app users to scan and either have the site URL filled in or be automatically logged in without having to enter their credentials.';
|
||||
$string['qrcodetype_desc'] = 'A QR code can be provided for mobile app users to scan. This can be used to fill in the site URL, or where the site is secured using HTTPS, to automatically log the user in without having to enter their username and password.';
|
||||
$string['qrcodetypeurl'] = 'QR code with site URL';
|
||||
$string['qrcodetypelogin'] = 'QR code with automatic login';
|
||||
$string['readingthisemailgettheapp'] = 'Reading this in an email? <a href="{$a}">Download the mobile app and receive notifications on your mobile device</a>.';
|
||||
$string['remoteaddons'] = 'Remote add-ons';
|
||||
$string['scanqrcode'] = 'Scan QR code';
|
||||
$string['selfsignedoruntrustedcertificatewarning'] = 'It seems that the HTTPS certificate is self-signed or not trusted. The mobile app will only work with trusted sites.';
|
||||
$string['setuplink'] = 'App download page';
|
||||
$string['setuplink_desc'] = 'URL of page with options to download the mobile app from the App Store and Google Play. The app download page link is displayed in the page footer and in a user\'s profile. Leave blank to not display a link.';
|
||||
|
||||
+147
-120
@@ -48,125 +48,152 @@ if ($hassiteconfig) {
|
||||
|
||||
$ADMIN->add('mobileapp', $temp);
|
||||
|
||||
// Show only mobile settings if the mobile service is enabled.
|
||||
if (!empty($CFG->enablemobilewebservice)) {
|
||||
|
||||
$featuresnotice = null;
|
||||
if (empty($CFG->disablemobileappsubscription)) {
|
||||
// General notification about limited features due to app restrictions.
|
||||
$subscriptionurl = (new moodle_url("/$CFG->admin/tool/mobile/subscription.php"))->out(false);
|
||||
$notify = new \core\output\notification(
|
||||
get_string('moodleappsportalfeatureswarning', 'tool_mobile', $subscriptionurl),
|
||||
\core\output\notification::NOTIFY_WARNING);
|
||||
$featuresnotice = $OUTPUT->render($notify);
|
||||
|
||||
$ADMIN->add('mobileapp', new admin_externalpage('mobileappsubscription',
|
||||
new lang_string('mobileappsubscription', 'tool_mobile'),
|
||||
"$CFG->wwwroot/$CFG->admin/tool/mobile/subscription.php"));
|
||||
}
|
||||
|
||||
// Type of login.
|
||||
$temp = new admin_settingpage('mobileauthentication', new lang_string('mobileauthentication', 'tool_mobile'));
|
||||
|
||||
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesauth', '', $featuresnotice));
|
||||
|
||||
$options = array(
|
||||
tool_mobile\api::LOGIN_VIA_APP => new lang_string('loginintheapp', 'tool_mobile'),
|
||||
tool_mobile\api::LOGIN_VIA_BROWSER => new lang_string('logininthebrowser', 'tool_mobile'),
|
||||
tool_mobile\api::LOGIN_VIA_EMBEDDED_BROWSER => new lang_string('loginintheembeddedbrowser', 'tool_mobile'),
|
||||
);
|
||||
$temp->add(new admin_setting_configselect('tool_mobile/typeoflogin',
|
||||
new lang_string('typeoflogin', 'tool_mobile'),
|
||||
new lang_string('typeoflogin_desc', 'tool_mobile'), 1, $options));
|
||||
|
||||
$options = [
|
||||
tool_mobile\api::QR_CODE_DISABLED => new lang_string('qrcodedisabled', 'tool_mobile'),
|
||||
tool_mobile\api::QR_CODE_URL => new lang_string('qrcodetypeurl', 'tool_mobile'),
|
||||
tool_mobile\api::QR_CODE_LOGIN => new lang_string('qrcodetypelogin', 'tool_mobile'),
|
||||
];
|
||||
$temp->add(new admin_setting_configselect('tool_mobile/qrcodetype',
|
||||
new lang_string('qrcodetype', 'tool_mobile'),
|
||||
new lang_string('qrcodetype_desc', 'tool_mobile'), tool_mobile\api::QR_CODE_LOGIN, $options));
|
||||
|
||||
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
|
||||
new lang_string('forcedurlscheme_key', 'tool_mobile'),
|
||||
new lang_string('forcedurlscheme', 'tool_mobile'), 'moodlemobile', PARAM_NOTAGS));
|
||||
|
||||
$temp->add(new admin_setting_configtext('tool_mobile/minimumversion',
|
||||
new lang_string('minimumversion_key', 'tool_mobile'),
|
||||
new lang_string('minimumversion', 'tool_mobile'), '', PARAM_NOTAGS));
|
||||
|
||||
$ADMIN->add('mobileapp', $temp);
|
||||
|
||||
// Appearance related settings.
|
||||
$temp = new admin_settingpage('mobileappearance', new lang_string('mobileappearance', 'tool_mobile'));
|
||||
|
||||
if (!empty($featuresnotice)) {
|
||||
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesappearance', '', $featuresnotice));
|
||||
}
|
||||
|
||||
$temp->add(new admin_setting_configtext('mobilecssurl', new lang_string('mobilecssurl', 'tool_mobile'),
|
||||
new lang_string('configmobilecssurl', 'tool_mobile'), '', PARAM_URL));
|
||||
|
||||
// Reference to Branded Mobile App.
|
||||
if (empty($CFG->disableserviceads_branded)) {
|
||||
$temp->add(new admin_setting_description('moodlebrandedappreference',
|
||||
new lang_string('moodlebrandedapp', 'admin'),
|
||||
new lang_string('moodlebrandedappreference', 'admin')
|
||||
));
|
||||
}
|
||||
|
||||
$temp->add(new admin_setting_heading('tool_mobile/smartappbanners',
|
||||
new lang_string('smartappbanners', 'tool_mobile'), ''));
|
||||
|
||||
$temp->add(new admin_setting_configcheckbox('tool_mobile/enablesmartappbanners',
|
||||
new lang_string('enablesmartappbanners', 'tool_mobile'),
|
||||
new lang_string('enablesmartappbanners_desc', 'tool_mobile'), 0));
|
||||
|
||||
$temp->add(new admin_setting_configtext('tool_mobile/iosappid', new lang_string('iosappid', 'tool_mobile'),
|
||||
new lang_string('iosappid_desc', 'tool_mobile'), tool_mobile\api::DEFAULT_IOS_APP_ID, PARAM_ALPHANUM));
|
||||
|
||||
$temp->add(new admin_setting_configtext('tool_mobile/androidappid', new lang_string('androidappid', 'tool_mobile'),
|
||||
new lang_string('androidappid_desc', 'tool_mobile'), tool_mobile\api::DEFAULT_ANDROID_APP_ID, PARAM_NOTAGS));
|
||||
|
||||
$temp->add(new admin_setting_configtext('tool_mobile/setuplink', new lang_string('setuplink', 'tool_mobile'),
|
||||
new lang_string('setuplink_desc', 'tool_mobile'), 'https://download.moodle.org/mobile', PARAM_URL));
|
||||
|
||||
$ADMIN->add('mobileapp', $temp);
|
||||
|
||||
// Features related settings.
|
||||
$temp = new admin_settingpage('mobilefeatures', new lang_string('mobilefeatures', 'tool_mobile'));
|
||||
|
||||
if (!empty($featuresnotice)) {
|
||||
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeatures', '', $featuresnotice));
|
||||
}
|
||||
|
||||
$temp->add(new admin_setting_heading('tool_mobile/logout',
|
||||
new lang_string('logout'), ''));
|
||||
|
||||
$temp->add(new admin_setting_configcheckbox('tool_mobile/forcelogout',
|
||||
new lang_string('forcelogout', 'tool_mobile'),
|
||||
new lang_string('forcelogout_desc', 'tool_mobile'), 0));
|
||||
|
||||
$temp->add(new admin_setting_heading('tool_mobile/features',
|
||||
new lang_string('mobilefeatures', 'tool_mobile'), ''));
|
||||
|
||||
$options = tool_mobile\api::get_features_list();
|
||||
$temp->add(new admin_setting_configmultiselect('tool_mobile/disabledfeatures',
|
||||
new lang_string('disabledfeatures', 'tool_mobile'),
|
||||
new lang_string('disabledfeatures_desc', 'tool_mobile'), array(), $options));
|
||||
|
||||
$temp->add(new admin_setting_configtextarea('tool_mobile/custommenuitems',
|
||||
new lang_string('custommenuitems', 'tool_mobile'),
|
||||
new lang_string('custommenuitems_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
|
||||
|
||||
$temp->add(new admin_setting_heading('tool_mobile/language',
|
||||
new lang_string('language'), ''));
|
||||
|
||||
$temp->add(new admin_setting_configtextarea('tool_mobile/customlangstrings',
|
||||
new lang_string('customlangstrings', 'tool_mobile'),
|
||||
new lang_string('customlangstrings_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
|
||||
|
||||
$ADMIN->add('mobileapp', $temp);
|
||||
$featuresnotice = null;
|
||||
if (empty($CFG->disablemobileappsubscription)) {
|
||||
// General notification about limited features due to app restrictions.
|
||||
$subscriptionurl = (new moodle_url("/$CFG->admin/tool/mobile/subscription.php"))->out(false);
|
||||
$notify = new \core\output\notification(
|
||||
get_string('moodleappsportalfeatureswarning', 'tool_mobile', $subscriptionurl),
|
||||
\core\output\notification::NOTIFY_WARNING);
|
||||
$featuresnotice = $OUTPUT->render($notify);
|
||||
}
|
||||
|
||||
$hideappsubscription = empty($CFG->enablemobilewebservice);
|
||||
$hideappsubscription = $hideappsubscription || (isset($CFG->disablemobileappsubscription) && !empty($CFG->disablemobileappsubscription));
|
||||
|
||||
$ADMIN->add(
|
||||
'mobileapp',
|
||||
new admin_externalpage(
|
||||
'mobileappsubscription',
|
||||
new lang_string('mobileappsubscription', 'tool_mobile'),
|
||||
"$CFG->wwwroot/$CFG->admin/tool/mobile/subscription.php",
|
||||
'moodle/site:config',
|
||||
$hideappsubscription
|
||||
)
|
||||
);
|
||||
|
||||
// Type of login.
|
||||
$temp = new admin_settingpage(
|
||||
'mobileauthentication',
|
||||
new lang_string('mobileauthentication', 'tool_mobile'),
|
||||
'moodle/site:config',
|
||||
empty($CFG->enablemobilewebservice)
|
||||
);
|
||||
|
||||
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesauth', '', $featuresnotice));
|
||||
|
||||
$options = array(
|
||||
tool_mobile\api::LOGIN_VIA_APP => new lang_string('loginintheapp', 'tool_mobile'),
|
||||
tool_mobile\api::LOGIN_VIA_BROWSER => new lang_string('logininthebrowser', 'tool_mobile'),
|
||||
tool_mobile\api::LOGIN_VIA_EMBEDDED_BROWSER => new lang_string('loginintheembeddedbrowser', 'tool_mobile'),
|
||||
);
|
||||
$temp->add(new admin_setting_configselect('tool_mobile/typeoflogin',
|
||||
new lang_string('typeoflogin', 'tool_mobile'),
|
||||
new lang_string('typeoflogin_desc', 'tool_mobile'), 1, $options));
|
||||
|
||||
$options = [
|
||||
tool_mobile\api::QR_CODE_DISABLED => new lang_string('qrcodedisabled', 'tool_mobile'),
|
||||
tool_mobile\api::QR_CODE_URL => new lang_string('qrcodetypeurl', 'tool_mobile'),
|
||||
];
|
||||
$qrcodetypedefault = tool_mobile\api::QR_CODE_URL;
|
||||
|
||||
if (is_https()) { // Allow QR login for https sites.
|
||||
$options[tool_mobile\api::QR_CODE_LOGIN] = new lang_string('qrcodetypelogin', 'tool_mobile');
|
||||
$qrcodetypedefault = tool_mobile\api::QR_CODE_LOGIN;
|
||||
}
|
||||
|
||||
$temp->add(new admin_setting_configselect('tool_mobile/qrcodetype',
|
||||
new lang_string('qrcodetype', 'tool_mobile'),
|
||||
new lang_string('qrcodetype_desc', 'tool_mobile'), $qrcodetypedefault, $options));
|
||||
|
||||
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
|
||||
new lang_string('forcedurlscheme_key', 'tool_mobile'),
|
||||
new lang_string('forcedurlscheme', 'tool_mobile'), 'moodlemobile', PARAM_NOTAGS));
|
||||
|
||||
$temp->add(new admin_setting_configtext('tool_mobile/minimumversion',
|
||||
new lang_string('minimumversion_key', 'tool_mobile'),
|
||||
new lang_string('minimumversion', 'tool_mobile'), '', PARAM_NOTAGS));
|
||||
|
||||
$ADMIN->add('mobileapp', $temp);
|
||||
|
||||
// Appearance related settings.
|
||||
$temp = new admin_settingpage(
|
||||
'mobileappearance',
|
||||
new lang_string('mobileappearance', 'tool_mobile'),
|
||||
'moodle/site:config',
|
||||
empty($CFG->enablemobilewebservice)
|
||||
);
|
||||
|
||||
if (!empty($featuresnotice)) {
|
||||
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesappearance', '', $featuresnotice));
|
||||
}
|
||||
|
||||
$temp->add(new admin_setting_configtext('mobilecssurl', new lang_string('mobilecssurl', 'tool_mobile'),
|
||||
new lang_string('configmobilecssurl', 'tool_mobile'), '', PARAM_URL));
|
||||
|
||||
// Reference to Branded Mobile App.
|
||||
if (empty($CFG->disableserviceads_branded)) {
|
||||
$temp->add(new admin_setting_description('moodlebrandedappreference',
|
||||
new lang_string('moodlebrandedapp', 'admin'),
|
||||
new lang_string('moodlebrandedappreference', 'admin')
|
||||
));
|
||||
}
|
||||
|
||||
$temp->add(new admin_setting_heading('tool_mobile/smartappbanners',
|
||||
new lang_string('smartappbanners', 'tool_mobile'), ''));
|
||||
|
||||
$temp->add(new admin_setting_configcheckbox('tool_mobile/enablesmartappbanners',
|
||||
new lang_string('enablesmartappbanners', 'tool_mobile'),
|
||||
new lang_string('enablesmartappbanners_desc', 'tool_mobile'), 0));
|
||||
|
||||
$temp->add(new admin_setting_configtext('tool_mobile/iosappid', new lang_string('iosappid', 'tool_mobile'),
|
||||
new lang_string('iosappid_desc', 'tool_mobile'), tool_mobile\api::DEFAULT_IOS_APP_ID, PARAM_ALPHANUM));
|
||||
|
||||
$temp->add(new admin_setting_configtext('tool_mobile/androidappid', new lang_string('androidappid', 'tool_mobile'),
|
||||
new lang_string('androidappid_desc', 'tool_mobile'), tool_mobile\api::DEFAULT_ANDROID_APP_ID, PARAM_NOTAGS));
|
||||
|
||||
$temp->add(new admin_setting_configtext('tool_mobile/setuplink', new lang_string('setuplink', 'tool_mobile'),
|
||||
new lang_string('setuplink_desc', 'tool_mobile'), 'https://download.moodle.org/mobile', PARAM_URL));
|
||||
|
||||
$ADMIN->add('mobileapp', $temp);
|
||||
|
||||
// Features related settings.
|
||||
$temp = new admin_settingpage(
|
||||
'mobilefeatures',
|
||||
new lang_string('mobilefeatures', 'tool_mobile'),
|
||||
'moodle/site:config',
|
||||
empty($CFG->enablemobilewebservice)
|
||||
);
|
||||
|
||||
if (!empty($featuresnotice)) {
|
||||
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeatures', '', $featuresnotice));
|
||||
}
|
||||
|
||||
$temp->add(new admin_setting_heading('tool_mobile/logout',
|
||||
new lang_string('logout'), ''));
|
||||
|
||||
$temp->add(new admin_setting_configcheckbox('tool_mobile/forcelogout',
|
||||
new lang_string('forcelogout', 'tool_mobile'),
|
||||
new lang_string('forcelogout_desc', 'tool_mobile'), 0));
|
||||
|
||||
$temp->add(new admin_setting_heading('tool_mobile/features',
|
||||
new lang_string('mobilefeatures', 'tool_mobile'), ''));
|
||||
|
||||
$options = tool_mobile\api::get_features_list();
|
||||
$temp->add(new admin_setting_configmultiselect('tool_mobile/disabledfeatures',
|
||||
new lang_string('disabledfeatures', 'tool_mobile'),
|
||||
new lang_string('disabledfeatures_desc', 'tool_mobile'), array(), $options));
|
||||
|
||||
$temp->add(new admin_setting_configtextarea('tool_mobile/custommenuitems',
|
||||
new lang_string('custommenuitems', 'tool_mobile'),
|
||||
new lang_string('custommenuitems_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
|
||||
|
||||
$temp->add(new admin_setting_heading('tool_mobile/language',
|
||||
new lang_string('language'), ''));
|
||||
|
||||
$temp->add(new admin_setting_configtextarea('tool_mobile/customlangstrings',
|
||||
new lang_string('customlangstrings', 'tool_mobile'),
|
||||
new lang_string('customlangstrings_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
|
||||
|
||||
$ADMIN->add('mobileapp', $temp);
|
||||
}
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class external extends external_api {
|
||||
public static function verify_webfinger_parameters() {
|
||||
return new external_function_parameters(
|
||||
array(
|
||||
'profileurl' => new external_value(PARAM_RAW, 'The profile url that the user has given us', VALUE_REQUIRED),
|
||||
'profileurl' => new external_value(PARAM_NOTAGS, 'The profile url that the user has given us', VALUE_REQUIRED),
|
||||
'course' => new external_value(PARAM_INT, 'The course we are adding to', VALUE_REQUIRED),
|
||||
'section' => new external_value(PARAM_INT, 'The section within the course we are adding to', VALUE_REQUIRED),
|
||||
)
|
||||
|
||||
@@ -46,7 +46,7 @@ class profile_manager {
|
||||
$user = \core_user::get_user($userid, 'moodlenetprofile');
|
||||
try {
|
||||
$userprofile = $user->moodlenetprofile ? $user->moodlenetprofile : '';
|
||||
return (isset($user)) ? new moodlenet_user_profile($userprofile, $userid) : null;
|
||||
return (isset($user)) ? new moodlenet_user_profile(s($userprofile), $userid) : null;
|
||||
} catch (\moodle_exception $e) {
|
||||
// If an exception is thrown, means there isn't a valid profile set. No need to log exception.
|
||||
return null;
|
||||
@@ -59,7 +59,7 @@ class profile_manager {
|
||||
if ($field->get_category_name() == self::get_category_name()
|
||||
&& $field->inputname == 'profile_field_mnetprofile') {
|
||||
try {
|
||||
return new moodlenet_user_profile($field->display_data(), $userid);
|
||||
return new moodlenet_user_profile(s($field->display_data()), $userid);
|
||||
} catch (\moodle_exception $e) {
|
||||
// If an exception is thrown, means there isn't a valid profile set. No need to log exception.
|
||||
return null;
|
||||
|
||||
@@ -102,5 +102,26 @@ function xmldb_tool_moodlenet_upgrade(int $oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2020061502, 'tool', 'moodlenet');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2020061503) {
|
||||
|
||||
// Find out if there are users with MoodleNet profiles set.
|
||||
$sql = "SELECT u.*
|
||||
FROM {user} u
|
||||
WHERE u.moodlenetprofile IS NOT NULL";
|
||||
|
||||
$records = $DB->get_records_sql($sql);
|
||||
|
||||
foreach ($records as $record) {
|
||||
// Force clean user value just incase there is something malicious.
|
||||
$record->moodlenetprofile = clean_text($record->moodlenetprofile, PARAM_NOTAGS);
|
||||
$DB->update_record('user', $record);
|
||||
}
|
||||
|
||||
upgrade_plugin_savepoint(true, 2020061503, 'tool', 'moodlenet');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'tool_moodlenet';
|
||||
$plugin->version = 2020061502;
|
||||
$plugin->version = 2020061503;
|
||||
$plugin->requires = 2020060900;
|
||||
$plugin->maturity = MATURITY_ALPHA;
|
||||
|
||||
@@ -69,5 +69,8 @@ function xmldb_tool_policy_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ class tool_task_renderer extends plugin_renderer_base {
|
||||
$showloglink = \core\task\logmanager::has_log_report();
|
||||
|
||||
$table = new html_table();
|
||||
$table->caption = get_string('scheduledtasks', 'tool_task');
|
||||
$table->head = [
|
||||
get_string('name'),
|
||||
get_string('component', 'tool_task'),
|
||||
@@ -180,7 +181,7 @@ class tool_task_renderer extends plugin_renderer_base {
|
||||
$plugininfo->init_display_name();
|
||||
|
||||
$componentname = $plugininfo->displayname;
|
||||
if (!$plugininfo->is_enabled()) {
|
||||
if ($plugininfo->is_enabled() === false) {
|
||||
$componentname .= ' ' . html_writer::span(
|
||||
get_string('disabled', 'tool_task'), 'badge badge-secondary');
|
||||
}
|
||||
|
||||
@@ -65,3 +65,9 @@ Feature: Manage scheduled tasks
|
||||
| Name | Component | Minute | Hour | Day | Day of week | Month |
|
||||
| Log table cleanup | Standard log | */5 | 1 | 2 | 4 | 3 |
|
||||
And I should see "Log table cleanup" in the "tr.table-primary" "css_element"
|
||||
|
||||
Scenario: Disabled plugin's tasks are labelled as disabled too
|
||||
When "CAS users sync job \auth_cas\task\sync_task" row "Next run" column of "Scheduled tasks" table should contain "Plugin disabled"
|
||||
Then "CAS users sync job \auth_cas\task\sync_task" row "Component" column of "Scheduled tasks" table should contain "Disabled"
|
||||
And "Background processing for scheduled allocation \workshopallocation_scheduled\task\cron_task" row "Next run" column of "Scheduled tasks" table should not contain "Plugin disabled"
|
||||
And "Background processing for scheduled allocation \workshopallocation_scheduled\task\cron_task" row "Component" column of "Scheduled tasks" table should not contain "Disabled"
|
||||
|
||||
@@ -138,13 +138,28 @@ class manager {
|
||||
*/
|
||||
const CONFIG_SHIPPED_VERSION = 'shipped_version';
|
||||
|
||||
/**
|
||||
* Helper method to initialize admin page, setting appropriate extra URL parameters
|
||||
*
|
||||
* @param string $action
|
||||
*/
|
||||
protected function setup_admin_externalpage(string $action): void {
|
||||
admin_externalpage_setup('tool_usertours/tours', '', array_filter([
|
||||
'action' => $action,
|
||||
'id' => optional_param('id', 0, PARAM_INT),
|
||||
'tourid' => optional_param('tourid', 0, PARAM_INT),
|
||||
'direction' => optional_param('direction', 0, PARAM_INT),
|
||||
]));
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the entry point for this controller class.
|
||||
*
|
||||
* @param string $action The action to perform.
|
||||
*/
|
||||
public function execute($action) {
|
||||
admin_externalpage_setup('tool_usertours/tours');
|
||||
$this->setup_admin_externalpage($action);
|
||||
|
||||
// Add the main content.
|
||||
switch($action) {
|
||||
case self::ACTION_NEWTOUR:
|
||||
|
||||
@@ -54,5 +54,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2020061501, 'tool', 'usertours');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 90 B |
@@ -93,6 +93,17 @@ class check_defaults extends XMLDBCheckAction {
|
||||
$physicaldefault = null;
|
||||
}
|
||||
|
||||
// For number fields there are issues with type differences, so let's convert
|
||||
// everything to a float.
|
||||
if ($xmldbfield->getType() === XMLDB_TYPE_NUMBER) {
|
||||
if ($physicaldefault !== null) {
|
||||
$physicaldefault = (float) $physicaldefault;
|
||||
}
|
||||
if ($xmldbdefault !== null) {
|
||||
$xmldbdefault = (float) $xmldbdefault;
|
||||
}
|
||||
}
|
||||
|
||||
// There *is* a default and it's wrong.
|
||||
if ($physicaldefault !== $xmldbdefault) {
|
||||
$xmldbtext = self::display_default($xmldbdefault);
|
||||
|
||||
@@ -624,9 +624,25 @@ class manager {
|
||||
LEFT JOIN {context} ctx ON ap.contextid = ctx.id
|
||||
WHERE ctx.id IS NULL)");
|
||||
|
||||
$contextsql = "SELECT id FROM {context} ctx";
|
||||
$DB->delete_records_select('analytics_predictions', "contextid NOT IN ($contextsql)");
|
||||
$DB->delete_records_select('analytics_indicator_calc', "contextid NOT IN ($contextsql)");
|
||||
// Cleanup analaytics predictions/calcs with MySQL friendly sub-select.
|
||||
$DB->execute("DELETE FROM {analytics_predictions} WHERE id IN (
|
||||
SELECT oldpredictions.id
|
||||
FROM (
|
||||
SELECT p.id
|
||||
FROM {analytics_predictions} p
|
||||
LEFT JOIN {context} ctx ON p.contextid = ctx.id
|
||||
WHERE ctx.id IS NULL
|
||||
) oldpredictions
|
||||
)");
|
||||
|
||||
$DB->execute("DELETE FROM {analytics_indicator_calc} WHERE id IN (
|
||||
SELECT oldcalcs.id FROM (
|
||||
SELECT c.id
|
||||
FROM {analytics_indicator_calc} c
|
||||
LEFT JOIN {context} ctx ON c.contextid = ctx.id
|
||||
WHERE ctx.id IS NULL
|
||||
) oldcalcs
|
||||
)");
|
||||
|
||||
// Clean up stuff that depends on analysable ids that do not exist anymore.
|
||||
|
||||
|
||||
@@ -44,5 +44,16 @@ function xmldb_auth_cas_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2020061501) {
|
||||
// Normalize the memberattribute_isdn plugin config.
|
||||
set_config('memberattribute_isdn',
|
||||
!empty(get_config('auth_cas', 'memberattribute_isdn')), 'auth_cas');
|
||||
|
||||
upgrade_plugin_savepoint(true, 2020061501, 'auth', 'cas');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -239,9 +239,9 @@ if ($ADMIN->fulltree) {
|
||||
get_string('auth_ldap_memberattribute', 'auth_ldap'), '', PARAM_RAW));
|
||||
|
||||
// Member attribute uses dn.
|
||||
$settings->add(new admin_setting_configtext('auth_cas/memberattribute_isdn',
|
||||
$settings->add(new admin_setting_configselect('auth_cas/memberattribute_isdn',
|
||||
get_string('auth_ldap_memberattribute_isdn_key', 'auth_ldap'),
|
||||
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), '', PARAM_RAW));
|
||||
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), 0, $yesno));
|
||||
|
||||
// Object class.
|
||||
$settings->add(new admin_setting_configtext('auth_cas/objectclass',
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2020061500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->version = 2020061501; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2020060900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_cas'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
+6
-3
@@ -603,9 +603,12 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
}
|
||||
}
|
||||
if (!empty($update)) {
|
||||
$authdb->Execute("UPDATE {$this->config->table}
|
||||
SET ".implode(',', $update)."
|
||||
WHERE {$this->config->fielduser}='".$this->ext_addslashes($extusername)."'");
|
||||
$sql = "UPDATE {$this->config->table}
|
||||
SET ".implode(',', $update)."
|
||||
WHERE {$this->config->fielduser} = ?";
|
||||
if (!$authdb->Execute($sql, array($this->ext_addslashes($extusername)))) {
|
||||
print_error('auth_dbupdateerror', 'auth_db');
|
||||
}
|
||||
}
|
||||
$authdb->Close();
|
||||
return true;
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_db_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -74,5 +74,6 @@ $string['auth_dbcannotconnect'] = 'Cannot connect to external database.';
|
||||
$string['auth_dbcannotreadtable'] = 'Cannot read external table.';
|
||||
$string['auth_dbtableempty'] = 'External table is empty.';
|
||||
$string['auth_dbcolumnlist'] = 'External table contains the following columns:<br />{$a}';
|
||||
$string['auth_dbupdateerror'] = 'Error updating external database.';
|
||||
$string['pluginname'] = 'External database';
|
||||
$string['privacy:metadata'] = 'The External database authentication plugin does not store any personal data.';
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_email_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,6 @@ class behat_auth_email extends behat_base {
|
||||
$confirmationpath = $confirmationurl->out_as_local_url(false);
|
||||
$url = $confirmationpath . '?' . 'data='. $secret .'/'. $username;
|
||||
|
||||
$this->getSession()->visit($this->locate_path($url));
|
||||
$this->execute('behat_general::i_visit', [$url]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,5 +44,16 @@ function xmldb_auth_ldap_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2020061501) {
|
||||
// Normalize the memberattribute_isdn plugin config.
|
||||
set_config('memberattribute_isdn',
|
||||
!empty(get_config('auth_ldap', 'memberattribute_isdn')), 'auth_ldap');
|
||||
|
||||
upgrade_plugin_savepoint(true, 2020061501, 'auth', 'ldap');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ $string['auth_ldap_ldap_encoding'] = 'Encoding used by the LDAP server, most lik
|
||||
$string['auth_ldap_ldap_encoding_key'] = 'LDAP encoding';
|
||||
$string['auth_ldap_login_settings'] = 'Login settings';
|
||||
$string['auth_ldap_memberattribute'] = 'Optional: Overrides user member attribute, when users belongs to a group. Usually \'member\'';
|
||||
$string['auth_ldap_memberattribute_isdn'] = 'Optional: Overrides handling of member attribute values, either 0 or 1';
|
||||
$string['auth_ldap_memberattribute_isdn'] = 'Overrides handling of member attribute values';
|
||||
$string['auth_ldap_memberattribute_isdn_key'] = 'Member attribute uses dn';
|
||||
$string['auth_ldap_memberattribute_key'] = 'Member attribute';
|
||||
$string['auth_ldap_noconnect'] = 'LDAP-module cannot connect to server: {$a}';
|
||||
|
||||
@@ -142,9 +142,9 @@ if ($ADMIN->fulltree) {
|
||||
get_string('auth_ldap_memberattribute', 'auth_ldap'), '', PARAM_RAW));
|
||||
|
||||
// Member attribute uses dn.
|
||||
$settings->add(new admin_setting_configtext('auth_ldap/memberattribute_isdn',
|
||||
$settings->add(new admin_setting_configselect('auth_ldap/memberattribute_isdn',
|
||||
get_string('auth_ldap_memberattribute_isdn_key', 'auth_ldap'),
|
||||
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), '', PARAM_RAW));
|
||||
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), 0, $yesno));
|
||||
|
||||
// Object class.
|
||||
$settings->add(new admin_setting_configtext('auth_ldap/objectclass',
|
||||
|
||||
@@ -108,16 +108,19 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
|
||||
$o['ou'] = 'users';
|
||||
ldap_add($connection, 'ou='.$o['ou'].','.$topdn, $o);
|
||||
|
||||
$createdusers = array();
|
||||
for ($i=1; $i<=5; $i++) {
|
||||
$this->create_ldap_user($connection, $topdn, $i);
|
||||
$createdusers[] = 'username' . $i;
|
||||
}
|
||||
|
||||
// Set up creators group.
|
||||
$assignedroles = array('username1', 'username2');
|
||||
$o = array();
|
||||
$o['objectClass'] = array('posixGroup');
|
||||
$o['cn'] = 'creators';
|
||||
$o['gidNumber'] = 1;
|
||||
$o['memberUid'] = array('username1', 'username2');
|
||||
$o['memberUid'] = $assignedroles;
|
||||
ldap_add($connection, 'cn='.$o['cn'].','.$topdn, $o);
|
||||
|
||||
$creatorrole = $DB->get_record('role', array('shortname'=>'coursecreator'));
|
||||
@@ -174,15 +177,23 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
|
||||
// Check events, 5 users created with 2 users having roles.
|
||||
$this->assertCount(7, $events);
|
||||
foreach ($events as $index => $event) {
|
||||
$usercreatedindex = array(0, 2, 4, 5, 6);
|
||||
$roleassignedindex = array (1, 3);
|
||||
if (in_array($index, $usercreatedindex)) {
|
||||
$this->assertInstanceOf('\core\event\user_created', $event);
|
||||
}
|
||||
if (in_array($index, $roleassignedindex)) {
|
||||
$this->assertInstanceOf('\core\event\role_assigned', $event);
|
||||
$username = $DB->get_field('user', 'username', array('id' => $event->relateduserid)); // Get username.
|
||||
|
||||
if ($event->eventname === '\core\event\user_created') {
|
||||
$this->assertContains($username, $createdusers);
|
||||
unset($events[$index]); // Remove matching event.
|
||||
|
||||
} else if ($event->eventname === '\core\event\role_assigned') {
|
||||
$this->assertContains($username, $assignedroles);
|
||||
unset($events[$index]); // Remove matching event.
|
||||
|
||||
} else {
|
||||
$this->fail('Unexpected event found: ' . $event->eventname);
|
||||
}
|
||||
}
|
||||
// If all the user_created and role_assigned events have matched
|
||||
// then the $events array should be now empty.
|
||||
$this->assertCount(0, $events);
|
||||
|
||||
$this->assertEquals(5, $DB->count_records('user', array('auth'=>'ldap')));
|
||||
$this->assertEquals(2, $DB->count_records('role_assignments'));
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2020061500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->version = 2020061501; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2020060900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_ldap'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_none_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -455,8 +455,9 @@ class auth extends \auth_plugin_base {
|
||||
}
|
||||
}
|
||||
|
||||
$issuer = $client->get_issuer();
|
||||
// First we try and find a defined mapping.
|
||||
$linkedlogin = api::match_username_to_user($userinfo['username'], $client->get_issuer());
|
||||
$linkedlogin = api::match_username_to_user($userinfo['username'], $issuer);
|
||||
|
||||
if (!empty($linkedlogin) && empty($linkedlogin->get('confirmtoken'))) {
|
||||
$mappeduser = get_complete_user_data('id', $linkedlogin->get('userid'));
|
||||
@@ -474,7 +475,7 @@ class auth extends \auth_plugin_base {
|
||||
$SESSION->loginerrormsg = get_string('invalidlogin');
|
||||
$client->log_out();
|
||||
redirect(new moodle_url('/login/index.php'));
|
||||
} else if ($mappeduser && $mappeduser->confirmed) {
|
||||
} else if ($mappeduser && ($mappeduser->confirmed || !$issuer->get('requireconfirmation'))) {
|
||||
// Update user fields.
|
||||
$userinfo = $this->update_user($userinfo, $mappeduser);
|
||||
$userwasmapped = true;
|
||||
@@ -503,7 +504,7 @@ class auth extends \auth_plugin_base {
|
||||
redirect(new moodle_url('/login/index.php'));
|
||||
}
|
||||
|
||||
$issuer = $client->get_issuer();
|
||||
|
||||
if (!$issuer->is_valid_login_domain($oauthemail)) {
|
||||
// Trigger login failed event.
|
||||
$failurereason = AUTH_LOGIN_UNAUTHORISED;
|
||||
|
||||
@@ -81,5 +81,8 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_shibboleth_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class behat_auth extends behat_base {
|
||||
}
|
||||
|
||||
// Visit login page.
|
||||
$this->getSession()->visit($this->locate_path($loginurl->out_as_local_url()));
|
||||
$this->execute('behat_general::i_visit', [$loginurl]);
|
||||
|
||||
// Enter username and password.
|
||||
$this->execute('behat_forms::i_set_the_field_to', array('Username', $this->escape($username)));
|
||||
|
||||
Vendored
+3
-3
@@ -410,7 +410,7 @@ M.core_availability.List = function(json, root, parentRoot) {
|
||||
noneNode.appendChild(deleteIcon.span);
|
||||
|
||||
// Also if it's not the root, none is actually invalid, so add a label.
|
||||
noneNode.appendChild(Y.Node.create('<span class="mt-1 label label-warning">' +
|
||||
noneNode.appendChild(Y.Node.create('<span class="mt-1 badge badge-warning">' +
|
||||
M.util.get_string('invalid', 'availability') + '</span>'));
|
||||
}
|
||||
|
||||
@@ -924,7 +924,7 @@ M.core_availability.Item = function(json, root) {
|
||||
|
||||
// Add the invalid marker (empty).
|
||||
this.node.appendChild(document.createTextNode(' '));
|
||||
this.node.appendChild(Y.Node.create('<span class="label label-warning"/>'));
|
||||
this.node.appendChild(Y.Node.create('<span class="badge badge-warning"/>'));
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -960,7 +960,7 @@ M.core_availability.Item.prototype.fillErrors = function(errors) {
|
||||
errors.push('core_availability:item_unknowntype');
|
||||
}
|
||||
// If any errors were added, add the marker to this item.
|
||||
var errorLabel = this.node.one('> .label-warning');
|
||||
var errorLabel = this.node.one('> .badge-warning');
|
||||
if (errors.length !== before && !errorLabel.get('firstChild')) {
|
||||
errorLabel.appendChild(document.createTextNode(M.util.get_string('invalid', 'availability')));
|
||||
} else if (errors.length === before && errorLabel.get('firstChild')) {
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+3
-3
@@ -410,7 +410,7 @@ M.core_availability.List = function(json, root, parentRoot) {
|
||||
noneNode.appendChild(deleteIcon.span);
|
||||
|
||||
// Also if it's not the root, none is actually invalid, so add a label.
|
||||
noneNode.appendChild(Y.Node.create('<span class="mt-1 label label-warning">' +
|
||||
noneNode.appendChild(Y.Node.create('<span class="mt-1 badge badge-warning">' +
|
||||
M.util.get_string('invalid', 'availability') + '</span>'));
|
||||
}
|
||||
|
||||
@@ -924,7 +924,7 @@ M.core_availability.Item = function(json, root) {
|
||||
|
||||
// Add the invalid marker (empty).
|
||||
this.node.appendChild(document.createTextNode(' '));
|
||||
this.node.appendChild(Y.Node.create('<span class="label label-warning"/>'));
|
||||
this.node.appendChild(Y.Node.create('<span class="badge badge-warning"/>'));
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -960,7 +960,7 @@ M.core_availability.Item.prototype.fillErrors = function(errors) {
|
||||
errors.push('core_availability:item_unknowntype');
|
||||
}
|
||||
// If any errors were added, add the marker to this item.
|
||||
var errorLabel = this.node.one('> .label-warning');
|
||||
var errorLabel = this.node.one('> .badge-warning');
|
||||
if (errors.length !== before && !errorLabel.get('firstChild')) {
|
||||
errorLabel.appendChild(document.createTextNode(M.util.get_string('invalid', 'availability')));
|
||||
} else if (errors.length === before && errorLabel.get('firstChild')) {
|
||||
|
||||
Vendored
+3
-3
@@ -408,7 +408,7 @@ M.core_availability.List = function(json, root, parentRoot) {
|
||||
noneNode.appendChild(deleteIcon.span);
|
||||
|
||||
// Also if it's not the root, none is actually invalid, so add a label.
|
||||
noneNode.appendChild(Y.Node.create('<span class="mt-1 label label-warning">' +
|
||||
noneNode.appendChild(Y.Node.create('<span class="mt-1 badge badge-warning">' +
|
||||
M.util.get_string('invalid', 'availability') + '</span>'));
|
||||
}
|
||||
|
||||
@@ -922,7 +922,7 @@ M.core_availability.Item = function(json, root) {
|
||||
|
||||
// Add the invalid marker (empty).
|
||||
this.node.appendChild(document.createTextNode(' '));
|
||||
this.node.appendChild(Y.Node.create('<span class="label label-warning"/>'));
|
||||
this.node.appendChild(Y.Node.create('<span class="badge badge-warning"/>'));
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -958,7 +958,7 @@ M.core_availability.Item.prototype.fillErrors = function(errors) {
|
||||
errors.push('core_availability:item_unknowntype');
|
||||
}
|
||||
// If any errors were added, add the marker to this item.
|
||||
var errorLabel = this.node.one('> .label-warning');
|
||||
var errorLabel = this.node.one('> .badge-warning');
|
||||
if (errors.length !== before && !errorLabel.get('firstChild')) {
|
||||
errorLabel.appendChild(document.createTextNode(M.util.get_string('invalid', 'availability')));
|
||||
} else if (errors.length === before && errorLabel.get('firstChild')) {
|
||||
|
||||
@@ -122,7 +122,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
|
||||
}
|
||||
|
||||
// Identify the backup we're dealing with.
|
||||
$backuprelease = floatval($this->get_task()->get_info()->backup_release); // The major version: 2.9, 3.0, ...
|
||||
$backuprelease = $this->get_task()->get_info()->backup_release; // The major version: 2.9, 3.0, 3.10...
|
||||
$backupbuild = 0;
|
||||
preg_match('/(\d{8})/', $this->get_task()->get_info()->moodle_release, $matches);
|
||||
if (!empty($matches[1])) {
|
||||
@@ -132,7 +132,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
|
||||
// On older versions the freeze value has to be converted.
|
||||
// We do this from here as it is happening right before the file is read.
|
||||
// This only targets the backup files that can contain the legacy freeze.
|
||||
if ($backupbuild > 20150618 && ($backuprelease < 3.0 || $backupbuild < 20160527)) {
|
||||
if ($backupbuild > 20150618 && (version_compare($backuprelease, '3.0', '<') || $backupbuild < 20160527)) {
|
||||
$this->rewrite_step_backup_file_for_legacy_freeze($fullpath);
|
||||
}
|
||||
|
||||
@@ -505,8 +505,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
|
||||
$gradebookcalculationsfreeze = get_config('core', 'gradebook_calculations_freeze_' . $this->get_courseid());
|
||||
preg_match('/(\d{8})/', $this->get_task()->get_info()->moodle_release, $matches);
|
||||
$backupbuild = (int)$matches[1];
|
||||
// The function floatval will return a float even if there is text mixed with the release number.
|
||||
$backuprelease = floatval($this->get_task()->get_info()->backup_release);
|
||||
$backuprelease = $this->get_task()->get_info()->backup_release; // The major version: 2.9, 3.0, 3.10...
|
||||
|
||||
// Extra credits need adjustments only for backups made between 2.8 release (20141110) and the fix release (20150619).
|
||||
if (!$gradebookcalculationsfreeze && $backupbuild >= 20141110 && $backupbuild < 20150619) {
|
||||
@@ -521,7 +520,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
|
||||
// Courses from before 3.1 (20160518) may have a letter boundary problem and should be checked for this issue.
|
||||
// Backups from before and including 2.9 could have a build number that is greater than 20160518 and should
|
||||
// be checked for this problem.
|
||||
if (!$gradebookcalculationsfreeze && ($backupbuild < 20160518 || $backuprelease <= 2.9)) {
|
||||
if (!$gradebookcalculationsfreeze && ($backupbuild < 20160518 || version_compare($backuprelease, '2.9', '<='))) {
|
||||
require_once($CFG->libdir . '/db/upgradelib.php');
|
||||
upgrade_course_letter_boundary($this->get_courseid());
|
||||
}
|
||||
@@ -4631,11 +4630,11 @@ class restore_create_categories_and_questions extends restore_structure_step {
|
||||
|
||||
// Before 3.5, question categories could be created at top level.
|
||||
// From 3.5 onwards, all question categories should be a child of a special category called the "top" category.
|
||||
$backuprelease = floatval($this->get_task()->get_info()->backup_release);
|
||||
$backuprelease = $this->get_task()->get_info()->backup_release; // The major version: 2.9, 3.0, 3.10...
|
||||
preg_match('/(\d{8})/', $this->get_task()->get_info()->moodle_release, $matches);
|
||||
$backupbuild = (int)$matches[1];
|
||||
$before35 = false;
|
||||
if ($backuprelease < 3.5 || $backupbuild < 20180205) {
|
||||
if (version_compare($backuprelease, '3.5', '<') || $backupbuild < 20180205) {
|
||||
$before35 = true;
|
||||
}
|
||||
if (empty($mapping->info->parent) && $before35) {
|
||||
@@ -4892,11 +4891,11 @@ class restore_move_module_questions_categories extends restore_execution_step {
|
||||
protected function define_execution() {
|
||||
global $DB;
|
||||
|
||||
$backuprelease = floatval($this->task->get_info()->backup_release);
|
||||
$backuprelease = $this->task->get_info()->backup_release; // The major version: 2.9, 3.0, 3.10...
|
||||
preg_match('/(\d{8})/', $this->task->get_info()->moodle_release, $matches);
|
||||
$backupbuild = (int)$matches[1];
|
||||
$after35 = false;
|
||||
if ($backuprelease >= 3.5 && $backupbuild > 20180205) {
|
||||
if (version_compare($backuprelease, '3.5', '>=') && $backupbuild > 20180205) {
|
||||
$after35 = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -581,11 +581,11 @@ abstract class restore_dbops {
|
||||
$rc = restore_controller_dbops::load_controller($restoreid);
|
||||
$restoreinfo = $rc->get_info();
|
||||
$rc->destroy(); // Always need to destroy.
|
||||
$backuprelease = floatval($restoreinfo->backup_release);
|
||||
$backuprelease = $restoreinfo->backup_release; // The major version: 2.9, 3.0, 3.10...
|
||||
preg_match('/(\d{8})/', $restoreinfo->moodle_release, $matches);
|
||||
$backupbuild = (int)$matches[1];
|
||||
$after35 = false;
|
||||
if ($backuprelease >= 3.5 && $backupbuild > 20180205) {
|
||||
if (version_compare($backuprelease, '3.5', '>=') && $backupbuild > 20180205) {
|
||||
$after35 = true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -524,7 +524,7 @@ define(['jquery', 'core/ajax', 'core/str', 'core/notification', 'core/templates'
|
||||
*/
|
||||
function getAllCopyProgress() {
|
||||
var copyids = [];
|
||||
var progressbars = $('.progress').find('.progress-bar').not('.complete');
|
||||
var progressbars = $('.progress').find('.progress-bar[data-operation][data-backupid][data-restoreid]').not('.complete');
|
||||
|
||||
progressbars.each(function() {
|
||||
let progressvars = {
|
||||
|
||||
@@ -402,7 +402,8 @@ abstract class base_moodleform extends moodleform {
|
||||
|
||||
// Get list of module types on course.
|
||||
$modinfo = get_fast_modinfo($COURSE);
|
||||
$modnames = $modinfo->get_used_module_names(true);
|
||||
$modnames = array_map('strval', $modinfo->get_used_module_names(true));
|
||||
core_collator::asort($modnames);
|
||||
$PAGE->requires->yui_module('moodle-backup-backupselectall', 'M.core_backup.backupselectall',
|
||||
array($modnames));
|
||||
$PAGE->requires->strings_for_js(array('select', 'all', 'none'), 'moodle');
|
||||
|
||||
@@ -111,8 +111,8 @@ class copy {
|
||||
* Take the validated form data and extract the required information for copy operations.
|
||||
*
|
||||
* @param \stdClass $formdata Data from the validated course copy form.
|
||||
* @throws \moodle_exception
|
||||
* @return \stdClass $copydata Data required for course copy operations.
|
||||
* @throws \moodle_exception If one of the required copy fields is missing
|
||||
*/
|
||||
private final function get_copy_data(\stdClass $formdata): \stdClass {
|
||||
$copydata = new \stdClass();
|
||||
@@ -121,7 +121,7 @@ class copy {
|
||||
if (isset($formdata->{$field})) {
|
||||
$copydata->{$field} = $formdata->{$field};
|
||||
} else {
|
||||
throw new \moodle_exception('copy_class_field_not_found');
|
||||
throw new \moodle_exception('copyfieldnotfound', 'backup', '', null, $field);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -162,15 +162,17 @@ class copy_form extends \moodleform {
|
||||
}
|
||||
|
||||
// Keep source course user data.
|
||||
$mform->addElement('select', 'userdata', get_string('userdata', 'backup'),
|
||||
[0 => get_string('no'), 1 => get_string('yes')]);
|
||||
$mform->setDefault('userdata', 0);
|
||||
$mform->addHelpButton('userdata', 'userdata', 'backup');
|
||||
|
||||
$requiredcapabilities = array(
|
||||
'moodle/restore:createuser', 'moodle/backup:userinfo', 'moodle/restore:userinfo'
|
||||
);
|
||||
if (has_all_capabilities($requiredcapabilities, $coursecontext)) {
|
||||
$dataarray = array();
|
||||
$dataarray[] = $mform->createElement('advcheckbox', 'userdata',
|
||||
get_string('enable'), '', array('group' => 1), array(0, 1));
|
||||
$mform->addGroup($dataarray, 'dataarray', get_string('userdata', 'backup'), ' ', false);
|
||||
$mform->addHelpButton('dataarray', 'userdata', 'backup');
|
||||
if (!has_all_capabilities($requiredcapabilities, $coursecontext)) {
|
||||
$mform->hardFreeze('userdata');
|
||||
$mform->setConstants('userdata', 0);
|
||||
}
|
||||
|
||||
// Keep manual enrolments.
|
||||
|
||||
@@ -56,7 +56,7 @@ class behat_backup extends behat_base {
|
||||
// table elements are used, and we need to catch exceptions contantly.
|
||||
|
||||
// Go to homepage.
|
||||
$this->getSession()->visit($this->locate_path('/?redirect=0'));
|
||||
$this->execute('behat_general::i_visit', ['/?redirect=0']);
|
||||
$this->execute("behat_general::wait_until_the_page_is_ready");
|
||||
|
||||
// Click the course link.
|
||||
@@ -98,7 +98,7 @@ class behat_backup extends behat_base {
|
||||
// table elements are used, and we need to catch exceptions contantly.
|
||||
|
||||
// Go to homepage.
|
||||
$this->getSession()->visit($this->locate_path('/?redirect=0'));
|
||||
$this->execute('behat_general::i_visit', ['/?redirect=0']);
|
||||
|
||||
// Click the course link.
|
||||
$this->execute("behat_general::click_link", $backupcourse);
|
||||
@@ -134,7 +134,7 @@ class behat_backup extends behat_base {
|
||||
// table elements are used, and we need to catch exceptions contantly.
|
||||
|
||||
// Go to homepage.
|
||||
$this->getSession()->visit($this->locate_path('/?redirect=0'));
|
||||
$this->execute('behat_general::i_visit', ['/?redirect=0']);
|
||||
$this->execute("behat_general::wait_until_the_page_is_ready");
|
||||
|
||||
// Click the course link.
|
||||
|
||||
@@ -70,7 +70,7 @@ class badge extends moodleform {
|
||||
$mform->addRule('description', null, 'required');
|
||||
|
||||
$str = $action == 'new' ? get_string('badgeimage', 'badges') : get_string('newimage', 'badges');
|
||||
$imageoptions = array('maxbytes' => 262144, 'accepted_types' => array('web_image'));
|
||||
$imageoptions = array('maxbytes' => 262144, 'accepted_types' => array('optimised_image'));
|
||||
$mform->addElement('filepicker', 'image', $str, null, $imageoptions);
|
||||
|
||||
if ($action == 'new') {
|
||||
|
||||
@@ -80,16 +80,16 @@ class external_backpack extends \moodleform {
|
||||
$issuercontact = $CFG->badges_defaultissuercontact;
|
||||
$mform->addElement('static', 'issuerinfo', get_string('defaultissuercontact', 'core_badges'), $issuercontact);
|
||||
|
||||
if ($backpack && $backpack->apiversion != OPEN_BADGES_V2P1) {
|
||||
$mform->addElement('passwordunmask', 'password', get_string('defaultissuerpassword', 'core_badges'));
|
||||
$mform->setType('password', PARAM_RAW);
|
||||
$mform->addHelpButton('password', 'defaultissuerpassword', 'badges');
|
||||
$mform->hideIf('password', 'apiversion', 'eq', 1);
|
||||
} else {
|
||||
$oauth2options = badges_get_oauth2_service_options();
|
||||
$mform->addElement('select', 'oauth2_issuerid', get_string('oauth2issuer', 'core_badges'), $oauth2options);
|
||||
$mform->setType('oauth2_issuerid', PARAM_INT);
|
||||
}
|
||||
$mform->addElement('passwordunmask', 'password', get_string('defaultissuerpassword', 'core_badges'));
|
||||
$mform->setType('password', PARAM_RAW);
|
||||
$mform->addHelpButton('password', 'defaultissuerpassword', 'badges');
|
||||
$mform->hideIf('password', 'apiversion', 'neq', 2);
|
||||
|
||||
$oauth2options = badges_get_oauth2_service_options();
|
||||
$mform->addElement('select', 'oauth2_issuerid', get_string('oauth2issuer', 'core_badges'), $oauth2options);
|
||||
$mform->setType('oauth2_issuerid', PARAM_INT);
|
||||
$mform->hideIf('oauth2_issuerid', 'apiversion', 'neq', '2.1');
|
||||
|
||||
if ($backpack) {
|
||||
$this->set_data($backpack);
|
||||
}
|
||||
|
||||
@@ -67,11 +67,6 @@ class external_backpacks_page implements \renderable {
|
||||
foreach ($this->backpacks as $backpack) {
|
||||
$exporter = new backpack_exporter($backpack);
|
||||
$backpack = $exporter->export($output);
|
||||
if ($backpack->apiversion == OPEN_BADGES_V2 || $backpack->apiversion == OPEN_BADGES_V2P1) {
|
||||
$backpack->canedit = true;
|
||||
} else {
|
||||
$backpack->canedit = false;
|
||||
}
|
||||
$backpack->cantest = ($backpack->apiversion == OPEN_BADGES_V2);
|
||||
$backpack->iscurrent = ($backpack->id == $CFG->badges_site_backpack);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
Example context (json):
|
||||
{
|
||||
"backpacks": [
|
||||
{"backpackweburl": "http://localhost/", "sitebackpack": true, "canedit": false, "cantest": true}
|
||||
{"backpackweburl": "http://localhost/", "sitebackpack": true, "cantest": true}
|
||||
]
|
||||
}
|
||||
}}
|
||||
@@ -50,9 +50,7 @@
|
||||
<td> {{{backpackweburl}}} </td>
|
||||
<td> {{#sitebackpack}}Yes{{/sitebackpack}} </td>
|
||||
<td>
|
||||
{{#canedit}}
|
||||
<a href="{{baseurl}}?id={{id}}&action=edit">{{#pix}}t/edit, core,{{#str}}editsettings{{/str}}{{/pix}}</a>
|
||||
{{/canedit}}
|
||||
{{^iscurrent}}
|
||||
<a href="{{baseurl}}?id={{id}}&action=delete" role="button" data-action="deletebackpack">
|
||||
{{#pix}}t/delete, core,{{#str}}delete{{/str}}{{/pix}}
|
||||
|
||||
@@ -107,7 +107,8 @@ Feature: Backpack badges
|
||||
And I set the field "backpackweburl" to "http://backpackweburl.cat"
|
||||
And I press "Save changes"
|
||||
Then I should see "http://backpackweburl.cat"
|
||||
And "Delete" "button" should exist
|
||||
And "Delete" "icon" should exist in the "http://backpackweburl.cat" "table_row"
|
||||
And "Edit settings" "icon" should exist in the "http://backpackweburl.cat" "table_row"
|
||||
|
||||
@javascript
|
||||
Scenario: Remove a site backpack
|
||||
|
||||
@@ -342,13 +342,13 @@ class block_activity_results extends block_base {
|
||||
|
||||
$rank = 0;
|
||||
if (!empty($best)) {
|
||||
$this->content->text .= '<table class="grades"><caption>';
|
||||
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
|
||||
if ($numbest == 1) {
|
||||
$this->content->text .= get_string('bestgroupgrade', 'block_activity_results');
|
||||
} else {
|
||||
$this->content->text .= get_string('bestgroupgrades', 'block_activity_results', $numbest);
|
||||
}
|
||||
$this->content->text .= '</caption><colgroup class="number" />';
|
||||
$this->content->text .= '</h6></caption><colgroup class="number" />';
|
||||
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
|
||||
foreach ($best as $groupid => $averagegrade) {
|
||||
switch ($nameformat) {
|
||||
@@ -398,13 +398,13 @@ class block_activity_results extends block_base {
|
||||
$rank = 0;
|
||||
if (!empty($worst)) {
|
||||
$worst = array_reverse($worst, true);
|
||||
$this->content->text .= '<table class="grades"><caption>';
|
||||
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
|
||||
if ($numworst == 1) {
|
||||
$this->content->text .= get_string('worstgroupgrade', 'block_activity_results');
|
||||
} else {
|
||||
$this->content->text .= get_string('worstgroupgrades', 'block_activity_results', $numworst);
|
||||
}
|
||||
$this->content->text .= '</caption><colgroup class="number" />';
|
||||
$this->content->text .= '</h6></caption><colgroup class="number" />';
|
||||
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
|
||||
foreach ($worst as $groupid => $averagegrade) {
|
||||
switch ($nameformat) {
|
||||
@@ -529,13 +529,13 @@ class block_activity_results extends block_base {
|
||||
|
||||
$rank = 0;
|
||||
if (!empty($best)) {
|
||||
$this->content->text .= '<table class="grades"><caption>';
|
||||
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
|
||||
if ($numbest == 1) {
|
||||
$this->content->text .= get_string('bestgrade', 'block_activity_results');
|
||||
} else {
|
||||
$this->content->text .= get_string('bestgrades', 'block_activity_results', $numbest);
|
||||
}
|
||||
$this->content->text .= '</caption><colgroup class="number" />';
|
||||
$this->content->text .= '</h6></caption><colgroup class="number" />';
|
||||
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
|
||||
foreach ($best as $userid => $gradeid) {
|
||||
switch ($nameformat) {
|
||||
@@ -592,13 +592,13 @@ class block_activity_results extends block_base {
|
||||
$rank = 0;
|
||||
if (!empty($worst)) {
|
||||
$worst = array_reverse($worst, true);
|
||||
$this->content->text .= '<table class="grades"><caption>';
|
||||
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
|
||||
if ($numbest == 1) {
|
||||
$this->content->text .= get_string('worstgrade', 'block_activity_results');
|
||||
} else {
|
||||
$this->content->text .= get_string('worstgrades', 'block_activity_results', $numworst);
|
||||
}
|
||||
$this->content->text .= '</caption><colgroup class="number" />';
|
||||
$this->content->text .= '</h6></caption><colgroup class="number" />';
|
||||
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
|
||||
foreach ($worst as $userid => $gradeid) {
|
||||
switch ($nameformat) {
|
||||
@@ -678,17 +678,17 @@ class block_activity_results extends block_base {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the Link to the activity module when displaed outside of the module
|
||||
* Generates the Link to the activity module when displayed outside of the module.
|
||||
* @param stdclass $activity
|
||||
* @param stdclass $cm
|
||||
* @return string
|
||||
*/
|
||||
private function activity_link($activity, $cm) {
|
||||
|
||||
$o = html_writer::start_tag('h3');
|
||||
$o = html_writer::start_tag('h5');
|
||||
$o .= html_writer::link(new moodle_url('/mod/'.$activity->itemmodule.'/view.php',
|
||||
array('id' => $cm->id)), format_string(($activity->itemname), true, ['context' => context_module::instance($cm->id)]));
|
||||
$o .= html_writer::end_tag('h3');
|
||||
$o .= html_writer::end_tag('h5');
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,3 @@
|
||||
.block_activity_results table.grades .grade {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.block_activity_results table.grades caption {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
@@ -57,5 +57,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -99,10 +99,14 @@ class block_blog_menu extends block_base {
|
||||
// Prepare the footer for this block
|
||||
if (has_capability('moodle/blog:search', context_system::instance())) {
|
||||
// Full-text search field
|
||||
$form = html_writer::tag('label', get_string('search', 'admin'), array('for'=>'blogsearchquery', 'class'=>'accesshide'));
|
||||
$form .= html_writer::empty_tag('input', array('id'=>'blogsearchquery', 'type'=>'text', 'name'=>'search'));
|
||||
$form .= html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('search')));
|
||||
$this->content->footer = html_writer::tag('form', html_writer::tag('div', $form), array('class'=>'blogsearchform', 'method'=>'get', 'action'=>new moodle_url('/blog/index.php')));
|
||||
$form = html_writer::tag('label', get_string('search', 'admin'), array('for' => 'blogsearchquery',
|
||||
'class' => 'accesshide'));
|
||||
$form .= html_writer::empty_tag('input', array('id' => 'blogsearchquery', 'class' => 'form-control mr-1',
|
||||
'type' => 'text', 'name' => 'search'));
|
||||
$form .= html_writer::empty_tag('input', array('type' => 'submit', 'class' => 'btn btn-secondary',
|
||||
'value' => get_string('search')));
|
||||
$this->content->footer = html_writer::tag('form', html_writer::tag('div', $form), array(
|
||||
'class' => 'blogsearchform form-inline', 'method' => 'get', 'action' => new moodle_url('/blog/index.php')));
|
||||
} else {
|
||||
// No footer to display
|
||||
$this->content->footer = '';
|
||||
|
||||
@@ -57,5 +57,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,5 +57,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -60,5 +60,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -60,5 +60,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -9,9 +9,14 @@ Feature: Random glossary entry block linking to global glossary
|
||||
| fullname | shortname |
|
||||
| Course 1 | C1 |
|
||||
| Course 2 | C2 |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | globalglossary | defaultapproval |
|
||||
| glossary | Tips and Tricks | Frontpage glossary description | C2 | glossary0 | 1 | 1 |
|
||||
And the following "activity" exists:
|
||||
| activity | glossary |
|
||||
| name | Tips and Tricks |
|
||||
| intro | Frontpage glossary description |
|
||||
| course | C2 |
|
||||
| idnumber | glossary0 |
|
||||
| globalglossary | 1 |
|
||||
| defaultapproval | 1 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Sam1 | Student1 | student1@example.com |
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_block_html_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -78,5 +78,8 @@ function xmldb_block_myoverview_upgrade($oldversion) {
|
||||
upgrade_block_savepoint(true, 2019111801, 'myoverview', false);
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user