Skip to content

Commit

Permalink
MDL-13050 merging from 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Feb 4, 2008
1 parent 0b19ec1 commit fb739b7
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions lang/en_utf8/grades.php
Expand Up @@ -402,6 +402,7 @@
$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';
Expand Down
6 changes: 6 additions & 0 deletions mod/assignment/lib.php
Expand Up @@ -1027,6 +1027,12 @@ function display_submissions($message='') {
$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
Expand Down
6 changes: 5 additions & 1 deletion mod/hotpot/report.php
Expand Up @@ -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) {
Expand Down
6 changes: 6 additions & 0 deletions mod/lesson/report.php
Expand Up @@ -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 '<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'));
Expand Down
6 changes: 6 additions & 0 deletions mod/quiz/report/default.php
Expand Up @@ -35,6 +35,12 @@ function print_header_and_tabs($cm, $course, $quiz, $reportmode="overview", $met
$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>';
}

}
}

Expand Down
3 changes: 3 additions & 0 deletions theme/standard/styles_layout.css
Expand Up @@ -2190,6 +2190,9 @@ body#doc-contents ul {
padding: 5px;
}

.allcoursegrades {
float: right;
}
/* gradebook edit tree */

.grade-edit-tree .gradetreebox {
Expand Down

0 comments on commit fb739b7

Please sign in to comment.