$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';
$string['statistics:view'] = 'View statistics report';
$string['statsfor'] = 'Quiz statistics (for {$a})';
$string['variant'] = 'Variant';
-$string['variantno'] = 'Variant {$a}';
$string['whichtries'] = 'Analyze responses for';
} 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);
}