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

Use clean group urls in redirect after editing group homepage content



Bug #1006634, part 3

This is the destination for the "Done" button at the bottom of the
block editing page.

Change-Id: I0ecb734af6370865832a538e289d919f6cfbea93
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent c7c08aed
......@@ -59,7 +59,7 @@
</form>
<div id="view-wizard-controls" class="center">
<form action="{$WWWROOT}{if $groupid}{if $viewtype == 'grouphomepage'}group/view.php{else}view/groupviews.php{/if}{elseif $institution}view/institutionviews.php{else}view{/if}" method="GET">
<form action="{$WWWROOT}{if $groupid}{if $viewtype == 'grouphomepage'}{$groupurl}{else}view/groupviews.php{/if}{elseif $institution}view/institutionviews.php{else}view{/if}" method="GET">
{if $groupid}
{if $viewtype == 'grouphomepage'}
<input type="hidden" name="id" value="{$groupid}">
......
......@@ -98,6 +98,7 @@ else if ($view->get('type') == 'dashboard') {
}
else if ($view->get('type') == 'grouphomepage') {
$title = get_string('grouphomepage', 'view');
$groupurl = group_homepage_url(get_record('group', 'id', $view->get('group')), false);
define('TITLE', $title . ': ' . get_string('editcontent', 'view'));
}
else if ($new) {
......@@ -204,6 +205,9 @@ if (get_config('viewmicroheaders')) {
$smarty->assign('viewtype', $viewtype);
$smarty->assign('view', $view->get('id'));
$smarty->assign('groupid', $group);
if (isset($groupurl)) {
$smarty->assign('groupurl', $groupurl);
}
$smarty->assign('institution', $institution);
if (get_config('userscanchooseviewthemes')
......
Supports Markdown
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