//require_capability() here!!
// default return url
-$returnurl = 'edit_tree.php?id='.$course->id;
+$returnurl = 'tree.php?id='.$course->id;
// get the grading tree object
// note: total must be first for moving to work correctly, if you want it last moving code must be rewritten!
case 'edit':
if ($eid and confirm_sesskey()) {
if ($element['type'] == 'category') {
- redirect('edit_category.php?courseid='.$course->id.'&id='.$object->id);
+ redirect('category.php?courseid='.$course->id.'&id='.$object->id);
} else {
- redirect('edit_item.php?courseid='.$course->id.'&id='.$object->id);
+ redirect('item.php?courseid='.$course->id.'&id='.$object->id);
}
}
break;
$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, 'edit_tree.php', 'edit_tree.php', $optionsyes, $optionsno, 'post', 'get');
+ notice_yesno($strdeletecheckfull, 'tree.php', 'tree.php', $optionsyes, $optionsno, 'post', 'get');
print_footer($course);
die;
}
echo '<div class="buttons">';
if ($moving) {
- print_single_button('edit_tree.php', array('id'=>$course->id), get_string('cancel'), 'get');
+ print_single_button('tree.php', array('id'=>$course->id), get_string('cancel'), 'get');
} else {
- print_single_button('edit_category.php', array('courseid'=>$course->id), get_string('addcategory', 'grades'), 'get');
- print_single_button('edit_item.php', array('courseid'=>$course->id), get_string('additem', 'grades'), 'get');
- print_single_button('edit_tree.php', array('id'=>$course->id, 'action'=>'autosort'), get_string('autosort', 'grades'), 'get');
- print_single_button('edit_tree.php', array('id'=>$course->id, 'action'=>'synclegacy'), get_string('synclegacygrades', 'grades'), 'get');
+ print_single_button('category.php', array('courseid'=>$course->id), get_string('addcategory', 'grades'), 'get');
+ print_single_button('item.php', array('courseid'=>$course->id), get_string('additem', 'grades'), 'get');
+ print_single_button('tree.php', array('id'=>$course->id, 'action'=>'autosort'), get_string('autosort', 'grades'), 'get');
+ print_single_button('tree.php', array('id'=>$course->id, 'action'=>'synclegacy'), get_string('synclegacygrades', 'grades'), 'get');
}
echo '</div>';
print_footer($course);
$eid = $element['eid'];
/// prepare actions
- $actions = '<a href="edit_tree.php?id='.$COURSE->id.'&action=edit&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.$stredit.'" title="'.$stredit.'"/></a>';
+ $actions = '<a href="tree.php?id='.$COURSE->id.'&action=edit&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.$stredit.'" title="'.$stredit.'"/></a>';
if ($element['type'] == 'item' or ($element['type'] == 'category' and $element['depth'] > 1)) {
- $actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&action=delete&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$strdelete.'" title="'.$strdelete.'"/></a>';
- $actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&action=moveselect&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" alt="'.$strmove.'" title="'.$strmove.'"/></a>';
+ $actions .= '<a href="tree.php?id='.$COURSE->id.'&action=delete&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$strdelete.'" title="'.$strdelete.'"/></a>';
+ $actions .= '<a href="tree.php?id='.$COURSE->id.'&action=moveselect&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" alt="'.$strmove.'" title="'.$strmove.'"/></a>';
}
if ($object->is_locked()) {
- $actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&action=unlock&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/unlock.gif" class="iconsmall" alt="'.$strunlock.'" title="'.$strunlock.'"/></a>';
+ $actions .= '<a href="tree.php?id='.$COURSE->id.'&action=unlock&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/unlock.gif" class="iconsmall" alt="'.$strunlock.'" title="'.$strunlock.'"/></a>';
} else {
- $actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&action=lock&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/lock.gif" class="iconsmall" alt="'.$strlock.'" title="'.$strlock.'"/></a>';
+ $actions .= '<a href="tree.php?id='.$COURSE->id.'&action=lock&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/lock.gif" class="iconsmall" alt="'.$strlock.'" title="'.$strlock.'"/></a>';
}
if ($object->is_hidden()) {
$name = '<span class="dimmed_text">'.$object->get_name().'</span>';
- $actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&action=show&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.$strshow.'" title="'.$strshow.'"/></a>';
+ $actions .= '<a href="tree.php?id='.$COURSE->id.'&action=show&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.$strshow.'" title="'.$strshow.'"/></a>';
} else {
$name = $object->get_name();
- $actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&action=hide&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.$strhide.'" title="'.$strhide.'"/></a>';
+ $actions .= '<a href="tree.php?id='.$COURSE->id.'&action=hide&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.$strhide.'" title="'.$strhide.'"/></a>';
}
/// prepare icon
$moveto = '';
if ($moving) {
$actions = ''; // no action icons when moving
- $moveto = '<li><a href="edit_tree.php?id='.$COURSE->id.'&action=move&eid='.$moving.'&moveafter='.$eid.'&sesskey='.sesskey().'"><img class="movetarget" src="'.$CFG->wwwroot.'/pix/movehere.gif" alt="'.$strmovehere.'" title="'.$strmovehere.'" /></a></li>';
+ $moveto = '<li><a href="tree.php?id='.$COURSE->id.'&action=move&eid='.$moving.'&moveafter='.$eid.'&sesskey='.sesskey().'"><img class="movetarget" src="'.$CFG->wwwroot.'/pix/movehere.gif" alt="'.$strmovehere.'" title="'.$strmovehere.'" /></a></li>';
}
/// print the list items now