diff --git a/lang/en_utf8/grades.php b/lang/en_utf8/grades.php
index 3792932d3a9..2ebea12b4ab 100644
--- a/lang/en_utf8/grades.php
+++ b/lang/en_utf8/grades.php
@@ -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';
diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php
index f4ad07e7431..758b73f6c28 100644
--- a/mod/assignment/lib.php
+++ b/mod/assignment/lib.php
@@ -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 ''
+ . get_string('seeallcoursegrades', 'grades') . '';
+ }
if (!empty($message)) {
echo $message; // display messages here if any
diff --git a/mod/hotpot/report.php b/mod/hotpot/report.php
index 8b9029f4338..728c7667d3e 100644
--- a/mod/hotpot/report.php
+++ b/mod/hotpot/report.php
@@ -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 ''
+ . get_string('seeallcoursegrades', 'grades') . '';
+ }
print_heading($hotpot->name);
}
function hotpot_print_report_selector(&$course, &$hotpot, &$formdata) {
diff --git a/mod/lesson/report.php b/mod/lesson/report.php
index 0a9e06d55e0..df4c1fcdc6b 100644
--- a/mod/lesson/report.php
+++ b/mod/lesson/report.php
@@ -108,6 +108,12 @@
}
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 ''
+ . get_string('seeallcoursegrades', 'grades') . '';
+ }
if ($nothingtodisplay) {
notify(get_string('nolessonattempts', 'lesson'));
diff --git a/mod/quiz/report/default.php b/mod/quiz/report/default.php
index a5a05c07aa1..6a41aa100c0 100644
--- a/mod/quiz/report/default.php
+++ b/mod/quiz/report/default.php
@@ -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 ''
+ . get_string('seeallcoursegrades', 'grades') . '';
+ }
+
}
}
diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css
index 49a498954d9..82a245148e9 100644
--- a/theme/standard/styles_layout.css
+++ b/theme/standard/styles_layout.css
@@ -2190,6 +2190,9 @@ body#doc-contents ul {
padding: 5px;
}
+.allcoursegrades {
+ float: right;
+}
/* gradebook edit tree */
.grade-edit-tree .gradetreebox {