1
0
mirror of https://github.com/moodle/moodle.git synced 2025-05-15 12:45:41 +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); update_course($data, $editoroptions);
} }
switch ($returnto) { // Redirect user to newly created/updated course.
case 'category': redirect(new moodle_url('/course/view.php', array('id' => $course->id)));
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);
} }