当前位置: 首页>>代码示例>>PHP>>正文


PHP GroupManager::groupMemberWithUploadRights方法代码示例

本文整理汇总了PHP中GroupManager::groupMemberWithUploadRights方法的典型用法代码示例。如果您正苦于以下问题:PHP GroupManager::groupMemberWithUploadRights方法的具体用法?PHP GroupManager::groupMemberWithUploadRights怎么用?PHP GroupManager::groupMemberWithUploadRights使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GroupManager的用法示例。


在下文中一共展示了GroupManager::groupMemberWithUploadRights方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

if (!$is_certificate_mode) {
    $req_gid = null;
    if (api_is_in_group()) {
        $req_gid = '&gidReq=' . $groupId;
        $interbreadcrumb[] = array("url" => "../group/group_space.php?gidReq=" . $groupId, "name" => get_lang('GroupSpace'));
        $noPHP_SELF = true;
        $path = explode('/', $dir);
        if ('/' . $path[1] != $group_properties['directory']) {
            api_not_allowed(true);
        }
    }
    $interbreadcrumb[] = array("url" => "./document.php?curdirpath=" . urlencode($dir) . $req_gid, "name" => get_lang('Documents'));
} else {
    $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'gradebook/' . $_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
}
if (!($is_allowed_to_edit || GroupManager::groupMemberWithUploadRights() || is_my_shared_folder($_user['user_id'], Security::remove_XSS($dir), api_get_session_id()))) {
    api_not_allowed(true);
}
Event::event_access_tool(TOOL_DOCUMENT);
$display_dir = $dir;
if (isset($group_properties)) {
    $display_dir = explode('/', $dir);
    unset($display_dir[0]);
    unset($display_dir[1]);
    $display_dir = implode('/', $display_dir);
}
$select_cat = isset($_GET['selectcat']) ? intval($_GET['selectcat']) : null;
// Create a new form
$form = new FormValidator('create_document', 'post', api_get_self() . '?' . api_get_cidreq() . '&dir=' . Security::remove_XSS(urlencode($dir)) . '&selectcat=' . $select_cat, null, array('class' => 'form-horizontal'));
// form title
$form->addElement('header', $nameTools);
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:create_document.php

示例2: array

// "2" because at the begin and end there are 2 "/"
// Level correction for group documents.
if (!empty($group_properties['directory'])) {
    $count_dir = $count_dir > 0 ? $count_dir - 1 : 0;
}
$relative_url = '';
for ($i = 0; $i < $count_dir; $i++) {
    $relative_url .= '../';
}
$html_editor_config = array('ToolbarSet' => api_is_allowed_to_edit(null, true) ? 'Documents' : 'DocumentsStudent', 'Width' => '100%', 'Height' => '600', 'FullPage' => true, 'InDocument' => true, 'CreateDocumentDir' => $relative_url, 'CreateDocumentWebDir' => empty($group_properties['directory']) ? api_get_path(WEB_COURSE_PATH) . $_course['path'] . '/document/' : api_get_path(WEB_COURSE_PATH) . api_get_course_path() . '/document' . $group_properties['directory'] . '/', 'BaseHref' => api_get_path(WEB_COURSE_PATH) . $_course['path'] . '/document' . $dir);
if ($is_certificate_mode) {
    $html_editor_config['CreateDocumentDir'] = api_get_path(WEB_COURSE_PATH) . $_course['path'] . '/document/';
    $html_editor_config['CreateDocumentWebDir'] = api_get_path(WEB_COURSE_PATH) . $_course['path'] . '/document/';
    $html_editor_config['BaseHref'] = api_get_path(WEB_COURSE_PATH) . $_course['path'] . '/document' . $dir;
}
$is_allowed_to_edit = api_is_allowed_to_edit(null, true) || GroupManager::groupMemberWithUploadRights() || is_my_shared_folder(api_get_user_id(), $dir, $current_session_id);
$noPHP_SELF = true;
/*	Other initialization code */
$dbTable = Database::get_course_table(TABLE_DOCUMENT);
$course_id = api_get_course_int_id();
if (!empty($group_id)) {
    $interbreadcrumb[] = array('url' => '../group/group_space.php?' . api_get_cidreq(), 'name' => get_lang('GroupSpace'));
    $group_document = true;
    $noPHP_SELF = true;
}
if (!$is_certificate_mode) {
    $interbreadcrumb[] = array("url" => "./document.php?curdirpath=" . urlencode($my_cur_dir_path) . '&' . api_get_cidreq(), "name" => get_lang('Documents'));
} else {
    $interbreadcrumb[] = array('url' => '../gradebook/' . $_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
}
// Interbreadcrumb for the current directory root path
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:edit_document.php


注:本文中的GroupManager::groupMemberWithUploadRights方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。