to get back from where we came from & refine where we are returned to when cancelled.
merged from MOODLE_19_STABLE
if ($mform->is_cancelled()){
if (empty($category)) {
- redirect($CFG->wwwroot);
+ redirect($CFG->wwwroot .'/course/index.php?categoryedit=on');
} else {
redirect($CFG->wwwroot.'/course/category.php?categoryedit=on&id='.$category->id);
}
$mform->addElement('hidden', 'id', null);
$mform->addElement('hidden', 'categoryadd', 0);
$mform->setType('id', PARAM_INT);
- $this->add_action_buttons(false, get_string('submit'));
+ $this->add_action_buttons(true, get_string('savechanges'));
}
}
?>