1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- /* For licensing terms, see /license.txt */
- /**
- * List of achieved certificates by the current user
- * @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
- * @package chamilo.gradebook
- */
- $cidReset = true;
- if (api_is_anonymous()) {
- api_not_allowed(true);
- }
- $userId = api_get_user_id();
- $courseList = GradebookUtils::getUserCertificatesInCourses($userId);
- $sessionList = GradebookUtils::getUserCertificatesInSessions($userId);
- if (empty($courseList) && empty($sessionList)) {
- Display::addFlash(
- Display::return_message(get_lang('YouNotYetAchievedCertificates'), 'warning')
- );
- }
- $template = \Chamilo\CoreBundle\Framework\Container::getTwig();
- $template->addGlobal('course_list', $courseList);
- $template->addGlobal('session_list', $sessionList);
- if (api_get_setting('course.allow_public_certificates') == 'true') {
- $template->addGlobal(
- 'actions',
- Display::toolbarButton(
- get_lang('SearchCertificates'),
- api_get_path(WEB_CODE_PATH) . "gradebook/search.php",
- 'search',
- 'info'
- )
- );
- }
- echo $template->render('@template_style/gradebook/my_certificates.html.twig');
|