mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 04:33:13 +01:00
Merge branch 'wip-MDL-59770-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
72086f77f1
@ -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));
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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'];
|
||||
|
||||
|
@ -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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user