dokeos-learnpath
[ class tree: dokeos-learnpath ] [ index: dokeos-learnpath ] [ all elements ]

Source for file lp_message.php

Documentation is available at lp_message.php

  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. //flag to allow for anonymous user - needs to be set before global.inc.php
  20. $use_anonymous true;
  21. // name of the language file that needs to be included 
  22. $language_file "learnpath";
  23. require_once('back_compat.inc.php');
  24. require_once('learnpath.class.php');
  25. require_once('scorm.class.php');
  26. $error '';
  27. $display_mode '';
  28. if(isset($_SESSION['lpobject'])){
  29.     $temp $_SESSION['lpobject'];
  30.     $_SESSION['oLP'unserialize($temp);
  31.     $error $_SESSION['oLP']->error;
  32.     $display_mode $_SESSION['oLP']->mode;
  33. }
  34. if($debug>0){error_log('New LP - Loaded lp_message : '.$_SERVER['REQUEST_URI'].' from '.$_SERVER['HTTP_REFERER'],0);}
  35. $charset 'ISO-8859-1';
  36.  
  37. $htmlHeadXtra['<script language="JavaScript" type="text/javascript">
  38.   var dokeos_xajax_handler = window.parent.oxajax;
  39. </script>';
  40. $lp_theme_css=$_SESSION['oLP']->get_theme();
  41. $scorm_css_header=true;
  42. include_once('../inc/reduced_header.inc.php');
  43. //close the session immediately to avoid concurrent access problems
  44. ?>
  45. <body>
  46. <div id="msg_div_id">
  47. <?php
  48. echo $error;
  49. ?>
  50. </div>
  51. </body></html>

Documentation generated on Thu, 12 Jun 2008 14:02:56 -0500 by phpDocumentor 1.4.1