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


PHP DocumentManager::attach_gradebook_certificate方法代码示例

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


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

示例1: substr

             }
             if ($new_title) {
                 $ct .= ", title='{$new_title}'";
             }
             Database::query("UPDATE {$doc_table} SET" . substr($ct, 1) . " WHERE c_id = {$course_id} AND id = '{$document_id}'");
         }
         $dir = substr($dir, 0, -1);
         $selectcat = '';
         if (isset($_REQUEST['selectcat'])) {
             $selectcat = "&selectcat=" . Security::remove_XSS($_REQUEST['selectcat']);
         }
         $certificate_condition = '';
         if ($is_certificate_mode) {
             $df = DocumentManager::get_default_certificate_id($_course['code']);
             if (!isset($df)) {
                 DocumentManager::attach_gradebook_certificate($_course['code'], $document_id);
             }
             $certificate_condition = '&certificate=true';
         }
         header('Location: document.php?' . api_get_cidreq() . '&id=' . $folder_id . $selectcat . $certificate_condition);
         exit;
     } else {
         Display::display_header($nameTools, 'Doc');
         Display::display_error_message(get_lang('Impossible'));
         Display::display_footer();
     }
 } else {
     Display::display_header($nameTools, 'Doc');
     Display::display_error_message(get_lang('Impossible'));
     Display::display_footer();
 }
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:create_document.php

示例2: intval

    if (isset($_GET['remove_as_template'])) {
        $document_id_for_template = intval($_GET['remove_as_template']);
        $user_id = api_get_user_id();
        DocumentManager::unset_document_as_template($document_id_for_template, $course_code, $user_id);
        Display::addFlash(Display::return_message(get_lang('DocumentUnsetAsTemplate'), 'confirmation'));
    }
}
// END ACTION MENU
// Attach certificate in the gradebook
if (isset($_GET['curdirpath']) && $_GET['curdirpath'] == '/certificates' && isset($_GET['set_certificate']) && $_GET['set_certificate'] == strval(intval($_GET['set_certificate']))) {
    if (isset($_GET['cidReq'])) {
        $course_id = Security::remove_XSS($_GET['cidReq']);
        // course id
        $document_id = Security::remove_XSS($_GET['set_certificate']);
        // document id
        DocumentManager::attach_gradebook_certificate($course_id, $document_id);
        $message = Display::return_message(get_lang('IsDefaultCertificate'), 'normal');
        Display::addFlash($message);
    }
}
/* 	GET ALL DOCUMENT DATA FOR CURDIRPATH */
if (isset($_GET['keyword']) && !empty($_GET['keyword'])) {
    $documentAndFolders = DocumentManager::get_all_document_data($courseInfo, $curdirpath, $groupId, null, $is_allowed_to_edit || $group_member_with_upload_rights, true);
} else {
    $documentAndFolders = DocumentManager::get_all_document_data($courseInfo, $curdirpath, $groupId, null, $is_allowed_to_edit || $group_member_with_upload_rights, false);
}
if ($groupId != 0) {
    $userAccess = GroupManager::user_has_access(api_get_user_id(), $groupId, GroupManager::GROUP_TOOL_DOCUMENTS);
    if ($userAccess) {
        $folders = DocumentManager::get_all_document_folders($courseInfo, $groupId, $is_allowed_to_edit || $group_member_with_upload_rights);
    }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:document.php


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