PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 1ms

/db/migrate/073_create_settings.rb

https://github.com/ybakos/CascadeLMS
Ruby | 104 lines | 59 code | 26 blank | 19 comment | 1 complexity | 60059df3659bcb9b63e12a61131d3780 MD5 | raw file
  1. class CreateSettings < ActiveRecord::Migration
  2. def self.up
  3. create_table :settings do |t|
  4. t.column :name, :string, :null => false
  5. t.column :value, :text, :null => false
  6. t.column :description, :text, :null => false
  7. end
  8. add_index(:settings, [:name], :unique => true)
  9. # Setting.create :name => 'storage_directory', :value => '/srv/www/rails/debug/shared/storage'
  10. Setting.create :name => 'title', :value => 'Miami University', :description => 'Main title for the site.'
  11. Setting.create :name => 'organization', :value => 'Miami University', :description => 'Name of the organization for which this software is installed.'
  12. Setting.create :name => 'email', :value => 'mike.helmick@muohio.edu', :description => 'Contact email, displayed on the bottom of the page.'
  13. Setting.create :name => 'error_email', :value => 'mike.helmick@muohio.edu', :description => 'Email address to send error reports to. These are live reports of exceptions as they occur.'
  14. Setting.create :name => 'blackboard', :value => 'http://mymiami.muohio.edu', :description => 'Do you still use Blackboard, or some other CMS? Put the link here.'
  15. Setting.create :name => 'dir_link', :value => 'http://netapps.muohio.edu/phpapps/directory/?searchstring=', :description => 'Link to a directory system based on Unique IDs'
  16. Setting.create :name => 'external_dir', :value => '/srv/www/rails/cscourseware/shared/storage', :description => 'Local file system directory where all data for this system is stored. It is critical that this directory, exists, has correct permissions, has enough space, and DOES NOT CHANGE.'
  17. Setting.create :name => 'temp_dir', :value => '/tmp', :description => 'Temporary directory for CSCW. You can clear the contents of the directory at any time.'
  18. Setting.create :name => 'session_limit', :value => '1800', :description => 'Number of seconds for user sessions.'
  19. Setting.create :name => 'recent_items', :value => '25', :description => 'Number of recent items to show on course overview screens and RSS feeds.'
  20. Setting.create :name => 'enscript_command', :value => '/usr/bin/enscript', :description => 'Location of the enscript comment, used for code formatting.'
  21. # Require the 1.3 client - for it's XML output capabilities
  22. Setting.create :name => 'subversion_command', :value => '/usr/local/bin/svn', :description => 'The Subversion command line location.'
  23. # either ldap or basic
  24. #authtype: basic
  25. Setting.create :name => 'authtype', :value => 'basic', :description => "Authentication type may be 'ldap' or 'basic'."
  26. # the setting below need to be filled in if LDAP is being used
  27. #ldapserver: 127.0.0.1
  28. Setting.create :name => 'ldapserver', :value => 'ldapsun1.muohio.edu', :description => 'LDAP Server Name (if using LDAP authentication)'
  29. Setting.create :name => 'ldap_dc', :value => 'dc=muohio,dc=edu', :description => 'LDAP Directory Context'
  30. Setting.create :name => 'ldap_ou', :value => 'ou=people', :description => 'LDAP Object'
  31. Setting.create :name => 'ldap_search', :value => 'uid', :description => 'LDAP Search field'
  32. Setting.create :name => 'ldap_port', :value => '389', :description => 'LDAP Port, SSL is usually 636, non-SSL is usually 389.'
  33. Setting.create :name => 'ldap_ssl', :value => 'false', :description => "Use SSL encryption for LDAP, 'true' or 'false'."
  34. Setting.create :name => 'ldap_field_uid', :value => 'uid', :description => 'LDAP field that unique IDs are pulled from'
  35. Setting.create :name => 'ldap_field_nickname', :value => 'eduPersonNickname', :description => 'LDAP field that preferred (nickname) is pulld from'
  36. Setting.create :name => 'ldap_field_firstname', :value => 'givenName', :description => 'LDAP field that first names are pulled from'
  37. Setting.create :name => 'ldap_field_middlename', :value => 'muohioeduMiddleName', :description => 'LDAP field that middle names are pulled from'
  38. Setting.create :name => 'ldap_field_lastname', :value => 'sn', :description => 'LDAP field that surnames are pulled from'
  39. Setting.create :name => 'ldap_field_affiliation', :value => 'muohioeduAffiliation', :description => 'LDAP field that instuition affiliation is fulled from'
  40. Setting.create :name => 'ldap_field_personaltitle', :value => 'personalTitle', :description => 'LDAP field that titles (Mr, Ms, Dr) are pulled from'
  41. Setting.create :name => 'ldap_field_email', :value => 'mail', :description => 'LDAP field containing email addresses'
  42. Setting.create :name => 'ldap_field_officehours', :value => 'muohioeduHours', :description => 'Office hours LDAP field'
  43. Setting.create :name => 'ldap_field_phone', :value => 'telephoneNumber', :description => 'Telephone number LDAP field'
  44. Setting.create :name => 'instructor_affiliation', :value => 'Faculty', :description => 'Affiliation value from LDAP that indicates faculty affiliation'
  45. # auto enroll
  46. # Must have LDAP enabled & this info must be available via LDAP
  47. Setting.create :name => 'enable_auto_enroll', :value => 'true', :description => 'Enable Auto Enrollment, must have LDAP authentication and course registration numbers (from Banner Web)'
  48. Setting.create :name => 'ldap_faculty_crn', :value => 'muohioeduCurrentTeachingCRN', :description => 'Courses being taught by a faculty member, from LDAP'
  49. Setting.create :name => 'ldap_faculty_desc', :value => 'muohioeduCurrentTeachingSubjectNumber', :description => 'Description of courses being taught by a faculty member, from LDAP'
  50. Setting.create :name => 'ldap_student_crn', :value => 'muohioeduCurrentCourseCRN', :description => 'Course CRNs of courses a stuent is enrolled in, from LDAP'
  51. Setting.create :name => 'ldap_student_desc', :value => 'muohioeduCurrentCourseSubjectNumber', :description => 'Description of courses a student is enrolled in, from LDAP'
  52. ## our format is Year Term(2 digit) and a 5 digit course number
  53. ## with the first 6 digits fully identifying the term
  54. ## Any format of Y T N will work, but you can disable auto enrol or customize
  55. Setting.create :name => 'crn_format', :value => 'YYYYTTNNNNN', :description => 'Our format is Year, Term(2 digit), and a 5 digit course number. The first 6 digits fully identifying the term. Any format of Y T N will work, but you can disable auto enrol or customize'
  56. Setting.create :name => 'default_subjects', :value => 'CSA MTH MIS IMS', :description => 'Default subjects for automatic course population, need to customize lib_crnloader.rb for your school.'
  57. ## Daily Turn-in limit
  58. Setting.create :name => 'turnin_limit', :value => '3', :description => 'Default daily turnin limit'
  59. ## Auto Grading
  60. # PRODUCTION
  61. Setting.create :name => 'ruby', :value => '/usr/local/bin/ruby', :description => 'Location of the Ruby interpreter for external calls.'
  62. Setting.create :name => 'java', :value => '/usr/lib/java/bin/java', :description => 'Location of Java for external calls (1.5 or higher required)'
  63. Setting.create :name => 'javac', :value => '/usr/lib/java/bin/javac', :description => 'Location of the Java compiler for external calls (1.5 or higher required)'
  64. Setting.create :name => 'ant', :value => '/usr/bin/ant', :description => 'Location of ANT for external calls'
  65. # DEVELOPMENT
  66. #ruby: /usr/local/bin/ruby
  67. #java: /usr/bin/java
  68. #javac: /usr/bin/javac
  69. #ant: /usr/bin/ant
  70. Setting.create :name => 'pmd_main', :value => 'edu.muohio.csa.cscourseware.CheckStyle', :description => 'Main class for PMD - do not change.'
  71. Setting.create :name => 'pmd_libs', :value => 'jakarta-oro-2.0.8.jar jaxen-1.1-beta-10.jar pmd-3.9.jar xercesImpl-2.6.2.jar xmlParserAPIs-2.6.2.jar checkStyle.jar asm-3.0.jar backport-util-concurrent.jar', :description => 'Jar files to pull in when running PMD. do not change.'
  72. Setting.create :name => 'banned_java', :value => 'java.io.File java.io.FileInputStream java.io.FileOutputStream java.io.FileReader java.io.FileWriter System.setIn System.setOut System.setErr System.loadLibrary System.setSecurityManager System.load Runtime.getRuntime java.io.*;', :description => 'Strings to disallow in Java code. Separated by a space'
  73. Setting.create :name => 'settings_reload', :value => '300', :description => 'Settings reload frequence (seconds). Since settings are cached on a per-thread basis, the settings may need to be refreshed from time to time. Set this to a very high number if your settings are stable. (Default is every 5 minutes)'
  74. end
  75. def self.down
  76. drop_table :settings
  77. end
  78. end