mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-41248 completion: fix non-translatable text.
There were two hard-coded strings. Thanks to Guido Hornig for the suggested fix.
This commit is contained in:
parent
76e4de31cc
commit
8d3debf360
@ -165,7 +165,7 @@ class completion_criteria_duration extends completion_criteria {
|
||||
* @return string
|
||||
*/
|
||||
public function get_title_detailed() {
|
||||
return ceil($this->enrolperiod / (60 * 60 * 24)) . ' days';
|
||||
return get_string('xdays', 'completion', ceil($this->enrolperiod / (60 * 60 * 24)));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -190,7 +190,8 @@ class completion_criteria_duration extends completion_criteria {
|
||||
|
||||
$daysleft = ceil($timeleft / (60 * 60 * 24));
|
||||
|
||||
return ($daysleft > 0 ? $daysleft : 0).' of '.$enrolperiod;
|
||||
return get_string('daysoftotal', 'completion', array(
|
||||
'days' => $daysleft > 0 ? $daysleft : 0, 'total' => $enrolperiod));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -111,6 +111,7 @@ $string['criteriarequiredany'] = 'Any criteria below are required';
|
||||
$string['csvdownload'] = 'Download in spreadsheet format (UTF-8 .csv)';
|
||||
$string['datepassed'] = 'Date passed';
|
||||
$string['days'] = 'Days';
|
||||
$string['daysoftotal'] = '{$a->days} of {$a->total}';
|
||||
$string['deletecompletiondata'] = 'Delete completion data';
|
||||
$string['dependencies'] = 'Dependencies';
|
||||
$string['dependenciescompleted'] = 'Completion of other courses';
|
||||
|
Loading…
x
Reference in New Issue
Block a user