Permalink
Browse files

MDL-32526 Course: After creating course user should be redirected to …

…newly created course

After creating a new course if user has capability to enrol users then
enrol user page should be visible else user should see newly created course
  • Loading branch information...
1 parent 2713f92 commit 2ed251d00702d58496cd2e54fc6bc007dbdd6d58 Rajesh Taneja committed Jan 11, 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 2ed251d

Please sign in to comment.