ToolIntro.class.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php // $Id: ToolIntro.class.php 5976 2005-08-12 09:06:04Z bmol $
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2004 Dokeos S.A.
  6. Copyright (c) 2003 Ghent University (UGent)
  7. Copyright (c) 2001 Universite catholique de Louvain (UCL)
  8. Copyright (c) Bart Mollet (bart.mollet@hogent.be)
  9. For a full list of contributors, see "credits.txt".
  10. The full license can be read in "license.txt".
  11. This program is free software; you can redistribute it and/or
  12. modify it under the terms of the GNU General Public License
  13. as published by the Free Software Foundation; either version 2
  14. of the License, or (at your option) any later version.
  15. See the GNU General Public License for more details.
  16. Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  17. Mail: info@dokeos.com
  18. ==============================================================================
  19. */
  20. require_once('Resource.class.php');
  21. /**
  22. * A WWW-link from the Links-module in a Dokeos-course.
  23. * @author Bart Mollet <bart.mollet@hogent.be>
  24. */
  25. class ToolIntro extends Resource
  26. {
  27. var $id;
  28. /**
  29. * intro text
  30. */
  31. var $intro_text;
  32. /**
  33. * Create a new text introduction
  34. * @param int $id The id of this tool introduction in the Dokeos-course
  35. * @param string $intro_text
  36. */
  37. function ToolIntro($id,$intro_text)
  38. {
  39. parent::Resource($id,RESOURCE_TOOL_INTRO);
  40. $this->id = $id;
  41. $this->intro_text = $intro_text;
  42. }
  43. /**
  44. * Show this resource
  45. */
  46. function show()
  47. {
  48. parent::show();
  49. if($this->id != 'course_homepage')
  50. {
  51. echo '<b>'.get_lang($this->id).': </b>';
  52. }
  53. echo $this->intro_text;
  54. }
  55. }
  56. ?>