ADministration MDL-23144 fixed course creation -> cancel button going to limbo. now goes back to course(cat) index page

This commit is contained in:
aparup
2010-07-08 05:40:03 +00:00
parent 13ce122930
commit 924ca8450f
+2 -2
View File
@@ -84,8 +84,8 @@ if (!empty($course)) {
$editform = new course_edit_form(NULL, array('course'=>$course, 'category'=>$category, 'editoroptions'=>$editoroptions));
if ($editform->is_cancelled()) {
if (empty($course)) {
redirect($CFG->wwwroot.'/');
if (empty($course->id)) {
redirect($CFG->wwwroot.'/course');
} else {
redirect($CFG->wwwroot.'/course/view.php?id='.$course->id);
}