Compare commits
320 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 70fa678586 | |||
| 0c6de97371 | |||
| 63981e5a82 | |||
| 6a0dfc60d6 | |||
| 38c4435a37 | |||
| 3cc4e2f725 | |||
| ca3cbbc233 | |||
| 7d196ef3b3 | |||
| 069b9d5820 | |||
| 454a3d34d5 | |||
| db3a985faf | |||
| c535520966 | |||
| e35ad40de1 | |||
| 436acc27fe | |||
| 73fd6f2928 | |||
| 84e17f59c5 | |||
| 63464df041 | |||
| 17c82085fc | |||
| 5e3ce67f37 | |||
| ec02a34e1f | |||
| 1e1e1b8229 | |||
| f7af2c5fc7 | |||
| 92194c1c8d | |||
| 7bbe8a1c76 | |||
| 22ee65c275 | |||
| 9354f9de64 | |||
| 04d2305788 | |||
| e21e294072 | |||
| 19b7ac05ad | |||
| 4294bbd50f | |||
| b1ffb73177 | |||
| cde1ac3eea | |||
| 059759aab9 | |||
| 188d41ccc9 | |||
| 0b5f9f6e60 | |||
| fa60a11522 | |||
| 29cdf58116 | |||
| 3db24b8015 | |||
| b21b210f41 | |||
| 79482e3fe8 | |||
| 3935371599 | |||
| 14026572ae | |||
| ee66d63054 | |||
| af2d6085cd | |||
| e615d70923 | |||
| ae8388d51c | |||
| 962e3eb662 | |||
| 4c586b025e | |||
| 8612c8aa3e | |||
| a7db91030b | |||
| d807d3c603 | |||
| 8f61b909e8 | |||
| e44ce23c9f | |||
| 6c87b08240 | |||
| 9afdc8fc12 | |||
| e30a500fb9 | |||
| 121d3e0d29 | |||
| 5b7356cdde | |||
| 169d972bf6 | |||
| 4fef0dadf0 | |||
| 96a0d1bc7a | |||
| 01c2ca76c0 | |||
| 46c68c1b42 | |||
| e65f6a7e40 | |||
| 800da1b13d | |||
| a53008f1f0 | |||
| f1a117b86b | |||
| bcbd4140a1 | |||
| c99c5a436e | |||
| b7d36bdbaf | |||
| c21f12e786 | |||
| 2dd1bb44c2 | |||
| 63de9b5cdb | |||
| 24a00cadec | |||
| 3f709d3272 | |||
| def32a798d | |||
| b63524492f | |||
| 46f0136a5a | |||
| 83dbc72f38 | |||
| c6911cefb4 | |||
| dfbdf40af9 | |||
| 3e0fb6862e | |||
| 0e8eba7e1f | |||
| d0209e611f | |||
| ec9ed6d067 | |||
| 3e340aba45 | |||
| de80be59bb | |||
| 310172571b | |||
| a550b70a94 | |||
| 3cd6842501 | |||
| f17c1aadb3 | |||
| 043dffdd34 | |||
| 6fef2ab3db | |||
| 9ffcf8a3e9 | |||
| 56b8f8c8be | |||
| fede68a0ac | |||
| 6588079c5d | |||
| f7e4c3627c | |||
| 6c3f7e0ae6 | |||
| 89d948d86b | |||
| e1dcad3d13 | |||
| 07d000c51e | |||
| 636e7a13b6 | |||
| a57bdfa055 | |||
| 80a57cf924 | |||
| 059d6ffd9f | |||
| fd13953a8a | |||
| 488e115027 | |||
| 72e3ff3c15 | |||
| bd4f6ce186 | |||
| 5416d932d7 | |||
| 27e719e709 | |||
| b577d34861 | |||
| dcd27d9cee | |||
| 863dcb14a8 | |||
| 1a754e8446 | |||
| 95e9f4cc02 | |||
| bac13609ca | |||
| df90a44f3f | |||
| 23fd4f3afc | |||
| 9b39a92170 | |||
| 69c5e60f8c | |||
| cc36a37ea4 | |||
| 2678ee4e81 | |||
| 5a9f3039a7 | |||
| 667784420f | |||
| f628e0ecf6 | |||
| 9ae3b89cc5 | |||
| 098a875e4e | |||
| 9d64f4f078 | |||
| 5fac573391 | |||
| def9c15904 | |||
| d4e9fe521e | |||
| 343cdba46b | |||
| aca74d0d74 | |||
| ce01dbab40 | |||
| 21cf201536 | |||
| dfefe26665 | |||
| de70bc556c | |||
| 7b06a12ef3 | |||
| a415eb505e | |||
| 54a20ea8fc | |||
| a1740aad65 | |||
| 3680b1efa0 | |||
| b90c2e2627 | |||
| 5c53893f97 | |||
| 3049c086a3 | |||
| c644b03f02 | |||
| 7693409caa | |||
| eac59c38f8 | |||
| cd6612b079 | |||
| 7d88829470 | |||
| 9fde80dfa0 | |||
| e787fa6ab4 | |||
| 24cfd4c7d8 | |||
| de33f85405 | |||
| 57e38e1d12 | |||
| ddbf8c29ae | |||
| f265312fcf | |||
| 7dc6674cc4 | |||
| c1b9c51914 | |||
| 14da7f58a4 | |||
| 18221902bc | |||
| 7d9ee66a2f | |||
| de60425a16 | |||
| 4eb3f8d9b7 | |||
| 994e94bf76 | |||
| 2f9f8b5903 | |||
| 3923610e6c | |||
| 0913eb3c2a | |||
| f5b50e0472 | |||
| 09261027b6 | |||
| e0c4e6496f | |||
| 672ce4c6cd | |||
| 13a2a8344c | |||
| 8184f47d6c | |||
| 7a7320af90 | |||
| 70fd9fbb39 | |||
| e16448d3f1 | |||
| 2b4eb2cb71 | |||
| ed798679bb | |||
| 299dcca1b1 | |||
| c16c53d137 | |||
| 52723e1e3f | |||
| 0bcbd5b205 | |||
| ec319d13df | |||
| 0c4422af0b | |||
| 40dcbac3d6 | |||
| 62eb5ef8eb | |||
| 434e8abac8 | |||
| 28add18d9b | |||
| f9220d8138 | |||
| 32237b8308 | |||
| c2ae90c553 | |||
| 7035e0f5b5 | |||
| 6a3777f90c | |||
| de7a6ff47e | |||
| 46e26a1b69 | |||
| 0db0a63e50 | |||
| 120798e85f | |||
| 4679634e36 | |||
| 1c0462deb3 | |||
| 7dc8cc1ab6 | |||
| 170cd579ff | |||
| 6c83de1d51 | |||
| 0ef42d5f6d | |||
| ffc60d23b4 | |||
| 4f5a6ca40e | |||
| a669c6b21e | |||
| e7734513b8 | |||
| 44b4f83298 | |||
| 49053808a2 | |||
| 8ea5d72218 | |||
| e33b7b342a | |||
| f33a8d4eee | |||
| 6a4a1d812c | |||
| c94dce9c89 | |||
| a551ea0210 | |||
| 72b489ef65 | |||
| 827d93f88a | |||
| 884f4d3ec3 | |||
| a072271853 | |||
| 95c794075a | |||
| 890f84cdb2 | |||
| b4e1bbef47 | |||
| 678d051bee | |||
| c83ef7e25b | |||
| 1ee447d3a4 | |||
| 217d523d43 | |||
| 76cebe50cb | |||
| 7dfc04ff98 | |||
| ff037d9698 | |||
| 39dc183d9f | |||
| f7ddcd23f8 | |||
| 92f57f8397 | |||
| 98f246ae97 | |||
| f9e7ee4534 | |||
| b14507a31f | |||
| 4436b9e9dd | |||
| 2568183232 | |||
| bcca23f9c5 | |||
| bab24efe70 | |||
| 45a46ecbd8 | |||
| 64cfe467f8 | |||
| 48f0ebcd49 | |||
| 6537c557b5 | |||
| 225e039e73 | |||
| c8dddb5ccb | |||
| 3e276d6efa | |||
| adf2ea6166 | |||
| fd90d0e925 | |||
| 58a4ce4774 | |||
| b44972cc8b | |||
| 655570df00 | |||
| dbf70dec42 | |||
| c40ed5f6ff | |||
| 2827c7f997 | |||
| 2259fb5f36 | |||
| 6dc7039af9 | |||
| ee7b977a8b | |||
| f4841f394c | |||
| 6973e38a91 | |||
| c1b158b569 | |||
| 21a8a95869 | |||
| 359914c8f6 | |||
| 95208fe135 | |||
| df428648ee | |||
| 9148905e9a | |||
| 64df3fed13 | |||
| ed4aaea57b | |||
| 163fc8588d | |||
| 39e34b9586 | |||
| 5c63ab7ee8 | |||
| 3e3068cd11 | |||
| a27dde0ba7 | |||
| b92400a49f | |||
| a477c8b752 | |||
| 7f52d5c740 | |||
| f52bdbb885 | |||
| 7c519588f1 | |||
| 7345917de4 | |||
| 8a71b10a68 | |||
| 18907a51d5 | |||
| 11d04ffe8a | |||
| 5e1014a76e | |||
| 6e497e6e7d | |||
| 66a4a376ee | |||
| 3563244314 | |||
| bf02dc9819 | |||
| 8e8c066448 | |||
| 67f83d9279 | |||
| bcd1915dd0 | |||
| 992ffccfd2 | |||
| 97fd5a9841 | |||
| 6b47a070e7 | |||
| b4cfb7d733 | |||
| a9fa51024f | |||
| 2eec6ffc6c | |||
| 3f1574f849 | |||
| 40b78a23e9 | |||
| fb5655b5c2 | |||
| 405dcba6f3 | |||
| 7f32c5a447 | |||
| ec3eeb7ace | |||
| 1af3d13bf3 | |||
| 84122523ba | |||
| 382c069e52 | |||
| 3f58a36504 | |||
| 9e41e4e8ea | |||
| 7523d99558 | |||
| 9a375bdf6c | |||
| 2fd5ceadb5 | |||
| a204d7d921 | |||
| bf345fc4ca | |||
| 2722404791 | |||
| 256f820dfd | |||
| 173f5515e3 | |||
| 926d5a53ff | |||
| 88c0fcb03f | |||
| 972304f4cb |
+2
-1
@@ -56,7 +56,8 @@ lib/amd/src/chartjs-lazy.js
|
||||
lib/maxmind/GeoIp2/
|
||||
lib/maxmind/MaxMind/
|
||||
lib/ltiprovider/
|
||||
media/player/videojs/amd/src/
|
||||
media/player/videojs/amd/src/video-lazy.js
|
||||
media/player/videojs/amd/src/Youtube-lazy.js
|
||||
media/player/videojs/videojs/
|
||||
mod/assign/feedback/editpdf/fpdi/
|
||||
repository/s3/S3.php
|
||||
|
||||
+2
-1
@@ -57,7 +57,8 @@ lib/amd/src/chartjs-lazy.js
|
||||
lib/maxmind/GeoIp2/
|
||||
lib/maxmind/MaxMind/
|
||||
lib/ltiprovider/
|
||||
media/player/videojs/amd/src/
|
||||
media/player/videojs/amd/src/video-lazy.js
|
||||
media/player/videojs/amd/src/Youtube-lazy.js
|
||||
media/player/videojs/videojs/
|
||||
mod/assign/feedback/editpdf/fpdi/
|
||||
repository/s3/S3.php
|
||||
|
||||
+3
-1
@@ -134,11 +134,13 @@ before_script:
|
||||
sed -i \
|
||||
-e "s%= 'pgsql'%= 'mysqli'%" \
|
||||
-e "s%= 'username'%= 'travis'%" \
|
||||
-e "s%=> 'utf8mb4_unicode_ci'%=> 'utf8mb4_bin'%" \
|
||||
config.php;
|
||||
|
||||
mysql -u root -e 'SET GLOBAL innodb_file_format=barracuda;' ;
|
||||
mysql -u root -e 'SET GLOBAL innodb_file_per_table=ON;' ;
|
||||
mysql -e 'CREATE DATABASE travis_ci_test DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;' ;
|
||||
mysql -u root -e 'SET GLOBAL innodb_large_prefix=ON;' ;
|
||||
mysql -e 'CREATE DATABASE travis_ci_test DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_bin;' ;
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -64,6 +64,71 @@ if (!empty($options['collation'])) {
|
||||
cli_error("Error: collation '$collation' is not available on this server!");
|
||||
}
|
||||
|
||||
$collationinfo = explode('_', $collation);
|
||||
$charset = reset($collationinfo);
|
||||
|
||||
$engine = strtolower($DB->get_dbengine());
|
||||
|
||||
// Do checks for utf8mb4.
|
||||
if (strpos($collation, 'utf8mb4') === 0) {
|
||||
// Do we have the right engine?
|
||||
if ($engine !== 'innodb' && $engine !== 'xtradb') {
|
||||
cli_error("Error: '$collation' requires InnoDB or XtraDB set as the engine.");
|
||||
}
|
||||
// Are we using Barracuda?
|
||||
if ($DB->get_row_format() != 'Barracuda') {
|
||||
// Try setting it here.
|
||||
try {
|
||||
$DB->execute("SET GLOBAL innodb_file_format=Barracuda");
|
||||
} catch (dml_exception $e) {
|
||||
cli_error("Error: '$collation' requires the file format to be set to Barracuda.
|
||||
An attempt was made to change the format, but it failed. Please try doing this manually.");
|
||||
}
|
||||
echo "GLOBAL SETTING: innodb_file_format changed to Barracuda\n";
|
||||
}
|
||||
// Is one file per table being used?
|
||||
if (!$DB->is_file_per_table_enabled()) {
|
||||
try {
|
||||
$DB->execute("SET GLOBAL innodb_file_per_table=1");
|
||||
} catch (dml_exception $e) {
|
||||
cli_error("Error: '$collation' requires the setting 'innodb_file_per_table' be set to 'ON'.
|
||||
An attempt was made to change the format, but it failed. Please try doing this manually.");
|
||||
}
|
||||
echo "GLOBAL SETTING: innodb_file_per_table changed to 1\n";
|
||||
}
|
||||
// Is large prefix set?
|
||||
if (!$DB->is_large_prefix_enabled()) {
|
||||
try {
|
||||
$DB->execute("SET GLOBAL innodb_large_prefix=1");
|
||||
} catch (dml_exception $e) {
|
||||
cli_error("Error: '$collation' requires the setting 'innodb_large_prefix' be set to 'ON'.
|
||||
An attempt was made to change the format, but it failed. Please try doing this manually.");
|
||||
}
|
||||
echo "GLOBAL SETTING: innodb_large_prefix changed to 1\n";
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SHOW VARIABLES LIKE 'collation_database'";
|
||||
if (!$dbcollation = $DB->get_record_sql($sql)) {
|
||||
cli_error("Error: Could not access collation information on the database.");
|
||||
}
|
||||
$sql = "SHOW VARIABLES LIKE 'character_set_database'";
|
||||
if (!$dbcharset = $DB->get_record_sql($sql)) {
|
||||
cli_error("Error: Could not access character set information on the database.");
|
||||
}
|
||||
if ($dbcollation->value !== $collation || $dbcharset->value !== $charset) {
|
||||
// Try to convert the DB.
|
||||
echo "Converting database to '$collation' for $CFG->wwwroot:\n";
|
||||
$sql = "ALTER DATABASE $CFG->dbname DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
|
||||
try {
|
||||
$DB->change_database_structure($sql);
|
||||
} catch (exception $e) {
|
||||
cli_error("Error: Tried to alter the database with no success. Please try manually changing the database
|
||||
to the new collation and character set and then run this script again.");
|
||||
}
|
||||
echo "DATABASE CONVERTED\n";
|
||||
}
|
||||
|
||||
echo "Converting tables and columns to '$collation' for $CFG->wwwroot:\n";
|
||||
$prefix = $DB->get_prefix();
|
||||
$prefix = str_replace('_', '\\_', $prefix);
|
||||
@@ -80,7 +145,7 @@ if (!empty($options['collation'])) {
|
||||
$skipped++;
|
||||
|
||||
} else {
|
||||
$DB->change_database_structure("ALTER TABLE $table->name DEFAULT COLLATE = $collation");
|
||||
$DB->change_database_structure("ALTER TABLE $table->name DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation");
|
||||
echo "CONVERTED\n";
|
||||
$converted++;
|
||||
}
|
||||
@@ -96,18 +161,32 @@ if (!empty($options['collation'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check for utf8mb4 collation.
|
||||
$rowformat = $DB->get_row_format_sql($engine, $collation);
|
||||
|
||||
if ($column->type === 'tinytext' or $column->type === 'mediumtext' or $column->type === 'text' or $column->type === 'longtext') {
|
||||
$notnull = ($column->null === 'NO') ? 'NOT NULL' : 'NULL';
|
||||
$default = (!is_null($column->default) and $column->default !== '') ? "DEFAULT '$column->default'" : '';
|
||||
// primary, unique and inc are not supported for texts
|
||||
$sql = "ALTER TABLE $table->name MODIFY COLUMN $column->field $column->type COLLATE $collation $notnull $default";
|
||||
$sql = "ALTER TABLE $table->name
|
||||
MODIFY COLUMN $column->field $column->type
|
||||
CHARACTER SET $charset
|
||||
COLLATE $collation $notnull $default";
|
||||
$DB->change_database_structure($sql);
|
||||
|
||||
} else if (strpos($column->type, 'varchar') === 0) {
|
||||
$notnull = ($column->null === 'NO') ? 'NOT NULL' : 'NULL';
|
||||
$default = !is_null($column->default) ? "DEFAULT '$column->default'" : '';
|
||||
// primary, unique and inc are not supported for texts
|
||||
$sql = "ALTER TABLE $table->name MODIFY COLUMN $column->field $column->type COLLATE $collation $notnull $default";
|
||||
|
||||
if ($rowformat != '') {
|
||||
$sql = "ALTER TABLE $table->name $rowformat";
|
||||
$DB->change_database_structure($sql);
|
||||
}
|
||||
|
||||
$sql = "ALTER TABLE $table->name
|
||||
MODIFY COLUMN $column->field $column->type
|
||||
CHARACTER SET $charset
|
||||
COLLATE $collation $notnull $default";
|
||||
$DB->change_database_structure($sql);
|
||||
} else {
|
||||
echo "ERROR (unknown column type: $column->type)\n";
|
||||
@@ -180,7 +259,9 @@ function mysql_get_collations() {
|
||||
global $DB;
|
||||
|
||||
$collations = array();
|
||||
$sql = "SHOW COLLATION WHERE Collation LIKE 'utf8\_%' AND Charset = 'utf8'";
|
||||
$sql = "SHOW COLLATION
|
||||
WHERE Collation LIKE 'utf8\_%' AND Charset = 'utf8'
|
||||
OR Collation LIKE 'utf8mb4\_%' AND Charset = 'utf8mb4'";
|
||||
$rs = $DB->get_recordset_sql($sql);
|
||||
foreach ($rs as $collation) {
|
||||
$collations[$collation->collation] = $collation->collation;
|
||||
|
||||
@@ -1723,6 +1723,21 @@
|
||||
<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_CHECKS>
|
||||
</MOODLE>
|
||||
<MOODLE version="3.2" requires="2.7">
|
||||
@@ -1873,6 +1888,21 @@
|
||||
<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_CHECKS>
|
||||
</MOODLE>
|
||||
</COMPATIBILITY_MATRIX>
|
||||
|
||||
@@ -38,5 +38,5 @@
|
||||
}
|
||||
}}
|
||||
<div class="form-text defaultsnext">
|
||||
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="{{#forceltr}}text-ltr{{/forceltr}}" {{#attributes}} {{name}}="{{value}}"{{/attributes}}>
|
||||
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="{{#forceltr}}text-ltr{{/forceltr}}"{{#attributes}} {{name}}="{{value}}"{{/attributes}}>
|
||||
</div>
|
||||
|
||||
+225
-89
@@ -54,6 +54,8 @@ list($options, $unrecognised) = cli_get_params(
|
||||
'fromrun' => 1,
|
||||
'torun' => 0,
|
||||
'single-run' => false,
|
||||
'rerun' => 0,
|
||||
'auto-rerun' => 0,
|
||||
),
|
||||
array(
|
||||
'h' => 'help',
|
||||
@@ -77,6 +79,8 @@ Options:
|
||||
--replace Replace args string with run process number, useful for output.
|
||||
--fromrun Execute run starting from (Used for parallel runs on different vms)
|
||||
--torun Execute run till (Used for parallel runs on different vms)
|
||||
--rerun Re-run scenarios that failed during last execution.
|
||||
--auto-rerun Automatically re-run scenarios that failed during last execution.
|
||||
|
||||
-h, --help Print out this help
|
||||
|
||||
@@ -91,11 +95,31 @@ if (!empty($options['help'])) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$parallelrun = behat_config_manager::get_parallel_test_runs($options['fromrun']);
|
||||
$parallelrun = behat_config_manager::get_behat_run_config_value('parallel');
|
||||
|
||||
// Default torun is maximum parallel runs.
|
||||
if (empty($options['torun'])) {
|
||||
$options['torun'] = $parallelrun;
|
||||
// Check if the options provided are valid to run behat.
|
||||
if ($parallelrun === false) {
|
||||
// Parallel run should not have fromrun or torun options greater than 1.
|
||||
if (($options['fromrun'] > 1) || ($options['torun'] > 1)) {
|
||||
echo "Test site is not initialized for parallel run." . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
// Ensure fromrun is within limits of initialized test site.
|
||||
if (!empty($options['fromrun']) && ($options['fromrun'] > $parallelrun)) {
|
||||
echo "From run (" . $options['fromrun'] . ") is more than site with parallel runs (" . $parallelrun . ")" . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Default torun is maximum parallel runs and should be less than equal to parallelruns.
|
||||
if (empty($options['torun'])) {
|
||||
$options['torun'] = $parallelrun;
|
||||
} else {
|
||||
if ($options['torun'] > $parallelrun) {
|
||||
echo "To run (" . $options['torun'] . ") is more than site with parallel runs (" . $parallelrun . ")" . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Capture signals and ensure we clean symlinks.
|
||||
@@ -127,7 +151,7 @@ if ($options['profile']) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$extraopts[] = '--profile="' . $profile . '"';
|
||||
$extraopts['profile'] = '--profile="' . $profile . '"';
|
||||
// By default, profile tags will be used.
|
||||
if (!empty($CFG->behat_config[$profile]['filters']['tags'])) {
|
||||
$tags = $CFG->behat_config[$profile]['filters']['tags'];
|
||||
@@ -137,117 +161,205 @@ if ($options['profile']) {
|
||||
// Command line tags have precedence (std behat behavior).
|
||||
if ($options['tags']) {
|
||||
$tags = $options['tags'];
|
||||
$extraopts[] = '--tags="' . $tags . '"';
|
||||
$extraopts['tags'] = '--tags="' . $tags . '"';
|
||||
}
|
||||
|
||||
// Add suite option if specified.
|
||||
if ($options['suite']) {
|
||||
$extraopts[] = '--suite="' . $options['suite'] . '"';
|
||||
$extraopts['suite'] = '--suite="' . $options['suite'] . '"';
|
||||
}
|
||||
|
||||
// Feature should be added to last, for behat command.
|
||||
if ($options['feature']) {
|
||||
$extraopts[] = $options['feature'];
|
||||
$extraopts['feature'] = $options['feature'];
|
||||
// Only run 1 process as process.
|
||||
// Feature file is picked from absolute path provided, so no need to check for behat.yml.
|
||||
$options['torun'] = $options['fromrun'];
|
||||
}
|
||||
|
||||
// Set of options to pass to behat.
|
||||
$extraopts = implode(' ', $extraopts);
|
||||
$extraoptstr = implode(' ', $extraopts);
|
||||
|
||||
// If empty parallelrun then just check with user if it's a run single behat test.
|
||||
// If rerun is passed then ensure we just run the failed processes.
|
||||
$lastfailedstatus = 0;
|
||||
$lasttorun = $options['torun'];
|
||||
$lastfromrun = $options['fromrun'];
|
||||
if ($options['rerun']) {
|
||||
// Get last combined failed status.
|
||||
$lastfailedstatus = behat_config_manager::get_behat_run_config_value('lastcombinedfailedstatus');
|
||||
$lasttorun = behat_config_manager::get_behat_run_config_value('lasttorun');
|
||||
$lastfromrun = behat_config_manager::get_behat_run_config_value('lastfromrun');
|
||||
|
||||
if ($lastfailedstatus !== false) {
|
||||
$extraoptstr .= ' --rerun';
|
||||
}
|
||||
|
||||
// If torun is less than last torun, then just set this to min last to run and similar for fromrun.
|
||||
if ($options['torun'] < $lasttorun) {
|
||||
$options['torun'];
|
||||
}
|
||||
if ($options['fromrun'] > $lastfromrun) {
|
||||
$options['fromrun'];
|
||||
}
|
||||
unset($options['rerun']);
|
||||
}
|
||||
|
||||
$cmds = array();
|
||||
$exitcodes = array();
|
||||
$status = 0;
|
||||
$verbose = empty($options['verbose']) ? false : true;
|
||||
|
||||
// Execute behat run commands.
|
||||
if (empty($parallelrun)) {
|
||||
$cwd = getcwd();
|
||||
chdir(__DIR__);
|
||||
$runtestscommand = behat_command::get_behat_command(false, false, true);
|
||||
$runtestscommand .= ' --config ' . behat_config_manager::get_behat_cli_config_filepath();
|
||||
$runtestscommand .= ' ' . $extraopts;
|
||||
$runtestscommand .= ' ' . $extraoptstr;
|
||||
$cmds['singlerun'] = $runtestscommand;
|
||||
|
||||
echo "Running single behat site:" . PHP_EOL;
|
||||
passthru("php $runtestscommand", $code);
|
||||
passthru("php $runtestscommand", $status);
|
||||
$exitcodes['singlerun'] = $status;
|
||||
chdir($cwd);
|
||||
exit($code);
|
||||
}
|
||||
} else {
|
||||
|
||||
$cmds = array();
|
||||
echo "Running " . ($options['torun'] - $options['fromrun'] + 1) . " parallel behat sites:" . PHP_EOL;
|
||||
echo "Running " . ($options['torun'] - $options['fromrun'] + 1) . " parallel behat sites:" . PHP_EOL;
|
||||
|
||||
for ($i = $options['fromrun']; $i <= $options['torun']; $i++) {
|
||||
$CFG->behatrunprocess = $i;
|
||||
for ($i = $options['fromrun']; $i <= $options['torun']; $i++) {
|
||||
$lastfailed = 1 & $lastfailedstatus >> ($i - 1);
|
||||
|
||||
// Options parameters to be added to each run.
|
||||
$myopts = !empty($options['replace']) ? str_replace($options['replace'], $i, $extraopts) : $extraopts;
|
||||
// Bypass if not failed in last run.
|
||||
if ($lastfailedstatus && !$lastfailed && ($i <= $lasttorun) && ($i >= $lastfromrun)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$behatcommand = behat_command::get_behat_command(false, false, true);
|
||||
$behatconfigpath = behat_config_manager::get_behat_cli_config_filepath($i);
|
||||
$CFG->behatrunprocess = $i;
|
||||
|
||||
// Command to execute behat run.
|
||||
$cmds[BEHAT_PARALLEL_SITE_NAME . $i] = $behatcommand . ' --config ' . $behatconfigpath . " " . $myopts;
|
||||
echo "[" . BEHAT_PARALLEL_SITE_NAME . $i . "] " . $cmds[BEHAT_PARALLEL_SITE_NAME . $i] . PHP_EOL;
|
||||
}
|
||||
// Options parameters to be added to each run.
|
||||
$myopts = !empty($options['replace']) ? str_replace($options['replace'], $i, $extraoptstr) : $extraoptstr;
|
||||
|
||||
if (empty($cmds)) {
|
||||
echo "No commands to execute " . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
$behatcommand = behat_command::get_behat_command(false, false, true);
|
||||
$behatconfigpath = behat_config_manager::get_behat_cli_config_filepath($i);
|
||||
|
||||
// Create site symlink if necessary.
|
||||
if (!behat_config_manager::create_parallel_site_links($options['fromrun'], $options['torun'])) {
|
||||
echo "Check permissions. If on windows, make sure you are running this command as admin" . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Execute all commands, relative to moodle root directory.
|
||||
$processes = cli_execute_parallel($cmds, __DIR__ . "/../../../../");
|
||||
$stoponfail = empty($options['stop-on-failure']) ? false : true;
|
||||
|
||||
// Print header.
|
||||
print_process_start_info($processes);
|
||||
|
||||
// Print combined run o/p from processes.
|
||||
$exitcodes = print_combined_run_output($processes, $stoponfail);
|
||||
$time = round(microtime(true) - $time, 1);
|
||||
echo "Finished in " . gmdate("G\h i\m s\s", $time) . PHP_EOL . PHP_EOL;
|
||||
|
||||
ksort($exitcodes);
|
||||
|
||||
// Print exit info from each run.
|
||||
// Status bits contains pass/fail status of parallel runs.
|
||||
$status = 0;
|
||||
$processcounter = 0;
|
||||
foreach ($exitcodes as $exitcode) {
|
||||
if ($exitcode) {
|
||||
$status |= (1 << $processcounter);
|
||||
}
|
||||
$processcounter++;
|
||||
}
|
||||
|
||||
// Run finished. Show exit code and output from individual process.
|
||||
$verbose = empty($options['verbose']) ? false : true;
|
||||
$verbose = $verbose || !empty($status);
|
||||
|
||||
// Show exit code from each process, if any process failed.
|
||||
if ($verbose) {
|
||||
// Echo exit codes.
|
||||
echo "Exit codes for each behat run: " . PHP_EOL;
|
||||
foreach ($exitcodes as $run => $exitcode) {
|
||||
echo $run . ": " . $exitcode . PHP_EOL;
|
||||
// Command to execute behat run.
|
||||
$cmds[BEHAT_PARALLEL_SITE_NAME . $i] = $behatcommand . ' --config ' . $behatconfigpath . " " . $myopts;
|
||||
echo "[" . BEHAT_PARALLEL_SITE_NAME . $i . "] " . $cmds[BEHAT_PARALLEL_SITE_NAME . $i] . PHP_EOL;
|
||||
}
|
||||
|
||||
// Show failed re-run commands.
|
||||
if ($status) {
|
||||
echo "To re-run failed processes, you can use following commands:" . PHP_EOL;
|
||||
foreach ($cmds as $name => $cmd) {
|
||||
if (!empty($exitcodes[$name])) {
|
||||
echo "[" . $name . "] " . $cmd . PHP_EOL;
|
||||
if (empty($cmds)) {
|
||||
echo "No commands to execute " . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Create site symlink if necessary.
|
||||
if (!behat_config_manager::create_parallel_site_links($options['fromrun'], $options['torun'])) {
|
||||
echo "Check permissions. If on windows, make sure you are running this command as admin" . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Save torun and from run, so it can be used to detect if it was executed in last run.
|
||||
behat_config_manager::set_behat_run_config_value('lasttorun', $options['torun']);
|
||||
behat_config_manager::set_behat_run_config_value('lastfromrun', $options['fromrun']);
|
||||
|
||||
// Keep no delay by default, between each parallel, let user decide.
|
||||
if (!defined('BEHAT_PARALLEL_START_DELAY')) {
|
||||
define('BEHAT_PARALLEL_START_DELAY', 0);
|
||||
}
|
||||
|
||||
// Execute all commands, relative to moodle root directory.
|
||||
$processes = cli_execute_parallel($cmds, __DIR__ . "/../../../../", BEHAT_PARALLEL_START_DELAY);
|
||||
$stoponfail = empty($options['stop-on-failure']) ? false : true;
|
||||
|
||||
// Print header.
|
||||
print_process_start_info($processes);
|
||||
|
||||
// Print combined run o/p from processes.
|
||||
$exitcodes = print_combined_run_output($processes, $stoponfail);
|
||||
// Time to finish run.
|
||||
$time = round(microtime(true) - $time, 1);
|
||||
echo "Finished in " . gmdate("G\h i\m s\s", $time) . PHP_EOL . PHP_EOL;
|
||||
ksort($exitcodes);
|
||||
|
||||
// Print exit info from each run.
|
||||
// Status bits contains pass/fail status of parallel runs.
|
||||
foreach ($exitcodes as $name => $exitcode) {
|
||||
if ($exitcode) {
|
||||
$runno = str_replace(BEHAT_PARALLEL_SITE_NAME, '', $name);
|
||||
$status |= (1 << ($runno - 1));
|
||||
}
|
||||
}
|
||||
|
||||
// Print each process information.
|
||||
print_each_process_info($processes, $verbose, $status);
|
||||
}
|
||||
|
||||
// Save final exit code containing which run failed.
|
||||
behat_config_manager::set_behat_run_config_value('lastcombinedfailedstatus', $status);
|
||||
|
||||
// Show exit code from each process, if any process failed and how to rerun failed process.
|
||||
if ($verbose || $status) {
|
||||
// Check if status of last run is failure and rerun is suggested.
|
||||
if (!empty($options['auto-rerun']) && $status) {
|
||||
// Rerun for the number of tries passed.
|
||||
for ($i = 0; $i < $options['auto-rerun']; $i++) {
|
||||
|
||||
// Run individual commands, to avoid parallel failures.
|
||||
foreach ($exitcodes as $behatrunname => $exitcode) {
|
||||
// If not failed in last run, then skip.
|
||||
if ($exitcode == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// This was a failure.
|
||||
echo "*** Re-running behat run: $behatrunname ***" . PHP_EOL;
|
||||
if ($verbose) {
|
||||
echo "Executing: " . $cmds[$behatrunname] . " --rerun" . PHP_EOL;
|
||||
}
|
||||
|
||||
passthru("php $cmds[$behatrunname] --rerun", $rerunstatus);
|
||||
|
||||
// Update exit code.
|
||||
$exitcodes[$behatrunname] = $rerunstatus;
|
||||
}
|
||||
}
|
||||
|
||||
// Update status after auto-rerun finished.
|
||||
foreach ($exitcodes as $name => $exitcode) {
|
||||
if ($exitcode) {
|
||||
if (!empty($parallelrun)) {
|
||||
$runno = str_replace(BEHAT_PARALLEL_SITE_NAME, '', $name);
|
||||
} else {
|
||||
$runno = 1;
|
||||
}
|
||||
$status |= (1 << ($runno - 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Show final o/p with re-run commands.
|
||||
if ($status) {
|
||||
if (!empty($parallelrun)) {
|
||||
// Echo exit codes.
|
||||
echo "Exit codes for each behat run: " . PHP_EOL;
|
||||
foreach ($exitcodes as $run => $exitcode) {
|
||||
echo $run . ": " . $exitcode . PHP_EOL;
|
||||
}
|
||||
unset($extraopts['fromrun']);
|
||||
unset($extraopts['torun']);
|
||||
if (!empty($options['replace'])) {
|
||||
$extraopts['replace'] = '--replace="' . $options['replace'] . '"';
|
||||
}
|
||||
}
|
||||
|
||||
echo "To re-run failed processes, you can use following command:" . PHP_EOL;
|
||||
$extraopts['rerun'] = '--rerun';
|
||||
$extraoptstr = implode(' ', $extraopts);
|
||||
echo behat_command::get_behat_command(true, true, true) . " " . $extraoptstr . PHP_EOL;
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
|
||||
print_each_process_info($processes, $verbose);
|
||||
|
||||
// Remove site symlink if necessary.
|
||||
behat_config_manager::drop_parallel_site_links();
|
||||
|
||||
@@ -364,23 +476,47 @@ function print_combined_run_output($processes, $stoponfail = false) {
|
||||
* @param array $processes list of processes to loop though.
|
||||
* @param bool $verbose Show verbose output for each process.
|
||||
*/
|
||||
function print_each_process_info($processes, $verbose = false) {
|
||||
function print_each_process_info($processes, $verbose = false, $status = 0) {
|
||||
foreach ($processes as $name => $process) {
|
||||
echo "**************** [" . $name . "] ****************" . PHP_EOL;
|
||||
if ($verbose) {
|
||||
echo $process->getOutput();
|
||||
echo $process->getErrorOutput();
|
||||
} else {
|
||||
$op = explode(PHP_EOL, $process->getOutput());
|
||||
foreach ($op as $line) {
|
||||
// Don't print progress .
|
||||
if (trim($line) && (strpos($line, '.') !== 0) && (strpos($line, 'Moodle ') !== 0) &&
|
||||
(strpos($line, 'Server OS ') !== 0) && (strpos($line, 'Started at ') !== 0) &&
|
||||
(strpos($line, 'Browser specific fixes ') !== 0)) {
|
||||
echo $line . PHP_EOL;
|
||||
}
|
||||
|
||||
} else if ($status) {
|
||||
// Only show failed o/p.
|
||||
$runno = str_replace(BEHAT_PARALLEL_SITE_NAME, '', $name);
|
||||
if ((1 << ($runno - 1)) & $status) {
|
||||
echo $process->getOutput();
|
||||
echo $process->getErrorOutput();
|
||||
} else {
|
||||
echo get_status_lines_from_run_op($process);
|
||||
}
|
||||
|
||||
} else {
|
||||
echo get_status_lines_from_run_op($process);
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract status information from behat o/p and return.
|
||||
* @param Symfony\Component\Process\Process $process
|
||||
* @return string
|
||||
*/
|
||||
function get_status_lines_from_run_op(Symfony\Component\Process\Process $process) {
|
||||
$statusstr = '';
|
||||
$op = explode(PHP_EOL, $process->getOutput());
|
||||
foreach ($op as $line) {
|
||||
// Don't print progress .
|
||||
if (trim($line) && (strpos($line, '.') !== 0) && (strpos($line, 'Moodle ') !== 0) &&
|
||||
(strpos($line, 'Server OS ') !== 0) && (strpos($line, 'Started at ') !== 0) &&
|
||||
(strpos($line, 'Browser specific fixes ') !== 0)) {
|
||||
$statusstr .= $line . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
return $statusstr;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,11 +36,7 @@ define('NO_OUTPUT_BUFFERING', true);
|
||||
define('IGNORE_COMPONENT_CACHE', true);
|
||||
define('ABORT_AFTER_CONFIG', true);
|
||||
|
||||
require_once(__DIR__ . '/../../../../config.php');
|
||||
require_once(__DIR__ . '/../../../../lib/clilib.php');
|
||||
require_once(__DIR__ . '/../../../../lib/behat/lib.php');
|
||||
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_command.php');
|
||||
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_config_manager.php');
|
||||
|
||||
// CLI options.
|
||||
list($options, $unrecognized) = cli_get_params(
|
||||
@@ -103,14 +99,26 @@ if (!empty($options['help'])) {
|
||||
|
||||
$cwd = getcwd();
|
||||
|
||||
// If Behat parallel site is being initiliased, then define a param to be used to ignore single run install.
|
||||
if (!empty($options['parallel'])) {
|
||||
define('BEHAT_PARALLEL_UTIL', true);
|
||||
}
|
||||
|
||||
require_once(__DIR__ . '/../../../../config.php');
|
||||
require_once(__DIR__ . '/../../../../lib/behat/lib.php');
|
||||
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_command.php');
|
||||
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_config_manager.php');
|
||||
|
||||
// For drop option check if parallel site.
|
||||
if ((empty($options['parallel'])) && ($options['drop']) || $options['updatesteps']) {
|
||||
// Get parallel run info from first run.
|
||||
$options['parallel'] = behat_config_manager::get_parallel_test_runs($options['fromrun']);
|
||||
$options['parallel'] = behat_config_manager::get_behat_run_config_value('parallel');
|
||||
}
|
||||
|
||||
// If not a parallel site then open single run.
|
||||
if (empty($options['parallel'])) {
|
||||
// Set run config value for single run.
|
||||
behat_config_manager::set_behat_run_config_value('singlerun', 1);
|
||||
|
||||
chdir(__DIR__);
|
||||
// Check if behat is initialised, if not exit.
|
||||
passthru("php util_single_run.php --diag", $status);
|
||||
@@ -147,6 +155,21 @@ if ($options['diag'] || $options['enable'] || $options['disable']) {
|
||||
$status = (bool)$status || (bool)$exitcode;
|
||||
}
|
||||
|
||||
// Remove run config file.
|
||||
$behatrunconfigfile = behat_config_manager::get_behat_run_config_file_path();
|
||||
if (file_exists($behatrunconfigfile)) {
|
||||
if (!unlink($behatrunconfigfile)) {
|
||||
behat_error(BEHAT_EXITCODE_PERMISSIONS, 'Can not delete behat run config file');
|
||||
}
|
||||
}
|
||||
|
||||
// Remove test file path.
|
||||
if (file_exists(behat_util::get_test_file_path())) {
|
||||
if (!unlink(behat_util::get_test_file_path())) {
|
||||
behat_error(BEHAT_EXITCODE_PERMISSIONS, 'Can not delete test file enable info');
|
||||
}
|
||||
}
|
||||
|
||||
} else if ($options['install']) {
|
||||
// This is intensive compared to behat itself so run them in chunk if option maxruns not set.
|
||||
if ($options['maxruns']) {
|
||||
@@ -233,6 +256,19 @@ if ($options['install']) {
|
||||
} else if ($options['enable']) {
|
||||
echo "Acceptance tests environment enabled on $CFG->behat_wwwroot, to run the tests use:" . PHP_EOL;
|
||||
echo behat_command::get_behat_command(true, true);
|
||||
|
||||
// Save fromrun and to run information.
|
||||
if (isset($options['fromrun'])) {
|
||||
behat_config_manager::set_behat_run_config_value('fromrun', $options['fromrun']);
|
||||
}
|
||||
|
||||
if (isset($options['torun'])) {
|
||||
behat_config_manager::set_behat_run_config_value('torun', $options['torun']);
|
||||
}
|
||||
if (isset($options['parallel'])) {
|
||||
behat_config_manager::set_behat_run_config_value('parallel', $options['parallel']);
|
||||
}
|
||||
|
||||
echo PHP_EOL;
|
||||
|
||||
} else if ($options['disable']) {
|
||||
|
||||
@@ -143,7 +143,7 @@ if ($options['run']) {
|
||||
$run = $options['run'];
|
||||
// If parallel option is not passed, then try get it form config.
|
||||
if (!$options['parallel']) {
|
||||
$parallel = behat_config_manager::get_parallel_test_runs();
|
||||
$parallel = behat_config_manager::get_behat_run_config_value('parallel');
|
||||
} else {
|
||||
$parallel = $options['parallel'];
|
||||
}
|
||||
@@ -176,10 +176,7 @@ if ($options['install']) {
|
||||
} else if ($options['enable']) {
|
||||
if (!empty($parallel)) {
|
||||
// Save parallel site info for enable and install options.
|
||||
$filepath = behat_config_manager::get_parallel_test_file_path();
|
||||
if (!file_put_contents($filepath, $parallel)) {
|
||||
behat_error(BEHAT_EXITCODE_PERMISSIONS, 'File ' . $filepath . ' can not be created');
|
||||
}
|
||||
behat_config_manager::set_behat_run_config_value('behatsiteenabled', 1);
|
||||
}
|
||||
|
||||
// Enable test mode.
|
||||
@@ -200,7 +197,7 @@ if ($options['install']) {
|
||||
}
|
||||
|
||||
} else if ($options['disable']) {
|
||||
behat_util::stop_test_mode();
|
||||
behat_util::stop_test_mode($run);
|
||||
// This is only displayed once for parallel install.
|
||||
if (empty($run)) {
|
||||
mtrace("Acceptance tests environment disabled");
|
||||
|
||||
@@ -7,8 +7,7 @@ Feature: Forms manipulation
|
||||
@javascript
|
||||
Scenario: Basic forms manipulation
|
||||
Given I log in as "admin"
|
||||
And I follow "Preferences" in the user menu
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
And I open my profile in edit mode
|
||||
When I set the field "First name" to "Field value"
|
||||
And I set the field "Select a country" to "Japan"
|
||||
And I set the field "New password" to "TestPass"
|
||||
|
||||
@@ -10,8 +10,7 @@ Feature: Transform steps arguments
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And I log in as "admin"
|
||||
And I follow "Preferences" in the user menu
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
And I open my profile in edit mode
|
||||
|
||||
Scenario: Use nasty strings on steps arguments
|
||||
When I set the field "Surname" to "$NASTYSTRING1"
|
||||
|
||||
@@ -99,7 +99,7 @@ class competency extends persistent {
|
||||
// Description.
|
||||
$mform->addElement('editor', 'description',
|
||||
get_string('description', 'tool_lp'), array('rows' => 4));
|
||||
$mform->setType('description', PARAM_RAW);
|
||||
$mform->setType('description', PARAM_CLEANHTML);
|
||||
// ID number.
|
||||
$mform->addElement('text', 'idnumber', get_string('idnumber', 'tool_lp'), 'maxlength="100"');
|
||||
$mform->setType('idnumber', PARAM_RAW);
|
||||
|
||||
@@ -62,7 +62,7 @@ class competency_framework extends persistent {
|
||||
// Description.
|
||||
$mform->addElement('editor', 'description',
|
||||
get_string('description', 'tool_lp'), array('rows' => 4));
|
||||
$mform->setType('description', PARAM_RAW);
|
||||
$mform->setType('description', PARAM_CLEANHTML);
|
||||
// ID number.
|
||||
$mform->addElement('text', 'idnumber', get_string('idnumber', 'tool_lp'), 'maxlength="100"');
|
||||
$mform->setType('idnumber', PARAM_RAW);
|
||||
|
||||
@@ -184,8 +184,14 @@ abstract class persistent extends moodleform {
|
||||
$data = $this->get_persistent()->to_record();
|
||||
$class = static::$persistentclass;
|
||||
$properties = $class::get_formatted_properties();
|
||||
$allproperties = $class::properties_definition();
|
||||
|
||||
foreach ($data as $field => $value) {
|
||||
// Clean data if it is to be displayed in a form.
|
||||
if (isset($allproperties[$field]['type'])) {
|
||||
$data->$field = clean_param($data->$field, $allproperties[$field]['type']);
|
||||
}
|
||||
|
||||
// Convert formatted properties.
|
||||
if (isset($properties[$field])) {
|
||||
$data->$field = array(
|
||||
|
||||
@@ -59,7 +59,7 @@ class plan extends persistent {
|
||||
$mform->addRule('name', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
|
||||
// Description.
|
||||
$mform->addElement('editor', 'description', get_string('plandescription', 'tool_lp'), array('rows' => 4));
|
||||
$mform->setType('description', PARAM_RAW);
|
||||
$mform->setType('description', PARAM_CLEANHTML);
|
||||
|
||||
$mform->addElement('date_time_selector', 'duedate', get_string('duedate', 'tool_lp'), array('optional' => true));
|
||||
$mform->addHelpButton('duedate', 'duedate', 'tool_lp');
|
||||
|
||||
@@ -58,7 +58,7 @@ class template extends persistent {
|
||||
// Description.
|
||||
$mform->addElement('editor', 'description',
|
||||
get_string('description', 'tool_lp'), array('rows' => 4));
|
||||
$mform->setType('description', PARAM_RAW);
|
||||
$mform->setType('description', PARAM_CLEANHTML);
|
||||
$mform->addElement('selectyesno', 'visible',
|
||||
get_string('visible', 'tool_lp'));
|
||||
$mform->addElement('date_time_selector',
|
||||
|
||||
@@ -54,7 +54,7 @@ class user_evidence extends persistent {
|
||||
$mform->addRule('name', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
|
||||
// Description.
|
||||
$mform->addElement('editor', 'description', get_string('userevidencedescription', 'tool_lp'), array('rows' => 10));
|
||||
$mform->setType('description', PARAM_RAW);
|
||||
$mform->setType('description', PARAM_CLEANHTML);
|
||||
|
||||
$mform->addElement('url', 'url', get_string('userevidenceurl', 'tool_lp'), array('size' => '60'), array('usefilepicker' => false));
|
||||
$mform->setType('url', PARAM_RAW_TRIMMED); // Can not use PARAM_URL, it silently converts bad URLs to ''.
|
||||
|
||||
@@ -93,7 +93,7 @@ require(['core/str'], function(Str) {
|
||||
{ key: 'comments', component: 'moodle' },
|
||||
{ key: 'commentscount', component: 'moodle' },
|
||||
{ key: 'commentsrequirelogin', component: 'moodle' },
|
||||
{ key: 'deletecomment', component: 'moodle' },
|
||||
{ key: 'deletecommentbyon', component: 'moodle' },
|
||||
]).then(function() {
|
||||
// Kick off when strings are loaded.
|
||||
Y.use('core_comment', function(Y) {
|
||||
|
||||
@@ -46,4 +46,4 @@ $string['pluginname'] = 'Moodle Mobile tools';
|
||||
$string['smartappbanners'] = 'Smart App Banners (iOS only)';
|
||||
$string['pluginnotenabledorconfigured'] = 'Plugin not enabled or configured.';
|
||||
$string['typeoflogin'] = 'Type of login';
|
||||
$string['typeoflogin_desc'] = 'Choose the type of login.';
|
||||
$string['typeoflogin_desc'] = 'If the site uses a SSO authentication method, then select via a browser window or via an embedded browser. An embedded browser provides a better user experience, though it doesn\'t work with all SSO plugins. If using SSO, autologinguests should be disabled.';
|
||||
|
||||
@@ -53,10 +53,13 @@ class eventobservers {
|
||||
* @param \core\event\course_deleted $event The course deleted event.
|
||||
*/
|
||||
public static function course_deleted(\core\event\course_deleted $event) {
|
||||
// Delete rules defined inside this course and associated subscriptions.
|
||||
$rules = rule_manager::get_rules_by_courseid($event->courseid, 0, 0, false);
|
||||
foreach ($rules as $rule) {
|
||||
rule_manager::delete_rule($rule->id, $event->get_context());
|
||||
}
|
||||
// Delete remaining subscriptions inside this course (from site-wide rules).
|
||||
subscription_manager::remove_all_subscriptions_in_course($event->get_context());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -176,8 +176,12 @@ class subscription {
|
||||
if (empty($courseid)) {
|
||||
return get_string('site');
|
||||
} else {
|
||||
$course = get_course($courseid);
|
||||
return format_string($course->fullname, true, array('context' => $context));
|
||||
try {
|
||||
$course = get_course($courseid);
|
||||
return format_string($course->fullname, true, array('context' => $context));
|
||||
} catch (\dml_exception $e) {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,9 +118,10 @@ class subscription_manager {
|
||||
|
||||
// If successful trigger a subscription_deleted event.
|
||||
if ($success) {
|
||||
if (!empty($subscription->courseid)) {
|
||||
if (!empty($subscription->courseid) &&
|
||||
($coursecontext = \context_course::instance($subscription->courseid, IGNORE_MISSING))) {
|
||||
$courseid = $subscription->courseid;
|
||||
$context = \context_course::instance($subscription->courseid);
|
||||
$context = $coursecontext;
|
||||
} else {
|
||||
$courseid = 0;
|
||||
$context = \context_system::instance();
|
||||
@@ -222,6 +223,31 @@ class subscription_manager {
|
||||
return $success;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all subscriptions in a course.
|
||||
*
|
||||
* This is called after a course was deleted, context no longer exists but we kept the object
|
||||
*
|
||||
* @param \context_course $coursecontext the context of the course
|
||||
*/
|
||||
public static function remove_all_subscriptions_in_course($coursecontext) {
|
||||
global $DB;
|
||||
|
||||
// Store all the subscriptions we have to delete.
|
||||
if ($subscriptions = $DB->get_records('tool_monitor_subscriptions', ['courseid' => $coursecontext->instanceid])) {
|
||||
// Delete subscriptions in bulk.
|
||||
$DB->delete_records('tool_monitor_subscriptions', ['courseid' => $coursecontext->instanceid]);
|
||||
|
||||
// Trigger events one by one.
|
||||
foreach ($subscriptions as $subscription) {
|
||||
$params = ['objectid' => $subscription->id, 'context' => $coursecontext];
|
||||
$event = \tool_monitor\event\subscription_deleted::create($params);
|
||||
$event->add_record_snapshot('tool_monitor_subscriptions', $subscription);
|
||||
$event->trigger();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a subscription instance for an given subscription id.
|
||||
*
|
||||
|
||||
@@ -80,5 +80,22 @@ function xmldb_tool_monitor_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2016120501) {
|
||||
|
||||
// Delete "orphaned" subscriptions.
|
||||
$sql = "SELECT DISTINCT s.courseid
|
||||
FROM {tool_monitor_subscriptions} s
|
||||
LEFT OUTER JOIN {course} c ON c.id = s.courseid
|
||||
WHERE s.courseid <> 0 and c.id IS NULL";
|
||||
$deletedcourses = $DB->get_field_sql($sql);
|
||||
if ($deletedcourses) {
|
||||
list($sql, $params) = $DB->get_in_or_equal($deletedcourses);
|
||||
$DB->execute("DELETE FROM {tool_monitor_subscriptions} WHERE courseid " . $sql, $params);
|
||||
}
|
||||
|
||||
// Monitor savepoint reached.
|
||||
upgrade_plugin_savepoint(true, 2016120501, 'tool', 'monitor');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ if (empty($courseid)) {
|
||||
// check system level capability.
|
||||
if (!has_capability('tool/monitor:subscribe', $context)) {
|
||||
// If not system level then check to see if they have access to any course level rules.
|
||||
if (tool_monitor_get_user_courses()){
|
||||
if (tool_monitor_can_subscribe()) {
|
||||
// Make them choose a course.
|
||||
$choose = true;
|
||||
} else {
|
||||
|
||||
@@ -75,12 +75,20 @@ function tool_monitor_extend_navigation_frontpage($navigation, $course, $context
|
||||
* @param context $coursecontext The context of the course
|
||||
*/
|
||||
function tool_monitor_extend_navigation_user_settings($navigation, $user, $usercontext, $course, $coursecontext) {
|
||||
global $USER, $SITE;
|
||||
global $USER, $PAGE;
|
||||
|
||||
// Don't bother doing needless calculations unless we are on the relevant pages.
|
||||
$onpreferencepage = $PAGE->url->compare(new moodle_url('/user/preferences.php'), URL_MATCH_BASE);
|
||||
$onmonitorpage = $PAGE->url->compare(new moodle_url('/admin/tool/monitor/index.php'), URL_MATCH_BASE);
|
||||
if (!$onpreferencepage && !$onmonitorpage) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Don't show the setting if the event monitor isn't turned on. No access to other peoples subscriptions.
|
||||
if (get_config('tool_monitor', 'enablemonitor') && $USER->id == $user->id) {
|
||||
// Now let's check to see if the user has any courses / site rules that they can subscribe to.
|
||||
if ($courses = tool_monitor_get_user_courses()) {
|
||||
// We skip doing a check here if we are on the event monitor page as the check is done internally on that page.
|
||||
if ($onmonitorpage || tool_monitor_can_subscribe()) {
|
||||
$url = new moodle_url('/admin/tool/monitor/index.php');
|
||||
$subsnode = navigation_node::create(get_string('managesubscriptions', 'tool_monitor'), $url,
|
||||
navigation_node::TYPE_SETTING, null, 'monitor', new pix_icon('i/settings', ''));
|
||||
@@ -92,6 +100,19 @@ function tool_monitor_extend_navigation_user_settings($navigation, $user, $userc
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user has the capacity to subscribe to an event monitor anywhere.
|
||||
*
|
||||
* @return bool True if a capability in a course is found. False otherwise.
|
||||
*/
|
||||
function tool_monitor_can_subscribe() {
|
||||
if (has_capability('tool/monitor:subscribe', context_system::instance())) {
|
||||
return true;
|
||||
}
|
||||
$courses = get_user_capability_course('tool/monitor:subscribe', null, true, '', '', 1);
|
||||
return empty($courses) ? false : true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of courses and also include 'Site' for site wide rules.
|
||||
*
|
||||
@@ -103,8 +124,11 @@ function tool_monitor_get_user_courses() {
|
||||
if (has_capability('tool/monitor:subscribe', context_system::instance())) {
|
||||
$options[0] = get_string('site');
|
||||
}
|
||||
if ($courses = get_user_capability_course('tool/monitor:subscribe', null, true, 'fullname, visible', $orderby)) {
|
||||
|
||||
$fields = 'fullname, visible, ctxid, ctxpath, ctxdepth, ctxlevel, ctxinstance';
|
||||
if ($courses = get_user_capability_course('tool/monitor:subscribe', null, true, $fields, $orderby)) {
|
||||
foreach ($courses as $course) {
|
||||
context_helper::preload_from_record($course);
|
||||
$coursectx = context_course::instance($course->id);
|
||||
if ($course->visible || has_capability('moodle/course:viewhiddencourses', $coursectx)) {
|
||||
$options[$course->id] = format_string($course->fullname, true, array('context' => $coursectx));
|
||||
|
||||
@@ -103,7 +103,7 @@ Feature: tool_monitor_subscriptions
|
||||
Given I log in as "admin"
|
||||
And I follow "Preferences" in the user menu
|
||||
And I click on "Notification preferences" "link" in the "#page-content" "css_element"
|
||||
And I click on ".preference-state" "css_element" in the "Notifications of rule subscriptions" "table_row"
|
||||
And I click on "//td[@data-processor-name='popup']//label[@class='preference-state']" "xpath_element" in the "Notifications of rule subscriptions" "table_row"
|
||||
And I wait until the page is ready
|
||||
And I follow "Preferences" in the user menu
|
||||
And I follow "Event monitoring"
|
||||
@@ -124,7 +124,7 @@ Feature: tool_monitor_subscriptions
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Preferences" in the user menu
|
||||
And I click on "Notification preferences" "link" in the "#page-content" "css_element"
|
||||
And I click on ".preference-state" "css_element" in the "Notifications of rule subscriptions" "table_row"
|
||||
And I click on "//td[@data-processor-name='popup']//label[@class='preference-state']" "xpath_element" in the "Notifications of rule subscriptions" "table_row"
|
||||
And I wait until the page is ready
|
||||
And I follow "Preferences" in the user menu
|
||||
And I follow "Event monitoring"
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2016120501; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_monitor'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -70,7 +70,7 @@ class tool_templatelibrary_external_testcase extends externallib_advanced_testca
|
||||
|
||||
$originaltheme = $CFG->theme;
|
||||
// Change the theme to 'base' because it overrides these templates.
|
||||
$CFG->theme = 'base';
|
||||
$CFG->theme = 'boost';
|
||||
|
||||
$template = external::load_canonical_template('core', 'notification_error');
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ class tool_usertours_manager_testcase extends advanced_testcase {
|
||||
$rcm = $rc->getMethod($function);
|
||||
$rcm->setAccessible(true);
|
||||
|
||||
$this->setExpectedException('moodle_exception', 'A required parameter (sesskey) was missing');
|
||||
$this->expectException('moodle_exception');
|
||||
$rcm->invokeArgs($manager, $arguments);
|
||||
}
|
||||
|
||||
|
||||
+24
-2
@@ -99,9 +99,31 @@ if (!isset($config->removeuser)) {
|
||||
$yesno = array( get_string('no'), get_string('yes') );
|
||||
|
||||
$disabled = '';
|
||||
if (!ldap_paged_results_supported($config->ldap_version)) {
|
||||
$pagedresultssupported = false;
|
||||
if ($config->host_url !== '') {
|
||||
/**
|
||||
* We try to connect each and every time we open the config, because we want to set the Page
|
||||
* Size setting as enabled or disabled depending on the configured LDAP server supporting
|
||||
* pagination or not, and to notify the user about it. If the user changed the LDAP server (or
|
||||
* the LDAP protocol version) last time, it might happen that paged results are no longer
|
||||
* available and we want to show that to the user the next time she goes to the settings page.
|
||||
*/
|
||||
try {
|
||||
$ldapconn = $this->ldap_connect();
|
||||
$pagedresultssupported = ldap_paged_results_supported($config->ldap_version, $ldapconn);
|
||||
} catch (Exception $e) {
|
||||
// If we couldn't connect and get the supported options, we can only assume we don't support paged results.
|
||||
$pagedresultssupported = false;
|
||||
}
|
||||
}
|
||||
/* Make sure we only disable the paged result size setting and show the notification about it if
|
||||
* there is a configured server that we tried to contact. Othersiwe, if someone's LDAP server does
|
||||
* support paged results, they won't be able to turn it on the first time they set it up (because
|
||||
* the field will be disabled).
|
||||
*/
|
||||
if (($config->host_url !== '') && (!$pagedresultssupported)) {
|
||||
$disabled = ' disabled="disabled"';
|
||||
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'));
|
||||
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'), \core\output\notification::NOTIFY_INFO);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -286,6 +286,10 @@ class auth_email_external extends external_api {
|
||||
// Validate the data sent.
|
||||
$data = $params;
|
||||
$data['email2'] = $data['email'];
|
||||
// Force policy agreed if a site policy is set. The client is responsible of implementing the interface check.
|
||||
if (!empty($CFG->sitepolicy)) {
|
||||
$data['policyagreed'] = 1;
|
||||
}
|
||||
unset($data['recaptcharesponse']);
|
||||
unset($data['customprofilefields']);
|
||||
// Add profile fields data.
|
||||
|
||||
+2
-2
@@ -695,7 +695,7 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
array_push($contexts, $this->config->create_context);
|
||||
}
|
||||
|
||||
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version);
|
||||
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version, $ldapconnection);
|
||||
$ldap_cookie = '';
|
||||
foreach ($contexts as $context) {
|
||||
$context = trim($context);
|
||||
@@ -1540,7 +1540,7 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
}
|
||||
|
||||
$ldap_cookie = '';
|
||||
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version);
|
||||
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version, $ldapconnection);
|
||||
foreach ($contexts as $context) {
|
||||
$context = trim($context);
|
||||
if (empty($context)) {
|
||||
|
||||
+24
-2
@@ -117,9 +117,31 @@ $fastpathoptions = array(AUTH_NTLM_FASTPATH_YESFORM => get_string('auth_ntlmsso_
|
||||
AUTH_NTLM_FASTPATH_ATTEMPT => get_string('auth_ntlmsso_ie_fastpath_attempt', 'auth_ldap'));
|
||||
|
||||
$disabled = '';
|
||||
if (!ldap_paged_results_supported($config->ldap_version)) {
|
||||
$pagedresultssupported = false;
|
||||
if ($config->host_url !== '') {
|
||||
/**
|
||||
* We try to connect each and every time we open the config, because we want to set the Page
|
||||
* Size setting as enabled or disabled depending on the configured LDAP server supporting
|
||||
* pagination or not, and to notify the user about it. If the user changed the LDAP server (or
|
||||
* the LDAP protocol version) last time, it might happen that paged results are no longer
|
||||
* available and we want to show that to the user the next time she goes to the settings page.
|
||||
*/
|
||||
try {
|
||||
$ldapconn = $this->ldap_connect();
|
||||
$pagedresultssupported = ldap_paged_results_supported($config->ldap_version, $ldapconn);
|
||||
} catch (Exception $e) {
|
||||
// If we couldn't connect and get the supported options, we can only assume we don't support paged results.
|
||||
$pagedresultssupported = false;
|
||||
}
|
||||
}
|
||||
/* Make sure we only disable the paged result size setting and show the notification about it if
|
||||
* there is a configured server that we tried to contact. Othersiwe, if someone's LDAP server does
|
||||
* support paged results, they won't be able to turn it on the first time they set it up (because
|
||||
* the field will be disabled).
|
||||
*/
|
||||
if (($config->host_url !== '') && (!$pagedresultssupported)) {
|
||||
$disabled = ' disabled="disabled"';
|
||||
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'));
|
||||
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'), \core\output\notification::NOTIFY_INFO);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -132,7 +132,7 @@ $string['ntlmsso_attempting'] = 'Attempting Single Sign On via NTLM...';
|
||||
$string['ntlmsso_failed'] = 'Auto-login failed, try the normal login page...';
|
||||
$string['ntlmsso_isdisabled'] = 'NTLM SSO is disabled.';
|
||||
$string['ntlmsso_unknowntype'] = 'Unknown ntlmsso type!';
|
||||
$string['pagedresultsnotsupp'] = 'LDAP paged results not supported (either your PHP version lacks support or you have configured Moodle to use LDAP protocol version 2)';
|
||||
$string['pagedresultsnotsupp'] = 'LDAP paged results not supported (either your PHP version lacks support, you have configured Moodle to use LDAP protocol version 2 or Moodle cannot contact your LDAP server to see if paged support is available.)';
|
||||
$string['pagesize'] = 'Make sure this value is smaller than your LDAP server result set size limit (the maximum number of entries that can be returned in a single query)';
|
||||
$string['pagesize_key'] = 'Page size';
|
||||
$string['pluginname'] = 'LDAP server';
|
||||
|
||||
@@ -2670,7 +2670,7 @@ class restore_calendarevents_structure_step extends restore_structure_step {
|
||||
'courseid' => $this->get_courseid(),
|
||||
'groupid' => $data->groupid,
|
||||
'userid' => $data->userid,
|
||||
'repeatid' => $data->repeatid,
|
||||
'repeatid' => $this->get_mappingid('event', $data->repeatid),
|
||||
'modulename' => $data->modulename,
|
||||
'eventtype' => $data->eventtype,
|
||||
'timestart' => $this->apply_date_offset($data->timestart),
|
||||
@@ -2688,18 +2688,27 @@ class restore_calendarevents_structure_step extends restore_structure_step {
|
||||
FROM {event}
|
||||
WHERE " . $DB->sql_compare_text('name', 255) . " = " . $DB->sql_compare_text('?', 255) . "
|
||||
AND courseid = ?
|
||||
AND repeatid = ?
|
||||
AND modulename = ?
|
||||
AND timestart = ?
|
||||
AND timeduration = ?
|
||||
AND " . $DB->sql_compare_text('description', 255) . " = " . $DB->sql_compare_text('?', 255);
|
||||
$arg = array ($params['name'], $params['courseid'], $params['repeatid'], $params['modulename'], $params['timestart'], $params['timeduration'], $params['description']);
|
||||
$arg = array ($params['name'], $params['courseid'], $params['modulename'], $params['timestart'], $params['timeduration'], $params['description']);
|
||||
$result = $DB->record_exists_sql($sql, $arg);
|
||||
if (empty($result)) {
|
||||
$newitemid = $DB->insert_record('event', $params);
|
||||
$this->set_mapping('event', $oldid, $newitemid);
|
||||
$this->set_mapping('event_description', $oldid, $newitemid, $restorefiles);
|
||||
}
|
||||
// With repeating events, each event has the repeatid pointed at the first occurrence.
|
||||
// Since the repeatid will be empty when the first occurrence is restored,
|
||||
// Get the repeatid from the second occurrence of the repeating event and use that to update the first occurrence.
|
||||
// Then keep a list of repeatids so we only perform this update once.
|
||||
static $repeatids = array();
|
||||
if (!empty($params['repeatid']) && !in_array($params['repeatid'], $repeatids)) {
|
||||
// This entry is repeated so the repeatid field must be set.
|
||||
$DB->set_field('event', 'repeatid', $params['repeatid'], array('id' => $params['repeatid']));
|
||||
$repeatids[] = $params['repeatid'];
|
||||
}
|
||||
|
||||
}
|
||||
protected function after_execute() {
|
||||
|
||||
@@ -519,7 +519,7 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
$method = 'get';
|
||||
}
|
||||
$url->param('sesskey', sesskey());
|
||||
$button = new single_button($url, get_string('continue'), $method);
|
||||
$button = new single_button($url, get_string('continue'), $method, true);
|
||||
$button->class = 'continuebutton';
|
||||
return $this->render($button);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ $PAGE->set_context($context);
|
||||
$title = get_string('backpackdetails', 'badges');
|
||||
$PAGE->set_title($title);
|
||||
$PAGE->set_heading(fullname($USER));
|
||||
$PAGE->set_pagelayout('mydashboard');
|
||||
$PAGE->set_pagelayout('standard');
|
||||
|
||||
$backpack = $DB->get_record('badge_backpack', array('userid' => $USER->id));
|
||||
$badgescache = cache::make('core', 'externalbadges');
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ $PAGE->set_context($context);
|
||||
$title = get_string('badges', 'badges');
|
||||
$PAGE->set_title($title);
|
||||
$PAGE->set_heading(fullname($USER));
|
||||
$PAGE->set_pagelayout('mydashboard');
|
||||
$PAGE->set_pagelayout('standard');
|
||||
|
||||
// Include JS files for backpack support.
|
||||
badges_setup_backpack_js();
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
require_once(__DIR__ . '/../config.php');
|
||||
require_once('preferences_form.php');
|
||||
require_once($CFG->dirroot.'/user/editlib.php');
|
||||
|
||||
$url = new moodle_url('/badges/preferences.php');
|
||||
|
||||
@@ -42,8 +43,8 @@ $mform = new badges_preferences_form();
|
||||
$mform->set_data(array('badgeprivacysetting' => get_user_preferences('badgeprivacysetting')));
|
||||
|
||||
if (!$mform->is_cancelled() && $data = $mform->get_data()) {
|
||||
$setting = $data->badgeprivacysetting;
|
||||
set_user_preference('badgeprivacysetting', $setting);
|
||||
useredit_update_user_preference(['id' => $USER->id,
|
||||
'preference_badgeprivacysetting' => $data->badgeprivacysetting]);
|
||||
}
|
||||
|
||||
if ($mform->is_cancelled()) {
|
||||
|
||||
@@ -30,9 +30,7 @@ Feature: Award badges
|
||||
And I should not see "Criteria for this badge have not been set up yet."
|
||||
And I press "Enable access"
|
||||
And I press "Continue"
|
||||
And I click on "Admin User" "link"
|
||||
And I choose "Profile" in the open action menu
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
And I open my profile in edit mode
|
||||
And I expand all fieldsets
|
||||
And I set the field "Phone" to "123456789"
|
||||
And I press "Update profile"
|
||||
|
||||
@@ -52,6 +52,7 @@ class block_activity_results_edit_form extends block_edit_form {
|
||||
$sql = 'SELECT id, itemname FROM {grade_items} WHERE courseid = ? and itemtype = ? and (gradetype = ? or gradetype = ?)';
|
||||
$params = array($this->page->course->id, 'mod', GRADE_TYPE_VALUE, GRADE_TYPE_SCALE);
|
||||
$activities = $DB->get_records_sql_menu($sql, $params);
|
||||
core_collator::asort($activities);
|
||||
|
||||
if (empty($activities)) {
|
||||
$mform->addElement('static', 'noactivitieswarning', get_string('config_select_activity', 'block_activity_results'),
|
||||
|
||||
@@ -86,7 +86,7 @@ function block_course_overview_get_myorder() {
|
||||
// If preference was not found, look in the old location and convert if found.
|
||||
$order = array();
|
||||
if ($value = get_user_preferences('course_overview_course_order')) {
|
||||
$order = unserialize($value);
|
||||
$order = unserialize_array($value);
|
||||
block_course_overview_update_myorder($order);
|
||||
unset_user_preference('course_overview_course_order');
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
This files describes API changes in /blocks/* - activity modules,
|
||||
information provided here is intended especially for developers.
|
||||
|
||||
=== 3.2.2 ===
|
||||
|
||||
* block_manager::get_required_by_theme_block_types() is no longer static.
|
||||
|
||||
=== 3.1 ===
|
||||
|
||||
* The collapsed class was removed from the navigation block to make it compatible with aria.
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
require_once('../config.php');
|
||||
require_once($CFG->dirroot.'/blog/lib.php');
|
||||
require_once('preferences_form.php');
|
||||
require_once($CFG->dirroot.'/user/editlib.php');
|
||||
|
||||
$courseid = optional_param('courseid', SITEID, PARAM_INT);
|
||||
$modid = optional_param('modid', null, PARAM_INT);
|
||||
@@ -81,7 +82,8 @@ if (!$mform->is_cancelled() && $data = $mform->get_data()) {
|
||||
if ($pagesize < 1) {
|
||||
print_error('invalidpagesize');
|
||||
}
|
||||
set_user_preference('blogpagesize', $pagesize);
|
||||
useredit_update_user_preference(['id' => $USER->id,
|
||||
'preference_blogpagesize' => $pagesize]);
|
||||
}
|
||||
|
||||
if ($mform->is_cancelled()) {
|
||||
|
||||
Vendored
+1
-1
@@ -213,7 +213,7 @@ class cache implements cache_loader {
|
||||
$this->definition = $definition;
|
||||
$this->store = $store;
|
||||
$this->storetype = get_class($store);
|
||||
$this->perfdebug = !empty($CFG->perfdebug);
|
||||
$this->perfdebug = (!empty($CFG->perfdebug) and $CFG->perfdebug > 7);
|
||||
if ($loader instanceof cache_loader) {
|
||||
$this->loader = $loader;
|
||||
// Mark the loader as a sub (chained) loader.
|
||||
|
||||
Vendored
+53
@@ -2172,4 +2172,57 @@ class core_cache_testcase extends advanced_testcase {
|
||||
$this->assertEquals(0, $endstats[$requestid]['stores']['cachestore_static']['sets'] -
|
||||
$startstats[$requestid]['stores']['cachestore_static']['sets']);
|
||||
}
|
||||
|
||||
public function test_performance_debug_off() {
|
||||
global $CFG;
|
||||
$this->resetAfterTest(true);
|
||||
$CFG->perfdebug = 7;
|
||||
|
||||
$instance = cache_config_testing::instance();
|
||||
$applicationid = 'phpunit/applicationperfoff';
|
||||
$instance->phpunit_add_definition($applicationid, array(
|
||||
'mode' => cache_store::MODE_APPLICATION,
|
||||
'component' => 'phpunit',
|
||||
'area' => 'applicationperfoff'
|
||||
));
|
||||
$sessionid = 'phpunit/sessionperfoff';
|
||||
$instance->phpunit_add_definition($sessionid, array(
|
||||
'mode' => cache_store::MODE_SESSION,
|
||||
'component' => 'phpunit',
|
||||
'area' => 'sessionperfoff'
|
||||
));
|
||||
$requestid = 'phpunit/requestperfoff';
|
||||
$instance->phpunit_add_definition($requestid, array(
|
||||
'mode' => cache_store::MODE_REQUEST,
|
||||
'component' => 'phpunit',
|
||||
'area' => 'requestperfoff'
|
||||
));
|
||||
|
||||
$application = cache::make('phpunit', 'applicationperfoff');
|
||||
$session = cache::make('phpunit', 'sessionperfoff');
|
||||
$request = cache::make('phpunit', 'requestperfoff');
|
||||
|
||||
// Check that no stats are recorded for these definitions yet.
|
||||
$stats = cache_helper::get_stats();
|
||||
$this->assertArrayNotHasKey($applicationid, $stats);
|
||||
$this->assertArrayNotHasKey($sessionid, $stats);
|
||||
$this->assertArrayNotHasKey($requestid, $stats);
|
||||
|
||||
// Trigger cache misses, cache sets and cache hits.
|
||||
$this->assertFalse($application->get('missMe'));
|
||||
$this->assertTrue($application->set('setMe', 1));
|
||||
$this->assertEquals(1, $application->get('setMe'));
|
||||
$this->assertFalse($session->get('missMe'));
|
||||
$this->assertTrue($session->set('setMe', 3));
|
||||
$this->assertEquals(3, $session->get('setMe'));
|
||||
$this->assertFalse($request->get('missMe'));
|
||||
$this->assertTrue($request->set('setMe', 4));
|
||||
$this->assertEquals(4, $request->get('setMe'));
|
||||
|
||||
// Check that no stats are being recorded for these definitions.
|
||||
$endstats = cache_helper::get_stats();
|
||||
$this->assertArrayNotHasKey($applicationid, $endstats);
|
||||
$this->assertArrayNotHasKey($sessionid, $endstats);
|
||||
$this->assertArrayNotHasKey($requestid, $endstats);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3346,3 +3346,25 @@ function calendar_get_calendar_context($subscription) {
|
||||
}
|
||||
return $context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements callback user_preferences, whitelists preferences that users are allowed to update directly
|
||||
*
|
||||
* Used in {@see core_user::fill_preferences_cache()}, see also {@see useredit_update_user_preference()}
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function core_calendar_user_preferences() {
|
||||
$preferences = [];
|
||||
$preferences['calendar_timeformat'] = array('type' => PARAM_NOTAGS, 'null' => NULL_NOT_ALLOWED, 'default' => '0',
|
||||
'choices' => array('0', CALENDAR_TF_12, CALENDAR_TF_24)
|
||||
);
|
||||
$preferences['calendar_startwday'] = array('type' => PARAM_INT, 'null' => NULL_NOT_ALLOWED, 'default' => 0,
|
||||
'choices' => array(0, 1, 2, 3, 4, 5, 6));
|
||||
$preferences['calendar_maxevents'] = array('type' => PARAM_INT, 'choices' => range(1, 20));
|
||||
$preferences['calendar_lookahead'] = array('type' => PARAM_INT, 'null' => NULL_NOT_ALLOWED, 'default' => 365,
|
||||
'choices' => array(365, 270, 180, 150, 120, 90, 60, 30, 21, 14, 7, 6, 5, 4, 3, 2, 1));
|
||||
$preferences['calendar_persistflt'] = array('type' => PARAM_INT, 'null' => NULL_NOT_ALLOWED, 'default' => 0,
|
||||
'choices' => array(0, 1));
|
||||
return $preferences;
|
||||
}
|
||||
+24
-1
@@ -57,6 +57,12 @@ M.core_comment = {
|
||||
this.view(0);
|
||||
return false;
|
||||
}, this);
|
||||
// Also handle space/enter key.
|
||||
handle.on('key', function(e) {
|
||||
e.preventDefault();
|
||||
this.view(0);
|
||||
return false;
|
||||
}, '13,32', this);
|
||||
}
|
||||
scope.toggle_textarea(false);
|
||||
},
|
||||
@@ -186,7 +192,17 @@ M.core_comment = {
|
||||
val = val.replace('___name___', list[i].fullname);
|
||||
}
|
||||
if (list[i]['delete']||newcmt) {
|
||||
list[i].content = '<div class="comment-delete"><a href="#" id ="comment-delete-'+this.client_id+'-'+list[i].id+'" title="'+M.util.get_string('deletecomment', 'moodle')+'"><img alt="" src="'+M.util.image_url('t/delete', 'core')+'" /></a></div>' + list[i].content;
|
||||
var tokens = {
|
||||
user: list[i].fullname,
|
||||
time: list[i].time
|
||||
};
|
||||
var deleteStr = Y.Escape.html(M.util.get_string('deletecommentbyon', 'moodle', tokens));
|
||||
list[i].content = '<div class="comment-delete">' +
|
||||
'<a href="#" role="button" id ="comment-delete-' + this.client_id + '-' + list[i].id + '"' +
|
||||
' title="' + deleteStr + '">' +
|
||||
'<img alt="' + deleteStr + '" src="' + M.util.image_url('t/delete', 'core') + '" />' +
|
||||
'</a>' +
|
||||
'</div>' + list[i].content;
|
||||
}
|
||||
val = val.replace('___time___', list[i].time);
|
||||
val = val.replace('___picture___', list[i].avatar);
|
||||
@@ -335,6 +351,7 @@ M.core_comment = {
|
||||
);
|
||||
},
|
||||
view: function(page) {
|
||||
var commenttoggler = Y.one('#comment-link-' + this.client_id);
|
||||
var container = Y.one('#comment-ctrl-'+this.client_id);
|
||||
var ta = Y.one('#dlg-content-'+this.client_id);
|
||||
var img = Y.one('#comment-img-'+this.client_id);
|
||||
@@ -351,6 +368,9 @@ M.core_comment = {
|
||||
if (img) {
|
||||
img.set('src', M.util.image_url('t/expanded', 'core'));
|
||||
}
|
||||
if (commenttoggler) {
|
||||
commenttoggler.setAttribute('aria-expanded', 'true');
|
||||
}
|
||||
} else {
|
||||
// hide
|
||||
container.setStyle('display', 'none');
|
||||
@@ -364,6 +384,9 @@ M.core_comment = {
|
||||
if (ta) {
|
||||
ta.set('value','');
|
||||
}
|
||||
if (commenttoggler) {
|
||||
commenttoggler.setAttribute('aria-expanded', 'false');
|
||||
}
|
||||
}
|
||||
if (ta) {
|
||||
//toggle_textarea.apply(ta, [false]);
|
||||
|
||||
+8
-2
@@ -263,7 +263,7 @@ class comment {
|
||||
'comments',
|
||||
'commentscount',
|
||||
'commentsrequirelogin',
|
||||
'deletecomment',
|
||||
'deletecommentbyon',
|
||||
),
|
||||
'moodle'
|
||||
);
|
||||
@@ -460,7 +460,13 @@ class comment {
|
||||
} else {
|
||||
$collapsedimage= 't/collapsed';
|
||||
}
|
||||
$html .= html_writer::start_tag('a', array('class' => 'comment-link', 'id' => 'comment-link-'.$this->cid, 'href' => '#'));
|
||||
$html .= html_writer::start_tag('a', array(
|
||||
'class' => 'comment-link',
|
||||
'id' => 'comment-link-'.$this->cid,
|
||||
'href' => '#',
|
||||
'role' => 'button',
|
||||
'aria-expanded' => 'false')
|
||||
);
|
||||
$html .= html_writer::empty_tag('img', array('id' => 'comment-img-'.$this->cid, 'src' => $OUTPUT->pix_url($collapsedimage), 'alt' => $this->linktext, 'title' => $this->linktext));
|
||||
$html .= html_writer::tag('span', $this->linktext.' '.$countstring, array('id' => 'comment-link-text-'.$this->cid));
|
||||
$html .= html_writer::end_tag('a');
|
||||
|
||||
@@ -68,7 +68,7 @@ class competency extends persistent {
|
||||
),
|
||||
'description' => array(
|
||||
'default' => '',
|
||||
'type' => PARAM_RAW
|
||||
'type' => PARAM_CLEANHTML
|
||||
),
|
||||
'descriptionformat' => array(
|
||||
'choices' => array(FORMAT_HTML, FORMAT_MOODLE, FORMAT_PLAIN, FORMAT_MARKDOWN),
|
||||
|
||||
@@ -90,7 +90,7 @@ class competency_framework extends persistent {
|
||||
'type' => PARAM_RAW
|
||||
),
|
||||
'description' => array(
|
||||
'type' => PARAM_RAW,
|
||||
'type' => PARAM_CLEANHTML,
|
||||
'default' => ''
|
||||
),
|
||||
'descriptionformat' => array(
|
||||
|
||||
+3
-2
@@ -334,7 +334,8 @@ abstract class exporter {
|
||||
*/
|
||||
final protected static function get_format_field($definitions, $property) {
|
||||
$formatproperty = $property . 'format';
|
||||
if ($definitions[$property]['type'] == PARAM_RAW && isset($definitions[$formatproperty])
|
||||
if (($definitions[$property]['type'] == PARAM_RAW || $definitions[$property]['type'] == PARAM_CLEANHTML)
|
||||
&& isset($definitions[$formatproperty])
|
||||
&& $definitions[$formatproperty]['type'] == PARAM_INT) {
|
||||
return $formatproperty;
|
||||
}
|
||||
@@ -451,7 +452,7 @@ abstract class exporter {
|
||||
// This is a nested array of more properties.
|
||||
$thisvalue = self::get_read_structure_from_properties($type, $proprequired, $propdefault);
|
||||
} else {
|
||||
if ($definition['type'] == PARAM_TEXT) {
|
||||
if ($definition['type'] == PARAM_TEXT || $definition['type'] == PARAM_CLEANHTML) {
|
||||
// PARAM_TEXT always becomes PARAM_RAW because filters may be applied.
|
||||
$type = PARAM_RAW;
|
||||
}
|
||||
|
||||
@@ -248,7 +248,8 @@ abstract class persistent {
|
||||
$formatted = array();
|
||||
foreach ($properties as $property => $definition) {
|
||||
$propertyformat = $property . 'format';
|
||||
if ($definition['type'] == PARAM_RAW && array_key_exists($propertyformat, $properties)
|
||||
if (($definition['type'] == PARAM_RAW || $definition['type'] == PARAM_CLEANHTML)
|
||||
&& array_key_exists($propertyformat, $properties)
|
||||
&& $properties[$propertyformat]['type'] == PARAM_INT) {
|
||||
$formatted[$property] = $propertyformat;
|
||||
}
|
||||
@@ -616,6 +617,10 @@ abstract class persistent {
|
||||
// Validate_param() does not like false with PARAM_BOOL, better to convert it to int.
|
||||
$value = 0;
|
||||
}
|
||||
if ($definition['type'] === PARAM_CLEANHTML) {
|
||||
// We silently clean for this type. It may introduce changes even to valid data.
|
||||
$value = clean_param($value, PARAM_CLEANHTML);
|
||||
}
|
||||
validate_param($value, $definition['type'], $definition['null']);
|
||||
} catch (invalid_parameter_exception $e) {
|
||||
$errors[$property] = static::get_property_error_message($property);
|
||||
|
||||
@@ -71,7 +71,7 @@ class plan extends persistent {
|
||||
'type' => PARAM_TEXT,
|
||||
),
|
||||
'description' => array(
|
||||
'type' => PARAM_RAW,
|
||||
'type' => PARAM_CLEANHTML,
|
||||
'default' => ''
|
||||
),
|
||||
'descriptionformat' => array(
|
||||
|
||||
@@ -53,7 +53,7 @@ class template extends persistent {
|
||||
),
|
||||
'description' => array(
|
||||
'default' => '',
|
||||
'type' => PARAM_RAW,
|
||||
'type' => PARAM_CLEANHTML,
|
||||
),
|
||||
'descriptionformat' => array(
|
||||
'choices' => array(FORMAT_HTML, FORMAT_MOODLE, FORMAT_PLAIN, FORMAT_MARKDOWN),
|
||||
|
||||
@@ -53,7 +53,7 @@ class user_evidence extends persistent {
|
||||
'type' => PARAM_TEXT
|
||||
),
|
||||
'description' => array(
|
||||
'type' => PARAM_RAW,
|
||||
'type' => PARAM_CLEANHTML,
|
||||
'default' => '',
|
||||
),
|
||||
'descriptionformat' => array(
|
||||
|
||||
@@ -290,6 +290,7 @@ function core_competency_pluginfile($course, $cm, $context, $filearea, $args, $f
|
||||
if ($filearea == 'userevidence' && $context->contextlevel == CONTEXT_USER) {
|
||||
if (user_evidence::can_read_user($context->instanceid)) {
|
||||
$file = $fs->get_file($context->id, 'core_competency', $filearea, $itemid, $filepath, $filename);
|
||||
$forcedownload = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -121,13 +121,14 @@ class behat_completion extends behat_base {
|
||||
public function activity_marked_as_complete($activityname, $activitytype, $completiontype) {
|
||||
if ($completiontype == "manual") {
|
||||
$imgalttext = get_string("completion-alt-manual-y", 'core_completion', $activityname);
|
||||
$xpathtocheck = "//input[@type='image'][contains(@alt, '$imgalttext')]";
|
||||
} else {
|
||||
$imgalttext = get_string("completion-alt-auto-y", 'core_completion', $activityname);
|
||||
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
|
||||
}
|
||||
$activityxpath = "//li[contains(concat(' ', @class, ' '), ' modtype_" . strtolower($activitytype) . " ')]";
|
||||
$activityxpath .= "[descendant::*[contains(text(), '" . $activityname . "')]]";
|
||||
|
||||
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
|
||||
$this->execute("behat_general::should_exist_in_the",
|
||||
array($xpathtocheck, "xpath_element", $activityxpath, "xpath_element")
|
||||
);
|
||||
@@ -142,13 +143,14 @@ class behat_completion extends behat_base {
|
||||
public function activity_marked_as_not_complete($activityname, $activitytype, $completiontype) {
|
||||
if ($completiontype == "manual") {
|
||||
$imgalttext = get_string("completion-alt-manual-n", 'core_completion', $activityname);
|
||||
$xpathtocheck = "//input[@type='image'][contains(@alt, '$imgalttext')]";
|
||||
} else {
|
||||
$imgalttext = get_string("completion-alt-auto-n", 'core_completion', $activityname);
|
||||
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
|
||||
}
|
||||
$activityxpath = "//li[contains(concat(' ', @class, ' '), ' modtype_" . strtolower($activitytype) . " ')]";
|
||||
$activityxpath .= "[descendant::*[contains(text(), '" . $activityname . "')]]";
|
||||
|
||||
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
|
||||
$this->execute("behat_general::should_exist_in_the",
|
||||
array($xpathtocheck, "xpath_element", $activityxpath, "xpath_element")
|
||||
);
|
||||
|
||||
@@ -25,15 +25,16 @@ Feature: Allow students to manually mark an activity as complete
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
And I press "Save and display"
|
||||
When I add a "Forum" to section "1" and I fill the form with:
|
||||
And I add a "Forum" to section "1" and I fill the form with:
|
||||
| Forum name | Test forum name |
|
||||
| Description | Test forum description |
|
||||
Then "Student First" user has not completed "Test forum name" activity
|
||||
And "Student First" user has not completed "Test forum name" activity
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I press "Mark as complete: Test forum name"
|
||||
When I press "Mark as complete: Test forum name"
|
||||
Then the "Test forum name" "forum" activity with "manual" completion should be marked as complete
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on site homepage
|
||||
|
||||
+1
-1
@@ -7,6 +7,6 @@
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "5.5.*",
|
||||
"phpunit/dbUnit": "1.4.*",
|
||||
"moodlehq/behat-extension": "3.32.4"
|
||||
"moodlehq/behat-extension": "3.32.5"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+209
-195
File diff suppressed because it is too large
Load Diff
@@ -63,6 +63,13 @@ $CFG->dboptions = array(
|
||||
// support advanced options on connection.
|
||||
// If you set those in the database then
|
||||
// the advanced settings will not be sent.
|
||||
'dbcollation' => 'utf8mb4_unicode_ci', // MySQL has partial and full UTF-8
|
||||
// support. If you wish to use partial UTF-8
|
||||
// (three bytes) then set this option to
|
||||
// 'utf8_unicode_ci', otherwise this option
|
||||
// can be removed for MySQL (by default it will
|
||||
// use 'utf8mb4_unicode_ci'. This option should
|
||||
// be removed for all other databases.
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
'resortcategoriesby',
|
||||
'name',
|
||||
false,
|
||||
array('aria-label' => get_string('selectcategorysortby'))
|
||||
array('aria-label' => get_string('selectcategorysortby'), 'class' => 'm-t-1')
|
||||
)
|
||||
);
|
||||
$form .= html_writer::div(
|
||||
@@ -441,15 +441,16 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
'resortcoursesby',
|
||||
'fullname',
|
||||
false,
|
||||
array('aria-label' => get_string('selectcoursesortby'))
|
||||
array('aria-label' => get_string('selectcoursesortby'), 'class' => 'm-t-1')
|
||||
)
|
||||
);
|
||||
$form .= html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'bulksort', 'value' => get_string('sort')));
|
||||
$form .= html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'bulksort',
|
||||
'value' => get_string('sort'), 'class' => 'btn btn-secondary m-y-1'));
|
||||
$form .= html_writer::end_div();
|
||||
|
||||
$html .= html_writer::start_div('detail-pair row yui3-g');
|
||||
$html .= html_writer::div(html_writer::span(get_string('sorting')), 'pair-key span3 yui3-u-1-4');
|
||||
$html .= html_writer::div($form, 'pair-value span9 yui3-u-3-4');
|
||||
$html .= html_writer::start_div('detail-pair row yui3-g m-y-1');
|
||||
$html .= html_writer::div(html_writer::span(get_string('sorting')), 'pair-key span3 col-md-3 yui3-u-1-4');
|
||||
$html .= html_writer::div($form, 'pair-value span9 col-md-9 yui3-u-3-4');
|
||||
$html .= html_writer::end_div();
|
||||
}
|
||||
if (coursecat::can_change_parent_any()) {
|
||||
@@ -463,9 +464,10 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
'movecategoriesto',
|
||||
'',
|
||||
array('' => 'choosedots'),
|
||||
array('aria-labelledby' => 'moveselectedcategoriesto')
|
||||
array('aria-labelledby' => 'moveselectedcategoriesto', 'class' => 'm-r-1')
|
||||
);
|
||||
$submit = array('type' => 'submit', 'name' => 'bulkmovecategories', 'value' => get_string('move'));
|
||||
$submit = array('type' => 'submit', 'name' => 'bulkmovecategories', 'value' => get_string('move'),
|
||||
'class' => 'btn btn-secondary');
|
||||
$html .= $this->detail_pair(
|
||||
html_writer::span(get_string('moveselectedcategoriesto'), '', array('id' => 'moveselectedcategoriesto')),
|
||||
$select . html_writer::empty_tag('input', $submit)
|
||||
@@ -780,9 +782,10 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
'movecoursesto',
|
||||
'',
|
||||
array('' => 'choosedots'),
|
||||
array('aria-labelledby' => 'moveselectedcoursesto')
|
||||
array('aria-labelledby' => 'moveselectedcoursesto', 'class' => 'm-r-1')
|
||||
);
|
||||
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'));
|
||||
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'),
|
||||
'class' => 'btn btn-secondary');
|
||||
$html .= $this->detail_pair(
|
||||
html_writer::span(get_string('moveselectedcoursesto'), '', array('id' => 'moveselectedcoursesto')),
|
||||
$select . html_writer::empty_tag('input', $submit)
|
||||
@@ -808,7 +811,8 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
array('' => 'choosedots'),
|
||||
array('aria-labelledby' => 'moveselectedcoursesto')
|
||||
);
|
||||
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'));
|
||||
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'),
|
||||
'class' => 'btn btn-secondary');
|
||||
$html .= $this->detail_pair(
|
||||
html_writer::span(get_string('moveselectedcoursesto'), '', array('id' => 'moveselectedcoursesto')),
|
||||
$select . html_writer::empty_tag('input', $submit)
|
||||
@@ -847,8 +851,8 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
*/
|
||||
protected function detail_pair($key, $value, $class ='') {
|
||||
$html = html_writer::start_div('detail-pair row yui3-g '.preg_replace('#[^a-zA-Z0-9_\-]#', '-', $class));
|
||||
$html .= html_writer::div(html_writer::span($key), 'pair-key span3 yui3-u-1-4');
|
||||
$html .= html_writer::div(html_writer::span($value), 'pair-value span9 yui3-u-3-4');
|
||||
$html .= html_writer::div(html_writer::span($key), 'pair-key span3 col-md-3 yui3-u-1-4');
|
||||
$html .= html_writer::div(html_writer::span($value), 'pair-value span9 col-md-9 m-b-1 yui3-u-3-4');
|
||||
$html .= html_writer::end_div();
|
||||
return $html;
|
||||
}
|
||||
@@ -946,7 +950,7 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
public function grid_column_start($size, $id = null, $class = null) {
|
||||
|
||||
// Calculate Bootstrap grid sizing.
|
||||
$bootstrapclass = 'span'.$size;
|
||||
$bootstrapclass = 'span'.$size.' col-md-'.$size;
|
||||
|
||||
// Calculate YUI grid sizing.
|
||||
if ($size === 12) {
|
||||
@@ -1322,13 +1326,14 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
$strsearchcourses = get_string("searchcourses");
|
||||
$searchurl = new moodle_url('/course/management.php');
|
||||
|
||||
$output = html_writer::start_tag('form', array('id' => $formid, 'action' => $searchurl, 'method' => 'get'));
|
||||
$output .= html_writer::start_tag('fieldset', array('class' => 'coursesearchbox invisiblefieldset'));
|
||||
$output .= html_writer::tag('label', $strsearchcourses.': ', array('for' => $inputid));
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'text', 'id' => $inputid,
|
||||
'size' => $inputsize, 'name' => 'search', 'value' => s($value)));
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'submit',
|
||||
'value' => get_string('go')));
|
||||
$output = html_writer::start_tag('form', array('id' => $formid, 'action' => $searchurl, 'method' => 'get',
|
||||
'class' => 'form-inline'));
|
||||
$output .= html_writer::start_tag('fieldset', array('class' => 'coursesearchbox invisiblefieldset m-y-1'));
|
||||
$output .= html_writer::tag('label', $strsearchcourses, array('for' => $inputid));
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'text', 'id' => $inputid, 'size' => $inputsize,
|
||||
'name' => 'search', 'value' => s($value), 'class' => 'form-control m-x-1'));
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('go'),
|
||||
'class' => 'btn btn-secondary'));
|
||||
$output .= html_writer::end_tag('fieldset');
|
||||
$output .= html_writer::end_tag('form');
|
||||
|
||||
|
||||
@@ -774,6 +774,10 @@ M.course_dndupload = {
|
||||
resel.li.outerHTML = unescape(resel.li.outerHTML);
|
||||
}
|
||||
self.add_editing(result.elementid);
|
||||
// Fire the content updated event.
|
||||
require(['core/event', 'jquery'], function(event, $) {
|
||||
event.notifyFilterContentUpdated($(result.fullcontent));
|
||||
});
|
||||
} else {
|
||||
// Error - remove the dummy element
|
||||
resel.parent.removeChild(resel.li);
|
||||
|
||||
@@ -2241,6 +2241,7 @@ class core_course_external extends external_api {
|
||||
$coursereturns['overviewfiles'] = $files;
|
||||
$coursereturns['contacts'] = $coursecontacts;
|
||||
$coursereturns['enrollmentmethods'] = $enroltypes;
|
||||
$coursereturns['sortorder'] = $course->sortorder;
|
||||
return $coursereturns;
|
||||
}
|
||||
|
||||
@@ -2983,7 +2984,7 @@ class core_course_external extends external_api {
|
||||
// Return information for any user that can access the course.
|
||||
$coursefields = array('format', 'showgrades', 'newsitems', 'startdate', 'maxbytes', 'showreports', 'visible',
|
||||
'groupmode', 'groupmodeforce', 'defaultgroupingid', 'enablecompletion', 'completionnotify', 'lang', 'theme',
|
||||
'sortorder', 'marker');
|
||||
'marker');
|
||||
|
||||
// Information for managers only.
|
||||
if ($canupdatecourse) {
|
||||
|
||||
@@ -21,7 +21,7 @@ Feature: Courses can be searched for and moved in bulk.
|
||||
Scenario: Search courses finds correct results
|
||||
Given I log in as "admin"
|
||||
And I go to the courses management page
|
||||
When I set the field "Search courses:" to "Biology"
|
||||
When I set the field "Search courses" to "Biology"
|
||||
And I press "Go"
|
||||
Then I should see "Biology Y1"
|
||||
And I should see "Biology Y2"
|
||||
@@ -32,7 +32,7 @@ Feature: Courses can be searched for and moved in bulk.
|
||||
Scenario: Search courses and move results in bulk
|
||||
Given I log in as "admin"
|
||||
And I go to the courses management page
|
||||
And I set the field "Search courses:" to "Biology"
|
||||
And I set the field "Search courses" to "Biology"
|
||||
And I press "Go"
|
||||
When I select course "Biology Y1" in the management interface
|
||||
And I select course "Biology Y2" in the management interface
|
||||
|
||||
@@ -42,8 +42,7 @@ Feature: Browse course list and return back from enrolment page
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
When I log in as "user2"
|
||||
And I follow "Preferences" in the user menu
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
And I open my profile in edit mode
|
||||
And I expand "Courses" node
|
||||
And I expand "Sample category" node
|
||||
And I follow "Course 1"
|
||||
|
||||
@@ -2019,7 +2019,7 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
|
||||
// Create the course with sections.
|
||||
$course = $this->getDataGenerator()->create_course(array('numsections' => 10), array('createsections' => true));
|
||||
$sections = $DB->get_records('course_sections', array('course' => $course->id));
|
||||
$sections = $DB->get_records('course_sections', array('course' => $course->id), 'section');
|
||||
$coursecontext = context_course::instance($course->id);
|
||||
$section = array_pop($sections);
|
||||
course_delete_section($course, $section);
|
||||
|
||||
@@ -2063,14 +2063,14 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||
$result = external_api::clean_returnvalue(core_course_external::get_courses_by_field_returns(), $result);
|
||||
$this->assertCount(2, $result['courses']);
|
||||
$this->assertCount(28, $result['courses'][0]); // Site course.
|
||||
$this->assertCount(12, $result['courses'][1]); // Only public information, not enrolled.
|
||||
$this->assertCount(13, $result['courses'][1]); // Only public information, not enrolled.
|
||||
|
||||
$result = core_course_external::get_courses_by_field('id', $course1->id);
|
||||
$result = external_api::clean_returnvalue(core_course_external::get_courses_by_field_returns(), $result);
|
||||
$this->assertCount(1, $result['courses']);
|
||||
$this->assertEquals($course1->id, $result['courses'][0]['id']);
|
||||
// Expect to receive all the files that a authenticated can see.
|
||||
$this->assertCount(12, $result['courses'][0]);
|
||||
$this->assertCount(13, $result['courses'][0]);
|
||||
|
||||
// Course 2 is not visible.
|
||||
$result = core_course_external::get_courses_by_field('id', $course2->id);
|
||||
|
||||
@@ -385,7 +385,7 @@ class helper {
|
||||
* Returns the url to launch the lti tool.
|
||||
*
|
||||
* @param int $toolid the id of the shared tool
|
||||
* @return moodle_url the url to launch the tool
|
||||
* @return \moodle_url the url to launch the tool
|
||||
* @since Moodle 3.2
|
||||
*/
|
||||
public static function get_launch_url($toolid) {
|
||||
@@ -395,7 +395,7 @@ class helper {
|
||||
/**
|
||||
* Returns the name of the lti enrolment instance, or the name of the course/module being shared.
|
||||
*
|
||||
* @param stdClass $tool The lti tool
|
||||
* @param \stdClass $tool The lti tool
|
||||
* @return string The name of the tool
|
||||
* @since Moodle 3.2
|
||||
*/
|
||||
@@ -415,7 +415,7 @@ class helper {
|
||||
/**
|
||||
* Returns a description of the course or module that this lti instance points to.
|
||||
*
|
||||
* @param stdClass $tool The lti tool
|
||||
* @param \stdClass $tool The lti tool
|
||||
* @return string A description of the tool
|
||||
* @since Moodle 3.2
|
||||
*/
|
||||
@@ -438,8 +438,8 @@ class helper {
|
||||
/**
|
||||
* Returns the icon of the tool.
|
||||
*
|
||||
* @param stdClass $tool The lti tool
|
||||
* @return moodle_url A url to the icon of the tool
|
||||
* @param \stdClass $tool The lti tool
|
||||
* @return \moodle_url A url to the icon of the tool
|
||||
* @since Moodle 3.2
|
||||
*/
|
||||
public static function get_icon($tool) {
|
||||
@@ -453,7 +453,7 @@ class helper {
|
||||
* If you have slash arguments enabled, this will be a nice url ending in cartridge.xml.
|
||||
* If not it will be a php page with some parameters passed.
|
||||
*
|
||||
* @param stdClass $tool The lti tool
|
||||
* @param \stdClass $tool The lti tool
|
||||
* @return string The url to the cartridge representing the tool
|
||||
* @since Moodle 3.2
|
||||
*/
|
||||
@@ -482,7 +482,7 @@ class helper {
|
||||
* If you have slash arguments enabled, this will be a nice url ending in cartridge.xml.
|
||||
* If not it will be a php page with some parameters passed.
|
||||
*
|
||||
* @param stdClass $tool The lti tool
|
||||
* @param \stdClass $tool The lti tool
|
||||
* @return string The url to the cartridge representing the tool
|
||||
*/
|
||||
public static function get_proxy_url($tool) {
|
||||
@@ -616,7 +616,7 @@ class helper {
|
||||
* Traverses a recursive associative array, setting the properties of the corresponding
|
||||
* xpath element.
|
||||
*
|
||||
* @param DOMXPath $xpath The xpath with the xml to modify
|
||||
* @param \DOMXPath $xpath The xpath with the xml to modify
|
||||
* @param array $parameters The array of xpaths to search through
|
||||
* @param string $prefix The current xpath prefix (gets longer the deeper into the array you go)
|
||||
* @return void
|
||||
|
||||
@@ -69,14 +69,14 @@ class manage_table extends \table_sql {
|
||||
|
||||
$this->define_columns(array(
|
||||
'name',
|
||||
'lti1',
|
||||
'lti2',
|
||||
'launch',
|
||||
'registration',
|
||||
'edit'
|
||||
));
|
||||
$this->define_headers(array(
|
||||
get_string('name'),
|
||||
get_string('lti1', 'enrol_lti'),
|
||||
get_string('lti2', 'enrol_lti'),
|
||||
get_string('launchdetails', 'enrol_lti'),
|
||||
get_string('registrationurl', 'enrol_lti'),
|
||||
get_string('edit')
|
||||
));
|
||||
$this->collapsible(false);
|
||||
@@ -87,6 +87,11 @@ class manage_table extends \table_sql {
|
||||
$this->ltienabled = enrol_is_enabled('lti');
|
||||
$this->canconfig = has_capability('moodle/course:enrolconfig', \context_course::instance($courseid));
|
||||
$this->courseid = $courseid;
|
||||
|
||||
// Set help icons.
|
||||
$launchicon = new \help_icon('launchdetails', 'enrol_lti');
|
||||
$regicon = new \help_icon('registrationurl', 'enrol_lti');
|
||||
$this->define_help_for_headers(['1' => $launchicon, '2' => $regicon]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,25 +107,25 @@ class manage_table extends \table_sql {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the LTI1 column.
|
||||
* Generate the launch column.
|
||||
*
|
||||
* @param \stdClass $tool instance data.
|
||||
* @return string
|
||||
*/
|
||||
public function col_lti1($tool) {
|
||||
public function col_launch($tool) {
|
||||
global $OUTPUT;
|
||||
|
||||
$url = helper::get_cartridge_url($tool);
|
||||
|
||||
$toolurllabel = get_string('toolurl', 'enrol_lti');
|
||||
$toolurl = $url;
|
||||
$cartridgeurllabel = get_string('cartridgeurl', 'enrol_lti');
|
||||
$cartridgeurl = $url;
|
||||
$secretlabel = get_string('secret', 'enrol_lti');
|
||||
$secret = $tool->secret;
|
||||
|
||||
$data = [
|
||||
"rows" => [
|
||||
[ "label" => $toolurllabel, "text" => $toolurl, "id" => "toolurl" ],
|
||||
[ "label" => $secretlabel, "text" => $secret, "id" => "secret" ],
|
||||
[ "label" => $cartridgeurllabel, "text" => $cartridgeurl, "id" => "cartridgeurl", "hidelabel" => false ],
|
||||
[ "label" => $secretlabel, "text" => $secret, "id" => "secret", "hidelabel" => false ],
|
||||
]
|
||||
];
|
||||
|
||||
@@ -129,22 +134,22 @@ class manage_table extends \table_sql {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the LTI2 column.
|
||||
* Generate the Registration column.
|
||||
*
|
||||
* @param \stdClass $tool instance data.
|
||||
* @return string
|
||||
*/
|
||||
public function col_lti2($tool) {
|
||||
public function col_registration($tool) {
|
||||
global $OUTPUT;
|
||||
|
||||
$url = helper::get_proxy_url($tool);
|
||||
|
||||
$toolurllabel = get_string('toolurl', 'enrol_lti');
|
||||
$toolurllabel = get_string("registrationurl", "enrol_lti");
|
||||
$toolurl = $url;
|
||||
|
||||
$data = [
|
||||
"rows" => [
|
||||
[ "label" => $toolurllabel, "text" => $toolurl, "id" => "toolurl" ],
|
||||
[ "label" => $toolurllabel, "text" => $toolurl, "id" => "toolurl" , "hidelabel" => true],
|
||||
]
|
||||
];
|
||||
|
||||
@@ -152,7 +157,6 @@ class manage_table extends \table_sql {
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generate the edit column.
|
||||
*
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="11" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="consumerid" TYPE="int" LENGTH="11" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="value" TYPE="char" LENGTH="32" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="value" TYPE="char" LENGTH="64" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="expires" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
|
||||
@@ -245,5 +245,18 @@ function xmldb_enrol_lti_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2016120501) {
|
||||
|
||||
// Changing precision of field value on table enrol_lti_lti2_nonce to (64).
|
||||
$table = new xmldb_table('enrol_lti_lti2_nonce');
|
||||
$field = new xmldb_field('value', XMLDB_TYPE_CHAR, '64', null, XMLDB_NOTNULL, null, null, 'consumerid');
|
||||
|
||||
// Launch change of precision for field value.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Lti savepoint reached.
|
||||
upgrade_plugin_savepoint(true, 2016120501, 'enrol', 'lti');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+3
-1
@@ -99,7 +99,9 @@ if ($action) {
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('toolsprovided', 'enrol_lti'));
|
||||
echo "<p>" . get_string('toolsprovided_help', 'enrol_lti') . "</p>";
|
||||
echo "<p>" .get_string('toolsprovided_help', 'enrol_lti') . "</p>";
|
||||
echo "<p class=helplink>" . $OUTPUT->doc_link('enrol/lti/index',
|
||||
get_string('morehelp')) ."</p>";
|
||||
|
||||
if (\enrol_lti\helper::count_lti_tools(array('courseid' => $courseid)) > 0) {
|
||||
$table = new \enrol_lti\manage_table($courseid);
|
||||
|
||||
@@ -1 +1 @@
|
||||
cartridgeurl,enrol_lti
|
||||
|
||||
|
||||
@@ -55,14 +55,16 @@ $string['membersyncmodeenrolandunenrol'] = 'Enrol new and unenrol missing users'
|
||||
$string['membersyncmodeenrolnew'] = 'Enrol new users';
|
||||
$string['membersyncmodeunenrolmissing'] = 'Unenrol missing users';
|
||||
$string['notoolsprovided'] = 'No tools provided';
|
||||
$string['lti1'] = 'LTI 1';
|
||||
$string['lti2'] = 'LTI 2';
|
||||
$string['launchdetails'] = 'Launch details';
|
||||
$string['launchdetails_help'] = 'A cartridge URL (also called configuration URL) plus secret are required for configuring the tool.';
|
||||
$string['lti:config'] = 'Configure \'Publish as LTI tool\' instances';
|
||||
$string['lti:unenrol'] = 'Unenrol users from the course';
|
||||
$string['opentool'] = 'Open tool';
|
||||
$string['pluginname'] = 'Publish as LTI tool';
|
||||
$string['pluginname_desc'] = 'The \'Publish as LTI tool\' plugin, together with the LTI authentication plugin, allows remote users to access selected courses and activities. In other words, Moodle functions as an LTI tool provider.';
|
||||
$string['registration'] = 'Published tool registration';
|
||||
$string['registrationurl'] = 'Registration URL';
|
||||
$string['registrationurl_help'] = 'If a registration URL (also called proxy URL) is used, then the tool is automatically configured.';
|
||||
$string['remotesystem'] = 'Remote system';
|
||||
$string['requirecompletion'] = 'Require course or activity completion prior to grade synchronisation';
|
||||
$string['returnurlnotset'] = 'Return URL was not set.';
|
||||
@@ -77,9 +79,8 @@ $string['successfulregistration'] = 'Successful registration';
|
||||
$string['tasksyncgrades'] = 'Publish as LTI tool grade sync';
|
||||
$string['tasksyncmembers'] = 'Publish as LTI tool users sync';
|
||||
$string['toolsprovided'] = 'Published tools';
|
||||
$string['toolsprovided_help'] = 'This is the information you need to paste into any system to add these tools. In other systems the Tool URL may be referred to as a configuration URL or a web link.';
|
||||
$string['toolsprovided_help'] = 'A tool may be shared with another site by providing either launch details or a registration URL.';
|
||||
$string['tooltobeprovided'] = 'Tool to be published';
|
||||
$string['toolurl'] = 'Tool URL';
|
||||
$string['userdefaultvalues'] = 'User default values';
|
||||
// Deprecated since Moodle 3.2.
|
||||
$string['cartridgeurl'] = 'Cartridge URL';
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
* none
|
||||
|
||||
Context variables required for this template:
|
||||
* rows An array of objects with label, text and id
|
||||
* rows An array of objects with label, hidelabel, text and id
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
@@ -34,19 +34,23 @@
|
||||
{
|
||||
"label": "Tool URL",
|
||||
"text": "http://example.com/",
|
||||
"id": "toolurl"
|
||||
"id": "toolurl",
|
||||
"hidelabel": false
|
||||
},
|
||||
{
|
||||
"label": "Secret",
|
||||
"text": "ABCDEF1234567890",
|
||||
"id": "secret"
|
||||
"id": "secret",
|
||||
"hidelabel": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}}
|
||||
{{#rows}}
|
||||
<div>
|
||||
<label style="display: inline-block; width: 5em" {{#id}}for={{#quote}}{{{id}}}-{{{uniqid}}}{{/quote}}{{/id}}>{{label}}</label>
|
||||
<label style="display: inline-block; width: 5em"
|
||||
{{#id}}for={{#quote}}{{{id}}}-{{{uniqid}}}{{/quote}}{{/id}} {{#hidelabel}}
|
||||
class="accesshide"{{/hidelabel}}>{{label}}</label>
|
||||
<div style="display: inline-block">{{> core/copy_box }}</div>
|
||||
</div>
|
||||
{{/rows}}
|
||||
|
||||
@@ -516,7 +516,7 @@ class enrol_lti_helper_testcase extends advanced_testcase {
|
||||
$document->load(realpath(__DIR__ . '/fixtures/input.xml'));
|
||||
$xpath = new \DOMXpath($document);
|
||||
|
||||
$this->setExpectedException("coding_exception");
|
||||
$this->expectException('coding_exception');
|
||||
$function->invokeArgs(null, [$xpath, $parameters]);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2016120501; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version (3.1)
|
||||
$plugin->component = 'enrol_lti'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -80,9 +80,10 @@ switch ($action) {
|
||||
} else {
|
||||
$useroptions['link'] = false;
|
||||
}
|
||||
$viewfullnames = has_capability('moodle/site:viewfullnames', $context);
|
||||
foreach ($outcome->response['users'] as &$user) {
|
||||
$user->picture = $OUTPUT->user_picture($user, $useroptions);
|
||||
$user->fullname = fullname($user);
|
||||
$user->fullname = fullname($user, $viewfullnames);
|
||||
$fieldvalues = array();
|
||||
foreach ($extrafields as $field) {
|
||||
$fieldvalues[] = s($user->{$field});
|
||||
|
||||
@@ -37,6 +37,7 @@ $context = context_course::instance($course->id, MUST_EXIST);
|
||||
require_login($course);
|
||||
$canenrol = has_capability('enrol/manual:enrol', $context);
|
||||
$canunenrol = has_capability('enrol/manual:unenrol', $context);
|
||||
$viewfullnames = has_capability('moodle/site:viewfullnames', $context);
|
||||
|
||||
// Note: manage capability not used here because it is used for editing
|
||||
// of existing enrolments which is not possible here.
|
||||
@@ -74,7 +75,9 @@ navigation_node::override_active_url(new moodle_url('/enrol/users.php', array('i
|
||||
$options = array('enrolid' => $enrolid, 'accesscontext' => $context);
|
||||
|
||||
$potentialuserselector = new enrol_manual_potential_participant('addselect', $options);
|
||||
$potentialuserselector->viewfullnames = $viewfullnames;
|
||||
$currentuserselector = new enrol_manual_current_participant('removeselect', $options);
|
||||
$currentuserselector->viewfullnames = $viewfullnames;
|
||||
|
||||
// Build the list of options for the enrolment period dropdown.
|
||||
$unlimitedperiod = get_string('unlimited');
|
||||
|
||||
+1
-1
@@ -173,7 +173,7 @@ class enrol_self_plugin extends enrol_plugin {
|
||||
}
|
||||
}
|
||||
// Send welcome message.
|
||||
if ($instance->customint4 !== ENROL_DO_NOT_SEND_EMAIL) {
|
||||
if ($instance->customint4 != ENROL_DO_NOT_SEND_EMAIL) {
|
||||
$this->email_welcome_message($instance, $USER);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,8 +57,8 @@ class filter_mediaplugin extends moodle_text_filter {
|
||||
}
|
||||
$jsinitialised = true;
|
||||
|
||||
$mediamanager = core_media_manager::instance();
|
||||
$mediamanager->setup($page);
|
||||
// Set up the media manager so that media plugins requiring JS are initialised.
|
||||
$mediamanager = core_media_manager::instance($page);
|
||||
}
|
||||
|
||||
public function filter($text, array $options = array()) {
|
||||
|
||||
@@ -236,6 +236,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
|
||||
$input = html_writer::tag('textarea', s($currentremark), $remarkparams);
|
||||
|
||||
// Show the frequently-used comments chooser only if there are defined entries.
|
||||
$commentchooser = '';
|
||||
if (!empty($comments)) {
|
||||
// Frequently used comments chooser.
|
||||
$chooserbuttonid = 'criteria-' . $criterion['id'] . '-commentchooser';
|
||||
|
||||
@@ -45,6 +45,13 @@ class grade_report_grader extends grade_report {
|
||||
*/
|
||||
private $allgrades;
|
||||
|
||||
/**
|
||||
* Contains all grade items expect GRADE_TYPE_NONE.
|
||||
*
|
||||
* @var array $allgradeitems
|
||||
*/
|
||||
private $allgradeitems;
|
||||
|
||||
/**
|
||||
* Array of errors for bulk grades updating.
|
||||
* @var array $gradeserror
|
||||
@@ -183,6 +190,7 @@ class grade_report_grader extends grade_report {
|
||||
array_unshift($mygroups, $this->currentgroup);
|
||||
}
|
||||
}
|
||||
$viewfullnames = has_capability('moodle/site:viewfullnames', $this->context);
|
||||
|
||||
// always initialize all arrays
|
||||
$queue = array();
|
||||
@@ -288,7 +296,7 @@ class grade_report_grader extends grade_report {
|
||||
$userfields = 'id, ' . get_all_user_name_fields(true);
|
||||
$user = $DB->get_record('user', array('id' => $userid), $userfields);
|
||||
$gradestr = new stdClass();
|
||||
$gradestr->username = fullname($user);
|
||||
$gradestr->username = fullname($user, $viewfullnames);
|
||||
$gradestr->itemname = $gradeitem->get_name();
|
||||
$warnings[] = get_string($errorstr, 'grades', $gradestr);
|
||||
if ($skip) {
|
||||
@@ -519,6 +527,22 @@ class grade_report_grader extends grade_report {
|
||||
return $this->users;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load all grade items.
|
||||
*/
|
||||
protected function get_allgradeitems() {
|
||||
if (!empty($this->allgradeitems)) {
|
||||
return $this->allgradeitems;
|
||||
}
|
||||
$allgradeitems = grade_item::fetch_all(array('courseid' => $this->courseid));
|
||||
// But hang on - don't include ones which are set to not show the grade at all.
|
||||
$this->allgradeitems = array_filter($allgradeitems, function($item) {
|
||||
return $item->gradetype != GRADE_TYPE_NONE;
|
||||
});
|
||||
|
||||
return $this->allgradeitems;
|
||||
}
|
||||
|
||||
/**
|
||||
* we supply the userids in this query, and get all the grades
|
||||
* pulls out all the grades, this does not need to worry about paging
|
||||
@@ -542,11 +566,16 @@ class grade_report_grader extends grade_report {
|
||||
WHERE g.itemid = gi.id AND gi.courseid = :courseid {$this->userselect}";
|
||||
|
||||
$userids = array_keys($this->users);
|
||||
$allgradeitems = $this->get_allgradeitems();
|
||||
|
||||
if ($grades = $DB->get_records_sql($sql, $params)) {
|
||||
foreach ($grades as $graderec) {
|
||||
$grade = new grade_grade($graderec, false);
|
||||
$this->allgrades[$graderec->userid][$graderec->itemid] = $grade;
|
||||
if (!empty($allgradeitems[$graderec->itemid])) {
|
||||
// Note: Filter out grades which have a grade type of GRADE_TYPE_NONE.
|
||||
// Only grades without this type are present in $allgradeitems.
|
||||
$this->allgrades[$graderec->userid][$graderec->itemid] = $grade;
|
||||
}
|
||||
if (in_array($graderec->userid, $userids) and array_key_exists($graderec->itemid, $this->gtree->get_items())) { // some items may not be present!!
|
||||
$this->grades[$graderec->userid][$graderec->itemid] = $grade;
|
||||
$this->grades[$graderec->userid][$graderec->itemid]->grade_item = $this->gtree->get_item($graderec->itemid); // db caching
|
||||
@@ -567,6 +596,18 @@ class grade_report_grader extends grade_report {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Pre fill grades for any remaining items which might be collapsed.
|
||||
foreach ($userids as $userid) {
|
||||
foreach ($allgradeitems as $itemid => $gradeitem) {
|
||||
if (!isset($this->allgrades[$userid][$itemid])) {
|
||||
$this->allgrades[$userid][$itemid] = new grade_grade();
|
||||
$this->allgrades[$userid][$itemid]->itemid = $itemid;
|
||||
$this->allgrades[$userid][$itemid]->userid = $userid;
|
||||
$this->allgrades[$userid][$itemid]->grade_item = $gradeitem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -611,6 +652,7 @@ class grade_report_grader extends grade_report {
|
||||
'moodle/grade:edit'), $this->context);
|
||||
}
|
||||
$hasuserreportcell = $canseeuserreport || $canseesingleview;
|
||||
$viewfullnames = has_capability('moodle/site:viewfullnames', $this->context);
|
||||
|
||||
$strfeedback = $this->get_lang_string("feedback");
|
||||
$strgrade = $this->get_lang_string('grade');
|
||||
@@ -682,7 +724,7 @@ class grade_report_grader extends grade_report {
|
||||
$usercell->text = $OUTPUT->user_picture($user, array('visibletoscreenreaders' => false));
|
||||
}
|
||||
|
||||
$fullname = fullname($user);
|
||||
$fullname = fullname($user, $viewfullnames);
|
||||
$usercell->text .= html_writer::link(new moodle_url('/user/view.php', array('id' => $user->id, 'course' => $this->course->id)), $fullname, array(
|
||||
'class' => 'username',
|
||||
));
|
||||
@@ -781,6 +823,8 @@ class grade_report_grader extends grade_report {
|
||||
$strexcludedgrades = get_string('excluded', 'grades');
|
||||
$strerror = get_string('error');
|
||||
|
||||
$viewfullnames = has_capability('moodle/site:viewfullnames', $this->context);
|
||||
|
||||
foreach ($this->gtree->get_levels() as $key => $row) {
|
||||
$headingrow = new html_table_row();
|
||||
$headingrow->attributes['class'] = 'heading_name_row';
|
||||
@@ -918,7 +962,7 @@ class grade_report_grader extends grade_report {
|
||||
// grade items (in case one has been hidden) as the course total shown needs to be adjusted for this particular
|
||||
// user.
|
||||
if (!$this->canviewhidden) {
|
||||
$allgradeitems = grade_item::fetch_all(array('courseid' => $this->courseid));
|
||||
$allgradeitems = $this->get_allgradeitems();
|
||||
}
|
||||
|
||||
foreach ($this->users as $userid => $user) {
|
||||
@@ -937,7 +981,7 @@ class grade_report_grader extends grade_report {
|
||||
$itemrow = new html_table_row();
|
||||
$itemrow->id = 'user_'.$userid;
|
||||
|
||||
$fullname = fullname($user);
|
||||
$fullname = fullname($user, $viewfullnames);
|
||||
$jsarguments['users'][$userid] = $fullname;
|
||||
|
||||
foreach ($this->gtree->items as $itemid => $unused) {
|
||||
@@ -1730,7 +1774,7 @@ class grade_report_grader extends grade_report {
|
||||
|
||||
// Try looking for old location of user setting that used to store all courses in one serialized user preference.
|
||||
if (($oldcollapsedpref = get_user_preferences('grade_report_grader_collapsed_categories')) !== null) {
|
||||
if ($collapsedall = @unserialize($oldcollapsedpref)) {
|
||||
if ($collapsedall = unserialize_array($oldcollapsedpref)) {
|
||||
// We found the old-style preference, filter out only categories that belong to this course and update the prefs.
|
||||
$collapsed = static::filter_collapsed_categories($courseid, $collapsedall);
|
||||
if (!empty($collapsed['aggregatesonly']) || !empty($collapsed['gradesonly'])) {
|
||||
|
||||
@@ -12,6 +12,7 @@ Feature: We can change what we are viewing on the grader report
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
| student2 | Student | 1 | student2@example.com |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
@@ -94,6 +95,9 @@ Feature: We can change what we are viewing on the grader report
|
||||
| capability | permission |
|
||||
| moodle/grade:viewhidden | Prevent |
|
||||
And I log out
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student2 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
|
||||
@@ -230,6 +230,74 @@ class core_grade_report_graderlib_testcase extends advanced_testcase {
|
||||
$this->assertEquals(count($toobigvalue['gradesonly']) - 1, count($report1->collapsed['gradesonly']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the get_right_rows function with one 'normal' and one 'ungraded' quiz.
|
||||
*
|
||||
* Previously, with an ungraded quiz (which results in a grade item with type GRADETYPE_NONE)
|
||||
* there was a bug in get_right_rows in some situations.
|
||||
*/
|
||||
public function test_get_right_rows() {
|
||||
global $USER, $DB;
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Create manager and student on a course.
|
||||
$generator = $this->getDataGenerator();
|
||||
$manager = $generator->create_user();
|
||||
$student = $generator->create_user();
|
||||
$course = $generator->create_course();
|
||||
$generator->enrol_user($manager->id, $course->id, 'manager');
|
||||
$generator->enrol_user($student->id, $course->id, 'student');
|
||||
|
||||
// Create a couple of quizzes on the course.
|
||||
$normalquiz = $generator->create_module('quiz', array('course' => $course->id,
|
||||
'name' => 'NormalQuiz'));
|
||||
$ungradedquiz = $generator->create_module('quiz', array('course' => $course->id,
|
||||
'name' => 'UngradedQuiz'));
|
||||
|
||||
// Set the grade for the second one to 0 (note, you have to do this after creating it,
|
||||
// otherwise it doesn't create an ungraded grade item).
|
||||
$ungradedquiz->instance = $ungradedquiz->id;
|
||||
quiz_set_grade(0, $ungradedquiz);
|
||||
|
||||
// Set current user.
|
||||
$this->setUser($manager);
|
||||
$USER->gradeediting[$course->id] = false;
|
||||
|
||||
// Get the report.
|
||||
$report = $this->create_report($course);
|
||||
$report->load_users();
|
||||
$report->load_final_grades();
|
||||
$result = $report->get_right_rows(false);
|
||||
|
||||
// There should be 3 rows (2 header rows, plus the grades for the first user).
|
||||
$this->assertCount(3, $result);
|
||||
|
||||
// The second row should contain 2 cells - one for the graded quiz and course total.
|
||||
$this->assertCount(2, $result[1]->cells);
|
||||
$this->assertContains('NormalQuiz', $result[1]->cells[0]->text);
|
||||
$this->assertContains('Course total', $result[1]->cells[1]->text);
|
||||
|
||||
// User row should contain grade values '-'.
|
||||
$this->assertCount(2, $result[2]->cells);
|
||||
$this->assertContains('>-<', $result[2]->cells[0]->text);
|
||||
$this->assertContains('>-<', $result[2]->cells[1]->text);
|
||||
|
||||
// Supposing the user cannot view hidden grades, this shouldn't make any difference (due
|
||||
// to a bug, it previously did).
|
||||
$context = context_course::instance($course->id);
|
||||
$managerroleid = $DB->get_field('role', 'id', array('shortname' => 'manager'));
|
||||
assign_capability('moodle/grade:viewhidden', CAP_PROHIBIT, $managerroleid, $context->id, true);
|
||||
$context->mark_dirty();
|
||||
$this->assertFalse(has_capability('moodle/grade:viewhidden', $context));
|
||||
|
||||
// Recreate the report. Confirm it returns successfully still.
|
||||
$report = $this->create_report($course);
|
||||
$report->load_users();
|
||||
$report->load_final_grades();
|
||||
$result = $report->get_right_rows(false);
|
||||
$this->assertCount(3, $result);
|
||||
}
|
||||
|
||||
private function create_grade_category($course) {
|
||||
static $cnt = 0;
|
||||
$cnt++;
|
||||
|
||||
@@ -42,3 +42,4 @@ $string['cliunknowoption'] = 'অচেনা অপশন:
|
||||
$string['cliyesnoprompt'] = 'y (মানে হ্যাঁ) বা n (মানে না) টাইপ করুন';
|
||||
$string['environmentrequireinstall'] = 'অবশ্যই ইনস্টল ও সক্রিয় করতে হবে';
|
||||
$string['environmentrequireversion'] = '{$a->needed} সংস্করণ আবশ্যক এবং আপনি {$a->current} চালাচ্ছেন';
|
||||
$string['upgradekeyset'] = 'আপগ্রেড কুঞ্জিকা (এটি সেট না করতে খালি রাখুন)';
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thislanguage'] = 'Èʋegbe';
|
||||
@@ -90,10 +90,9 @@ $string['pathsunsecuredataroot'] = 'Dataroot location is not secure';
|
||||
$string['pathswrongadmindir'] = 'Admin directory does not exist';
|
||||
$string['phpextension'] = '{$a} PHP extension';
|
||||
$string['phpversion'] = 'PHP version';
|
||||
$string['phpversionhelp'] = '<p>Moodle requires a PHP version of at least 4.3.0 or 5.1.0 (5.0.x has a number of known problems).</p>
|
||||
<p>You are currently running version {$a}</p>
|
||||
<p>You must upgrade PHP or move to a host with a newer version of PHP!<br />
|
||||
(In case of 5.0.x you could also downgrade to 4.4.x version)</p>';
|
||||
$string['phpversionhelp'] = '<p>Moodle requires a PHP version of at least 5.6.5 (7.x has some engine limitations).</p>
|
||||
<p>You are currently running version {$a}.</p>
|
||||
<p>You must upgrade PHP or move to a host with a newer version of PHP.</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'You are seeing this page because you have successfully installed and
|
||||
launched the <strong>{$a->packname} {$a->packversion}</strong> package in your computer. Congratulations!';
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'English US - K12';
|
||||
@@ -44,8 +44,8 @@ $string['dmlexceptiononinstall'] = '<p>Ocurrió un error en la BasedeDatos[{$a->
|
||||
$string['downloadedfilecheckfailed'] = 'Ha fallado la comprobación del archivo descargado';
|
||||
$string['invalidmd5'] = 'La variable de verificación MD5 es incorrecta no es valida - trate nuevamente';
|
||||
$string['missingrequiredfield'] = 'Falta algún campo necesario';
|
||||
$string['remotedownloaderror'] = '<p>Falló la descarga del componente a su servidor. Se recomienda ampliamente verificar los ajustes del proxy, extensión PHP cURL.</p>
|
||||
<p>Debe descargar el<a href="{$a->url}">{$a->url}</a> archivo manualmente, copiarlo en "{$a->dest}" en su servidor y descomprimirlo allí.</p>';
|
||||
$string['remotedownloaderror'] = '<p>Falló la descarga del componente a su servidor. Por favor verifique los ajustes del proxy, la extensión PHP cURL.está altamente recomendada.</p>
|
||||
<p>Debe descargar el archivo <a href="{$a->url}">{$a->url}</a> manualmente, copiarlo a "{$a->dest}" en su servidor y descomprimirlo allí.</p>';
|
||||
$string['wrongdestpath'] = 'Ruta de destino errónea.';
|
||||
$string['wrongsourcebase'] = 'Base de fuente de URL errónea.';
|
||||
$string['wrongzipfilename'] = 'Nombre de archivo ZIP erróneo.';
|
||||
|
||||
@@ -85,10 +85,9 @@ $string['pathsunsecuredataroot'] = 'La ubicación de dataroot no es segura';
|
||||
$string['pathswrongadmindir'] = 'El directorio admin no existe';
|
||||
$string['phpextension'] = 'Extensión PHP {$a}';
|
||||
$string['phpversion'] = 'Versión PHP';
|
||||
$string['phpversionhelp'] = '<p>Moodle requiere al menos una versión de PHP 4.3.0 o 5.1.0 ((5.0.x tiene una serie de problemas conocidos).</p>
|
||||
$string['phpversionhelp'] = '<p>Moodle requiere una versión de PHP de al menos 5.6.5 (7.x tiene algunas limitaciones del motor).</p>
|
||||
<p>En este momento está ejecutando la versión {$a}</p>
|
||||
<p>¡Debe actualizar PHP o trasladarse a otro servidor con una versión más reciente de PHP!<br />
|
||||
(En caso de 5.0.x podría también revertir a la versión 4.4.x)</p>';
|
||||
<p>Usted debe actualizar PHP o trasladarse a otro servidor con una versión más reciente de PHP!<br />';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Si está viendo esta página es porque ha podido instalar y ejecutar exitosamente el paquete <strong>{$a->packname} {$a->packversion}</strong> en su computadora. !Enhorabuena!';
|
||||
$string['welcomep30'] = 'Esta versión de <strong>{$a->installername}</strong> incluye las aplicaciones necesarias para que <strong>Moodle</strong> funcione en su computadora, principalmente:';
|
||||
|
||||
@@ -31,4 +31,4 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = 'es_mx';
|
||||
$string['thislanguage'] = 'Español - México - kids';
|
||||
$string['thislanguage'] = 'Español de México para niños';
|
||||
|
||||
@@ -41,8 +41,8 @@ $string['cannotunzipfile'] = 'Ei saa lahti pakkida faili.';
|
||||
$string['componentisuptodate'] = 'Komponent on ajakohane';
|
||||
$string['downloadedfilecheckfailed'] = 'Alla laetud faili kontroll ebaõnnestus.';
|
||||
$string['invalidmd5'] = 'Vigane md5';
|
||||
$string['missingrequiredfield'] = 'Mõned nõutud väljad on puudu';
|
||||
$string['missingrequiredfield'] = 'Mõni nõutav väli on puudu';
|
||||
$string['remotedownloaderror'] = 'Komponendi alla tõmbamine serverisse ebaõnnestus, palun kontrolli proksi seadeid, PHP cURL laiendus on tungivalt soovitatav.<br /><br />Sa pead tõmbama <a href="{$a->url}">{$a->url}</a> faili käsitsi, kopeerima selle "{$a->dest}" oma serveris ja pakkima lahti sinna.';
|
||||
$string['wrongdestpath'] = 'Vale sihtrada';
|
||||
$string['wrongdestpath'] = 'Vale sihtkohatee';
|
||||
$string['wrongsourcebase'] = 'Vale allika URL\'i baas.';
|
||||
$string['wrongzipfilename'] = 'Vale ZIP failinimi';
|
||||
$string['wrongzipfilename'] = 'Vale ZIP-faili nimi';
|
||||
|
||||
+16
-16
@@ -32,23 +32,23 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'Administreerimiskataloog';
|
||||
$string['availablelangs'] = 'Saadaval keelte nimekiri';
|
||||
$string['chooselanguagehead'] = 'Keele valik';
|
||||
$string['chooselanguagehead'] = 'Valige keel';
|
||||
$string['chooselanguagesub'] = 'Palun vali keel, mida kasutatakse AINULT installeerimise käigus. Hiljem saab valida õpikeskkonna ja kasutajate keelt.';
|
||||
$string['clialreadyinstalled'] = 'Fail config.php juba eksisteerib, palun kasuta admin/cli/upgrade.php kui soovid uuendada oma saiti.';
|
||||
$string['cliinstallheader'] = 'Moodle {$a} käsurea põhine installeerimise programm';
|
||||
$string['cliinstallheader'] = 'Moodle’i {$a} käsureapõhine installiprogramm';
|
||||
$string['databasehost'] = 'Andmebaasi host';
|
||||
$string['databasename'] = 'Andmebaasi nimi';
|
||||
$string['databasetypehead'] = 'Vali andmebaasi draiver';
|
||||
$string['databasetypehead'] = 'Valige andmebaasi draiver';
|
||||
$string['dataroot'] = 'Andmete kataloog';
|
||||
$string['datarootpermission'] = 'Andmete kataloogide õigus';
|
||||
$string['datarootpermission'] = 'Andmekataloogide õigus';
|
||||
$string['dbprefix'] = 'Tabeli eesliide';
|
||||
$string['dirroot'] = 'Moodle kataloog';
|
||||
$string['environmenthead'] = 'Keskkonna kontrollimine...';
|
||||
$string['environmentsub2'] = 'Iga Moodle väljalaskel on oma minimaalne PHP versiooni nõue ja kohustuslikud PHP laiendused.
|
||||
Täielik keskkonna kontroll tehakse enne iga installeerimist ja uuendamist. Palun võta ühendust serveri administraatoriga, kui sa ei sa kuidas installeerida või võimaldada PHP laiendusi.';
|
||||
$string['errorsinenvironment'] = 'Keskkonna sobivuse kontroll ebaõnnestus!';
|
||||
$string['installation'] = 'Installeerimine';
|
||||
$string['langdownloaderror'] = 'Kahjuks keelt "{$a}" ei paigaldatud. Paigaldamine jätkub inglise keeles.';
|
||||
$string['errorsinenvironment'] = 'Keskkonna sobivuse kontroll nurjus.';
|
||||
$string['installation'] = 'Installimine';
|
||||
$string['langdownloaderror'] = 'Keelt "{$a}" ei saanud alla laadida. Installimine jätkub inglise keeles.';
|
||||
$string['memorylimithelp'] = '<p>PHP mälu limiit sinu serveri jaoks on hetkel {$a}.</p>
|
||||
<p>See võib hiljem tekitada Moodle\'il mäluprobleeme, eriti kui sul on palju mooduleid ja/või kasutajaid.
|
||||
</p>
|
||||
@@ -60,11 +60,11 @@ See lubab Moodle\'il ise mälu limiiti määrata.</li>
|
||||
<li>Mõnedes PHP serverites saad luua Moodle kataloogi .htaccess faili, mis sisaldab seda rida:<p><blockquote>php_value memory_limit 16M</blockquote></p>
|
||||
<p>Kuigi mõnedes serverites tõkestab see <b>kõigi</b> PHP lehekülgede tööd (sa näed veateateid, kui vaatad lehti), nii et pead eemaldama .htaccess faili.</p></li>
|
||||
</ol>';
|
||||
$string['paths'] = 'Rajad';
|
||||
$string['paths'] = 'Teed';
|
||||
$string['pathserrcreatedataroot'] = 'Andmete kataloogi ({$a->dataroot}) ei saa installeerija luua.';
|
||||
$string['pathshead'] = 'Radade kinnitused';
|
||||
$string['pathsrodataroot'] = 'Andmete juurkataloog (Dataroot) ei ole kirjutatav.';
|
||||
$string['pathsroparentdataroot'] = 'Ülemkataloog ({$a->parent}) ei ole kirjutatav. Installeerija ei saanud andmete kataloogi ({$a->dataroot}) luua.';
|
||||
$string['pathshead'] = 'Kinnita teed';
|
||||
$string['pathsrodataroot'] = 'Andmete juurkataloog ei võimalda kirjutust.';
|
||||
$string['pathsroparentdataroot'] = 'Ülemkataloog ({$a->parent}) ei võimalda kirjutust. Installiprogramm ei saanud andmete kataloogi ({$a->dataroot}) luua.';
|
||||
$string['pathssubadmindir'] = 'Väga vähesed veebihostid kasutavad /admin spetsiaalse URL-na, et pääseda ligi kontrollpaneelile või millegile sarnasele. Kahjuks on see konfliktis Moodle administreerimislehtedega. Sa saad olukorda parandada, kui nimetad kataloogi admin ümber oma üaigalduses ning kirjutad selle uue nime siia. Näiteks: <em>moodleadmin</em>. See parandab administreerimisliidese lingid Moodle\'s.';
|
||||
$string['pathssubdataroot'] = 'Sa pead näitama koha, kuhu Moodle saaks salvestada üles laetud failid. See kataloog peab olema loetav JA KIRJUTATAV veebiserveri kasutaja poolt (tavaliselt \'nobody\' or \'apache\'), samas see kataloog ei tohiks olla ligipääsetav otse veebi kaudu. Kui kataloogi ei eksisteeri, siis installeerija püüab selle ise luua.';
|
||||
$string['pathssubdirroot'] = 'Täistee Moodle paigalduse kataloogile.';
|
||||
@@ -73,9 +73,9 @@ Ei ole võimalik kasutada mitmest kohast kohast ligipääsu.
|
||||
Kui Su sait omab mitut avalikku aadress, siis pead seadistama ümbersuunamised kõikidelt teistest aadressidelt.
|
||||
Kui Su sait on ligipääsetav nii Internetist kui intranetist (sisevõrgust), siis kasuta Interneti ehk avalikku aadressi ja seadista DNS sellisellt, et intraneti kasutajad kasutaksid ka avalikku aadressi.
|
||||
Kui aadress pole korrektne, siis palun muuda URL oma brauseris, et taasalustada installeerimist erineva väärtusega.';
|
||||
$string['pathsunsecuredataroot'] = 'Andmete juurkataloogi asukoht pole turvamine';
|
||||
$string['pathswrongadmindir'] = 'Admin kataloogi ei eksisteeri';
|
||||
$string['phpextension'] = '{$a} PHP laiendus';
|
||||
$string['pathsunsecuredataroot'] = 'Andmete juurkataloogi asukoht pole turvaline';
|
||||
$string['pathswrongadmindir'] = 'Halduskataloogi pole olemas';
|
||||
$string['phpextension'] = '{$a} PHP-laiendus';
|
||||
$string['phpversion'] = 'PHP versioon';
|
||||
$string['phpversionhelp'] = '<p>Moodle vajab vähemalt PHP versiooni 4.1.0</p>
|
||||
<p>Sinu jooksev versioon on {$a}</p>
|
||||
@@ -83,8 +83,8 @@ $string['phpversionhelp'] = '<p>Moodle vajab vähemalt PHP versiooni 4.1.0</p>
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Sa näed seda lehte, sest oled edukalt installeerinud ja käivitanud <strong>{$a->packname} {$a->packversion}</strong> paketi Sinu arvutis. Õnnitleme!';
|
||||
$string['welcomep30'] = 'See <strong>{$a->installername}</strong> väljalase rakendusi loomaks keskkonda, millel <strong>Moodle</strong> hakkab will operate, namely:';
|
||||
$string['welcomep40'] = 'Pakett sisaldab ka <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep40'] = 'Pakett sisaldab ka järgmist: <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Kasutamaks kõiki selle rakendusi selles paketis on kaetud nende vastavad litsentsid. Täielik <strong>{$a->installername}</strong> pakett on <a href="http://www.opensource.org/docs/definition_plain.html">avatud lähtekoodil</a> ja jaotatud <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> litsentsi alusel.';
|
||||
$string['welcomep60'] = 'Järgnevatel lehtedel juhitakse sind läbi mõnede lihtsate sammude seadistamaks ja seadmaks üles <strong>Moodle</strong> oma arvutis. Sa võid nõustuda vaikeväärtustega või fakultatiivselt täiendada vastavalt oma vajadustele.';
|
||||
$string['welcomep70'] = 'Vajuta "Järgmine" nuppu all jätkamaks <strong>Moodle</strong> paigaldamisega.';
|
||||
$string['welcomep70'] = '<strong>Moodle\\’i</strong> installi jätkamiseks klõpsake nuppu Edasi.';
|
||||
$string['wwwroot'] = 'Veebiaadress';
|
||||
|
||||
@@ -32,4 +32,4 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = '';
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Eesti';
|
||||
$string['thislanguage'] = 'inglise';
|
||||
|
||||
@@ -41,9 +41,10 @@ $string['cannotunzipfile'] = 'Ezin da fitxategia deskonprimatu';
|
||||
$string['componentisuptodate'] = 'Osagaia eguneratu da';
|
||||
$string['dmlexceptiononinstall'] = '<p>Datu-basearen errorea gertatu da [{$a->errorcode}].<br />{$a->debuginfo}</p>';
|
||||
$string['downloadedfilecheckfailed'] = 'Jaitsitako fitxategiaren konprobazioak kale egin du.';
|
||||
$string['invalidmd5'] = 'md5 ez da baliagarria';
|
||||
$string['invalidmd5'] = 'Kontrolerako aldagaia gaizki zegoen - saiatu berriz ere';
|
||||
$string['missingrequiredfield'] = 'Beharrezko eremuren bat falta da.';
|
||||
$string['remotedownloaderror'] = 'Errorea osagaia zure zerbitzarian jaistean, mesedez egiaztatu proxy-ezarpenak, PHP cURL luzapea erabat gomendatzen da.<br/><br /> <a href="*{$a->url}*">*{$a->url}*</a> fitxategia eskuz jaitsi beharko zenuke, zure zerbitzariko "*{$a->dest}*" -ra kopiatu eta bertan deskonprimatu.';
|
||||
$string['remotedownloaderror'] = '<p>Errorea osagaia zure zerbitzarian jaistean, mesedez egiaztatu proxy-ezarpenak, PHP cURL luzapena erabat gomendatzen da.</p>
|
||||
<p> <a href="{$a->url}">{$a->url}</a> fitxategia eskuz jaitsi beharko zenuke, zure zerbitzariko "{$a->dest}"-ra kopiatu eta bertan deskonprimatu.</p>';
|
||||
$string['wrongdestpath'] = 'Bide desegokia';
|
||||
$string['wrongsourcebase'] = 'URL iturriaren oinarri akastuna';
|
||||
$string['wrongzipfilename'] = 'ZIP fitxategiaren izen desegokia';
|
||||
|
||||
+26
-13
@@ -34,23 +34,27 @@ $string['admindirname'] = 'Admin direktorioa';
|
||||
$string['availablelangs'] = 'Hizkuntza-pakete eskuragarriak';
|
||||
$string['chooselanguagehead'] = 'Aukeratu hizkuntza bat';
|
||||
$string['chooselanguagesub'] = 'Mesedez, aukeratu instalaziorako hizkuntza bat. Hizkuntza hori erabiliko da gunearen berezko hizkuntza gisa, baina aurrerago alda daiteke.';
|
||||
$string['clialreadyconfigured'] = 'File config.php fitxategia badago, mesedez erabili admin/cli/install_database.php gune hau instalatu nahi baduzu.';
|
||||
$string['clialreadyinstalled'] = 'File config.php fitxategia badago, mesedez erabili admin/cli/upgrade.php zure gunea eguneratu nahi baduzu.';
|
||||
$string['clialreadyconfigured'] = 'Dagoeneko badago config.php konfigurazio-fitxategia. Mesedez erabili admin/cli/install_database.php Moodle gune honetan instalatu nahi baduzu.';
|
||||
$string['clialreadyinstalled'] = 'Dagoeneko badago config.php konfigurazio-fitxategia. Mesedez erabili admin/cli/upgrade.php zure Moodle gunea eguneratu nahi baduzu.';
|
||||
$string['cliinstallheader'] = 'Moodle {$a} komando-lerro bidezko instalaziorako programa';
|
||||
$string['databasehost'] = 'Datu-basearen ostalaria';
|
||||
$string['databasename'] = 'Datu-basearen izena';
|
||||
$string['databasetypehead'] = 'Aukeratu datu-base kontrolatzailea';
|
||||
$string['dataroot'] = 'Datu-direktorioa';
|
||||
$string['datarootpermission'] = 'Datu-direktorioen baimena';
|
||||
$string['dbprefix'] = 'Taulen aurrizkia';
|
||||
$string['dirroot'] = 'Moodle direktorioa';
|
||||
$string['environmenthead'] = 'Zure ingurunea egiaztatzen...';
|
||||
$string['errorsinenvironment'] = 'Kale egin du ingurunearen egiaztatzeak!';
|
||||
$string['environmentsub2'] = 'Moodle-ko bertsio bakoitzak PHPko gutxieneko bertsioa eta derrigorrez instalatu beharreko PHP luzapen batzuk ditu. Ingurunearen azterketa oso bat egiten da instalazioa eta eguneraketa bakoitza egin aurretik. Mesedez, jarri harremanetan zerbitzariaren kudeatzailearekin ez badakizu bertsio berria edo PHP luzapenak nola instalatu.';
|
||||
$string['errorsinenvironment'] = 'Huts egin du ingurunearen egiaztatzeak!';
|
||||
$string['installation'] = 'Instalazioa';
|
||||
$string['langdownloaderror'] = '"{$a}" hizkuntza ezin izan da instalatu. Instalazio-prozesuak ingelesez jarraituko du.';
|
||||
$string['memorylimithelp'] = '<p>Zure zerbitzarian PHP memoria-muga {$a} da.</p>
|
||||
$string['langdownloaderror'] = 'Zoritxarrez "{$a}" hizkuntza ezin izan da jaitsi. Instalazio-prozesuak ingelesez jarraituko du.';
|
||||
$string['memorylimithelp'] = '<p>Zure zerbitzarian PHP memoria-muga {$a} da une honetan.</p>
|
||||
|
||||
<p>Aurrerago honek Moodle-ri arazoak sor diezaizkioke, bereziki modulu edo/eta erabiltzaile asko badituzu.</p>
|
||||
<p>Aurrerago honek Moodle-ri arazoak sor diezaizkioke,
|
||||
bereziki modulu edo/eta erabiltzaile asko badituzu.</p>
|
||||
|
||||
<p>PHP muga altuenarekin konfiguratzea aholkatzen dizugu, ad. 40M.
|
||||
<p>PHP memoria-muga ahal bezain altu konfiguratzea aholkatzen dizugu, ad. 40M.
|
||||
Hori egiteko modu asko daude:</p>
|
||||
<ol>
|
||||
<li>Ahal baduzu, PHP <i>--enable-memory-limit</i>-ekin berriz konpilatu.
|
||||
@@ -58,8 +62,8 @@ Horrek Moodle-k berak memoria-muga ezartzea ahalbidetzen du.</li>
|
||||
<li>php.ini fitxategirako sarbidea baduzu,<b>memory_limit</b> ezarpena alda dezakezu
|
||||
40Mra, adibidez. Sarbiderik ez baduzu, zure administratzaileari egin dezala eska diezaiokezu.</li>
|
||||
<li>PHP zerbitzari batzuetan Moodle-ren direktorioan beheko lerro hau daukan .htaccess fitxategia sor dezakezu:
|
||||
<p><blockquote>php_value memory_limit 40M</blockquote></p>
|
||||
<p>Hala ere, zerbitzari batzuetan horrek PHP orri <b>GUZTIEK</b> ez funtzionatzea ekar dezake
|
||||
<blockquote><div>php_value memory_limit 40M</div></blockquote>
|
||||
<p>Hala ere, zerbitzari batzuetan horrek PHP orri <b>guztiek</b> ez funtzionatzea ekar dezake
|
||||
(orriak ikustean erroreak ere ikusiko dituzu). Kasu horretan, .htaccess fitxategia ezabatu beharko duzu.</p></li>
|
||||
</ol>';
|
||||
$string['paths'] = 'Bideak';
|
||||
@@ -67,8 +71,18 @@ $string['pathserrcreatedataroot'] = 'Instalatzaileak ezin du datu-direktorioa ({
|
||||
$string['pathshead'] = 'Egiaztatu bideak';
|
||||
$string['pathsrodataroot'] = 'Dataroot direktorioa ez da idazteko modukoa.';
|
||||
$string['pathsroparentdataroot'] = 'Goragoko direktorioa ({$a->parent}) ez da idazteko modukoa. Instalatzaileak ezin du datu-direktorioa ({$a->dataroot}) sortu.';
|
||||
$string['pathssubadmindir'] = 'Web ostalari gutxi batzuk /admin URL berezi gisa erabiltzen dute kontrol-panel edo antzekora sarbidea emateko. Zoritxarrez, honek Moodle-ren kudeatze-orrien berezko kokapenarekin gatazka sortzen du. Hau konpondu dezakezu zure instalazioko admin karpeta berrizendatuz, eta izen berria hemen sartuta. Adibidez <em>moodleadmin</em>. Honek Moodle-ko admin estekak konponduko du.';
|
||||
$string['pathssubdataroot'] = '<p>Moodle-k erabiltzaileek igotako fitxategien edukiak bilduko dituen direktorio bat.</p>
|
||||
<p>Direktorio honetan web-zerbitzariaren erabiltzaileak irakurtzeko eta idazteko baimena izan beharko ditu (normalean \'www-data\', \'nobody\', edo \'apache\').</p>
|
||||
<p>Ez litzateke web bidez eskuragarri egon beharko.</p>
|
||||
<p>Direktorioa existitzen ez bada, instalazioan sortzeko saiakera egingo da.</p>';
|
||||
$string['pathssubdirroot'] = '<p>Moodle-ko kodea daukan direktorioaren helbide osoa.</p>';
|
||||
$string['pathssubwwwroot'] = '<p>Moodle eskuragarri egongo den helbide osoa, hau da, erabiltzaileek Moodle-n sartzeko nabigatzaileareko helbide barran idatziko duten helbidea</p>
|
||||
<p>Moodle ezin da hainbat helbidetatik eskuragarri egon. Zure gunea hainbat helbidetatik eskuragarri badago errazena aukeratu eta bertara beste helbideetatik behin-betiko berbideraketak konfiguratu itzazu.</p>
|
||||
<p>Zure gunea Internetetik eta barne-sare batetik eskuragarri badago (batzuetan Intranet deitutakoa), hemen helbide publikoa erabili ezazu.</p>
|
||||
<p>Oraingo helbidea egokia ez bada, mesedez aldatu ezazu URLa zure nabigatzailean eta instalazioa berriz abiatu ezazu.</p>';
|
||||
$string['pathsunsecuredataroot'] = 'Dataroot-en kokapena ez da segurua';
|
||||
$string['pathswrongadmindir'] = 'Kudeaketa direktorioa ez da existitzen';
|
||||
$string['pathswrongadmindir'] = 'Admin direktorioa ez da existitzen';
|
||||
$string['phpextension'] = '{$a} PHP luzapena';
|
||||
$string['phpversion'] = 'PHP bertsioa';
|
||||
$string['phpversionhelp'] = '<p>Moodle-k gutxienez PHP 4.3.0 edo 5.1.0 (5.0.x errore batzuk ditu). </p>
|
||||
@@ -76,8 +90,7 @@ $string['phpversionhelp'] = '<p>Moodle-k gutxienez PHP 4.3.0 edo 5.1.0 (5.0.x er
|
||||
<p>PHP eguneratu edo PHP bertsio berriagoa duen zerbitzari batera jo</p>
|
||||
<p>5.0.x baduzu, nahi izanez gero, 4.4.x. bertsiora jaitsi dezakezu</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Orri hau ikusten baduzu <strong>{$a->packname} {$a->packversion}</strong> paketea
|
||||
zure ordenadorean instalatu ahal izan duzu. Zorionak!';
|
||||
$string['welcomep20'] = 'Orri hau ikusten baduzu <strong>{$a->packname} {$a->packversion}</strong> paketea zure ordenagailuan instalatu ahal izan duzu. Zorionak!';
|
||||
$string['welcomep30'] = '<strong>{$a->installername}</strong>ren bertsio honek <strong>Moodle</strong>k
|
||||
zure ordenadorean funtzionatzeko behar diren aplikazioak dauzka,
|
||||
bereziki:';
|
||||
@@ -87,7 +100,7 @@ $string['welcomep50'] = 'Paketeko aplikazio guztien erabilpena dagozkien lizentz
|
||||
<a href="http://www.opensource.org/docs/definition_plain.html">kode irekia</a> dauka eta
|
||||
<a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> lizentziapean banatzen da.';
|
||||
$string['welcomep60'] = 'Datozen orriek urrats erraz batzuen bidez gidatuko zaituzte
|
||||
<strong>Moodle</strong> zure ordenadorean instalatu eta konfiguratzeko. Aholkatzen diren lehentsitako baloreak
|
||||
<strong>Moodle</strong> zure ordenagailuan instalatu eta konfiguratzeko. Aholkatzen diren lehentsitako baloreak
|
||||
mantendu edo, nahi izanez gero, alda ditzakezu zure beharrei erantzun diezaieten.';
|
||||
$string['welcomep70'] = '"Hurrengoa" botoia sakatu <strong>Moodle</strong>ren konfigurazioarekin jarraitzeko.';
|
||||
$string['wwwroot'] = 'Web helbidea';
|
||||
|
||||
@@ -30,5 +30,17 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatedboninstall'] = '<p>پایگاه داده نتوانست ساخته شود.</p>
|
||||
<p>پایگاه دادهٔ تعیین شده وجود ندارد و کاربر ارائهشده هم مجوز ساختن پایگاه داده را ندارد.</p>
|
||||
<p>مدیر سایت باید پیکربندی پایگاه داده را بررسی کند.</p>';
|
||||
$string['cannotcreatelangdir'] = 'دایرکتوری lang نتوانست ساخته شود';
|
||||
$string['cannotcreatetempdir'] = 'نمیتوان دایرکتوری temp را ساخت';
|
||||
$string['cannotdownloadcomponents'] = 'اجزا (کامپوننتها) را نمیتوان دریافت کرد';
|
||||
$string['cannotdownloadzipfile'] = 'فایل ZIP نتوانست دریافت شود.';
|
||||
$string['cannotfindcomponent'] = 'کامپوننت پیدا نشد';
|
||||
$string['cannotsavemd5file'] = 'نمیتوانم فایل md5 را ذخیره کنم';
|
||||
$string['cannotsavezipfile'] = 'نمیتوانم فایل ZIP را ذخیره کنم';
|
||||
$string['cannotunzipfile'] = 'فایل نمیتواند unzip شود';
|
||||
$string['componentisuptodate'] = 'کامپوننت بهروز است';
|
||||
$string['dmlexceptiononinstall'] = '<p>یک خطای پایگاه داده رخ داد [{$a->errorcode}].<br />{$a->debuginfo}</p>';
|
||||
$string['missingrequiredfield'] = 'بعضی از فیلدهای ضروری خالی است';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user