Skip to content

Commit 470c67f

Browse files
authored
Merge pull request #281 from ArloSoftware/ARLO-78
ARLO-78: Adding setting and default value
2 parents 459cf65 + 69ea68c commit 470c67f

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

lang/en/enrol_arlo.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
$string['apipassword_desc'] = 'Forgot your password? <a title="{$a->title}" href="{$a->url}" target="_blank">Learn how to reset it.</a>';
5656
$string['arloauthconfig'] = 'Arlo authentication method';
5757
$string['arloauthconfig_desc'] = 'Select the authentication method to use for Arlo enrolments.';
58+
$string['enable_arlo_auth_config'] = 'Enable Arlo authentication configuration';
59+
$string['enable_arlo_auth_config_desc'] = 'Show options for selecting the authentication method used for Arlo enrolments and its password handling.';
5860
$string['arloconnection'] = 'Arlo connection';
5961
$string['arlosettings'] = 'Arlo settings';
6062
$string['arlocontact'] = 'Arlo contact';

settings.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@
176176
get_string('webhookstatus', 'enrol_arlo'),
177177
new moodle_url('/enrol/arlo/admin/webhook_status.php')));
178178

179+
$name = get_string('enable_arlo_auth_config', 'enrol_arlo');
180+
$description = get_string('enable_arlo_auth_config_desc', 'enrol_arlo');
181+
$settings->add(new admin_setting_configcheckbox('enable_arlo_auth_config', $name, $description, 0));
182+
179183
if (!empty($CFG->enable_arlo_auth_config)) {
180184
$name = get_string('arloauthconfig', 'enrol_arlo');
181185
$description = get_string('arloauthconfig_desc', 'enrol_arlo');
@@ -190,7 +194,7 @@
190194
// Some auth methods doesn't use a password inside Moodle, so it may be better to disable the force password change feature.
191195
$name = get_string('disableforcepasswordchange', 'enrol_arlo');
192196
$description = get_string('disableforcepasswordchange_desc', 'enrol_arlo');
193-
$settings->add(new admin_setting_configcheckbox('enrol_arlo/disableforcepasswordchange', $name, $description, 0));
197+
$settings->add(new admin_setting_configcheckbox('enrol_arlo/disableforcepasswordchange', $name, $description, 1));
194198
}
195199
$settings = null;
196200
}

0 commit comments

Comments
 (0)