Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 106 additions & 13 deletions cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,25 @@

# Prevent auto auth from creating superusers or modifying existing users
'RESTRICT_AUTOMATIC_AUTH': True,

'AUTH_USE_OPENID_PROVIDER': True,
'ENABLE_INSTRUCTOR_ANALYTICS': False,
'PREVIEW_LMS_BASE': "preview.localhost:18000",
'ENABLE_GRADE_DOWNLOADS': True,
'ENABLE_MKTG_SITE': False,
'ENABLE_DISCUSSION_HOME_PANEL': True,
'ENABLE_COMBINED_LOGIN_REGISTRATION': True,
'ENABLE_CORS_HEADERS': False,
'ENABLE_CROSS_DOMAIN_CSRF_COOKIE': False,
'ENABLE_COUNTRY_ACCESS': False,
'ENABLE_CREDIT_API': False,
'ENABLE_OAUTH2_PROVIDER': False,
'ENABLE_SYSADMIN_DASHBOARD': False,
'ENABLE_MOBILE_REST_API': False,
'CUSTOM_COURSES_EDX': False,
'ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES': True,
'SHOW_FOOTER_LANGUAGE_SELECTOR': False,
'ENABLE_ENROLLMENT_RESET': False,
}

ENABLE_JASMINE = False
Expand All @@ -319,7 +338,11 @@
############################# SOCIAL MEDIA SHARING #############################
SOCIAL_SHARING_SETTINGS = {
# Note: Ensure 'CUSTOM_COURSE_URLS' has a matching value in lms/envs/common.py
'CUSTOM_COURSE_URLS': False
'CUSTOM_COURSE_URLS': False,
'DASHBOARD_FACEBOOK': False,
'CERTIFICATE_FACEBOOK': False,
'CERTIFICATE_TWITTER': False,
'DASHBOARD_TWITTER': False
}

SOCIAL_MEDIA_FOOTER_URLS = {}
Expand Down Expand Up @@ -349,6 +372,11 @@

DATA_DIR = COURSES_ROOT

DJFS = {
'type': 'osfs',
'directory_root': '/edx/var/edxapp/django-pyfs/static/django-pyfs',
'url_root': '/static/django-pyfs',
}
######################## BRANCH.IO ###########################
BRANCH_IO_KEY = ''

Expand Down Expand Up @@ -439,6 +467,11 @@
# in the global settings.py
AWS_SES_REGION_NAME = 'us-east-1'
AWS_SES_REGION_ENDPOINT = 'email.us-east-1.amazonaws.com'
AWS_ACCESS_KEY_ID = None
AWS_SECRET_ACCESS_KEY = None
AWS_QUERYSTRING_AUTH = False
AWS_STORAGE_BUCKET_NAME = 'SET-ME-PLEASE (ex. bucket-name)'
AWS_S3_CUSTOM_DOMAIN = 'SET-ME-PLEASE (ex. bucket-name.s3.amazonaws.com)'

##############################################################################

Expand Down Expand Up @@ -511,6 +544,7 @@

CROSS_DOMAIN_CSRF_COOKIE_DOMAIN = ''
CROSS_DOMAIN_CSRF_COOKIE_NAME = ''
CSRF_TRUSTED_ORIGINS = []

#################### CAPA External Code Evaluation #############################
XQUEUE_INTERFACE = {
Expand Down Expand Up @@ -602,6 +636,8 @@
'openedx.core.djangoapps.site_configuration.middleware.SessionCookieDomainOverrideMiddleware',
]

EXTRA_MIDDLEWARE_CLASSES = []

# Clickjacking protection can be disabled by setting this to 'ALLOW'
X_FRAME_OPTIONS = 'DENY'

Expand Down Expand Up @@ -634,7 +670,7 @@
############################ ORA 2 ############################################

# By default, don't use a file prefix
ORA2_FILE_PREFIX = None
ORA2_FILE_PREFIX = 'default_env-default_deployment/ora2'

# Default File Upload Storage bucket and prefix. Used by the FileUpload Service.
FILE_UPLOAD_STORAGE_BUCKET_NAME = 'SET-ME-PLEASE (ex. bucket-name)'
Expand All @@ -643,9 +679,21 @@
############################ Modulestore Configuration ################################

DOC_STORE_CONFIG = {
'db': 'edxapp',
'host': 'localhost',
'db': 'xmodule',
'replicaSet': '',
'user': 'edxapp',
'port': 27017,
'collection': 'modulestore',
'ssl': False,
# https://api.mongodb.com/python/2.9.1/api/pymongo/mongo_client.html#module-pymongo.mongo_client
# default is never timeout while the connection is open,
#this means it needs to explicitly close raising pymongo.errors.NetworkTimeout
'socketTimeoutMS': 3000,
'connectTimeoutMS': 2000, # default is 20000, I believe raises pymongo.errors.ConnectionFailure
# Not setting waitQueueTimeoutMS and waitQueueMultiple since pymongo defaults to nobody being allowed to wait
'auth_source': None,
'read_preference': 'PRIMARY'
# If 'asset_collection' defined, it'll be used
# as the collection name for asset metadata.
# Otherwise, a default collection name will be used.
Expand All @@ -658,10 +706,11 @@
'OPTIONS': {
'db': 'edxapp',
'host': 'localhost',
'password': 'edxapp',
'password': 'password',
'port': 27017,
'user': 'edxapp',
'ssl': False
'ssl': False,
'auth_source': None
},
'ADDITIONAL_OPTIONS': {},
'DOC_STORE_CONFIG': DOC_STORE_CONFIG
Expand Down Expand Up @@ -737,7 +786,7 @@
'OPTIONS': {},
'PASSWORD': 'password',
'PORT': '3306',
'USER': 'edxapp'
'USER': 'edxapp001'
}
}

