* @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.
 *
 */
define('INTERNAL', 1);
define('INSTITUTIONALADMIN', 1);
define('MENUITEM', 'manageinstitutions/share');
require dirname(dirname(__FILE__)) . '/init.php';
require_once get_config('libroot') . 'view.php';
require_once get_config('libroot') . 'institution.php';
require_once 'pieforms/pieform.php';
$institution = param_alpha('institution', false);
if ($institution == 'mahara') {
    redirect('/admin/site/shareviews.php');
}
$s = institution_selector_for_page($institution, get_config('wwwroot') . 'view/institutionshare.php');
$institution = $s['institution'];
define('TITLE', get_string('share', 'view'));
if ($institution === false) {
    $smarty = smarty();
    $smarty->display('admin/users/noinstitutions.tpl');
    exit;
}
$accesslists = View::get_accesslists(null, null, $institution);
$smarty = smarty();
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('institutionselector', $s['institutionselector']);
$smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs']);
$smarty->assign('accesslists', $accesslists);
$smarty->assign('institution', $institution);
$smarty->display('view/share.tpl');
Example #2
0
<?php

/**
 *
 * @package    mahara
 * @subpackage core
 * @author     Catalyst IT Ltd
 * @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.
 *
 */
define('INTERNAL', 1);
require dirname(dirname(__FILE__)) . '/init.php';
require_once get_config('libroot') . 'view.php';
define('TITLE', get_string('share', 'view'));
define('MENUITEM', 'myportfolio/share');
$accesslists = View::get_accesslists($USER->get('id'));
$smarty = smarty();
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('accesslists', $accesslists);
$smarty->display('view/share.tpl');
<?php

/**
 *
 * @package    mahara
 * @subpackage core
 * @author     Catalyst IT Ltd
 * @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.
 *
 */
define('INTERNAL', 1);
define('ADMIN', 1);
define('MENUITEM', 'configsite/share');
require dirname(dirname(dirname(__FILE__))) . '/init.php';
require_once get_config('libroot') . 'view.php';
define('TITLE', get_string('share', 'view'));
$accesslists = View::get_accesslists(null, null, 'mahara');
$smarty = smarty();
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('accesslists', $accesslists);
$smarty->display('view/share.tpl');
Example #4
0
<?php

/**
 *
 * @package    mahara
 * @subpackage core
 * @author     Catalyst IT Ltd
 * @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.
 *
 */
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();
if (!group_user_can_edit_views($group)) {
    throw new AccessDeniedException();
}
$accesslists = View::get_accesslists(null, $group->id);
$smarty = smarty();
$smarty->assign('heading', $group->name);
$smarty->assign('subsectionheading', TITLE);
$smarty->assign('headingclass', 'page-header');
$smarty->assign('accesslists', $accesslists);
$smarty->display('view/share.tpl');
             $userlisthtml .= '<br /><span style="font-size:1.5em;font-weight:bold">' . $mhr_user->getFullNameString() . ' (' . $mhr_user->getObject()->email . ')</span><br /><br />';
             $record_count = $course_history_table->getTotal('record_count');
             if ($record_count > 0) {
                 $userlisthtml .= $course_history_table->getHTML();
             } else {
                 $userlisthtml .= 'No Records To Display<br />';
             }
         }
         $csvfields = array('username', 'start_date', 'course', 'enrol_date', 'catalog', 'platform', 'instructor', 'credits', 'grade_percent', 'grade_letter');
         $USER->set_download_file(generate_csv($csv_array, $csvfields), 'coursehistory.csv', 'text/csv');
         $csv = true;
     }
 } else {
     if ($selected == 'accesslist') {
         require_once get_config('libroot') . 'view.php';
         $accesslists = View::get_accesslists(array_keys($users));
         foreach ($accesslists['collections'] as $k => $c) {
             if (!isset($users[$c['owner']]->collections)) {
                 $users[$c['owner']]->collections = array();
             }
             $users[$c['owner']]->collections[$k] = $c;
         }
         foreach ($accesslists['views'] as $k => $v) {
             if (!isset($users[$v['owner']]->views)) {
                 $users[$v['owner']]->views = array();
             }
             $users[$v['owner']]->views[$k] = $v;
         }
         $smarty = smarty_core();
         $smarty->assign_by_ref('users', $users);
         $smarty->assign_by_ref('USER', $USER);