From 4aef64f85fab3078d530a402fb4838cdf9d3898d Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Tue, 22 Aug 2017 13:06:09 +0800 Subject: [PATCH] MDL-59770 registration: correct mistype AMOS BEGIN MOV [mobilenotificacionsenabled,core_hub],[mobilenotificationsenabled,core_hub] AMOS END --- admin/registration/forms.php | 18 +++++++++--------- admin/registration/lib.php | 4 ++-- admin/registration/register.php | 6 +++--- lang/en/hub.php | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/admin/registration/forms.php b/admin/registration/forms.php index 4cb0e40e927..0d708799f1e 100644 --- a/admin/registration/forms.php +++ b/admin/registration/forms.php @@ -257,7 +257,7 @@ class site_registration_form extends moodleform { $modulenumberaveragecfg = get_config('hub', 'site_modulenumberaverage_' . $cleanhuburl); // Mobile related information. $mobileservicesenabled = get_config('hub', 'site_mobileservicesenabled_' . $cleanhuburl); - $mobilenotificacionsenabled = get_config('hub', 'site_mobilenotificacionsenabled_' . $cleanhuburl); + $mobilenotificationsenabled = get_config('hub', 'site_mobilenotificationsenabled_' . $cleanhuburl); $registereduserdevices = get_config('hub', 'site_registereduserdevices_' . $cleanhuburl); $registeredactiveuserdevices = get_config('hub', 'site_registeredactiveuserdevices_' . $cleanhuburl); @@ -474,10 +474,10 @@ class site_registration_form extends moodleform { $mform->setType('mobileservicesenabled', PARAM_INT); $mobilenotificationsstatus = $aremobilenotificationsenabled ? 'yes' : 'no'; - $mform->addElement('checkbox', 'mobilenotificacionsenabled', '', - " " . get_string('mobilenotificacionsenabled', 'hub', $mobilenotificationsstatus)); - $mform->setDefault('mobilenotificacionsenabled', $mobilenotificacionsenabled != -1); - $mform->setType('mobilenotificacionsenabled', PARAM_INT); + $mform->addElement('checkbox', 'mobilenotificationsenabled', '', + " " . get_string('mobilenotificationsenabled', 'hub', $mobilenotificationsstatus)); + $mform->setDefault('mobilenotificationsenabled', $mobilenotificationsenabled != -1); + $mform->setType('mobilenotificationsenabled', PARAM_INT); $mform->addElement('checkbox', 'registereduserdevices', '', " " . get_string('registereduserdevices', 'hub', $registereduserdevicescount)); @@ -547,10 +547,10 @@ class site_registration_form extends moodleform { $mform->setType('mobileservicesenabled', PARAM_INT); $mobilenotificationsstatus = $aremobilenotificationsenabled ? 'yes' : 'no'; - $mform->addElement('static', 'mobilenotificacionsenabledlabel', '', - " " . get_string('mobilenotificacionsenabled', 'hub', $mobilenotificationsstatus)); - $mform->addElement('hidden', 'mobilenotificacionsenabled', 1); - $mform->setType('mobilenotificacionsenabled', PARAM_INT); + $mform->addElement('static', 'mobilenotificationsenabledlabel', '', + " " . get_string('mobilenotificationsenabled', 'hub', $mobilenotificationsstatus)); + $mform->addElement('hidden', 'mobilenotificationsenabled', 1); + $mform->setType('mobilenotificationsenabled', PARAM_INT); $mform->addElement('static', 'registereduserdeviceslabel', '', " " . get_string('registereduserdevices', 'hub', $registereduserdevicescount)); diff --git a/admin/registration/lib.php b/admin/registration/lib.php index 1e48bc8b46b..8d1f8dbb23e 100644 --- a/admin/registration/lib.php +++ b/admin/registration/lib.php @@ -282,7 +282,7 @@ class registration_manager { $siteinfo['url'] = $CFG->wwwroot; // Mobile related information. $siteinfo['mobileservicesenabled'] = 0; - $siteinfo['mobilenotificacionsenabled'] = 0; + $siteinfo['mobilenotificationsenabled'] = 0; $siteinfo['registereduserdevices'] = 0; $siteinfo['registeredactiveuserdevices'] = 0; if (!empty($CFG->enablewebservices) && !empty($CFG->enablemobilewebservice)) { @@ -291,7 +291,7 @@ class registration_manager { $airnotifierextpath = $CFG->dirroot . '/message/output/airnotifier/externallib.php'; if (file_exists($airnotifierextpath)) { // Maybe some one uninstalled the plugin. require_once($airnotifierextpath); - $siteinfo['mobilenotificacionsenabled'] = message_airnotifier_external::is_system_configured(); + $siteinfo['mobilenotificationsenabled'] = message_airnotifier_external::is_system_configured(); $siteinfo['registeredactiveuserdevices'] = $DB->count_records('message_airnotifier_devices', array('enable' => 1)); } } diff --git a/admin/registration/register.php b/admin/registration/register.php index 43d2e42ebf2..2b7cf968b58 100644 --- a/admin/registration/register.php +++ b/admin/registration/register.php @@ -69,7 +69,7 @@ if (!empty($fromform) and confirm_sesskey()) { // The function get_site_info() will not calculate the optional data if config is set to -1. $inputnames = array('courses', 'users', 'roleassignments', 'posts', 'questions', 'resources', 'badges', 'issuedbadges', 'modulenumberaverage', 'participantnumberaverage', - 'mobileservicesenabled', 'mobilenotificacionsenabled', 'registereduserdevices', 'registeredactiveuserdevices'); + 'mobileservicesenabled', 'mobilenotificationsenabled', 'registereduserdevices', 'registeredactiveuserdevices'); foreach ($inputnames as $inputname) { if (empty($fromform->{$inputname})) { $fromform->{$inputname} = -1; @@ -103,7 +103,7 @@ if (!empty($fromform) and confirm_sesskey()) { set_config('site_modulenumberaverage_' . $cleanhuburl, $fromform->modulenumberaverage, 'hub'); set_config('site_participantnumberaverage_' . $cleanhuburl, $fromform->participantnumberaverage, 'hub'); set_config('site_mobileservicesenabled_' . $cleanhuburl, $fromform->mobileservicesenabled, 'hub'); - set_config('site_mobilenotificacionsenabled_' . $cleanhuburl, $fromform->mobilenotificacionsenabled, 'hub'); + set_config('site_mobilenotificationsenabled_' . $cleanhuburl, $fromform->mobilenotificationsenabled, 'hub'); set_config('site_registereduserdevices_' . $cleanhuburl, $fromform->registereduserdevices, 'hub'); set_config('site_registeredactiveuserdevices_' . $cleanhuburl, $fromform->registeredactiveuserdevices, 'hub'); } @@ -149,7 +149,7 @@ if (!empty($fromform) and empty($update) and confirm_sesskey()) { $fromform->participantnumberaverage = $siteinfo['participantnumberaverage']; $fromform->street = $siteinfo['street']; $fromform->mobileservicesenabled = $siteinfo['mobileservicesenabled']; - $fromform->mobilenotificacionsenabled = $siteinfo['mobilenotificacionsenabled']; + $fromform->mobilenotificationsenabled = $siteinfo['mobilenotificationsenabled']; $fromform->registereduserdevices = $siteinfo['registereduserdevices']; $fromform->registeredactiveuserdevices = $siteinfo['registeredactiveuserdevices']; diff --git a/lang/en/hub.php b/lang/en/hub.php index 0d168b8a3cb..e179229d9d5 100644 --- a/lang/en/hub.php +++ b/lang/en/hub.php @@ -117,7 +117,7 @@ $string['licence'] = 'Licence'; $string['licence_help'] = 'Select the licence you want to distribute your course under.'; $string['licence_link'] = 'licenses'; $string['logourl'] = 'Logo URL'; -$string['mobilenotificacionsenabled'] = 'Mobile notifications enabled ({$a})'; +$string['mobilenotificationsenabled'] = 'Mobile notifications enabled ({$a})'; $string['mobileservicesenabled'] = 'Mobile services enabled ({$a})'; $string['modulenumberaverage'] = 'Average number of course modules ({$a})'; $string['moodleorg'] = 'Moodle';