lp_log.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Container script for the messages coming from the learnpath object. Initially, this wasn't supposed to be
  5. * a separate file but rather some text included in lp_view.php, but SCORM involves loading a script that
  6. * saves the data asynchronously while the SCORM learning path carries on. Having an informational iframe
  7. * helps not popping up an additional window when saving data.
  8. *
  9. * This script is also used to refresh the TOC as sometimes the SCORM JS messages are taken into account
  10. * only after the TOC is drawn. As such, you might complete an item, browse to the next page, have the
  11. * TOC drawn with your 'incomplete' status, while the SCORM messages generally arrives just after the TOC
  12. * is drawn. By updating it here and in lp_save.php, we avoid funny visual effect like having a complete
  13. * item showing as incomplete.
  14. * @package chamilo.learnpath
  15. * @author Yannick Warnier <ywarnier@beeznest.org>
  16. */
  17. // Flag to allow for anonymous user - needs to be set before global.inc.php.
  18. $use_anonymous = true;
  19. require_once 'back_compat.inc.php';
  20. $htmlHeadXtra[] = '<script language="javascript">
  21. function cleanlog(){
  22. if(document.getElementById){
  23. document.getElementById("log_content").innerHTML = "";
  24. }
  25. }
  26. </script>';
  27. $scorm_css_header = true;
  28. $display_mode = '';
  29. $lp_theme_log = true;
  30. include_once '../inc/reduced_header.inc.php';
  31. ?>
  32. <body dir="<?php echo api_get_text_direction(); ?>">
  33. <div id="log_content">
  34. </div>
  35. <div style="color: white;" onclick="javascript: cleanlog();">.</div>
  36. </body>
  37. </html>