lp_message.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php //$id: $
  2. /**
  3. * Container script for the messages coming from the learnpath object. Initially, this wasn't supposed to be
  4. * a separate file but rather some text included in lp_view.php, but SCORM involves loading a script that
  5. * saves the data asynchronously while the SCORM learning path carries on. Having an informational iframe
  6. * helps not popping up an additional window when saving data.
  7. *
  8. * This script is also used to refresh the TOC as sometimes the SCORM JS messages are taken into account
  9. * only after the TOC is drawn. As such, you might complete an item, browse to the next page, have the
  10. * TOC drawn with your 'incomplete' status, while the SCORM messages generally arrives just after the TOC
  11. * is drawn. By updating it here and in lp_save.php, we avoid funny visual effect like having a complete
  12. * item showing as incomplete.
  13. * @package dokeos.learnpath
  14. * @author Yannick Warnier <ywarnier@beeznest.org>
  15. */
  16. /**
  17. * Script
  18. */
  19. $langFile = "learnpath";
  20. require_once('back_compat.inc.php');
  21. require_once('learnpath.class.php');
  22. require_once('scorm.class.php');
  23. if(isset($_SESSION['lpobject'])){
  24. $temp = $_SESSION['lpobject'];
  25. $_SESSION['oLP'] = unserialize($temp);
  26. }
  27. if($debug>0){error_log('New LP - Loaded lp_message : '.$_SERVER['REQUEST_URI'].' from '.$_SERVER['HTTP_REFERER'],0);}
  28. $charset = 'ISO-8859-1';
  29. $htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
  30. var dokeos_xajax_handler = window.parent.oxajax;
  31. </script>';
  32. $htmlHeadXtra[] = '' .
  33. '<style type="text/css" media="screen, projection">
  34. /*<![CDATA[*/
  35. @import "scorm.css";
  36. /*]]>*/
  37. </style>';
  38. include_once('../inc/reduced_header.inc.php');
  39. ?>
  40. <body>
  41. <div id="msg_div_id">
  42. <?php
  43. echo $_SESSION['oLP']->error;
  44. ?>
  45. </div>
  46. </body></html>