Permalink
Browse files

Merge branch 'wip-mdl-32526-m23' of git://github.com/rajeshtaneja/moo…

…dle into MOODLE_23_STABLE
  • Loading branch information...
2 parents 166cb23 + 2ed251d commit 38f688108dc38479cb3147340c59d4044a061f7a @danpoltawski danpoltawski committed Jan 22, 2013
Showing with 2 additions and 10 deletions.
  1. +2 −10 course/edit.php
View
@@ -130,16 +130,8 @@
}
rebuild_course_cache($course->id);
- 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)));
}

0 comments on commit 38f6881

Please sign in to comment.