Merge branch 'MDL-73728-master' of https://github.com/andrewnicols/moodle
This commit is contained in:
Vendored
@@ -10,7 +10,7 @@ Feature: I can upload a preset file
|
||||
Given I should see "Import site admin preset"
|
||||
And I click on "Import" "button"
|
||||
And I should see "You must supply a value here"
|
||||
And I upload "adminpresets/tests/fixtures/import_settings_plugins.xml" file to "Select file" filemanager
|
||||
And I upload "admin/presets/tests/fixtures/import_settings_plugins.xml" file to "Select file" filemanager
|
||||
And I click on "Import" "button"
|
||||
And I should see "Setting changes"
|
||||
And I should see "Imported preset"
|
||||
@@ -31,7 +31,7 @@ Feature: I can upload a preset file
|
||||
Scenario: Rename imported settings
|
||||
Given I should see "Import site admin preset"
|
||||
And I set the field "Name" to "Renamed preset"
|
||||
And I upload "adminpresets/tests/fixtures/import_settings_plugins.xml" file to "Select file" filemanager
|
||||
And I upload "admin/presets/tests/fixtures/import_settings_plugins.xml" file to "Select file" filemanager
|
||||
And I click on "Import" "button"
|
||||
And I should not see "Imported preset"
|
||||
And I should see "Renamed preset"
|
||||
@@ -42,7 +42,7 @@ Feature: I can upload a preset file
|
||||
|
||||
Scenario: Import settings from an invalid XML file
|
||||
Given I set the field "Name" to "Renamed preset"
|
||||
And I upload "adminpresets/tests/fixtures/invalid_xml_file.xml" file to "Select file" filemanager
|
||||
And I upload "admin/presets/tests/fixtures/invalid_xml_file.xml" file to "Select file" filemanager
|
||||
When I click on "Import" "button"
|
||||
Then I should see "Wrong file"
|
||||
And I should not see "Setting changes"
|
||||
@@ -51,7 +51,7 @@ Feature: I can upload a preset file
|
||||
|
||||
Scenario: Import unexisting settings category
|
||||
Given I set the field "Name" to "Renamed preset"
|
||||
And I upload "adminpresets/tests/fixtures/unexisting_category.xml" file to "Select file" filemanager
|
||||
And I upload "admin/presets/tests/fixtures/unexisting_category.xml" file to "Select file" filemanager
|
||||
When I click on "Import" "button"
|
||||
Then I should see "No valid settings"
|
||||
And I should not see "Setting changes"
|
||||
@@ -63,7 +63,7 @@ Feature: I can upload a preset file
|
||||
| debug | 0 |
|
||||
| debugdisplay | 0 |
|
||||
And I set the field "Name" to "Renamed preset"
|
||||
And I upload "adminpresets/tests/fixtures/import_settings_with_unexisting_setting.xml" file to "Select file" filemanager
|
||||
And I upload "admin/presets/tests/fixtures/import_settings_with_unexisting_setting.xml" file to "Select file" filemanager
|
||||
When I click on "Import" "button"
|
||||
And I should see "Setting changes"
|
||||
And I should see "Enable portfolios" in the "core" "table_row"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/adminpresets/tests/generator/lib.php');
|
||||
require_once($CFG->dirroot . '/admin/presets/tests/generator/lib.php');
|
||||
|
||||
/**
|
||||
* Data generator the admin_presets tool.
|
||||
|
||||
@@ -189,7 +189,7 @@ class import_test extends \advanced_testcase {
|
||||
* @return array
|
||||
*/
|
||||
public function import_execute_provider(): array {
|
||||
$fixturesfolder = __DIR__ . '/../../../../../../adminpresets/tests/fixtures/';
|
||||
$fixturesfolder = __DIR__ . '/../../../../../presets/tests/fixtures/';
|
||||
|
||||
return [
|
||||
'Import settings from an empty file' => [
|
||||
|
||||
+1
-1
@@ -1163,7 +1163,7 @@ $CFG->admin = 'admin';
|
||||
// This setting accepts the following values:
|
||||
// - One of the core preset names (i.e "starter" or "full").
|
||||
// - The path of a valid XML preset file, that will be imported and applied. Absolute paths are recommended, to
|
||||
// guarantee the file is found: i.e."MOODLEPATH/adminpresets/tests/fixtures/import_settings_plugins.xml".
|
||||
// guarantee the file is found: i.e."MOODLEPATH/admin/presets/tests/fixtures/import_settings_plugins.xml".
|
||||
//
|
||||
// This setting is only used during the installation process. So once the Moodle site is installed, it is ignored.
|
||||
//
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@
|
||||
"subsystems": {
|
||||
"access": null,
|
||||
"admin": "admin",
|
||||
"adminpresets": "adminpresets",
|
||||
"adminpresets": "admin/presets",
|
||||
"analytics": "analytics",
|
||||
"antivirus": "lib\/antivirus",
|
||||
"auth": "auth",
|
||||
|
||||
+1
-1
@@ -333,6 +333,6 @@ function xmldb_main_install() {
|
||||
badges_install_default_backpacks();
|
||||
|
||||
// Create default core site admin presets.
|
||||
require_once($CFG->dirroot . '/adminpresets/classes/helper.php');
|
||||
require_once($CFG->dirroot . '/admin/presets/classes/helper.php');
|
||||
\core_adminpresets\helper::create_default_presets();
|
||||
}
|
||||
|
||||
+1
-1
@@ -3508,7 +3508,7 @@ privatefiles,moodle|/user/files.php';
|
||||
|
||||
if ($DB->count_records('adminpresets', ['iscore' => 1]) == 0) {
|
||||
// Create default core site admin presets.
|
||||
require_once($CFG->dirroot . '/adminpresets/classes/helper.php');
|
||||
require_once($CFG->dirroot . '/admin/presets/classes/helper.php');
|
||||
\core_adminpresets\helper::create_default_presets();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -209,7 +209,7 @@
|
||||
<directory suffix="_test.php">reportbuilder/tests</directory>
|
||||
</testsuite>
|
||||
<testsuite name="core_adminpresets_testsuite">
|
||||
<directory suffix="_test.php">adminpresets/tests</directory>
|
||||
<directory suffix="_test.php">admin/presets/tests</directory>
|
||||
</testsuite>
|
||||
|
||||
<!--Plugin suites: use admin/tool/phpunit/cli/util.php to build phpunit.xml from
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$version = 2022020200.03; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
$version = 2022020200.04; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
// RR = release increments - 00 in DEV branches.
|
||||
// .XX = incremental changes.
|
||||
$release = '4.0dev+ (Build: 20220202)'; // Human-friendly version name
|
||||
|
||||
Reference in New Issue
Block a user