dropbox_config.inc.php 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2006 Dokeos S.A.
  6. Copyright (c) 2006 Ghent University (UGent)
  7. Copyright (c) various contributors
  8. For a full list of contributors, see "credits.txt".
  9. The full license can be read in "license.txt".
  10. This program is free software; you can redistribute it and/or
  11. modify it under the terms of the GNU General Public License
  12. as published by the Free Software Foundation; either version 2
  13. of the License, or (at your option) any later version.
  14. See the GNU General Public License for more details.
  15. Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  16. Mail: info@dokeos.com
  17. ==============================================================================
  18. */
  19. /**
  20. * --------------------------------------
  21. *       DEBUGGING VARS
  22. * --------------------------------------
  23. */
  24. $DEBUG = TRUE;
  25. /**
  26. * --------------------------------------
  27. *       DATABASE TABLE VARIABLES
  28. * --------------------------------------
  29. */
  30. $dropbox_cnf['tbl_post'] = Database::get_course_table(TABLE_DROPBOX_POST);
  31. $dropbox_cnf['tbl_file'] = Database::get_course_table(TABLE_DROPBOX_FILE);
  32. $dropbox_cnf['tbl_person'] = Database::get_course_table(TABLE_DROPBOX_PERSON);
  33. $dropbox_cnf['tbl_intro'] = Database::get_course_table(TABLE_TOOL_INTRO);
  34. $dropbox_cnf['tbl_user'] = Database::get_main_table(TABLE_MAIN_USER);
  35. $dropbox_cnf['tbl_course_user'] = Database::get_main_table(TABLE_MAIN_COURSE_USER);
  36. $dropbox_cnf['tbl_category'] = Database::get_course_table(TABLE_DROPBOX_CATEGORY);
  37. $dropbox_cnf['tbl_feedback'] = Database::get_course_table(TABLE_DROPBOX_FEEDBACK);
  38. /**
  39. * --------------------------------------
  40. *       INITIALISE OTHER VARIABLES & CONSTANTS
  41. * --------------------------------------
  42. */
  43. $dropbox_cnf["courseId"] = $_cid;
  44. $dropbox_cnf["sysPath"] = api_get_path('SYS_COURSE_PATH') . $_course["path"] . "/dropbox"; //path to dropbox subdir in course containing the uploaded files
  45. $dropbox_cnf["webPath"] = api_get_path('WEB_COURSE_PATH') . $_course["path"] . "/dropbox";
  46. $dropbox_cnf["maxFilesize"] = api_get_setting("dropbox_max_filesize"); //file size limit as imposed by the platform admin (see Dokeos Config Settings on the platform administration section)
  47. //$dropbox_cnf["version"] = "1.4";
  48. $dropbox_cnf["allowOverwrite"] = string_2_boolean(api_get_setting("dropbox_allow_overwrite"));
  49. $dropbox_cnf["allowJustUpload"] = string_2_boolean(api_get_setting("dropbox_allow_just_upload"));
  50. $dropbox_cnf["allowStudentToStudent"] = string_2_boolean(api_get_setting("dropbox_allow_student_to_student"));
  51. $dropbox_cnf["allowGroup"] = string_2_boolean(api_get_setting("dropbox_allow_group"));
  52. /**
  53. * --------------------------------------
  54. * RH:   INITIALISE MAILING VARIABLES
  55. * --------------------------------------
  56. */
  57. $dropbox_cnf["allowMailing"] = string_2_boolean(api_get_setting("dropbox_allow_mailing")); // false = no mailing functionality
  58. $dropbox_cnf["mailingIdBase"] = 10000000; // bigger than any user_id,
  59. // allowing enough space for pseudo_ids as uploader_id, dest_user_id, user_id:
  60. // mailing pseudo_id = dropbox_cnf("mailingIdBase") + mailing id
  61. $dropbox_cnf["mailingZipRegexp"] = '/^(.*)(STUDENTID|USERID|LOGINNAME)(.*)\.ZIP$/i';
  62. $dropbox_cnf["mailingWhereSTUDENTID"] = "official_code";
  63. $dropbox_cnf["mailingWhereUSERID"] = "username";
  64. $dropbox_cnf["mailingWhereLOGINNAME"] = "username";
  65. $dropbox_cnf["mailingFileRegexp"] = '/^(.+)\.\w{1,4}$/';
  66. $dropbox_cnf['sent_received_tabs']=true;
  67. ?>