criteria.php 1000 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Show information about OpenBadge citeria
  5. * @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
  6. * @package chamilo.badge
  7. */
  8. require_once __DIR__.'/../inc/global.inc.php';
  9. $entityManager = Database::getManager();
  10. $skill = $entityManager->find('ChamiloCoreBundle:Skill', $_GET['id']);
  11. if (!$skill) {
  12. Display::addFlash(
  13. Display::return_message(get_lang('SkillNotFound'), 'error')
  14. );
  15. header('Location: '.api_get_path(WEB_PATH));
  16. exit;
  17. }
  18. $skillInfo = [
  19. 'name' => $skill->getName(),
  20. 'short_code' => $skill->getShortCode(),
  21. 'description' => $skill->getDescription(),
  22. 'criteria' => $skill->getCriteria(),
  23. 'badge_image' => $skill->getWebIconPath()
  24. ];
  25. $template = new Template();
  26. $template->assign('skill_info', $skillInfo);
  27. $content = $template->fetch(
  28. $template->get_template('skill/criteria.tpl')
  29. );
  30. $template->assign('content', $content);
  31. $template->display_one_col_template();