diff --git a/lang/en/deprecated.txt b/lang/en/deprecated.txt index b934616128d..8b27ec06d72 100644 --- a/lang/en/deprecated.txt +++ b/lang/en/deprecated.txt @@ -116,3 +116,7 @@ coursecalendar,core_calendar importcalendarexternal,core_calendar nocalendarsubscriptions,core_calendar datechanged,core +siteregistrationcontact,core_hub +siteregistrationcontact_help,core_hub +registrationcontactno,core +registrationcontactyes,core \ No newline at end of file diff --git a/lang/en/hub.php b/lang/en/hub.php index 424a0c57b86..a82ad1af2fc 100644 --- a/lang/en/hub.php +++ b/lang/en/hub.php @@ -150,8 +150,6 @@ $string['siteprivacy_help'] = 'You can choose to have your site listed publicly $string['siteprivacynotpublished'] = 'Do not list my site'; $string['siteprivacypublished'] = 'Only display my site name'; $string['siteprivacylinked'] = 'Display my site name with the link'; -$string['siteregistrationcontact'] = 'Display contact form'; -$string['siteregistrationcontact_help'] = 'If you allow it, other people in our Moodle community (who need a login account) can contact you via a form on our Moodle community site. However, they will never be able to see your email address.'; $string['siteregistrationemail'] = 'Notifications of new Moodle releases, security alerts and other important news'; $string['siteregistrationemail_help'] = 'You have the option of subscribing to our low-volume mailing list for notifications of new Moodle releases, security alerts and other important news. You may unsubscribe at any time.'; $string['siteregistrationupdated'] = 'Site registration updated'; @@ -178,3 +176,7 @@ $string['wrongtoken'] = 'The registration failed for some unknown reason (networ // Deprecate since 3.11. $string['sitecommnewsno'] = 'No, I do not wish to receive any emails'; + +// Deprecated since 4.5. +$string['siteregistrationcontact'] = 'Display contact form'; +$string['siteregistrationcontact_help'] = 'If you allow it, other people in our Moodle community (who need a login account) can contact you via a form on our Moodle community site. However, they will never be able to see your email address.'; diff --git a/lang/en/moodle.php b/lang/en/moodle.php index c06715f3c50..25c58bd59f3 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -1816,8 +1816,6 @@ $string['refresh'] = 'Refresh'; $string['refreshingevents'] = 'Refreshing events'; $string['registration'] = 'Moodle registration'; $string['registrationcontact'] = 'Contact from the public'; -$string['registrationcontactno'] = 'No, I do not want to be contacted by other people'; -$string['registrationcontactyes'] = 'Yes, provide a form for other Moodlers to contact me'; $string['registrationemail'] = 'Email notifications'; $string['registrationinfo'] = '

This page allows you to register your Moodle site with moodle.org. Registration is free. The main benefit of registering is that you will be added to a low-volume mailing list @@ -2522,3 +2520,5 @@ $string['coursesearch_help'] = 'You can search for multiple words at once and ca // Deprecated since Moodle 4.5. $string['datechanged'] = 'Date changed'; +$string['registrationcontactno'] = 'No, I do not want to be contacted by other people'; +$string['registrationcontactyes'] = 'Yes, provide a form for other Moodlers to contact me'; diff --git a/lib/classes/hub/registration.php b/lib/classes/hub/registration.php index 6a301fa6315..0b1cc88037d 100644 --- a/lib/classes/hub/registration.php +++ b/lib/classes/hub/registration.php @@ -43,7 +43,7 @@ class registration { /** @var array Fields used in a site registration form. * IMPORTANT: any new fields with non-empty defaults have to be added to CONFIRM_NEW_FIELDS */ const FORM_FIELDS = ['policyagreed', 'language', 'countrycode', 'privacy', - 'contactemail', 'contactable', 'emailalert', 'emailalertemail', 'commnews', 'commnewsemail', + 'contactemail', 'emailalert', 'emailalertemail', 'commnews', 'commnewsemail', 'contactname', 'name', 'description', 'imageurl', 'contactphone', 'regioncode', 'geolocation', 'street']; /** @var array List of new FORM_FIELDS or siteinfo fields added indexed by the version when they were added. diff --git a/lib/classes/hub/site_registration_form.php b/lib/classes/hub/site_registration_form.php index e8b667e79b6..74ccb47b882 100644 --- a/lib/classes/hub/site_registration_form.php +++ b/lib/classes/hub/site_registration_form.php @@ -129,15 +129,6 @@ class site_registration_form extends \moodleform { $mform->setType('contactemail', PARAM_EMAIL); $mform->addHelpButton('contactemail', 'siteemail', 'hub'); - $options = array(); - $options[0] = get_string("registrationcontactno"); - $options[1] = get_string("registrationcontactyes"); - $mform->addElement('select', 'contactable', get_string('siteregistrationcontact', 'hub'), $options); - $mform->setType('contactable', PARAM_INT); - $mform->addHelpButton('contactable', 'siteregistrationcontact', 'hub'); - $mform->hideIf('contactable', 'privacy', 'eq', registration::HUB_SITENOTPUBLISHED); - unset($options); - $this->add_checkbox_with_email('emailalert', 'siteregistrationemail', false, get_string('registrationyes')); $this->add_checkbox_with_email( @@ -300,8 +291,6 @@ class site_registration_form extends \moodleform { $data->commnewsemail = null; } unset($data->commnewsnewemail); - // Always return 'contactable'. - $data->contactable = empty($data->contactable) ? 0 : 1; if (debugging('', DEBUG_DEVELOPER)) { // Display debugging message for developers who added fields to the form and forgot to add them to registration::FORM_FIELDS. diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 22b4c9bdb8d..423bab7b684 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1167,6 +1167,14 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2024041200.00); } + if ($oldversion < 2024070500.01) { + // Remove the site_contactable config of the hub plugin from config plugin table. + unset_config('site_contactable', 'hub'); + + // Main savepoint reached. + upgrade_main_savepoint(true, 2024070500.01); + } + // Automatically generated Moodle v4.4.0 release upgrade line. // Put any upgrade step following this. diff --git a/version.php b/version.php index 95c817a0cc3..544e8680d14 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2024070500.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2024070500.01; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes. $release = '4.5dev (Build: 20240705)'; // Human-friendly version name