Commit d6263dfa authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1819787: Hiding group submenu when on group page



behatnotneeded

Change-Id: I496c0d9d22d7f1e98ce979243118a66926d41568
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 597fdaac
......@@ -6032,11 +6032,13 @@ class View {
}
}
public static function set_nav($group, $institution, $share=false, $collection=false) {
public static function set_nav($group, $institution, $share=false, $collection=false, $submenu=true) {
if ($group) {
define('MENUITEM', 'engage/index');
define('MENUITEM_SUBPAGE', $share ? 'share' : 'views');
define('GROUP', $group);
if ($submenu) {
define('MENUITEM_SUBPAGE', $share ? 'share' : 'views');
define('GROUP', $group);
}
}
else if ($institution == 'mahara') {
define('ADMIN', 1);
......
......@@ -104,7 +104,7 @@ if (!can_view_view($view)) {
throw new AccessDeniedException($errorstr);
}
$institution = $view->get('institution');
View::set_nav($groupid, $institution);
View::set_nav($groupid, $institution, false, false, false);
// Comment list pagination requires limit/offset params
$limit = param_integer('limit', 10);
$offset = param_integer('offset', 0);
......
......@@ -69,6 +69,8 @@ Scenario: Create forum and add block to group page
# TODO could test other options
And I press "Save"
And I display the page
# Allow the ajax block to load
And I wait "1" seconds
Then I should see "cat photography is often underrated"
And I should see "I just use my phone"
And I expand the section "Attached files"
......
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