lp_author_image.php 1.5 KB

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