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:
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user