Permalink
Browse files

Merge branch 'MDL-41248' of git://github.com/timhunt/moodle

  • Loading branch information...
2 parents 23d142e + 8d3debf commit 3be87d897de4f40dde7b9b2b69eb9eac6caf4815 @danpoltawski danpoltawski committed Mar 5, 2014
Showing with 4 additions and 2 deletions.
  1. +3 −2 completion/criteria/completion_criteria_duration.php
  2. +1 −0 lang/en/completion.php
@@ -165,7 +165,7 @@ public function get_title() {
* @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 @@ public function get_status($completion) {
$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));
}
/**
View
@@ -111,6 +111,7 @@
$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';

0 comments on commit 3be87d8

Please sign in to comment.