# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/grade/edit/tree/category.php
--- moodle/grade/edit/tree/category.php Base (1.28)
+++ moodle/grade/edit/tree/category.php Locally Modified (Based On 1.28)
@@ -28,6 +28,7 @@
     $url->param('id', $id);
 }
 $PAGE->set_url($url);
+$PAGE->set_pagelayout('admin');
 
 if (!$course = $DB->get_record('course', array('id' => $courseid))) {
     print_error('nocourseid');
@@ -209,9 +210,11 @@
     redirect($returnurl);
 }
 
+$return = false;
+$buttons = false;
+$shownavigation = false;
+print_grade_page_head($courseid, 'edittree', null, $heading, $return, $buttons, $shownavigation);
 
-print_grade_page_head($courseid, 'edittree', null, $heading);
-
 $mform->display();
 
 echo $OUTPUT->footer();
Index: moodle/grade/edit/tree/category_form.php
--- moodle/grade/edit/tree/category_form.php Base (1.62)
+++ moodle/grade/edit/tree/category_form.php Locally Modified (Based On 1.62)
@@ -101,9 +101,12 @@
         $mform->disabledIf('droplow', 'keephigh', 'noteq', 0);
 
         // Grade item settings
-        $mform->addElement('header', 'general', get_string('gradeitem', 'grades'));
+        // Displayed as Category total to avoid confusion between grade items requiring marking and category totals
+        $mform->addElement('header', 'general', get_string('categorytotal', 'grades'));
 
-        $mform->addElement('text', 'grade_item_itemname', get_string('itemname', 'grades'));
+        $mform->addElement('text', 'grade_item_itemname', get_string('categorytotalname', 'grades'));
+        $mform->setAdvanced('grade_item_itemname');
+
         $mform->addElement('text', 'grade_item_iteminfo', get_string('iteminfo', 'grades'));
         $mform->addHelpButton('grade_item_iteminfo', 'iteminfo', 'grades');
 
@@ -143,6 +146,7 @@
         }
         $mform->addElement('select', 'grade_item_scaleid', get_string('scale'), $options);
         $mform->addHelpButton('grade_item_scaleid', 'typescale', 'grades');
+        //$mform->setAdvanced('grade_item_scaleid');
         $mform->disabledIf('grade_item_scaleid', 'grade_item_gradetype', 'noteq', GRADE_TYPE_SCALE);
         $mform->disabledIf('grade_item_scaleid', 'aggregation', 'eq', GRADE_AGGREGATE_SUM);
 
@@ -207,6 +211,7 @@
         /// locking
         $mform->addElement('checkbox', 'grade_item_locked', get_string('locked', 'grades'));
         $mform->addHelpButton('grade_item_locked', 'locked', 'grades');
+        $mform->setAdvanced('grade_item_locked');
 
         $mform->addElement('date_time_selector', 'grade_item_locktime', get_string('locktime', 'grades'), array('optional'=>true));
         $mform->disabledIf('grade_item_locktime', 'grade_item_gradetype', 'eq', GRADE_TYPE_NONE);
Index: moodle/grade/edit/tree/item.php
--- moodle/grade/edit/tree/item.php Base (1.29)
+++ moodle/grade/edit/tree/item.php Locally Modified (Based On 1.29)
@@ -28,6 +28,7 @@
     $url->param('id', $id);
 }
 $PAGE->set_url($url);
+$PAGE->set_pagelayout('admin');
 
 if (!$course = $DB->get_record('course', array('id' => $courseid))) {
     print_error('nocourseid');
@@ -164,7 +165,10 @@
     redirect($returnurl);
 }
 
-print_grade_page_head($courseid, 'edittree', null, $heading);
+$return = false;
+$buttons = false;
+$shownavigation = false;
+print_grade_page_head($courseid, 'edittree', null, $heading, $return, $buttons, $shownavigation);
 
 $mform->display();
 
Index: moodle/grade/edit/tree/item_form.php
--- moodle/grade/edit/tree/item_form.php Base (1.66)
+++ moodle/grade/edit/tree/item_form.php Locally Modified (Based On 1.66)
@@ -145,6 +145,7 @@
         /// locking
         $mform->addElement('advcheckbox', 'locked', get_string('locked', 'grades'));
         $mform->addHelpButton('locked', 'locked', 'grades');
+        $mform->setAdvanced('locked');
 
         $mform->addElement('date_time_selector', 'locktime', get_string('locktime', 'grades'), array('optional'=>true));
         $mform->disabledIf('locktime', 'gradetype', 'eq', GRADE_TYPE_NONE);
Index: moodle/grade/lib.php
--- moodle/grade/lib.php Base (1.207)
+++ moodle/grade/lib.php Locally Modified (Based On 1.207)
@@ -610,7 +610,7 @@
  */
 function print_grade_page_head($courseid, $active_type, $active_plugin=null,
                                $heading = false, $return=false,
-                               $buttons=false) {
+                               $buttons=false, $shownavigation=true) {
     global $CFG, $OUTPUT, $PAGE;
 
     $plugin_info = grade_get_plugin_info($courseid, $active_type, $active_plugin);
@@ -644,6 +644,7 @@
         $heading = $stractive_plugin;
     }
 
+    if ($shownavigation) {
     if ($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_DROPDOWN) {
         $returnval .= print_grade_plugin_selector($plugin_info, $active_type, $active_plugin, $return);
     }
@@ -651,6 +652,7 @@
     if ($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_TABS) {
         $returnval .= grade_print_tabs($active_type, $active_plugin, $plugin_info, $return);
     }
+    }
 
     if ($return) {
         return $returnval;
Index: moodle/lang/en/grades.php
--- moodle/lang/en/grades.php Base (1.81)
+++ moodle/lang/en/grades.php Locally Modified (Based On 1.81)
@@ -113,6 +113,7 @@
 $string['categoryedit'] = 'Edit category';
 $string['categoryname'] = 'Category name';
 $string['categorytotal'] = 'Category total';
+$string['categorytotalname'] = 'Category total name';
 $string['categorytotalfull'] = '{$a->category} total';
 $string['combo'] = 'Tabs and Dropdown menu';
 $string['compact'] = 'Compact';
