From 3b48ba9dc146843026e2a0ddfddf175c45ca694c Mon Sep 17 00:00:00 2001 From: tjhunt Date: Mon, 24 Jul 2006 14:40:48 +0000 Subject: [PATCH] Bug #6157 - lang strings using concatenation, not $a. Merged from MOODLE_16_STABLE. --- lang/en_utf8/quiz.php | 3 +-- lang/en_utf8/quiz_analysis.php | 4 ++-- mod/quiz/review.php | 6 ++++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lang/en_utf8/quiz.php b/lang/en_utf8/quiz.php index 67ae0b1e5a..a818297c41 100644 --- a/lang/en_utf8/quiz.php +++ b/lang/en_utf8/quiz.php @@ -249,7 +249,6 @@ $string['link'] = 'Link'; $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'; @@ -318,7 +317,7 @@ $string['none']= 'None'; $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'; diff --git a/lang/en_utf8/quiz_analysis.php b/lang/en_utf8/quiz_analysis.php index 16b1b8cf2f..a72d8e2b91 100644 --- a/lang/en_utf8/quiz_analysis.php +++ b/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'; diff --git a/mod/quiz/review.php b/mod/quiz/review.php index d6a2ad048b..e6a4bf6928 100644 --- a/mod/quiz/review.php +++ b/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) { -- 2.39.5