]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13050 merging from 1.9
authornicolasconnault <nicolasconnault>
Mon, 4 Feb 2008 13:57:36 +0000 (13:57 +0000)
committernicolasconnault <nicolasconnault>
Mon, 4 Feb 2008 13:57:36 +0000 (13:57 +0000)
lang/en_utf8/grades.php
mod/assignment/lib.php
mod/hotpot/report.php
mod/lesson/report.php
mod/quiz/report/default.php
theme/standard/styles_layout.css

index 3792932d3a98b6db103770958f3b53d317493be3..2ebea12b4aba27a305a5e46591019637c174865a 100644 (file)
@@ -402,6 +402,7 @@ $string['savepreferences'] = 'Save preferences';
 $string['scaledpct'] = 'Scaled %%';
 $string['scaleidhelp'] = 'The scale to which this $a is linked.';
 $string['scalestandardhelp'] = 'A standard scale is one that is available site-wide, for all courses.';
+$string['seeallcoursegrades'] = 'See all course grades';
 $string['selectdestination'] = 'Select destination of $a';
 $string['selectalloroneuser'] = 'Select all or one user';
 $string['septab'] = 'Tab';
index f4ad07e74312f1b501ac97250d77557cb3a68e33..758b73f6c2872c181a0b39e8bd799afff51e3d8b 100644 (file)
@@ -1027,6 +1027,12 @@ class assignment_base {
         $navigation = build_navigation($this->strsubmissions, $this->cm);
         print_header_simple(format_string($this->assignment->name,true), "", $navigation,
                 '', '', true, update_module_button($cm->id, $course->id, $this->strassignment), navmenu($course, $cm));
+        
+        $course_context = get_context_instance(CONTEXT_COURSE, $course->id);
+        if (has_capability('gradereport/grader:view', $course_context) && has_capability('moodle/grade:viewall', $course_context)) {
+            echo '<a class="allcoursegrades" href="' . $CFG->wwwroot . '/grade/report/grader/index.php?id=' . $course->id . '">' 
+                . get_string('seeallcoursegrades', 'grades') . '</a>';
+        }
 
         if (!empty($message)) {
             echo $message;   // display messages here if any
index 8b9029f4338d7397fcdc4d5d740324b1411b8841..728c7667d3e54fc988be17c13944c726f5cd3e2a 100644 (file)
@@ -429,7 +429,11 @@ function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
 
     $button = update_module_button($cm->id, $course->id, $strmodulename);
     print_header($title, $heading, $navigation, "", "", true, $button, navmenu($course, $cm));
-
+    $course_context = get_context_instance(CONTEXT_COURSE, $course->id);
+    if (has_capability('gradereport/grader:view', $course_context) && has_capability('moodle/grade:viewall', $course_context)) {
+        echo '<a class="allcoursegrades" href="' . $CFG->wwwroot . '/grade/report/grader/index.php?id=' . $course->id . '">' 
+            . get_string('seeallcoursegrades', 'grades') . '</a>';
+    }
     print_heading($hotpot->name);
 }
 function hotpot_print_report_selector(&$course, &$hotpot, &$formdata) {
index 0a9e06d55e07eeec6603f8f3189f91db44412c47..df4c1fcdc6bbe279623c09020616b9b333236657 100644 (file)
     }
 
     lesson_print_header($cm, $course, $lesson, $action);
+    
+    $course_context = get_context_instance(CONTEXT_COURSE, $course->id);
+    if (has_capability('gradereport/grader:view', $course_context) && has_capability('moodle/grade:viewall', $course_context)) {
+        echo '<a class="allcoursegrades" href="' . $CFG->wwwroot . '/grade/report/grader/index.php?id=' . $course->id . '">' 
+            . get_string('seeallcoursegrades', 'grades') . '</a>';
+    }
 
     if ($nothingtodisplay) {
         notify(get_string('nolessonattempts', 'lesson'));
index a5a05c07aa13118cf33c5510f4a791a6102b84b6..6a41aa100c0e0f79578fe3edccc1316bc984359b 100644 (file)
@@ -35,6 +35,12 @@ class quiz_default_report {
         $currenttab = 'reports';
         $mode = $reportmode;
         require($CFG->dirroot . '/mod/quiz/tabs.php');
+        $course_context = get_context_instance(CONTEXT_COURSE, $course->id);
+        if (has_capability('gradereport/grader:view', $course_context) && has_capability('moodle/grade:viewall', $course_context)) {
+            echo '<a class="allcoursegrades" href="' . $CFG->wwwroot . '/grade/report/grader/index.php?id=' . $course->id . '">' 
+                . get_string('seeallcoursegrades', 'grades') . '</a>';
+        }
+
     }
 }
 
index 49a498954d9d2b07dd0acdb31ad35f50d2d5e9dc..82a245148e9681f0110cb39a3fb3597ee7184261 100644 (file)
@@ -2190,6 +2190,9 @@ body#doc-contents ul {
   padding: 5px;
 }
 
+.allcoursegrades {
+    float: right;
+}
 /* gradebook edit tree */
 
 .grade-edit-tree .gradetreebox {