dropbox_config.inc.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * DEBUGGING VARS
  5. */
  6. $DEBUG = false; // TODO: Is this needed?
  7. /**
  8. * DATABASE TABLE VARIABLES
  9. */
  10. $dropbox_cnf['tbl_user'] = Database::get_main_table(TABLE_MAIN_USER);
  11. $dropbox_cnf['tbl_course_user'] = Database::get_main_table(TABLE_MAIN_COURSE_USER);
  12. $dropbox_cnf['tbl_post'] = Database::get_course_table(TABLE_DROPBOX_POST);
  13. $dropbox_cnf['tbl_file'] = Database::get_course_table(TABLE_DROPBOX_FILE);
  14. $dropbox_cnf['tbl_person'] = Database::get_course_table(TABLE_DROPBOX_PERSON);
  15. $dropbox_cnf['tbl_intro'] = Database::get_course_table(TABLE_TOOL_INTRO);
  16. $dropbox_cnf['tbl_category'] = Database::get_course_table(TABLE_DROPBOX_CATEGORY);
  17. $dropbox_cnf['tbl_feedback'] = Database::get_course_table(TABLE_DROPBOX_FEEDBACK);
  18. /**
  19. * INITIALISE OTHER VARIABLES & CONSTANTS
  20. */
  21. $dropbox_cnf['courseId'] = $_cid;
  22. $dropbox_cnf['sysPath'] = api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/dropbox'; //path to dropbox subdir in course containing the uploaded files
  23. $dropbox_cnf['webPath'] = api_get_path(WEB_COURSE_PATH) . $_course['path'] . '/dropbox';
  24. $dropbox_cnf['maxFilesize'] = api_get_setting('dropbox_max_filesize'); //file size limit as imposed by the platform admin (see Chamilo Config Settings on the platform administration section)
  25. //$dropbox_cnf['version'] = '1.4';
  26. $dropbox_cnf['allowOverwrite'] = api_string_2_boolean(api_get_setting('dropbox_allow_overwrite'));
  27. $dropbox_cnf['allowJustUpload'] = api_string_2_boolean(api_get_setting('dropbox_allow_just_upload'));
  28. $dropbox_cnf['allowStudentToStudent'] = api_string_2_boolean(api_get_setting('dropbox_allow_student_to_student'));
  29. $dropbox_cnf['allowGroup'] = api_string_2_boolean(api_get_setting('dropbox_allow_group'));
  30. /**
  31. * INITIALISE MAILING VARIABLES
  32. */
  33. $dropbox_cnf['allowMailing'] = string_2_boolean(api_get_setting('dropbox_allow_mailing')); // false = no mailing functionality
  34. $dropbox_cnf['mailingIdBase'] = 10000000; // bigger than any user_id,
  35. // allowing enough space for pseudo_ids as uploader_id, dest_user_id, user_id:
  36. // mailing pseudo_id = dropbox_cnf('mailingIdBase') + mailing id
  37. $dropbox_cnf['mailingZipRegexp'] = '/^(.*)(STUDENTID|USERID|LOGINNAME)(.*)\.ZIP$/i';
  38. $dropbox_cnf['mailingWhereSTUDENTID'] = 'official_code';
  39. $dropbox_cnf['mailingWhereUSERID'] = 'username';
  40. $dropbox_cnf['mailingWhereLOGINNAME'] = 'username';
  41. $dropbox_cnf['mailingFileRegexp'] = '/^(.+)\.\w{1,4}$/';
  42. $dropbox_cnf['sent_received_tabs'] = true;