1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-25 10:26:17 +02:00

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
commit bfaf3041fa

@ -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)));
}