String improvements for date range element
Also added a help button to reduce the wall of text.
This commit is contained in:
parent
7611196fa3
commit
7756d928ac
2 changed files with 15 additions and 13 deletions
|
@ -178,6 +178,7 @@ class element extends \mod_customcert\element {
|
||||||
$rangeoptions['startdate']['type'] = PARAM_INT;
|
$rangeoptions['startdate']['type'] = PARAM_INT;
|
||||||
$rangeoptions['enddate']['type'] = PARAM_INT;
|
$rangeoptions['enddate']['type'] = PARAM_INT;
|
||||||
$rangeoptions['recurring']['type'] = PARAM_INT;
|
$rangeoptions['recurring']['type'] = PARAM_INT;
|
||||||
|
$rangeoptions['recurring']['helpbutton'] = ['recurring', 'customcertelement_daterange'];
|
||||||
$rangeoptions['datestring']['type'] = PARAM_NOTAGS;
|
$rangeoptions['datestring']['type'] = PARAM_NOTAGS;
|
||||||
$rangeoptions['rangedelete']['type'] = PARAM_BOOL;
|
$rangeoptions['rangedelete']['type'] = PARAM_BOOL;
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
|
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
|
||||||
|
|
||||||
|
$string['addrange'] = 'Add another range';
|
||||||
$string['completiondate'] = 'Completion date';
|
$string['completiondate'] = 'Completion date';
|
||||||
$string['courseenddate'] = 'Course end date';
|
$string['courseenddate'] = 'Course end date';
|
||||||
$string['coursegradedate'] = 'Course grade date';
|
$string['coursegradedate'] = 'Course grade date';
|
||||||
|
@ -31,21 +32,21 @@ $string['coursestartdate'] = 'Course start date';
|
||||||
$string['dateitem'] = 'Date item';
|
$string['dateitem'] = 'Date item';
|
||||||
$string['dateitem_help'] = 'This will be the date that is printed on the certificate';
|
$string['dateitem_help'] = 'This will be the date that is printed on the certificate';
|
||||||
$string['dateranges'] = 'Date ranges';
|
$string['dateranges'] = 'Date ranges';
|
||||||
|
$string['datestring'] = 'String';
|
||||||
|
$string['end'] = 'End';
|
||||||
|
$string['error:atleastone'] = 'You must have at least one date range configured';
|
||||||
|
$string['error:datestring'] = 'You must provide string representation for the date range';
|
||||||
|
$string['error:enddate'] = 'End date must occur after the start date';
|
||||||
|
$string['error:recurring'] = 'Recurring range must not be longer than 12 months';
|
||||||
$string['fallbackstring'] = 'Fallback string';
|
$string['fallbackstring'] = 'Fallback string';
|
||||||
$string['fallbackstring_help'] = 'This string will be displayed if no date range applies to a date. If the fallback string is not set, then there will be no output at all.';
|
$string['fallbackstring_help'] = 'This string will be displayed if no date range applies to a date. If the fallback string is not set, then there will be no output at all.';
|
||||||
$string['help'] = 'Configure a string representation for each date range. Make sure your ranges do not overlap, otherwise the first matched date range will be applied. If no date range matches then the fallback string will be displayed (if it is set).<br/><br /> If you mark a date range as recurring, then the configured year will not be considered.';
|
$string['help'] = 'Configure a string representation for your date ranges.<br /><br />If your ranges overlap the first matched date range will be applied.';
|
||||||
$string['placeholders'] = 'The following placeholders can be used in the string representation or fallback string. <br/><br /> {{range_first_year}} - first year of the matched range,<br/> {{range_last_year}} - last year of the matched range,<br/> {{recurring_range_first_year}} - first year of the matched recurring period,<br/> {{recurring_range_last_year}} - last year of the matched recurring period,<br/> {{current_year}} - the current year,<br/> {{date_year}} - a year of the users\'s date.';
|
|
||||||
$string['issueddate'] = 'Issued date';
|
$string['issueddate'] = 'Issued date';
|
||||||
|
$string['placeholders'] = 'The following placeholders can be used in the string representation or fallback string. <br/><br /> {{range_first_year}} - first year of the matched range,<br/> {{range_last_year}} - last year of the matched range,<br/> {{recurring_range_first_year}} - first year of the matched recurring period,<br/> {{recurring_range_last_year}} - last year of the matched recurring period,<br/> {{current_year}} - the current year,<br/> {{date_year}} - a year of the users\'s date.';
|
||||||
$string['pluginname'] = 'Date range';
|
$string['pluginname'] = 'Date range';
|
||||||
$string['privacy:metadata'] = 'The Date range plugin does not store any personal data.';
|
|
||||||
$string['start'] = 'Start';
|
|
||||||
$string['end'] = 'End';
|
|
||||||
$string['datestring'] = 'String';
|
|
||||||
$string['error:atleastone'] = 'You must have at least one date range configured';
|
|
||||||
$string['error:datestring'] = 'You must provide string representation for the datarange';
|
|
||||||
$string['error:enddate'] = 'End date must be after Start date';
|
|
||||||
$string['error:recurring'] = 'Recurring range must not be longer than 12 months';
|
|
||||||
$string['preview'] = 'Preview {$a}';
|
$string['preview'] = 'Preview {$a}';
|
||||||
$string['recurring'] = 'Recurring?';
|
$string['privacy:metadata'] = 'The Date range plugin does not store any personal data.';
|
||||||
$string['setdeleted'] = 'Delete?';
|
$string['recurring'] = 'Recurring';
|
||||||
$string['addrange'] = 'Add another range';
|
$string['recurring_help'] = 'If you mark a date range as recurring then the configured year will not be considered.';
|
||||||
|
$string['setdeleted'] = 'Delete';
|
||||||
|
$string['start'] = 'Start';
|
||||||
|
|
Loading…
Reference in a new issue