lp_author_image.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Script that displays the author name and image of a LP
  5. * @package chamilo.learnpath
  6. * @author Julio Montoya Armas <gugli100@gmail.com>
  7. */
  8. $use_anonymous = true;
  9. require_once 'back_compat.inc.php';
  10. require_once 'learnpath.class.php';
  11. require_once 'scorm.class.php';
  12. require_once 'aicc.class.php';
  13. //Getting the LP
  14. if(isset($_SESSION['lpobject']))
  15. {
  16. $oLP = unserialize($_SESSION['lpobject']);
  17. if(is_object($oLP)){
  18. $_SESSION['oLP'] = $oLP;
  19. }else{
  20. die('Could not instanciate lp object');
  21. }
  22. } /*
  23. $charset = $_SESSION['oLP']->encoding;
  24. $lp_theme_css=$_SESSION['oLP']->get_theme();
  25. */
  26. $scorm_css_header=true;
  27. // scorm.css loaded
  28. include_once '../inc/reduced_header.inc.php';
  29. echo '<html>
  30. <body>';
  31. $image = '../img/lp_author_background.gif';
  32. echo '<div id="image_preview">';
  33. echo '<table STYLE="width:250px;height:110px;background-image: url('.$image.');">';
  34. echo '<tr><td align="center">';
  35. if ($_SESSION['oLP']->get_preview_image()!='')
  36. echo '<img alt="" src="'.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/upload/learning_path/images/'.$_SESSION['oLP']->get_preview_image().'">';
  37. else
  38. echo Display::display_icon('unknown_250_100.jpg',' ');
  39. echo '</td></tr>';
  40. echo '</table>';
  41. echo '<div id="author_name">';
  42. echo $_SESSION['oLP']->get_author();
  43. echo '</div>';
  44. echo '</div>';
  45. ?>
  46. </body>
  47. </html>