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


PHP GradebookUtils::get_list_users_certificates方法代码示例

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


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

示例1: get_lang

 if (empty($selectedCourseInfo)) {
     Session::write('reportErrorMessage', get_lang('NoCourse'));
     header("Location: {$selfUrl}");
     exit;
 }
 $gradebookCategories = Category::load(null, null, $selectedCourseInfo['code'], null, false, $selectedSession);
 $gradebook = null;
 if (!empty($gradebookCategories)) {
     $gradebook = current($gradebookCategories);
 }
 if (!is_null($gradebook)) {
     $exportAllLink = api_get_path(WEB_CODE_PATH) . "gradebook/gradebook_display_certificate.php?";
     $exportAllLink .= http_build_query(array("action" => "export_all_certificates", "cidReq" => $selectedCourseInfo['code'], "id_session" => 0, "gidReq" => 0, "cat_id" => $gradebook->get_id()));
     $sessionName = api_get_session_name($selectedSession);
     $courseName = api_get_course_info($selectedCourseInfo['code'])['title'];
     $studentList = GradebookUtils::get_list_users_certificates($gradebook->get_id());
     $certificateStudents = array();
     if (is_array($studentList) && !empty($studentList)) {
         foreach ($studentList as $student) {
             if (api_is_student_boss() && !in_array($student['user_id'], $userList)) {
                 continue;
             }
             $certificateStudent = array('fullName' => api_get_person_name($student['firstname'], $student['lastname']), 'sessionName' => $sessionName, 'courseName' => $courseName, 'certificates' => array());
             $studentCertificates = GradebookUtils::get_list_gradebook_certificates_by_user_id($student['user_id'], $gradebook->get_id());
             if (!is_array($studentCertificates) || empty($studentCertificates)) {
                 continue;
             }
             foreach ($studentCertificates as $certificate) {
                 $creationDate = new DateTime($certificate['created_at']);
                 $creationMonth = $creationDate->format('m');
                 $creationYear = $creationDate->format('Y');
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:certificate_report.php

示例2: array

    $filterForm = '<br />' . $form->return_form();
    if ($form->validate()) {
        $officialCode = $form->getSubmitValue('filter');
        if ($officialCode == 'all') {
            $certificate_list = GradebookUtils::get_list_users_certificates($cat_id);
        } else {
            $userList = UserManager::getUsersByOfficialCode($officialCode);
            if (!empty($userList)) {
                $certificate_list = GradebookUtils::get_list_users_certificates($cat_id, $userList);
            }
        }
    } else {
        $certificate_list = GradebookUtils::get_list_users_certificates($cat_id);
    }
} else {
    $certificate_list = GradebookUtils::get_list_users_certificates($cat_id);
}
echo '<div class="btn-group">';
$url = api_get_self() . '?action=generate_all_certificates' . '&' . api_get_cidReq() . '&cat_id=' . $cat_id . '&filter=' . $filterOfficialCode;
echo Display::url(get_lang('GenerateCertificates'), $url, array('class' => 'btn btn-default'));
$url = api_get_self() . '?action=delete_all_certificates' . '&' . api_get_cidReq() . '&cat_id=' . $cat_id . '&filter=' . $filterOfficialCode;
echo Display::url(get_lang('DeleteAllCertificates'), $url, array('class' => 'btn btn-default'));
$hideCertificateExport = api_get_setting('hide_certificate_export_link');
if (count($certificate_list) > 0 && $hideCertificateExport !== 'true') {
    $url = api_get_self() . '?action=export_all_certificates' . '&' . api_get_cidReq() . '&cat_id=' . $cat_id . '&filter=' . $filterOfficialCode;
    echo Display::url(get_lang('ExportAllCertificatesToPDF'), $url, array('class' => 'btn btn-default'));
}
echo '</div>';
echo $filterForm;
if (count($certificate_list) == 0) {
    echo Display::display_warning_message(get_lang('NoResultsAvailable'));
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:gradebook_display_certificate.php

示例3: deleteAllCertificates

 /**
  * @param int $catId
  */
 public static function deleteAllCertificates($catId)
 {
     $certificate_list = GradebookUtils::get_list_users_certificates($catId);
     if (!empty($certificate_list)) {
         foreach ($certificate_list as $index => $value) {
             $list_certificate = GradebookUtils::get_list_gradebook_certificates_by_user_id($value['user_id'], $catId);
             foreach ($list_certificate as $value_certificate) {
                 $certificate_obj = new Certificate($value_certificate['id']);
                 $certificate_obj->delete(true);
             }
         }
     }
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:16,代码来源:category.class.php


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