aiken_classes.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * @author Claro Team <cvs@claroline.net>
  5. * @author Yannick Warnier <yannick.warnier@beeznest.com> - updated ImsAnswerHotspot to match QTI norms
  6. * @author César Perales <cesar.perales@gmail.com> Updated function names and import files for Aiken format support
  7. * @package chamilo.exercise
  8. */
  9. if ( count( get_included_files() ) == 1 ) die( '---' );
  10. if (!function_exists('mime_content_type')) {
  11. function mime_content_type($filename) {
  12. return DocumentManager::file_get_mime_type((string)$filename);
  13. }
  14. }
  15. /**
  16. * Aiken2Question transformation class
  17. */
  18. class Aiken2Question extends Question
  19. {
  20. /**
  21. * Include the correct answer class and create answer
  22. */
  23. function setAnswer()
  24. {
  25. switch($this->type)
  26. {
  27. case MCUA :
  28. $answer = new AikenAnswerMultipleChoice($this->id);
  29. return $answer;
  30. default :
  31. $answer = null;
  32. break;
  33. }
  34. return $answer;
  35. }
  36. function createAnswersForm($form)
  37. {
  38. return true;
  39. }
  40. function processAnswersCreation($form)
  41. {
  42. return true;
  43. }
  44. }
  45. /**
  46. * Class
  47. * @package chamilo.exercise
  48. */
  49. class AikenAnswerMultipleChoice extends Answer
  50. {
  51. }