Commit c84d12e7 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Redirect tutors to the group page after releasing views, to avoid possible access denied page

Signed-off-by: default avatarRichard Mansfield <>
parent 93418726
......@@ -115,8 +115,14 @@ else {
function releaseview_submit() {
global $USER, $SESSION, $view;
$groupid = $view->get('submittedgroup');
$SESSION->add_ok_msg(get_string('viewreleasedsuccess', 'group'));
if ($groupid) {
// The tutor might not have access to the view any more; send
// them back to the group page.
redirect(get_config('wwwroot') . 'group/view.php?id='.$groupid);
redirect(get_config('wwwroot') . 'view/view.php?id='.$view->get('id'));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment