本文整理汇总了PHP中GradebookUtils::getUserCertificatesInCourses方法的典型用法代码示例。如果您正苦于以下问题:PHP GradebookUtils::getUserCertificatesInCourses方法的具体用法?PHP GradebookUtils::getUserCertificatesInCourses怎么用?PHP GradebookUtils::getUserCertificatesInCourses使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GradebookUtils
的用法示例。
在下文中一共展示了GradebookUtils::getUserCertificatesInCourses方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
$firstname = $searchForm->getSubmitValue('firstname');
$lastname = $searchForm->getSubmitValue('lastname');
$userList = UserManager::getUserByName($firstname, $lastname);
if (empty($userList)) {
Display::addFlash(Display::return_message(get_lang('NoResults'), 'warning'));
header('Location: ' . api_get_self());
exit;
}
} elseif ($userId > 0) {
$userInfo = api_get_user_info($userId);
if (empty($userInfo)) {
Display::addFlash(Display::return_message(get_lang('NoUser'), 'warning'));
header('Location: ' . api_get_self());
exit;
}
$courseList = GradebookUtils::getUserCertificatesInCourses($userId, false);
$sessionList = GradebookUtils::getUserCertificatesInSessions($userId, false);
if (empty($courseList) && empty($sessionList)) {
Display::addFlash(Display::return_message(sprintf(get_lang('TheUserXNotYetAchievedCertificates'), $userInfo['complete_name']), 'warning'));
header('Location: ' . api_get_self());
exit;
}
}
$template = new Template(get_lang('SearchCertificates'));
$template->assign('search_form', $searchForm->returnForm());
$template->assign('user_list', $userList);
$template->assign('user_info', $userInfo);
$template->assign('course_list', $courseList);
$template->assign('session_list', $sessionList);
$content = $template->fetch('default/gradebook/search.tpl');
$template->assign('header', get_lang('SearchCertificates'));