testheaderpage.php 1.1 KB

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