diff --git a/public/admin/presets/classes/helper.php b/public/admin/presets/classes/helper.php index 5b384c8eed0..7dcfd088de6 100644 --- a/public/admin/presets/classes/helper.php +++ b/public/admin/presets/classes/helper.php @@ -288,7 +288,7 @@ class helper { static::add_item($presetid, 'pushcourseratingstouserplans', '1', 'core_competency'); static::add_item($presetid, 'showdataretentionsummary', '1', 'tool_dataprivacy'); static::add_item($presetid, 'forum_maxattachments', '9'); - static::add_item($presetid, 'guestloginbutton', '1'); + static::add_item($presetid, 'guestloginbutton', '0'); // Modules: Enable database, external tool (lti), IMS content package (imscp), lesson, SCORM, wiki, workshop. static::add_plugin($presetid, 'mod', 'data', true); diff --git a/public/admin/settings/plugins.php b/public/admin/settings/plugins.php index 60f43d86f50..1cb0c621500 100644 --- a/public/admin/settings/plugins.php +++ b/public/admin/settings/plugins.php @@ -122,8 +122,13 @@ if ($hassiteconfig) { new lang_string('allowaccountssameemail_desc', 'core_auth'), 0)); $temp->add(new admin_setting_configcheckbox('authpreventaccountcreation', new lang_string('authpreventaccountcreation', 'admin'), new lang_string('authpreventaccountcreation_help', 'admin'), 0)); $temp->add(new admin_setting_configcheckbox('loginpageautofocus', new lang_string('loginpageautofocus', 'admin'), new lang_string('loginpageautofocus_help', 'admin'), 0)); - $temp->add(new admin_setting_configselect('guestloginbutton', new lang_string('guestloginbutton', 'auth'), - new lang_string('showguestlogin', 'auth'), '1', array('0'=>new lang_string('hide'), '1'=>new lang_string('show')))); + $temp->add(new admin_setting_configselect( + 'guestloginbutton', + new lang_string('guestloginbutton', 'auth'), + new lang_string('showguestlogin', 'auth'), + '0', + [ 0 => new lang_string('hide'), 1 => new lang_string('show')], + )); $options = array(0 => get_string('no'), 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 10 => 10, 20 => 20, 50 => 50); $temp->add(new admin_setting_configselect('limitconcurrentlogins', new lang_string('limitconcurrentlogins', 'core_auth'), diff --git a/public/admin/tool/admin_presets/tests/behat/apply_presets.feature b/public/admin/tool/admin_presets/tests/behat/apply_presets.feature index cdfc81e37ea..035371e28b8 100644 --- a/public/admin/tool/admin_presets/tests/behat/apply_presets.feature +++ b/public/admin/tool/admin_presets/tests/behat/apply_presets.feature @@ -56,7 +56,6 @@ Feature: I can apply presets And I should see "Flickr" in the "Setting changes" "table" And I should see "Global search" in the "Setting changes" "table" And I should see "Guest access" in the "Setting changes" "table" - And I should see "Guest login button" in the "Setting changes" "table" And I should see "IMS content package" in the "Setting changes" "table" And I should see "Immediate feedback with CBM" in the "Setting changes" "table" And I should see "Latest badges" in the "Setting changes" "table" diff --git a/public/admin/tool/policy/tests/behat/consent.feature b/public/admin/tool/policy/tests/behat/consent.feature index 03bddedcdc9..04f5b1136b0 100644 --- a/public/admin/tool/policy/tests/behat/consent.feature +++ b/public/admin/tool/policy/tests/behat/consent.feature @@ -451,6 +451,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | registerauth | email | | passwordpolicy | 0 | | sitepolicyhandler | tool_policy | + | guestloginbutton | 1 | And the following policies exist: | Name | Type | Revision | Content | Summary | Status | Audience | | This site policy | 0 | | full text2 | short text2 | active | all | @@ -612,6 +613,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | registerauth | email | | passwordpolicy | 0 | | sitepolicyhandler | tool_policy | + | guestloginbutton | 1 | Given the following policies exist: | Policy | Name | Revision | Content | Summary | Status | | P1 | This site policy | | full text1 | short text1 | archived | diff --git a/public/enrol/self/tests/behat/self_enrolment.feature b/public/enrol/self/tests/behat/self_enrolment.feature index e4afaada48d..09ee584699a 100644 --- a/public/enrol/self/tests/behat/self_enrolment.feature +++ b/public/enrol/self/tests/behat/self_enrolment.feature @@ -21,7 +21,9 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe # test use of the singleselect functionality. @javascript Scenario: Self-enrolment enabled as guest - Given I log in as "teacher1" + Given the following config values are set as admin: + | guestloginbutton | 1 | + And I log in as "teacher1" And I add "Self enrolment" enrolment method in "Course 1" with: | Custom instance name | Test student enrolment | And I log out diff --git a/public/mod/forum/tests/behat/guest_users.feature b/public/mod/forum/tests/behat/guest_users.feature index 468e99733ae..f19be705fba 100644 --- a/public/mod/forum/tests/behat/guest_users.feature +++ b/public/mod/forum/tests/behat/guest_users.feature @@ -7,6 +7,7 @@ Feature: Guest and not logged users could see the option to add new post or repl Background: Given the following config values are set as admin: | enrol_guest | Yes | + | guestloginbutton | 1 | And the following "users" exist: | username | firstname | lastname | email | | teacher | Teacher | 1 | teacher@example.com |