lp_nav.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. // name of the language file that needs to be included
  12. $language_file[] = "scormdocument";
  13. $language_file[] = "scorm";
  14. $language_file[] = "learnpath";
  15. require_once('back_compat.inc.php');
  16. require_once('learnpath.class.php');
  17. require_once('scorm.class.php');
  18. require_once('aicc.class.php');
  19. //error_log('New LP - Loaded lp_nav: '.$_SERVER['REQUEST_URI'],0);
  20. if(isset($_SESSION['lpobject']))
  21. {
  22. //if($debug>0) //error_log('New LP - in lp_nav.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_nav.php - SESSION[lpobject] is not object - dying',0);
  28. die('Could not instanciate lp object');
  29. }
  30. }
  31. $htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
  32. var dokeos_xajax_handler = window.parent.oxajax;
  33. </script>';
  34. if($_SESSION['oLP']->mode == 'fullscreen'){
  35. $htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
  36. /*<![CDATA[*/
  37. @import "scormfs.css";
  38. /*]]>*/
  39. </style>';
  40. }else{
  41. $htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
  42. /*<![CDATA[*/
  43. @import "scorm.css";
  44. /*]]>*/
  45. </style>';
  46. }
  47. include_once('../inc/reduced_header.inc.php');
  48. ?>
  49. <body>
  50. <div class="lp_navigation_elem">
  51. <?php echo $_SESSION['oLP']->get_progress_bar(); ?>
  52. <?php echo $_SESSION['oLP']->get_navigation_bar(); ?>
  53. </div>
  54. </body>
  55. </html>
  56. <?php
  57. if(!empty($_SESSION['oLP'])){
  58. $_SESSION['lpobject'] = serialize($_SESSION['oLP']);
  59. }
  60. ?>