lp_nav.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php //$id: $
  2. /**
  3. * Script opened in an iframe and containing the learning path's navigation and progress bar
  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. $langFile[] = "scormdocument";
  12. $langFile[] = "scorm";
  13. $langFile[] = "learnpath";
  14. require_once('back_compat.inc.php');
  15. require_once('learnpath.class.php');
  16. require_once('scorm.class.php');
  17. require_once('aicc.class.php');
  18. //error_log('New LP - Loaded lp_nav: '.$_SERVER['REQUEST_URI'],0);
  19. if(isset($_SESSION['lpobject']))
  20. {
  21. //if($debug>0) //error_log('New LP - in lp_nav.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_nav.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. if($_SESSION['oLP']->mode == 'fullscreen'){
  34. $htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
  35. /*<![CDATA[*/
  36. @import "scormfs.css";
  37. /*]]>*/
  38. </style>';
  39. }else{
  40. $htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
  41. /*<![CDATA[*/
  42. @import "scorm.css";
  43. /*]]>*/
  44. </style>';
  45. }
  46. include_once('../inc/reduced_header.inc.php');
  47. ?>
  48. <body>
  49. <div class="lp_navigation_elem">
  50. <?php echo $_SESSION['oLP']->get_progress_bar(); ?>
  51. <?php echo $_SESSION['oLP']->get_navigation_bar(); ?>
  52. </div>
  53. </body>
  54. </html>
  55. <?php
  56. if(!empty($_SESSION['oLP'])){
  57. $_SESSION['lpobject'] = serialize($_SESSION['oLP']);
  58. }
  59. ?>