lp_toc.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php //$id: $
  2. /**
  3. * Script opened in an iframe and containing the learning path's table of contents
  4. * @package dokeos.learnpath
  5. * @author Yannick Warnier <ywarnier@beeznest.org>
  6. * @license GNU/GPL - See Dokeos license directory for details
  7. */
  8. /**
  9. * Script
  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. {
  22. //if($debug>0) error_log('New LP - in lp_toc.php - SESSION[lpobject] is defined',0);
  23. $oLP = unserialize($_SESSION['lpobject']);
  24. if(is_object($oLP)){
  25. $_SESSION['oLP'] = $oLP;
  26. }else{
  27. //error_log('New LP - in lp_toc.php - SESSION[lpobject] is not object - dying',0);
  28. die('Could not instanciate lp object');
  29. }
  30. }
  31. $charset = $_SESSION['oLP']->encoding;
  32. $htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
  33. var dokeos_xajax_handler = window.parent.oxajax;
  34. </script>';
  35. $scorm_css_header=true;
  36. $display_mode='';
  37. $lp_theme_css=$_SESSION['oLP']->get_theme();
  38. include_once('../inc/reduced_header.inc.php');
  39. ?>
  40. <body>
  41. <?php echo $_SESSION['oLP']->get_html_toc();?><br/>
  42. </body>
  43. </html>
  44. <?php
  45. if(!empty($_SESSION['oLP'])){
  46. $_SESSION['lpobject'] = serialize($_SESSION['oLP']);
  47. }
  48. ?>