lp_toc.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Script opened in an iframe and containing the learning path's table of contents
  5. * @package chamilo.learnpath
  6. * @author Yannick Warnier <ywarnier@beeznest.org>
  7. */
  8. /**
  9. * Code
  10. */
  11. // Flag to allow for anonymous user - needs to be set before global.inc.php.
  12. $use_anonymous = true;
  13. $language_file[] = 'scormdocument';
  14. $language_file[] = 'scorm';
  15. $language_file[] = 'learnpath';
  16. require_once 'back_compat.inc.php';
  17. require_once 'learnpath.class.php';
  18. require_once 'scorm.class.php';
  19. require_once 'aicc.class.php';
  20. if (isset($_SESSION['lpobject'])) {
  21. //if ($debug > 0) error_log('New LP - in lp_toc.php - SESSION[lpobject] is defined', 0);
  22. $oLP = unserialize($_SESSION['lpobject']);
  23. if (is_object($oLP)) {
  24. $_SESSION['oLP'] = $oLP;
  25. } else {
  26. //error_log('New LP - in lp_toc.php - SESSION[lpobject] is not object - dying', 0);
  27. die('Could not instanciate lp object');
  28. }
  29. }
  30. $htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
  31. var dokeos_xajax_handler = window.parent.oxajax;
  32. </script>';
  33. $scorm_css_header = true;
  34. $display_mode = '';
  35. $lp_theme_css = $_SESSION['oLP']->get_theme();
  36. include_once '../inc/reduced_header.inc.php';
  37. ?>
  38. <body dir="<?php echo api_get_text_direction(); ?>">
  39. <?php echo $_SESSION['oLP']->get_html_toc();?><br />
  40. </body>
  41. </html>
  42. <?php
  43. if (!empty($_SESSION['oLP'])) {
  44. $_SESSION['lpobject'] = serialize($_SESSION['oLP']);
  45. }