sloodle_config.sample.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. /**
  3. * Sloodle configuration settings
  4. *
  5. * This file is for settings that can be configured on a site-by-site basis.
  6. * It needs to be renamed as sloodle_config.php to be used.
  7. * For a normal sloodle installation you shouldn't have to bother with this.
  8. *
  9. * @package sloodle
  10. *
  11. */
  12. //---------------------------------------------------------------------
  13. // Debugging / development constants
  14. /** The following will turn on logging of requests coming from LSL and responses going back */
  15. /*
  16. On a production server, this should usually be off ('') unless you're trying to trouble-shoot something.
  17. If you do use it, your web server user (usually apache or www-data) will need to be able to write to this file.
  18. It will contain all data sent to and from the server by LSL scripts, including sensitive data like prim passwords
  19. ...so if you turn this on, be careful about who has access to the file it creates.
  20. */
  21. //define('SLOODLE_DEBUG_REQUEST_LOG', '/tmp/sloodle_debug.log');
  22. define('SLOODLE_DEBUG_REQUEST_LOG', '');
  23. /** The following tells objects that we want them to persist their config over resets, and copy it to new objects that are copied.
  24. * The object will try to use the persistent config if if doesn't get a start_param from the rezzer.
  25. * This should usually be on, but if you're developing a set to share with other people, it's better to turn it off
  26. * That way the objects you rez won't try to use your server if the start_param somehow fails, which seems to happen sometimes.
  27. *
  28. */
  29. //define('SLOODLE_ENABLE_OBJECT_PERSISTANCE', false);
  30. define('SLOODLE_ENABLE_OBJECT_PERSISTANCE', true);
  31. //---------------------------------------------------------------------
  32. // Login and top-level navigation customization
  33. /**
  34. * By default, the shared-media version of the set (and potentially other tools) will use the regular Moodle pages to login or logout the user.
  35. * This isn't ideal UI-wise, because those screens are designed to be displayed in a browser, not on a shared-media prim.
  36. * By setting an include here, you can supply your own login screen code.
  37. * This was designed for Avatar Classroom, where we want to redirect you to our shared login screen at avatarclassroom.com
  38. * ...but it may also be useful if you want to make a shared-media-specific login screen
  39. * ...or you have an unusual login flow that requires customization.
  40. */
  41. //define('SLOODLE_SHARED_MEDIA_LOGIN_INCLUDE', SLOODLE_DIRROOT.'/mod/set-1.0/shared_media/login.avatarclassroom.php');
  42. //define('SLOODLE_SHARED_MEDIA_LOGOUT_INCLUDE', SLOODLE_DIRROOT.'/mod/set-1.0/shared_media/logout.avatarclassroom.php');
  43. // Site list customization
  44. /**
  45. * This allows you to have a back button on the shared media screen to take you one level above the course/controller list.
  46. * Used in Avatar Classroom to provide a list of your hosted Moodle sites so that you can switch between them or create a new one.
  47. * Probably not useful to anyone else.
  48. */
  49. //define('SLOODLE_SHARED_MEDIA_SITE_LIST_BASE_URL', 'http://www.avatarclassroom.com/mod/sloodle/mod/set-1.0/shared_media/');
  50. /*
  51. * Set this to true if you want the rezzer to automatically link its owner to the person logged in and using it in Moodle.
  52. * This is used by Avatar Classroom. Will normally be off for regular sloodle.
  53. */
  54. define('SLOODLE_SHARED_MEDIA_AUTOLINK_REZZER_OWNER', false);
  55. /*
  56. This can be defined to cause the rezzer screen to fetch the initial object config from another site.
  57. It is used in Avatar Classroom to allow the initial setup to be done via the avatar classroom site, before we know which site they want to connect to.
  58. The UUID of the object will be appended to this URL, and the service will be expected to return a JSON representation of the active object.
  59. See mod/set-1.0/shared_media/index.php to see how this is used.
  60. */
  61. define('SLOODLE_SHARED_MEDIA_REZZER_CONFIG_WEB_SERVICE', '');
  62. /*
  63. The collections of objects the rezzer supports.
  64. This corresponds to the collections parameter in the object definition of each object.
  65. NB The array should be serialized because PHP won't do arrays as constants.
  66. */
  67. define('SLOODLE_SUPPORTED_OBJECT_COLLECTIONS', serialize(array('SLOODLE 2.0') ) ); //
  68. //---------------------------------------------------------------------
  69. /*
  70. For performance, it's possible to send HTTP-in messages via a message queue.
  71. This requires a beanstalkd server, and a php daemon delivering messages to it.
  72. */
  73. define('SLOODLE_MESSAGE_QUEUE_SERVER_BEANSTALK', true);
  74. /*
  75. Turn this on to rez and derez asynchronously, using a message queue.
  76. */
  77. // The rezzer can only rez one object at a time in any case,
  78. // ...so there doesn't seem to be much advantage to doing this as a background task.
  79. define('SLOODLE_ASYNC_REZZING', false);
  80. // On OpenSim derezzing replies have been known to timeout
  81. // ...so async tends to work better
  82. // ...although at the cost of making the user feedback on the rezzer a bit slower to show.
  83. define('SLOODLE_ASYNC_DEREZZING', false);
  84. // In practice I haven't yet found a case where synchronous config-sending doesn't work well.
  85. define('SLOODLE_ASYNC_SEND_CONFIG', false);
  86. // Messages for the scoreboard etc can cause bottlenecks,
  87. // eg the quiz chair times out while waiting to update the scoreboard
  88. // ...and the scoreboard gets a big queue of messages, most of which are out of date.
  89. // These are definitely better done asynchrously.
  90. define('SLOODLE_ASYNC_SEND_MESSAGES', true);
  91. //---------------------------------------------------------------------
  92. // How often the objects should ping the server to tell it they're still here
  93. define('SLOODLE_PING_INTERVAL', 3600);
  94. // How often the rezzer should ping the server to tell it what objects are still rezzed
  95. // The
  96. /*
  97. NB there may be up to 4 HTTP requests in this time:
  98. - 1 request from the rezzer asking for a list of objects not heard from recently that might have been deleted
  99. - 1 request from the rezzer telling the server to note that some objects have disappeared
  100. - 2 messages from the rezzer screen HTML page to check if any objects have gone missing recently
  101. */
  102. define('SLOODLE_REZZER_STATUS_CONFIRM_INTERVAL', 9);
  103. //---------------------------------------------------------------------
  104. ?>