diff --git a/classes/models/outage.php b/classes/models/outage.php index ebc2894..5b0b8d9 100644 --- a/classes/models/outage.php +++ b/classes/models/outage.php @@ -141,11 +141,13 @@ class outage { return str_replace( [ '{{start}}', - '{{stop}}' + '{{stop}}', + '{{duration}}', ], [ userdate($this->starttime, get_string('datetimeformat', 'auth_outage')), userdate($this->stoptime, get_string('datetimeformat', 'auth_outage')), + format_time($this->get_duration()), ], $str ); diff --git a/lang/en/auth_outage.php b/lang/en/auth_outage.php index 68a95d9..0a25870 100644 --- a/lang/en/auth_outage.php +++ b/lang/en/auth_outage.php @@ -33,7 +33,7 @@ $string['defaultwarningduration'] = 'Warning Duration'; $string['defaultwarningdurationdescription'] = 'Default warning time (in minutes) for outages.'; $string['defaultwarningtitle'] = 'Title'; $string['defaultwarningtitledescription'] = 'Default title for outages. Use {{start}} and {{stop}} placeholders as required.'; -$string['defaultwarningtitlevalue'] = 'System down from {{start}} to {{stop}}.'; +$string['defaultwarningtitlevalue'] = 'System down from {{start}} for {{duration}}.'; $string['defaultwarningdescription'] = 'Description'; $string['defaultwarningdescriptiondescription'] = 'Default warning message for outages. Use {{start}} and {{stop}} placeholders as required.'; $string['defaultwarningdescriptionvalue'] = 'There is an scheduled maintenance from {{start}} to {{stop}} and our system will not be available during that time.';