Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug #6157 - lang strings using concatenation, not $a.

  • Loading branch information...
commit 87cb44ac9f8d29669d063cf47babafad1026bece 1 parent 6446003
tjhunt authored
View
3  lang/en_utf8/quiz.php
@@ -245,7 +245,6 @@
$string['listitems'] = 'Listing of Items in Quiz';
$string['literal'] = 'Literal';
$string['loguniform'] = 'digits, from a loguniform distribution';
-$string['lowmarkslimit'] = ' Don\'t analyze if score is less than: ';
$string['makecopy'] = 'Save as new question';
$string['managetypes'] = 'Manage question types and servers';
$string['manualgrading'] = 'Grading';
@@ -313,7 +312,7 @@
$string['onlyteachersimport'] = 'Only teachers with editing rights can import questions';
$string['onlyteachersexport'] = 'Only teachers can export questions';
$string['optional'] = 'optional';
-$string['outof'] = ' out of a maximum of ';
+$string['outof'] = '$a->grade out of a maximum of $a->maxgrade';
$string['overdue'] = 'Overdue';
$string['pagesize'] = 'Attempts shown per page: ';
$string['paragraphquestion'] = 'Paragraph Question not supported at line $a. The question will be ignored';
View
4 lang/en_utf8/quiz_analysis.php
@@ -3,8 +3,8 @@
$string['analysis'] = 'Item analysis';
$string['analysisdownload'] = 'Analysis download';
$string['analysisoptions'] = 'Analysis options';
-$string['attemptselection'] = 'Attempts to analyze per user ';
-$string['lowmarkslimit'] = "Don't analyse if score is less than: ";
+$string['attemptselection'] = 'Attempts to analyze per user';
+$string['lowmarkslimit'] = "Don't analyse if score is less than:";
$string['attemptsall'] = 'all attempts';
$string['attemptshighest'] = 'highest grade';
$string['attemptsfirst'] = 'first attempt';
View
6 mod/quiz/review.php
@@ -189,11 +189,13 @@
$result->grade = "0.0";
}
+ $a = new stdClass;
$percentage = round(($attempt->sumgrades/$quiz->sumgrades)*100, 0);
- $grade = round(($attempt->sumgrades/$quiz->sumgrades)*$quiz->grade, $CFG->quiz_decimalpoints);
+ $a->grade = round(($attempt->sumgrades/$quiz->sumgrades)*$quiz->grade, $CFG->quiz_decimalpoints);
+ $a->maxgrade = $quiz->grade;
$rawscore = round($attempt->sumgrades, $CFG->quiz_decimalpoints);
$table->data[] = array("$strscore:", "$rawscore/$quiz->sumgrades ($percentage %)");
- $table->data[] = array("$strgrade:", $grade.get_string('outof', 'quiz').$quiz->grade);
+ $table->data[] = array("$strgrade:", get_string('outof', 'quiz', $a));
}
}
if ($isteacher and $attempt->userid == $USER->id) {
Please sign in to comment.
Something went wrong with that request. Please try again.