MDL-44054 quiz_statistics fix lang string concatenation.

This commit is contained in:
Tim Hunt 2014-05-09 15:54:32 +01:00
parent 8e478c99d3
commit 7076b30972
2 changed files with 17 additions and 8 deletions

View File

@ -26,8 +26,12 @@ $string['actualresponse'] = 'Actual response';
$string['allattempts'] = 'all attempts';
$string['allattemptsavg'] = 'Average grade of all attempts';
$string['allattemptscount'] = 'Total number of complete graded attempts';
$string['analysisnameonly'] = '"{$a->name}"';
$string['analysisno'] = '({$a->number}) "{$a->name}"';
$string['analysisnovariant'] = '({$a->number}) "{$a->name}" variant {$a->variant}';
$string['analysisofresponses'] = 'Analysis of responses';
$string['analysisofresponsesfor'] = 'Analysis of responses for {$a}.';
$string['analysisofresponsesfor'] = 'Analysis of responses for {$a}';
$string['analysisvariant'] = '"{$a->name}" variant {$a->variant}';
$string['attempts'] = 'Attempts';
$string['attemptsall'] = 'all attempts';
$string['attemptsfirst'] = 'first attempt';
@ -110,6 +114,5 @@ $string['statisticsreportgraph'] = 'Statistics for question positions';
$string['statistics:view'] = 'View statistics report';
$string['statsfor'] = 'Quiz statistics (for {$a})';
$string['variant'] = 'Variant';
$string['variantno'] = 'Variant {$a}';
$string['whichtries'] = 'Analyze responses for';

View File

@ -387,13 +387,19 @@ class quiz_statistics_report extends quiz_default_report {
} else {
// Work out an appropriate title.
$questiontabletitle = '"' . $question->name . '"';
if (!empty($question->number)) {
$questiontabletitle = '(' . $question->number . ') ' . $questiontabletitle;
}
if (!is_null($variantno)) {
$questiontabletitle .= ' '.get_string('variantno', 'quiz_statistics', $variantno);
$a = clone($question);
$a->variant = $variantno;
if (!empty($question->number) && !is_null($variantno)) {
$questiontabletitle = get_string('analysisnovariant', 'quiz_statistics', $a);
} else if (!empty($question->number)) {
$questiontabletitle = get_string('analysisno', 'quiz_statistics', $a);
} else if (!is_null($variantno)) {
$questiontabletitle = get_string('analysisvariant', 'quiz_statistics', $a);
} else {
$questiontabletitle = get_string('analysisnameonly', 'quiz_statistics', $a);
}
if ($this->table->is_downloading() == 'xhtml') {
$questiontabletitle = get_string('analysisofresponsesfor', 'quiz_statistics', $questiontabletitle);
}