ticket.class.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * This class defines the basis of the ticket management system plugin
  5. * @package chamilo.plugin.ticket
  6. */
  7. /**
  8. * Ticket class
  9. */
  10. class Ticket {
  11. public $url;
  12. public $salt;
  13. public $api;
  14. public $user_complete_name = null;
  15. public $protocol = 'http://';
  16. private $debug = false;
  17. public $logout_url = null;
  18. public $plugin_enabled = false;
  19. /**
  20. * Constructor (generates a connection to the API and the Chamilo settings
  21. * required for the connection to the videoconference server)
  22. */
  23. function __construct()
  24. {
  25. // initialize video server settings from global settings
  26. $plugin = TicketPlugin::create();
  27. }
  28. /**
  29. * Checks whether a user is teacher in the current course
  30. * @return bool True if the user can be considered a teacher in this course, false otherwise
  31. */
  32. function is_teacher()
  33. {
  34. return api_is_course_admin() || api_is_coach() || api_is_platform_admin();
  35. }
  36. }