Skip to content

Commit

Permalink
MDL-28325 Enrolment: added help to the duration, start date and end d…
Browse files Browse the repository at this point in the history
…ate setting

The patch also fixes one typo in enrol_manual detected while working on
this.
  • Loading branch information
mudrd8mz committed Jul 15, 2011
1 parent ecb8829 commit 94f630e
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion enrol/authorize/lang/en/enrol_authorize.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
$string['zipcode'] = 'Zip code';
$string['cost'] = 'Cost';
$string['currency'] = 'Currency';
$string['enrolperiod'] = 'Enrolment period';
$string['enrolperiod'] = 'Enrolment duration';
$string['enrolstartdate'] = 'Start date';
$string['enrolenddate'] = 'End date';
$string['enrolenddaterror'] = 'Enrolment end date cannot be earlier than start date';
Expand Down
1 change: 1 addition & 0 deletions enrol/manual/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function definition() {

$mform->addElement('duration', 'enrolperiod', get_string('defaultperiod', 'enrol_manual'), array('optional' => true, 'defaultunit' => 86400));
$mform->setDefault('enrolperiod', $plugin->get_config('enrolperiod'));
$mform->addHelpButton('enrolperiod', 'defaultperiod', 'enrol_manual');

if ($instance->id) {
$roles = get_default_enrol_roles($context, $instance->roleid);
Expand Down
7 changes: 4 additions & 3 deletions enrol/manual/lang/en/enrol_manual.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
$string['alterstatus'] = 'Alter status';
$string['altertimeend'] = 'Alter end time';
$string['altertimestart'] = 'Alter start time';
$string['assignrole'] = 'Assignrole';
$string['assignrole'] = 'Assign role';
$string['confirmbulkdeleteenrolment'] = 'Are you sure you want to delete these users enrolments?';
$string['defaultperiod'] = 'Default enrolment period';
$string['defaultperiod_desc'] = 'Default length of the default enrolment period setting (in seconds).'; //TODO: fixme
$string['defaultperiod'] = 'Default enrolment duration';
$string['defaultperiod_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['defaultperiod_help'] = 'Default length of time that the enrolment is valid, starting with the moment the user is enrolled. If disabled, the enrolment duration will be unlimited by default.';
$string['deleteselectedusers'] = 'Delete selected user enrolments';
$string['editenrolment'] = 'Edit enrolment';
$string['editselectedusers'] = 'Edit selected user enrolments';
Expand Down
5 changes: 3 additions & 2 deletions enrol/paypal/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ function definition() {

$mform->addElement('duration', 'enrolperiod', get_string('enrolperiod', 'enrol_paypal'), array('optional' => true, 'defaultunit' => 86400));
$mform->setDefault('enrolperiod', $plugin->get_config('enrolperiod'));

$mform->addHelpButton('enrolperiod', 'enrolperiod', 'enrol_paypal');

$mform->addElement('date_selector', 'enrolstartdate', get_string('enrolstartdate', 'enrol_paypal'), array('optional' => true));
$mform->setDefault('enrolstartdate', 0);

$mform->addHelpButton('enrolstartdate', 'enrolstartdate', 'enrol_paypal');

$mform->addElement('date_selector', 'enrolenddate', get_string('enrolenddate', 'enrol_paypal'), array('optional' => true));
$mform->setDefault('enrolenddate', 0);
$mform->addHelpButton('enrolenddate', 'enrolenddate', 'enrol_paypal');

$mform->addElement('hidden', 'id');
$mform->addElement('hidden', 'courseid');
Expand Down
7 changes: 5 additions & 2 deletions enrol/paypal/lang/en/enrol_paypal.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@
$string['defaultrole'] = 'Default role assignment';
$string['defaultrole_desc'] = 'Select role which should be assigned to users during PayPal enrolments';
$string['enrolenddate'] = 'End date';
$string['enrolenddate_help'] = 'If enabled, users can be enrolled until this date only.';
$string['enrolenddaterror'] = 'Enrolment end date cannot be earlier than start date';
$string['enrolperiod'] = 'Enrolment period';
$string['enrolperiod_desc'] = 'Default length of the enrolment period (in seconds).'; //TODO: fixme
$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_help'] = 'Length of time that the enrolment is valid, starting with the moment the user is enrolled. If disabled, the enrolment duration will be unlimited.';
$string['enrolstartdate'] = 'Start date';
$string['enrolstartdate_help'] = 'If enabled, users can be enrolled from this date onward only.';
$string['mailadmins'] = 'Notify admin';
$string['mailstudents'] = 'Notify students';
$string['mailteachers'] = 'Notify teachers';
Expand Down
3 changes: 3 additions & 0 deletions enrol/self/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,15 @@ function definition() {

$mform->addElement('duration', 'enrolperiod', get_string('enrolperiod', 'enrol_self'), array('optional' => true, 'defaultunit' => 86400));
$mform->setDefault('enrolperiod', $plugin->get_config('enrolperiod'));
$mform->addHelpButton('enrolperiod', 'enrolperiod', 'enrol_self');

$mform->addElement('date_selector', 'enrolstartdate', get_string('enrolstartdate', 'enrol_self'), array('optional' => true));
$mform->setDefault('enrolstartdate', 0);
$mform->addHelpButton('enrolstartdate', 'enrolstartdate', 'enrol_self');

$mform->addElement('date_selector', 'enrolenddate', get_string('enrolenddate', 'enrol_self'), array('optional' => true));
$mform->setDefault('enrolenddate', 0);
$mform->addHelpButton('enrolenddate', 'enrolenddate', 'enrol_self');

$options = array(0 => get_string('never'),
1800 * 3600 * 24 => get_string('numdays', '', 1800),
Expand Down
7 changes: 5 additions & 2 deletions enrol/self/lang/en/enrol_self.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@
$string['defaultrole_desc'] = 'Select role which should be assigned to users during self enrolment';
$string['editenrolment'] = 'Edit enrolment';
$string['enrolenddate'] = 'End date';
$string['enrolenddate_help'] = 'If enabled, users can enrol themselves until this date only.';
$string['enrolenddaterror'] = 'Enrolment end date cannot be earlier than start date';
$string['enrolme'] = 'Enrol me';
$string['enrolperiod'] = 'Enrolment period';
$string['enrolperiod_desc'] = 'Default length of the enrolment period (in seconds).'; //TODO: fixme
$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_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.';
$string['groupkey'] = 'Use group enrolment keys';
$string['groupkey_desc'] = 'Use group enrolment keys by default.';
$string['groupkey_help'] = 'In addition to restricting access to the course to only those who know the key, use of a group enrolment key means users are automatically added to the group when they enrol in the course.
Expand Down

0 comments on commit 94f630e

Please sign in to comment.