### Eclipse Workspace Patch 1.0
#P moodle19
Index: mod/quiz/styles.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/quiz/styles.php,v
retrieving revision 1.22
diff -u -r1.22 styles.php
--- mod/quiz/styles.php	9 Aug 2006 13:45:52 -0000	1.22
+++ mod/quiz/styles.php	11 Oct 2007 08:47:19 -0000
@@ -38,6 +38,16 @@
   color: green !important;
 }
 
+body#mod-quiz-view div.finalgrade,
+body#mod-quiz-view div.finalfeedback {
+  text-align: center;
+}
+
+body#mod-quiz-view div.overriddennotice {
+  text-align: center;
+  font-size: 0.7em;
+}
+
 /* manual grading */
 body#mod-quiz-grading table#grading
 {
Index: mod/quiz/view.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/quiz/view.php,v
retrieving revision 1.124
diff -u -r1.124 view.php
--- mod/quiz/view.php	20 Sep 2007 15:14:29 -0000	1.124
+++ mod/quiz/view.php	11 Oct 2007 08:47:19 -0000
@@ -165,7 +165,7 @@
     // Print table with existing attempts
     if ($attempts) {
 
-        print_heading('Summary of your previous attempts');
+        print_heading(get_string('summaryofattempts', 'quiz'));
 
         // Get some strings.
         $strattempt       = get_string("attempt", "quiz");
@@ -311,6 +311,21 @@
         }
     }
 
+    // print final grade from gradebook if present or overridden
+    require_once($CFG->libdir.'/gradelib.php');
+    $grading_info = grade_get_grades($course->id, 'mod', 'quiz', $quiz->id, $USER->id);
+    $item = $grading_info->items[0];
+    $grade = $item->grades[$USER->id];
+
+    if (!$grade->hidden and (!is_null($grade->grade) or $grade->overridden)) {
+        print_heading(get_string('finalgrade', 'grades'));
+        echo '<div class="finalgrade">'.$grade->str_grade.'</div>';
+        echo '<div class="finalfeedback">'.$grade->str_feedback.'</div>';
+        if ($grade->overridden) {
+            echo '<div class="overriddennotice">'.get_string('overriddennotice', 'grades').'</div>';
+        }
+    }
+
     // Print a button to start/continue an attempt, if appropriate.
     if (!$quiz->questions) {
         print_heading(get_string("noquestions", "quiz"));
Index: lang/en_utf8/grades.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/grades.php,v
retrieving revision 1.111
diff -u -r1.111 grades.php
--- lang/en_utf8/grades.php	10 Oct 2007 06:43:26 -0000	1.111
+++ lang/en_utf8/grades.php	11 Oct 2007 08:47:18 -0000
@@ -320,6 +320,7 @@
 $string['overridesitedefaultgradedisplaytypehelp'] = 'Tick this checkbox to enable the overriding of the site defaults for the display of grades in the gradebook. This activates form elements allowing you to define the grade letters and boundaries of your choice.';
 $string['overridden'] = 'Overridden';
 $string['overriddenhelp'] = 'When on, the overridden flag prevents any future attempts to automatically adjust the value of the grade. This flag is often set internally by the gradebook, but can be switched on and off manually using this form element.';
+$string['overriddennotice'] = 'Your final grade from this activity was manually adjusted.';
 $string['overallavg'] = 'Overall average';
 $string['pctoftotalgrade'] = '%% of total grade';
 $string['percent'] = 'Percent';
Index: lang/en_utf8/quiz.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/quiz.php,v
retrieving revision 1.83
diff -u -r1.83 quiz.php
--- lang/en_utf8/quiz.php	9 Oct 2007 15:44:06 -0000	1.83
+++ lang/en_utf8/quiz.php	11 Oct 2007 08:47:19 -0000
@@ -542,6 +542,7 @@
 $string['subneterror'] = 'Sorry, this quiz has been locked so that it is only accessible from certain locations.  Currently your computer is not one of those allowed to use this quiz.';
 $string['subnetnotice'] = 'This quiz has been locked so that it is only accessible from certain locations. Your computer is not on an allowed subnet. As teacher you are allowed to preview anyway.';
 $string['substitutedby'] = 'will be substituted by';
+$string['summaryofattempts'] = 'Summary of your previous attempts';
 $string['temporaryblocked'] = 'You are temporarily not allowed to re-attempt the quiz.<br /> You will be able to take another attempt on:';
 $string['time'] = 'Time';
 $string['timecompleted'] = 'Completed';

