shareviews.php 900 Bytes
Newer Older
Richard Mansfield's avatar
Richard Mansfield committed
1
2
3
4
5
6
<?php
/**
 *
 * @package    mahara
 * @subpackage core
 * @author     Catalyst IT Ltd
7
8
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
 * @copyright  For copyright information on Mahara, please see the README file distributed with this software.
Richard Mansfield's avatar
Richard Mansfield committed
9
10
11
12
13
14
15
16
17
18
19
20
 *
 */

define('INTERNAL', 1);
require(dirname(dirname(__FILE__)) . '/init.php');
require_once(get_config('libroot') . 'view.php');
require_once(get_config('libroot') . 'group.php');
define('TITLE', get_string('share', 'view'));
define('MENUITEM', 'groups/share');

define('GROUP', param_integer('group'));
$group = group_current_group();
21
if (!group_user_can_edit_views($group)) {
Richard Mansfield's avatar
Richard Mansfield committed
22
23
24
25
26
27
    throw new AccessDeniedException();
}

$accesslists = View::get_accesslists(null, $group->id);

$smarty = smarty();
28
$smarty->assign('heading', $group->name);
Richard Mansfield's avatar
Richard Mansfield committed
29
30
$smarty->assign('accesslists', $accesslists);
$smarty->display('view/share.tpl');