]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18004 Added two admin settings for showing/hiding the gradebook dropdown and...
authornicolasconnault <nicolasconnault>
Thu, 12 Feb 2009 10:27:23 +0000 (10:27 +0000)
committernicolasconnault <nicolasconnault>
Thu, 12 Feb 2009 10:27:23 +0000 (10:27 +0000)
admin/settings/grades.php
grade/lib.php
grade/report/grader/index.php
lang/en_utf8/grades.php

index f703ef6486c2cb40713fe1a6e1a23db71f0a1adb..6da457bb4660e236f68a8b38d8f72d505db03b1c 100644 (file)
@@ -52,7 +52,8 @@ if (has_capability('moodle/grade:manage', $systemcontext)
                                                          '3' => '3',
                                                          '4' => '4',
                                                          '5' => '5')));
-
+        $temp->add(new admin_setting_configcheckbox('grade_shownavmenu', get_string('shownavmenu', 'grades'), get_string('configshownavmenu', 'grades'), 1));
+        $temp->add(new admin_setting_configcheckbox('grade_showtabs', get_string('showtabs', 'grades'), get_string('configshowtabs', 'grades'), 0));
         $temp->add(new admin_setting_special_gradeexport());
     }
     $ADMIN->add('grades', $temp);
index 033ada524641b9debb5a4080ab83cf3829178130..50fd597db7978bff014a603efa5b440aecb70ea1 100644 (file)
@@ -615,6 +615,10 @@ function grade_get_plugin_info($courseid, $active_type, $active_plugin) {
         }
     }
 
+    // Put settings last
+    $settings = $plugin_info['settings'];
+    unset($plugin_info['settings']);
+    $plugin_info['settings'] = $settings;
     return $plugin_info;
 }
 
@@ -657,9 +661,14 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null, $he
         $heading = $stractive_plugin;
     }
 
-    $returnval .= print_grade_plugin_selector($plugin_info, $return);
+    if ($CFG->grade_shownavmenu) {
+        $returnval .= print_grade_plugin_selector($plugin_info, $return);
+    }
     $returnval .= print_heading($heading);
-    $returnval .= grade_print_tabs($active_type, $active_plugin, $plugin_info, $return, $preferences_page_url);
+
+    if ($CFG->grade_showtabs) {
+        $returnval .= grade_print_tabs($active_type, $active_plugin, $plugin_info, $return, $preferences_page_url);
+    }
 
     if ($return) {
         return $returnval;
index 8d8b837277d04e287d2a3d6d5edf0e21c78b1d08..fa55d4307fecc8ae4479518d3d935c9e7f0d0f0c 100644 (file)
@@ -173,7 +173,7 @@ if ($USER->gradeediting[$course->id] and !$report->get_pref('enableajax')) {
 }
 
 echo $reporthtml;
-var_dump($report->get_pref('enableajax'));
+
 // print submit button
 if ($USER->gradeediting[$course->id] && ($report->get_pref('showquickfeedback')
     ||
index 9c147b54d3effa296cf10a8eee2efb8326d93e7b..be905b6d97bb8c025ed5a560d9682ed5f8824535 100644 (file)
@@ -106,10 +106,12 @@ $string['configshowgroups'] = 'Whether to show the mean for each group.';
 $string['configshowhiddenitems'] = 'Specifies how hidden grade items are shown. If Hide is selected, they are hidden completely. If Show is selected, the hidden grade item row is shown in grey with the grade hidden completely. If \"Only hidden until\" is selected, grade items with a \"hide until\" date set are shown in grey with the grades hidden completely until the set date, after which the whole item is shown.';
 $string['configshowlocks'] = 'Whether to show a lock/unlock icon near each grade.';
 $string['configshowfeedback'] = 'Whether to show a feedback icon (for adding/editing) near each grade.';
+$string['configshownavmenu'] = 'Whether to show a drop-down menu for quick navigation to various gradebook pages. ';
 $string['configshownumberofgrades'] = 'Whether to show the number of grades used when calculating the mean in brackets after each average, for example 45 (34).';
 $string['configshowranges'] = 'Whether to show the range of grades for each column in an additional row.';
 $string['configshowpercentage'] = 'Whether to show the percentage value of each grade item.';
 $string['configshowrank'] = 'Whether to show the position of the user in relation to the rest of the class, for each grade item.';
+$string['configshowtabs'] = 'Whether to show tabs for navigating to various gradebook pages. Tabs are an alternative gradebook navigation method from the \"Choose an action\" dropdown menu.';
 $string['configshowuseridnumber'] = 'Whether to show user id numbers in an additional column.';
 $string['configshowuserimage'] = 'Whether to show the user\'s profile image next to the name in the grader report.';
 $string['configstudentsperpage'] = 'The number of students to display per page in the grader report.';
@@ -483,6 +485,7 @@ $string['showgroups'] = 'Show groups';
 $string['showhiddenitems'] = 'Show hidden items';
 $string['showhiddenuntilonly'] = 'Only hidden until';
 $string['showlocks'] = 'Show locks';
+$string['shownavmenu'] = 'Show the \"Choose an action\" dropdown menu';
 $string['shownohidden'] = 'No hidden';
 $string['shownooutcomes'] = 'Hide outcomes';
 $string['shownumberofgrades'] = 'Show number of grades in averages';
@@ -490,6 +493,7 @@ $string['showpercentage'] = 'Show percentage';
 $string['showquickfeedback'] = 'Show Quick Feedback';
 $string['showranges'] = 'Show ranges';
 $string['showrank'] = 'Show rank';
+$string['showtabs'] = 'Show navigation tabs';
 $string['showuseridnumber'] = 'Show user idnumber';
 $string['showuserimage'] = 'Show user profile images';
 $string['showverbose'] = 'Show $a->category$a->itemmodule $a->itemname';