MDL-34853 use new duration setting type in enrol_self
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
38257347ed
commit
0bf660cad6
@@ -39,7 +39,7 @@ $string['enrolenddate_help'] = 'If enabled, users can enrol themselves until thi
|
||||
$string['enrolenddaterror'] = 'Enrolment end date cannot be earlier than start date';
|
||||
$string['enrolme'] = 'Enrol me';
|
||||
$string['enrolperiod'] = 'Enrolment duration';
|
||||
$string['enrolperiod_desc'] = 'Default length of time that the enrolment is valid (in seconds). If set to zero, the enrolment duration will be unlimited by default.';
|
||||
$string['enrolperiod_desc'] = 'Default length of time that the enrolment is valid. If set to zero, the enrolment duration will be unlimited by default.';
|
||||
$string['enrolperiod_help'] = 'Length of time that the enrolment is valid, starting with the moment the user enrols themselves. If disabled, the enrolment duration will be unlimited.';
|
||||
$string['enrolstartdate'] = 'Start date';
|
||||
$string['enrolstartdate_help'] = 'If enabled, users can enrol themselves from this date onward only.';
|
||||
|
||||
@@ -65,8 +65,8 @@ if ($ADMIN->fulltree) {
|
||||
get_string('defaultrole', 'enrol_self'), get_string('defaultrole_desc', 'enrol_self'), $student->id, $options));
|
||||
}
|
||||
|
||||
$settings->add(new admin_setting_configtext('enrol_self/enrolperiod',
|
||||
get_string('enrolperiod', 'enrol_self'), get_string('enrolperiod_desc', 'enrol_self'), 0, PARAM_INT));
|
||||
$settings->add(new admin_setting_configduration('enrol_self/enrolperiod',
|
||||
get_string('enrolperiod', 'enrol_self'), get_string('enrolperiod_desc', 'enrol_self'), 0));
|
||||
|
||||
$options = array(0 => get_string('never'),
|
||||
1800 * 3600 * 24 => get_string('numdays', '', 1800),
|
||||
|
||||
Reference in New Issue
Block a user