Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-26626 course competion block - fix hardcoded string

  • Loading branch information...
commit a58f4d5595980b61acb4a793a7e6bee5ad563cac 1 parent d64baec
@danpoltawski danpoltawski authored
View
10 blocks/completionstatus/block_completionstatus.php
@@ -152,7 +152,10 @@ public function get_content() {
$shtml .= '<tr><td>';
$shtml .= get_string('activitiescompleted', 'completion');
$shtml .= '</td><td style="text-align: right">';
- $shtml .= $activities_complete.' of '.count($activities);
+ $a = new stdClass();
+ $a->first = $activities_complete;
+ $a->second = count($activities);
+ $shtml .= get_string('firstofsecond', 'block_completionstatus', $a);
$shtml .= '</td></tr>';
}
@@ -162,7 +165,10 @@ public function get_content() {
$phtml = '<tr><td>';
$phtml .= get_string('prerequisitescompleted', 'completion');
$phtml .= '</td><td style="text-align: right">';
- $phtml .= $prerequisites_complete.' of '.count($prerequisites);
+ $a = new stdClass();
+ $a->first = $prerequisites_complete;
+ $a->second = count($prerequisites);
+ $shtml .= get_string('firstofsecond', 'block_completionstatus', $a);
$phtml .= '</td></tr>';
$shtml = $phtml . $shtml;
View
1  blocks/completionstatus/lang/en/block_completionstatus.php
@@ -3,5 +3,6 @@
$string['completionprogressdetails'] = 'Completion progress details';
$string['completionstatus'] = 'Course completion status';
$string['criteriagroup'] = 'Criteria group';
+$string['firstofsecond'] = '{$a->first} of {$a->second}';
$string['pluginname'] = 'Course completion status';
$string['requirement'] = 'Requirement';
Please sign in to comment.
Something went wrong with that request. Please try again.