Commit 0ed69fcf authored by Richard Mansfield's avatar Richard Mansfield
Browse files

When releasing a view, redirect to the clean group or view url

Bug #1006634, part 3

Use the global $submittedgroup in releaseview_submit() - it already
contains the group record.

Change-Id: I3ad549cd8f0581251ded9d315cf3b5cc90e724ee
Signed-off-by: default avatarRichard Mansfield <>
parent fe8eab18
......@@ -141,16 +141,15 @@ else {
function releaseview_submit() {
global $USER, $SESSION, $view;
$groupid = $view->get('submittedgroup');
global $USER, $SESSION, $view, $submittedgroup;
$SESSION->add_ok_msg(get_string('viewreleasedsuccess', 'group'));
if ($groupid) {
if ($submittedgroup) {
// 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'));
$javascript = array('paginator', 'viewmenu', 'artefact/resume/resumeshowhide.js');
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