testheaderpage.php 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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. require '../inc/global.inc.php';
  9. require_once(api_get_path(SYS_CODE_PATH).'exercice/hotpotatoes.lib.php');
  10. $documentPath= api_get_path(SYS_COURSE_PATH).$_course['path']."/document";
  11. $my_file = Security::remove_XSS($_GET['file']);
  12. $my_file=str_replace(array('../','\\..','\\0','..\\'),array('','','',''),urldecode($my_file));
  13. $title = GetQuizName($my_file,$documentPath);
  14. if ($title =='') {
  15. $title = basename($my_file);
  16. }
  17. $nameTools = $title;
  18. $noPHP_SELF=true;
  19. if (isset($_SESSION['gradebook'])){
  20. $gradebook= $_SESSION['gradebook'];
  21. }
  22. if (!empty($gradebook) && $gradebook=='view') {
  23. $interbreadcrumb[]= array (
  24. 'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
  25. 'name' => get_lang('ToolGradebook')
  26. );
  27. }
  28. $interbreadcrumb[]= array ("url"=>"./exercise.php", "name"=> get_lang('Exercises'));
  29. Display::display_header($nameTools,"Exercise");
  30. echo "<a name='TOP'></a>";