PageRenderTime 43ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/vendor/Tsugi/Core/Link.php

https://github.com/arwhyte/tsugi
PHP | 44 lines | 8 code | 7 blank | 29 comment | 0 complexity | 8e7b869d28775787b9310d9a0ac59f1c MD5 | raw file
Possible License(s): Apache-2.0
  1. <?php
  2. namespace Tsugi\Core;
  3. /**
  4. * This is a class to provide access to the resource link level data.
  5. *
  6. * This data comes from the LTI launch from the LMS.
  7. * A resource_link may or may not be in a context. If there
  8. * is a link without a context, it is a "system-wide" link
  9. * like "view profile" or "show all courses"
  10. */
  11. class Link {
  12. /**
  13. * The integer primary key for this link in the 'lti_link' table.
  14. */
  15. public $id;
  16. /**
  17. * The link title
  18. */
  19. public $title;
  20. /**
  21. * The current grade for the user
  22. *
  23. * If there is a current grade (float between 0.0 and 1.0)
  24. * it is in this variable. If there is not yet a grade for
  25. * this user/link combination, this will be false.
  26. */
  27. public $grade = false;
  28. /**
  29. * The result_id for the link (if set)
  30. *
  31. * This is the primary key for the lti_result row for this
  32. * user/link combination. It may be false. Is this is not
  33. * false, we can send a grade back to the LMS for this
  34. * user/link combination.
  35. */
  36. public $result_id = false;
  37. }