From: nicolasconnault Date: Mon, 4 Feb 2008 13:57:36 +0000 (+0000) Subject: MDL-13050 merging from 1.9 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fb739b77e00a51c19532844ec4d6027f38e2a3e2;p=moodle.git MDL-13050 merging from 1.9 --- diff --git a/lang/en_utf8/grades.php b/lang/en_utf8/grades.php index 3792932d3a..2ebea12b4a 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 f4ad07e743..758b73f6c2 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 8b9029f433..728c7667d3 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 0a9e06d55e..df4c1fcdc6 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 a5a05c07aa..6a41aa100c 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 49a498954d..82a245148e 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 {