MDL-13050 merging from 1.9

This commit is contained in:
nicolasconnault 2008-02-04 13:57:36 +00:00
parent 0b19ec1e95
commit fb739b77e0
6 changed files with 27 additions and 1 deletions

View file

@ -402,6 +402,7 @@ $string['savepreferences'] = 'Save preferences';
$string['scaledpct'] = 'Scaled %%'; $string['scaledpct'] = 'Scaled %%';
$string['scaleidhelp'] = 'The scale to which this $a is linked.'; $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['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['selectdestination'] = 'Select destination of $a';
$string['selectalloroneuser'] = 'Select all or one user'; $string['selectalloroneuser'] = 'Select all or one user';
$string['septab'] = 'Tab'; $string['septab'] = 'Tab';

View file

@ -1027,6 +1027,12 @@ class assignment_base {
$navigation = build_navigation($this->strsubmissions, $this->cm); $navigation = build_navigation($this->strsubmissions, $this->cm);
print_header_simple(format_string($this->assignment->name,true), "", $navigation, print_header_simple(format_string($this->assignment->name,true), "", $navigation,
'', '', true, update_module_button($cm->id, $course->id, $this->strassignment), navmenu($course, $cm)); '', '', 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)) { if (!empty($message)) {
echo $message; // display messages here if any echo $message; // display messages here if any

View file

@ -429,7 +429,11 @@ function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
$button = update_module_button($cm->id, $course->id, $strmodulename); $button = update_module_button($cm->id, $course->id, $strmodulename);
print_header($title, $heading, $navigation, "", "", true, $button, navmenu($course, $cm)); 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); print_heading($hotpot->name);
} }
function hotpot_print_report_selector(&$course, &$hotpot, &$formdata) { function hotpot_print_report_selector(&$course, &$hotpot, &$formdata) {

View file

@ -108,6 +108,12 @@
} }
lesson_print_header($cm, $course, $lesson, $action); 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) { if ($nothingtodisplay) {
notify(get_string('nolessonattempts', 'lesson')); notify(get_string('nolessonattempts', 'lesson'));

View file

@ -35,6 +35,12 @@ class quiz_default_report {
$currenttab = 'reports'; $currenttab = 'reports';
$mode = $reportmode; $mode = $reportmode;
require($CFG->dirroot . '/mod/quiz/tabs.php'); 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>';
}
} }
} }

View file

@ -2190,6 +2190,9 @@ body#doc-contents ul {
padding: 5px; padding: 5px;
} }
.allcoursegrades {
float: right;
}
/* gradebook edit tree */ /* gradebook edit tree */
.grade-edit-tree .gradetreebox { .grade-edit-tree .gradetreebox {