MDL-26628 completion report: Fix hard coded strings in Completion report

This commit is contained in:
Aaron Barnes 2011-04-27 15:33:45 +12:00 committed by Sam Hemelryk
parent 5f1c825dfa
commit 5227344a07

View File

@ -384,7 +384,7 @@ if(!$csv) {
// Try load a aggregation method
$method = $completion->get_aggregation_method($current_group->criteriatype);
$method = $method == 1 ? 'All' : 'Any';
$method = $method == 1 ? get_string('all') : get_string('any');
} else {
$method = '-';
@ -406,7 +406,7 @@ if(!$csv) {
// Get course aggregation
$method = $completion->get_aggregation_method();
print $method == 1 ? 'All' : 'Any';
print $method == 1 ? get_string('all') : get_string('any');
print '</th>';
print '</tr>';
@ -515,7 +515,7 @@ if(!$csv) {
// Overall course completion status
print '<th class="criteriaicon">';
print '<img src="'.$OUTPUT->pix_url('i/course').'" class="icon" alt="Course" title="Course Complete" />'; //TODO: localize
print '<img src="'.$OUTPUT->pix_url('i/course').'" class="icon" alt="'.get_string('course').'" title="'.get_string('coursecomplete', 'completion').'" />';
print '</th>';
print '</tr>';
@ -634,7 +634,7 @@ foreach ($progress as $user) {
print '<td class="completion-progresscell">'.
'<a href="'.$CFG->wwwroot.'/course/togglecompletion.php?user='.$user->id.'&amp;course='.$course->id.'&amp;rolec='.$allow_marking_criteria.'&amp;sesskey='.sesskey().'">'.
'<img src="'.$OUTPUT->pix_url('i/completion-manual-'.($is_complete ? 'y' : 'n')).
'" alt="'.$describe.'" class="icon" title="Mark as complete" /></a></td>'; //TODO: localize
'" alt="'.$describe.'" class="icon" title="'.get_string('markcomplete', 'completion').'" /></a></td>';
} else {
print '<td class="completion-progresscell">'.
'<img src="'.$OUTPUT->pix_url('i/'.$completionicon).