Merge branch 'wip-mdl-32526' of git://github.com/rajeshtaneja/moodle

This commit is contained in:
Dan Poltawski
2013-01-22 14:00:26 +08:00
+2 -10
View File
@@ -135,16 +135,8 @@ if ($editform->is_cancelled()) {
update_course($data, $editoroptions);
}
switch ($returnto) {
case 'category':
case 'topcat': //redirecting to where the new course was created by default.
$url = new moodle_url($CFG->wwwroot.'/course/category.php', array('id'=>$categoryid));
break;
default:
$url = new moodle_url($CFG->wwwroot.'/course/view.php', array('id'=>$course->id));
break;
}
redirect($url);
// Redirect user to newly created/updated course.
redirect(new moodle_url('/course/view.php', array('id' => $course->id)));
}