lp_author_image.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. /**
  9. * Code
  10. */
  11. $use_anonymous = true;
  12. require_once 'back_compat.inc.php';
  13. require_once 'learnpath.class.php';
  14. require_once 'scorm.class.php';
  15. require_once 'aicc.class.php';
  16. // Getting the LP.
  17. if (isset($_SESSION['lpobject'])) {
  18. $oLP = unserialize($_SESSION['lpobject']);
  19. if (is_object($oLP)) {
  20. $_SESSION['oLP'] = $oLP;
  21. } else {
  22. die('Could not instanciate lp object');
  23. }
  24. }
  25. /*
  26. $lp_theme_css = $_SESSION['oLP']->get_theme();
  27. */
  28. $scorm_css_header = true;
  29. // scorm.css loaded
  30. require_once '../inc/reduced_header.inc.php';
  31. echo '<body dir="'.api_get_text_direction().'">';
  32. $image = '../img/lp_author_background.gif';
  33. echo '<div id="image_preview">';
  34. echo '<table STYLE="width:250px;height:110px;background-image: url('.$image.');">';
  35. echo '<tr><td align="center">';
  36. if ($_SESSION['oLP']->get_preview_image()!='')
  37. echo '<img alt="" src="'.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/upload/learning_path/images/'.$_SESSION['oLP']->get_preview_image().'">';
  38. else
  39. echo Display::display_icon('unknown_250_100.jpg', ' ');
  40. echo '</td></tr>';
  41. echo '</table>';
  42. echo '<div id="author_name">';
  43. echo $_SESSION['oLP']->get_author();
  44. echo '</div>';
  45. echo '</div>';
  46. ?>
  47. </body>
  48. </html>