From c4c97a6d8201f7fff83eeda33d2f4677dd767c94 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Tue, 17 Feb 2009 11:17:29 +0000 Subject: [PATCH] MDL-18004 --- grade/edit/settings/index.php | 4 ++++ grade/lib.php | 14 +++++++++++--- lang/en_utf8/grades.php | 1 + 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/grade/edit/settings/index.php b/grade/edit/settings/index.php index 4a58d55dbf..1c1228253b 100644 --- a/grade/edit/settings/index.php +++ b/grade/edit/settings/index.php @@ -76,6 +76,10 @@ if ($mform->is_cancelled()) { print_grade_page_head($courseid, 'settings', 'coursesettings', get_string('coursesettings', 'grades')); +print_box_start('generalbox boxaligncenter boxwidthnormal centerpara'); +echo get_string('coursesettingsexplanation', 'grades'); +print_box_end(); + $mform->display(); print_footer($course); diff --git a/grade/lib.php b/grade/lib.php index c7fb70e05f..bd036ec835 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -440,7 +440,7 @@ function grade_get_plugin_info($courseid, $active_type, $active_plugin) { $active = $url; } - $plugin_info['settings']['coursesettings'] = array('id' => 'coursesettings', 'link' => $url, 'string' => get_string('course')); + $plugin_info['settings'] = array('id' => 'coursesettings', 'link' => $url, 'string' => get_string('settings')); $count++; } @@ -676,12 +676,20 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null, $he $active_type_link = $plugin_info[$active_type]['link']; } - $navlinks[] = array('name' => $stractive_type, 'link' => $active_type_link, 'type' => 'misc'); + if (empty($plugin_info[$active_type]['id'])) { + $navlinks[] = array('name' => $stractive_type, 'link' => $active_type_link, 'type' => 'misc'); + } + $navlinks[] = array('name' => $stractive_plugin, 'link' => null, 'type' => 'misc'); $navigation = build_navigation($navlinks); - $returnval = print_header_simple($strgrades . ': ' . $stractive_type, ': ' . $stractive_type . ': ' . $stractive_plugin, $navigation, '', + $title = ': ' . $stractive_plugin; + if (empty($plugin_info[$active_type]['id'])) { + $title = ': ' . $stractive_type . ': ' . $stractive_plugin; + } + + $returnval = print_header_simple($strgrades . ': ' . $stractive_type, $title, $navigation, '', $bodytags, true, $buttons, navmenu($COURSE), false, '', $return); // Guess heading if not given explicitly diff --git a/lang/en_utf8/grades.php b/lang/en_utf8/grades.php index 59c0e9516d..cd8b2c5096 100644 --- a/lang/en_utf8/grades.php +++ b/lang/en_utf8/grades.php @@ -123,6 +123,7 @@ $string['coursegradedisplayupdated'] = 'The course grade display type has been u $string['coursename'] = 'Course name'; $string['coursescales'] = 'Course scales'; $string['coursesettings'] = 'Course settings'; +$string['coursesettingsexplanation'] = 'Course settings determine how the gradebook appears for all participants in the course.'; $string['coursetotal'] = 'Course total'; $string['createcategory'] = 'Create category'; $string['createcategoryerror'] = 'Could not create a new category'; -- 2.39.5