Expand Down Expand Up @@ -800,7 +849,7 @@

# Email
TECH_SUPPORT_EMAIL = 'technical@example.com'
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_PORT = 25
EMAIL_USE_TLS = False
Expand Down Expand Up @@ -1116,6 +1165,9 @@
CELERY_BROKER_HOSTNAME = 'localhost'
CELERY_BROKER_USER = 'celery'
CELERY_BROKER_PASSWORD = 'celery'
CELERY_BROKER_VHOST = ''
CELERY_BROKER_USE_SSL = False
CELERY_EVENT_QUEUE_TTL = None

############################## Video ##########################################

Expand Down Expand Up @@ -1376,6 +1428,7 @@

############################## EVENT TRACKING #################################

CMS_SEGMENT_KEY = None
TRACK_MAX_EVENT = 50000

TRACKING_BACKENDS = {
Expand Down Expand Up @@ -1759,7 +1812,7 @@
PARTNER_SUPPORT_EMAIL = ''

# Affiliate cookie tracking
AFFILIATE_COOKIE_NAME = 'affiliate_id'
AFFILIATE_COOKIE_NAME = 'dev_affiliate_id'

############## Settings for Studio Context Sensitive Help ##############

Expand Down Expand Up @@ -1820,7 +1873,7 @@
RECALCULATE_GRADES_ROUTING_KEY = DEFAULT_PRIORITY_QUEUE

# Queue to use for updating grades due to grading policy change
POLICY_CHANGE_GRADES_ROUTING_KEY = DEFAULT_PRIORITY_QUEUE
POLICY_CHANGE_GRADES_ROUTING_KEY = 'edx.lms.core.default'

# Rate limit for regrading tasks that a grading policy change can kick off
POLICY_CHANGE_TASK_RATE_LIMIT = '300/h'
Expand Down Expand Up @@ -1857,8 +1910,8 @@

###################### ZENDESK ######################
ZENDESK_URL = ''
ZENDESK_USER = None
ZENDESK_API_KEY = None
ZENDESK_USER = ''
ZENDESK_API_KEY = ''
ZENDESK_CUSTOM_FIELDS = {}
ZENDESK_OAUTH_ACCESS_TOKEN = ''
# A mapping of string names to Zendesk Group IDs
Expand Down Expand Up @@ -1892,7 +1945,7 @@
ECOMMERCE_API_SIGNING_KEY = 'SET-ME-PLEASE'

CREDENTIALS_INTERNAL_SERVICE_URL = 'http://localhost:8005'
CREDENTIALS_PUBLIC_SERVICE_URL = None
CREDENTIALS_PUBLIC_SERVICE_URL = 'http://localhost:8005'

ANALYTICS_DASHBOARD_URL = 'http://localhost:18110/courses'
ANALYTICS_DASHBOARD_NAME = 'Your Platform Name Here Insights'
Expand Down Expand Up @@ -1994,7 +2047,7 @@
SWIFT_AUTH_URL = None
SWIFT_AUTH_VERSION = None
SWIFT_REGION_NAME = None
SWIFT_USE_TEMP_URLS = None
SWIFT_USE_TEMP_URLS = False
SWIFT_TEMP_URL_KEY = None
SWIFT_TEMP_URL_DURATION = 1800 # seconds

Expand All @@ -2021,3 +2074,43 @@
# null is a language independent type in YAML
'null': {}
}

PROCTORING_SETTINGS = {}

################## BLOCKSTORE RELATED SETTINGS #########################
BLOCKSTORE_PUBLIC_URL_ROOT = 'http://localhost:18250'
BLOCKSTORE_API_URL = 'http://localhost:18250/api/v1'

###################### LEARNER PORTAL ################################
LEARNER_PORTAL_URL_ROOT = 'https://learner-portal-localhost:18000'

######################### MICROSITE ###############################
MICROSITE_ROOT_DIR = '/edx/app/edxapp/edx-microsite'
MICROSITE_CONFIGURATION = {}

############################ JWT #################################
JWT_ISSUER = 'http://127.0.0.1:8000/oauth2'
DEFAULT_JWT_ISSUER = {
'ISSUER': 'http://127.0.0.1:8000/oauth2',
'AUDIENCE': 'SET-ME-PLEASE',
'SECRET_KEY': 'SET-ME-PLEASE'
}
JWT_EXPIRATION = 30
JWT_PRIVATE_SIGNING_KEY = None


SYSLOG_SERVER = ''
FEEDBACK_SUBMISSION_EMAIL = ''
REGISTRATION_EXTRA_FIELDS = {
'confirm_email': 'hidden',
'level_of_education': 'optional',
'gender': 'optional',
'year_of_birth': 'optional',
'mailing_address': 'optional',
'goals': 'optional',
'honor_code': 'required',
'terms_of_service': 'hidden',
'city': 'hidden',
'country': 'hidden',
}
EDXAPP_PARSE_KEYS = {}