mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-10207 delete support in grade tree editing page
This commit is contained in:
parent
e5d31b2f1b
commit
f943f4fd00
@ -84,7 +84,23 @@ switch ($action) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'delete':
|
case 'delete':
|
||||||
//TODO: implement deleting in grade items and categories
|
if ($eid) {
|
||||||
|
$confirm = optional_param('confirm', 0, PARAM_BOOL);
|
||||||
|
|
||||||
|
if ($confirm and confirm_sesskey()) {
|
||||||
|
$object->delete('grade/report/grader/category');
|
||||||
|
redirect($returnurl);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
print_header_simple($strgrades . ': ' . $strgraderreport, ': ' . $strcategoriesedit, $navigation, '', '', true, '', navmenu($course));
|
||||||
|
$strdeletecheckfull = get_string('deletecheck', '', $object->get_name());
|
||||||
|
$optionsyes = array('eid'=>$eid, 'confirm'=>1, 'sesskey'=>sesskey(), 'id'=>$course->id, 'action'=>'delete');
|
||||||
|
$optionsno = array('id'=>$course->id);
|
||||||
|
notice_yesno($strdeletecheckfull, 'category.php', 'category.php', $optionsyes, $optionsno, 'post', 'get');
|
||||||
|
print_footer($course);
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'autosort':
|
case 'autosort':
|
||||||
@ -156,7 +172,7 @@ print_header_simple($strgrades . ': ' . $strgraderreport, ': ' . $strcategoriese
|
|||||||
print_heading(get_string('categoriesedit', 'grades'));
|
print_heading(get_string('categoriesedit', 'grades'));
|
||||||
|
|
||||||
// Add tabs
|
// Add tabs
|
||||||
$currenttab = 'editcategory';
|
$currenttab = 'editcategory';
|
||||||
include('tabs.php');
|
include('tabs.php');
|
||||||
|
|
||||||
print_box_start('gradetreebox generalbox');
|
print_box_start('gradetreebox generalbox');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user