Permalink
Browse files

MDL-28325 Enrolment: added help to the duration, start date and end d…

…ate setting

The patch also fixes one typo in enrol_manual detected while working on
this.
  • Loading branch information...
1 parent c015236 commit bf9f318ead6d1fd6194dad1ef51e330c716b36ba @mudrd8mz mudrd8mz committed Jul 13, 2011
@@ -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';
@@ -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);
@@ -24,9 +24,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$string['assignrole'] = 'Assignrole';
-$string['defaultperiod'] = 'Default enrolment period';
-$string['defaultperiod_desc'] = 'Default length of the default enrolment period setting (in seconds).'; //TODO: fixme
+$string['assignrole'] = 'Assign role';
+$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['enrolledincourserole'] = 'Enrolled in "{$a->course}" as "{$a->role}"';
$string['enrolusers'] = 'Enrol users';
$string['manual:config'] = 'Configure manual enrol instances';
@@ -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');
@@ -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';
View
@@ -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),
@@ -28,11 +28,14 @@
$string['defaultrole'] = 'Default role assignment';
$string['defaultrole_desc'] = 'Select role which should be assigned to users during self 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.

0 comments on commit bf9f318

Please sign in to comment.