testheaderpage.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php //$id: $
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Code library for HotPotatoes integration.
  5. * @package chamilo.exercise
  6. * @author Istvan Mandak
  7. */
  8. /**
  9. * Code
  10. */
  11. // name of the language file that needs to be included
  12. $language_file='exercice';
  13. require '../inc/global.inc.php';
  14. require_once(api_get_path(SYS_CODE_PATH).'exercice/hotpotatoes.lib.php');
  15. $documentPath= api_get_path(SYS_COURSE_PATH).$_course['path']."/document";
  16. $my_file = Security::remove_XSS($_GET['file']);
  17. $my_file=str_replace(array('../','\\..','\\0','..\\'),array('','','',''),urldecode($my_file));
  18. $title = GetQuizName($my_file,$documentPath);
  19. if ($title =='') {
  20. $title = basename($my_file);
  21. }
  22. $nameTools = $title;
  23. $noPHP_SELF=true;
  24. if (isset($_SESSION['gradebook'])){
  25. $gradebook= $_SESSION['gradebook'];
  26. }
  27. if (!empty($gradebook) && $gradebook=='view') {
  28. $interbreadcrumb[]= array (
  29. 'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
  30. 'name' => get_lang('ToolGradebook')
  31. );
  32. }
  33. $interbreadcrumb[]= array ("url"=>"./exercice.php", "name"=> get_lang('Exercices'));
  34. Display::display_header($nameTools,"Exercise");
  35. echo "<a name='TOP'></a>";