Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
4.0
-
MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
MDL-73145-master -
Hide
IMPORTANT: As all these installations will be run against the same code and database, it's important to use a different dbprefix. The testing instructions have been written taking this into account (so this is just a warning in case you copy&paste the command without changing this value).
Testing scenario 1. CLI install: Apply STARTER
- Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation:
sudo -u www-data php admin/cli/install.php --lang=en --wwwroot=http://localhost/m/integration_master --dbtype=pgsql --dbname=integrationmaster --dbuser=postgres --dbpass=postgres --prefix=aa_ --fullname=Test --shortname=Test --adminpass=test --adminemail=admin@moodle.invalid --sitepreset=starter --agree-license --non-interactive --allow-unstable
- Check the installation process finishes without errors.
- Open the config.php and check it contains $CFG->setsitepresetduringinstall = 'starter'.
- Login as admin.
- Go to "Site administration > Site admin presets".
- Check the "Show version history" option is displayed in the "Starter" actions menu.
- Go to "Site administration > Advanced features".
- Check "Enable comments", "Enable tags functionality", "Enable notes", "Enable blogs", "Enable badges" and "Enable competencies" features are disabled.
- Go to "Site administration > Plugins > Manage activities".
- Check, at least, Chat, Database and Lesson are disabled.
Testing scenario 2. CLI install: Apply a non-existing preset
- Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation:
sudo -u www-data php admin/cli/install.php --lang=en --wwwroot=http://localhost/m/integration_master --dbtype=pgsql --dbname=integrationmaster --dbuser=postgres --dbpass=postgres --prefix=bb_ --fullname=Test --shortname=Test --adminpass=test --adminemail=admin@moodle.invalid --sitepreset=unexisting --agree-license --non-interactive --allow-unstable
- Check the installation process finishes without errors.
- Open the config.php and check it contains $CFG->setsitepresetduringinstall = 'unexisting'.
- Login as admin.
- Go to "Site administration > Site admin presets".
- Check the "Show version history" option is NOT displayed in the "Starter" actions menu.
- Go to "Site administration > Advanced features".
- Check all the settings have their default value.
- Go to "Site administration > Plugins > Manage activities".
- Check Chat, Database and Lesson are enabled.
Testing scenario 3. CLI install: Import valid XML file
- Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation:
sudo -u www-data php admin/cli/install.php --lang=en --wwwroot=http://localhost/m/integration_master --dbtype=pgsql --dbname=integrationmaster --dbuser=postgres --dbpass=postgres --prefix=cc_ --fullname=Test --shortname=Test --adminpass=test --adminemail=admin@moodle.invalid --sitepreset=../tool/admin_presets/tests/fixtures/import_settings_plugins.xml --agree-license --non-interactive --allow-unstable
- Check the installation process finishes without errors.
- Open the config.php and check it contains $CFG->setsitepresetduringinstall = '../tool/admin_presets/tests/fixtures/import_settings_plugins.xml'.
- Login as admin.
- Go to "Site administration > Site admin presets".
- Check a 3 presets are displayed: "Starter", "Full" and "Imported preset".
- Check the "Show version history" option is displayed in the "Imported preset" actions menu.
- Go to "Site administration > Plugins > Manage activities".
- Check, Chat and Database are disabled and Lesson is enabled.
Testing scenario 4. CLI install: Import unexisting XML file
- Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation:
sudo -u www-data php admin/cli/install.php --lang=en --wwwroot=http://localhost/m/integration_master --dbtype=pgsql --dbname=integrationmaster --dbuser=postgres --dbpass=postgres --prefix=dd_ --fullname=Test --shortname=Test --adminpass=test --adminemail=admin@moodle.invalid --sitepreset=../tool/admin_presets/tests/fixtures/xxxxx.xml --agree-license --non-interactive --allow-unstable
- Check the installation process finishes without errors (there are some warnings, but no errors).
- Open the config.php and check it contains $CFG->setsitepresetduringinstall = '../tool/admin_presets/tests/fixtures/xxxxx.xml'.
- Login as admin.
- Go to "Site administration > Site admin presets".
- Check only 2 presets are displayed: "Starter" and "Full".
- Go to "Site administration > Plugins > Manage activities".
- Check, Chat, Database and Lesson are enabled.
Testing scenario 5. CLI install: Import invalid XML file
- Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation:
sudo -u www-data php admin/cli/install.php --lang=en --wwwroot=http://localhost/m/integration_master --dbtype=pgsql --dbname=integrationmaster --dbuser=postgres --dbpass=postgres --prefix=ee_ --fullname=Test --shortname=Test --adminpass=test --adminemail=admin@moodle.invalid --sitepreset=../tool/admin_presets/tests/fixtures/invalid_xml_file.xml --agree-license --non-interactive --allow-unstable
- Check the installation process finishes without errors.
- Open the config.php and check it contains $CFG->setsitepresetduringinstall = '../tool/admin_presets/tests/fixtures/invalid_xml_file.xml'.
- Login as admin.
- Go to "Site administration > Site admin presets".
- Check only 2 presets are displayed: "Starter" and "Full".
- Go to "Site administration > Plugins > Manage activities".
- Check, Chat, Database and Lesson are enabled.
Testing scenario 6. CLI install: Default installation (without --sitepreset)
- Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation:
sudo -u www-data php admin/cli/install.php --lang=en --wwwroot=http://localhost/m/integration_master --dbtype=pgsql --dbname=integrationmaster --dbuser=postgres --dbpass=postgres --prefix=ff_ --fullname=Test --shortname=Test --adminpass=test --adminemail=admin@moodle.invalid --agree-license --non-interactive --allow-unstable
- Check the installation process finishes without errors.
- Open the config.php and check it does NOT contain $CFG->setsitepresetduringinstall.
- Login as admin.
- Go to "Site administration > Site admin presets".
- Check the "Show version history" option is not displayed in the "Starter" nor the "Full" actions menu.
- Go to "Site administration > Advanced features".
- Check "Enable comments", "Enable tags functionality", "Enable notes", "Enable blogs", "Enable badges" and "Enable competencies" features are enabled.
- Go to "Site administration > Plugins > Manage activities".
- Check, at least, Chat, Database and Lesson are enabled.
Testing scenario 7. Manual install: Apply STARTER
- Edit the config.php file and change the following fields:
- $CFG->prefix = 'gg_';
- $CFG->setsitepresetduringinstall = 'starter';
- Go to the Moodle site and follow the installation process, pressing the "Continue" button, to installing manually your Moodle site.
- Once the installation process finishes and all the required forms are filled-out, go to "Site administration > Site admin presets".
- Check the "Show version history" option is displayed in the "Starter" actions menu.
- Go to "Site administration > Advanced features".
- Check "Enable comments", "Enable tags functionality", "Enable notes", "Enable blogs", "Enable badges" and "Enable competencies" features are disabled.
- Go to "Site administration > Plugins > Manage activities".
- Check, at least, Chat, Database and Lesson are disabled.
ShowIMPORTANT : As all these installations will be run against the same code and database, it's important to use a different dbprefix. The testing instructions have been written taking this into account (so this is just a warning in case you copy&paste the command without changing this value). Testing scenario 1. CLI install: Apply STARTER Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation: sudo -u www-data php admin/cli/install.php --lang=en --wwwroot=http: //localhost/m/integration_master --dbtype=pgsql --dbname=integrationmaster --dbuser=postgres --dbpass=postgres --prefix=aa_ --fullname=Test --shortname=Test --adminpass=test --adminemail=admin@moodle.invalid --sitepreset=starter --agree-license --non-interactive --allow-unstable Check the installation process finishes without errors. Open the config.php and check it contains $CFG->setsitepresetduringinstall = 'starter'. Login as admin. Go to "Site administration > Site admin presets". Check the "Show version history" option is displayed in the "Starter" actions menu. Go to "Site administration > Advanced features". Check "Enable comments", "Enable tags functionality", "Enable notes", "Enable blogs", "Enable badges" and "Enable competencies" features are disabled. Go to "Site administration > Plugins > Manage activities". Check , at least, Chat, Database and Lesson are disabled. Testing scenario 2. CLI install: Apply a non-existing preset Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation: sudo -u www-data php admin/cli/install.php --lang=en --wwwroot=http: //localhost/m/integration_master --dbtype=pgsql --dbname=integrationmaster --dbuser=postgres --dbpass=postgres --prefix=bb_ --fullname=Test --shortname=Test --adminpass=test --adminemail=admin@moodle.invalid --sitepreset=unexisting --agree-license --non-interactive --allow-unstable Check the installation process finishes without errors. Open the config.php and check it contains $CFG->setsitepresetduringinstall = 'unexisting'. Login as admin. Go to "Site administration > Site admin presets". Check the "Show version history" option is NOT displayed in the "Starter" actions menu. Go to "Site administration > Advanced features". Check all the settings have their default value. Go to "Site administration > Plugins > Manage activities". Check Chat, Database and Lesson are enabled. Testing scenario 3. CLI install: Import valid XML file Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation: sudo -u www-data php admin/cli/install.php --lang=en --wwwroot=http: //localhost/m/integration_master --dbtype=pgsql --dbname=integrationmaster --dbuser=postgres --dbpass=postgres --prefix=cc_ --fullname=Test --shortname=Test --adminpass=test --adminemail=admin@moodle.invalid --sitepreset=../tool/admin_presets/tests/fixtures/import_settings_plugins.xml --agree-license --non-interactive --allow-unstable Check the installation process finishes without errors. Open the config.php and check it contains $CFG->setsitepresetduringinstall = '../tool/admin_presets/tests/fixtures/import_settings_plugins.xml'. Login as admin. Go to "Site administration > Site admin presets". Check a 3 presets are displayed: "Starter", "Full" and "Imported preset". Check the "Show version history" option is displayed in the "Imported preset" actions menu. Go to "Site administration > Plugins > Manage activities". Check , Chat and Database are disabled and Lesson is enabled. Testing scenario 4. CLI install: Import unexisting XML file Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation: sudo -u www-data php admin/cli/install.php --lang=en --wwwroot=http: //localhost/m/integration_master --dbtype=pgsql --dbname=integrationmaster --dbuser=postgres --dbpass=postgres --prefix=dd_ --fullname=Test --shortname=Test --adminpass=test --adminemail=admin@moodle.invalid --sitepreset=../tool/admin_presets/tests/fixtures/xxxxx.xml --agree-license --non-interactive --allow-unstable Check the installation process finishes without errors (there are some warnings, but no errors). Open the config.php and check it contains $CFG->setsitepresetduringinstall = '../tool/admin_presets/tests/fixtures/xxxxx.xml'. Login as admin. Go to "Site administration > Site admin presets". Check only 2 presets are displayed: "Starter" and "Full". Go to "Site administration > Plugins > Manage activities". Check , Chat, Database and Lesson are enabled. Testing scenario 5. CLI install: Import invalid XML file Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation: sudo -u www-data php admin/cli/install.php --lang=en --wwwroot=http: //localhost/m/integration_master --dbtype=pgsql --dbname=integrationmaster --dbuser=postgres --dbpass=postgres --prefix=ee_ --fullname=Test --shortname=Test --adminpass=test --adminemail=admin@moodle.invalid --sitepreset=../tool/admin_presets/tests/fixtures/invalid_xml_file.xml --agree-license --non-interactive --allow-unstable Check the installation process finishes without errors. Open the config.php and check it contains $CFG->setsitepresetduringinstall = '../tool/admin_presets/tests/fixtures/invalid_xml_file.xml'. Login as admin. Go to "Site administration > Site admin presets". Check only 2 presets are displayed: "Starter" and "Full". Go to "Site administration > Plugins > Manage activities". Check , Chat, Database and Lesson are enabled. Testing scenario 6. CLI install: Default installation (without --sitepreset) Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation: sudo -u www-data php admin/cli/install.php --lang=en --wwwroot=http: //localhost/m/integration_master --dbtype=pgsql --dbname=integrationmaster --dbuser=postgres --dbpass=postgres --prefix=ff_ --fullname=Test --shortname=Test --adminpass=test --adminemail=admin@moodle.invalid --agree-license --non-interactive --allow-unstable Check the installation process finishes without errors. Open the config.php and check it does NOT contain $CFG->setsitepresetduringinstall. Login as admin. Go to "Site administration > Site admin presets". Check the "Show version history" option is not displayed in the "Starter" nor the "Full" actions menu. Go to "Site administration > Advanced features". Check "Enable comments", "Enable tags functionality", "Enable notes", "Enable blogs", "Enable badges" and "Enable competencies" features are enabled. Go to "Site administration > Plugins > Manage activities". Check , at least, Chat, Database and Lesson are enabled. Testing scenario 7. Manual install: Apply STARTER Edit the config.php file and change the following fields: $CFG->prefix = 'gg_'; $CFG->setsitepresetduringinstall = 'starter'; Go to the Moodle site and follow the installation process, pressing the "Continue" button, to installing manually your Moodle site. Once the installation process finishes and all the required forms are filled-out, go to "Site administration > Site admin presets". Check the "Show version history" option is displayed in the "Starter" actions menu. Go to "Site administration > Advanced features". Check "Enable comments", "Enable tags functionality", "Enable notes", "Enable blogs", "Enable badges" and "Enable competencies" features are disabled. Go to "Site administration > Plugins > Manage activities". Check , at least, Chat, Database and Lesson are disabled. - Open a terminal and run the following command. You'll probably need to modify some values, such as wwwroot, dbname, dbuser and dbpass to your local installation:
-
Moppies Kanban
Description
Add a mechanism, such as a setting $CFG in the config.php file, to let admins define the preset to be installed by default when the installer will be executed.
Attachments
- MDL-73145_test 1_3.webm
- 1.92 MB
- MDL-73145_test 2_3.webm
- 2.11 MB
- MDL-73145_test 3_3.webm
- 766 kB
- MDL-73145_test 4_3.webm
- 669 kB
- MDL-73145_test 5_1.png
- 113 kB
- MDL-73145_test 5_3.webm
- 677 kB
- MDL-73145_test 6_3.webm
- 2.11 MB
- MDL-73145_test 7_3.webm
- 2.56 MB
Issue Links
- blocks
-
MDL-73108 Let admins select default preset during installation
-
- Development in progress
-
- has a non-specific relationship to
-
MDL-73397 Move presets feature to core or core_adminpresets
-
- Closed
-
- has a QA test
-
MDLQA-16086 An admin can install Moodle using a predefined admin preset
-
- Open
-
-
MDLQA-16698 CLONE - An admin can install Moodle using a predefined admin preset
-
- Passed
-
- has been marked as being related by
-
MDL-73394 Store the latest site admin preset applied
-
- Closed
-
- is blocked by
-
MDL-72112 Integrate admin_presets third-party plugin in Moodle LMS
-
- Closed
-