dropbox_config.inc.php 2.8 KB

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