mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
gradebook MDL-22931 made some of the setting labels more specific and made blocks show on category setting screen
This commit is contained in:
parent
36c3fbe324
commit
2821c4955b
@ -28,6 +28,7 @@ if ($id !== 0) {
|
||||
$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,8 +210,10 @@ if ($mform->is_cancelled()) {
|
||||
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();
|
||||
|
||||
|
@ -101,9 +101,12 @@ class edit_category_form extends moodleform {
|
||||
$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('categorytotalname', 'grades'));
|
||||
$mform->setAdvanced('grade_item_itemname');
|
||||
|
||||
$mform->addElement('text', 'grade_item_itemname', get_string('itemname', 'grades'));
|
||||
$mform->addElement('text', 'grade_item_iteminfo', get_string('iteminfo', 'grades'));
|
||||
$mform->addHelpButton('grade_item_iteminfo', 'iteminfo', 'grades');
|
||||
|
||||
|
@ -28,6 +28,7 @@ if ($id !== 0) {
|
||||
$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 @@ if ($mform->is_cancelled()) {
|
||||
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();
|
||||
|
||||
|
@ -610,7 +610,7 @@ class grade_plugin_info {
|
||||
*/
|
||||
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,12 +644,14 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
|
||||
$heading = $stractive_plugin;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
$returnval .= $OUTPUT->heading($heading);
|
||||
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 ($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);
|
||||
}
|
||||
$returnval .= $OUTPUT->heading($heading);
|
||||
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) {
|
||||
|
@ -113,6 +113,7 @@ $string['category'] = 'Category';
|
||||
$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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user