Commit 6b34bf0b authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add Forums link in group header menu

parent 12da89fe
...@@ -61,7 +61,7 @@ class PluginArtefactFile extends PluginArtefact { ...@@ -61,7 +61,7 @@ class PluginArtefactFile extends PluginArtefact {
'path' => 'groups/files', 'path' => 'groups/files',
'url' => 'artefact/file/groupfiles.php?group='.$groupid, 'url' => 'artefact/file/groupfiles.php?group='.$groupid,
'title' => get_string('Files', 'artefact.file'), 'title' => get_string('Files', 'artefact.file'),
'weight' => 50, 'weight' => 60,
), ),
); );
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
*/ */
define('INTERNAL', 1); define('INTERNAL', 1);
define('MENUITEM', 'groups'); define('MENUITEM', 'groups/forums');
require(dirname(dirname(dirname(__FILE__))) . '/init.php'); require(dirname(dirname(dirname(__FILE__))) . '/init.php');
require_once('group.php'); require_once('group.php');
safe_require('interaction', 'forum'); safe_require('interaction', 'forum');
...@@ -132,7 +132,7 @@ if ($forums) { ...@@ -132,7 +132,7 @@ if ($forums) {
} }
} }
$smarty = smarty(array(), array(), array(), array('sideblocks' => array(interaction_sideblock($groupid)))); $smarty = smarty(array(), array(), array(), array('sideblocks' => array(interaction_sideblock($groupid)), 'group' => $group));
$smarty->assign('breadcrumbs', $breadcrumbs); $smarty->assign('breadcrumbs', $breadcrumbs);
$smarty->assign('groupid', $groupid); $smarty->assign('groupid', $groupid);
$smarty->assign('heading', TITLE); $smarty->assign('heading', TITLE);
......
...@@ -789,11 +789,17 @@ function group_get_menu_tabs($group) { ...@@ -789,11 +789,17 @@ function group_get_menu_tabs($group) {
'title' => get_string('Members', 'group'), 'title' => get_string('Members', 'group'),
'weight' => 30 'weight' => 30
), ),
array( // @todo: get this from a function in the interaction plugin (or better, make forums an artefact plugin)
'path' => 'groups/forums',
'url' => 'interaction/forum/index.php?group='.$group->id,
'title' => get_string('nameplural', 'interaction.forum'),
'weight' => 40
),
array( array(
'path' => 'groups/views', 'path' => 'groups/views',
'url' => 'view/groupviews.php?group='.$group->id, 'url' => 'view/groupviews.php?group='.$group->id,
'title' => get_string('Views', 'group'), 'title' => get_string('Views', 'group'),
'weight' => 40 'weight' => 50
), ),
); );
if (!group_user_access($group->id)) { if (!group_user_access($group->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