lp_toc.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. // Flag to allow for anonymous user - needs to be set before global.inc.php
  9. $use_anonymous = true;
  10. $language_file[] = 'scormdocument';
  11. $language_file[] = 'scorm';
  12. $language_file[] = 'learnpath';
  13. require_once 'back_compat.inc.php';
  14. require_once 'learnpath.class.php';
  15. require_once 'scorm.class.php';
  16. require_once 'aicc.class.php';
  17. if (isset($_SESSION['lpobject'])) {
  18. //if($debug>0) error_log('New LP - in lp_toc.php - SESSION[lpobject] is defined',0);
  19. $oLP = unserialize($_SESSION['lpobject']);
  20. if (is_object($oLP)){
  21. $_SESSION['oLP'] = $oLP;
  22. } else {
  23. //error_log('New LP - in lp_toc.php - SESSION[lpobject] is not object - dying',0);
  24. die('Could not instanciate lp object.');
  25. }
  26. }
  27. $htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
  28. var dokeos_xajax_handler = window.parent.oxajax;
  29. </script>';
  30. $scorm_css_header = true;
  31. $display_mode = '';
  32. $lp_theme_css = $_SESSION['oLP']->get_theme();
  33. include_once '../inc/reduced_header.inc.php';
  34. ?>
  35. <body dir="<?php echo api_get_text_direction(); ?>">
  36. <?php echo $_SESSION['oLP']->get_html_toc();?><br />
  37. </body>
  38. </html>
  39. <?php
  40. if (!empty($_SESSION['oLP'])) {
  41. $_SESSION['lpobject'] = serialize($_SESSION['oLP']);
  42. }