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
99 changes: 80 additions & 19 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ def _make_mako_template_dirs(settings):
LOGGING_ENV = 'sandbox'

EDX_ROOT_URL = ''
EDX_API_KEY = "PUT_YOUR_API_KEY_HERE"

LOGIN_REDIRECT_URL = EDX_ROOT_URL + '/login'
LOGIN_URL = EDX_ROOT_URL + '/login'
Expand All @@ -769,15 +770,15 @@ def _make_mako_template_dirs(settings):

LOG_DIR = '/edx/var/log/edx'

DATA_DIR = '/edx/app/edxapp'
DATA_DIR = '/edx/var/edxapp/data'

MAINTENANCE_BANNER_TEXT = 'Sample banner message'

GIT_REPO_DIR = '/edx/var/edxapp/course_repos'

DJFS = {
'type': 'osfs',
'directory_root': '/edx/app/edxapp/django-pyfs/static/django-pyfs',
'directory_root': '/edx/var/edxapp/django-pyfs/static/django-pyfs',
'url_root': '/static/django-pyfs',
}

Expand Down Expand Up @@ -922,6 +923,7 @@ def _make_mako_template_dirs(settings):
GOOGLE_ANALYTICS_ACCOUNT = None
GOOGLE_SITE_VERIFICATION_ID = ''
GOOGLE_ANALYTICS_LINKEDIN = 'GOOGLE_ANALYTICS_LINKEDIN_DUMMY'
GOOGLE_ANALYTICS_TRACKING_ID = None

######################## BRANCH.IO ###########################
BRANCH_IO_KEY = ''
Expand Down Expand Up @@ -959,12 +961,22 @@ def _make_mako_template_dirs(settings):
MODULESTORE_BRANCH = 'published-only'

DOC_STORE_CONFIG = {
'db': 'edxapp',
'host': 'localhost',
'db': 'xmodule',
'replicaSet': '',
'password': 'password',
'port': 27017,
'user': 'edxapp',
'collection': 'modulestore',
# If 'asset_collection' defined, it'll be used
# as the collection name for asset metadata.
# Otherwise, a default collection name will be used.
'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': 'SECONDARY_PREFERRED'
}

CONTENTSTORE = {
Expand All @@ -974,10 +986,11 @@ def _make_mako_template_dirs(settings):
'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 @@ -1033,7 +1046,7 @@ def _make_mako_template_dirs(settings):
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': 'localhost',
'NAME': 'dxapp',
'NAME': 'edxapp',
'OPTIONS': {},
'PASSWORD': 'password',
'PORT': '3306',
Expand All @@ -1047,7 +1060,7 @@ def _make_mako_template_dirs(settings):
'OPTIONS': {},
'PASSWORD': 'password',
'PORT': '3306',
'USER': 'edxapp'
'USER': 'edxapp001'
}
}

Expand Down Expand Up @@ -1291,6 +1304,11 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring
AWS_QUERYSTRING_EXPIRE = 10 * 365 * 24 * 60 * 60 # 10 years
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)"

################################# SIMPLEWIKI ###################################
SIMPLE_WIKI_REQUIRE_LOGIN_EDIT = True
Expand Down Expand Up @@ -1351,8 +1369,8 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring
################################# EdxNotes config #########################

# Configure the LMS to use our stub EdxNotes implementation
EDXNOTES_PUBLIC_API = 'http://localhost:8120/api/v1'
EDXNOTES_INTERNAL_API = 'http://localhost:8120/api/v1'
EDXNOTES_PUBLIC_API = 'http://localhost:18120/api/v1'
EDXNOTES_INTERNAL_API = 'http://localhost:18120/api/v1'

EDXNOTES_CONNECT_TIMEOUT = 0.5 # time in seconds
EDXNOTES_READ_TIMEOUT = 1.5 # time in seconds
Expand Down Expand Up @@ -2144,7 +2162,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring

# We also define a queue for smaller jobs so that large courses don't block
# smaller emails (see BULK_EMAIL_JOB_SIZE_THRESHOLD setting)
BULK_EMAIL_ROUTING_KEY_SMALL_JOBS = DEFAULT_PRIORITY_QUEUE
BULK_EMAIL_ROUTING_KEY_SMALL_JOBS = 'edx.lms.core.default'

# For emails with fewer than these number of recipients, send them through
# a different queue to avoid large courses blocking emails that are meant to be
Expand Down Expand Up @@ -2659,6 +2677,9 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring
}
}

#################SOCAIL AUTH OAUTH######################
SOCIAL_AUTH_OAUTH_SECRETS = {}

################# Mobile URLS ##########################

# These are URLs to the app store for mobile.
Expand Down Expand Up @@ -3161,7 +3182,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring
PDF_RECEIPT_TAX_ID = '00-0000000'
PDF_RECEIPT_FOOTER_TEXT = 'Enter your receipt footer text here.'
PDF_RECEIPT_DISCLAIMER_TEXT = 'ENTER YOUR RECEIPT DISCLAIMER TEXT HERE.'
PDF_RECEIPT_BILLING_ADDRESS = 'Enter your receipt terms and conditions here.'
PDF_RECEIPT_BILLING_ADDRESS = 'Enter your receipt billing address here.'
PDF_RECEIPT_TERMS_AND_CONDITIONS = 'Enter your receipt terms and conditions here.'
PDF_RECEIPT_TAX_ID_LABEL = 'fake Tax ID'
PDF_RECEIPT_LOGO_PATH = PROJECT_ROOT + '/static/images/openedx-logo-tag.png'
Expand Down Expand Up @@ -3271,7 +3292,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring
COURSE_CATALOG_API_URL = 'http://localhost:8008/api/v1'

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

COMMENTS_SERVICE_URL = 'http://localhost:18080'
COMMENTS_SERVICE_KEY = 'password'
Expand Down Expand Up @@ -3349,7 +3370,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring
CREDIT_PROVIDER_TIMESTAMP_EXPIRATION = 15 * 60

# The Help link to the FAQ page about the credit
CREDIT_HELP_LINK_URL = "/"
CREDIT_HELP_LINK_URL = ""

# Default domain for the e-mail address associated with users who are created
# via the LTI Provider feature. Note that the generated e-mail addresses are
Expand All @@ -3376,6 +3397,15 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring

################################ Settings for JWTs ################################

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

JWT_AUTH = {
'JWT_VERIFY_EXPIRATION': True,

Expand All @@ -3401,8 +3431,18 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring
'JWT_PRIVATE_SIGNING_JWK': None,
'JWT_PUBLIC_SIGNING_JWK_SET': None,

'JWT_ISSUER': 'change-me',
'JWT_ISSUER': 'http://127.0.0.1:8000/oauth2',
'JWT_AUDIENCE': 'change-me',
'JWT_ISSUERS': [
{
'ISSUER': 'http://127.0.0.1:8000/oauth2',
'AUDIENCE': 'change-me',
'SECRET_KEY': SECRET_KEY
}
],
'JWT_AUTH_COOKIE_HEADER_PAYLOAD': 'edx-jwt-cookie-header-payload',
'JWT_AUTH_COOKIE_SIGNATURE': 'edx-jwt-cookie-signature',
'JWT_AUTH_REFRESH_COOKIE': 'edx-jwt-refresh-cookie',
}

EDX_DRF_EXTENSIONS = {
Expand Down Expand Up @@ -3465,7 +3505,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring
CREDENTIALS_GENERATION_ROUTING_KEY = DEFAULT_PRIORITY_QUEUE

# Queue to use for award program certificates
PROGRAM_CERTIFICATES_ROUTING_KEY = DEFAULT_PRIORITY_QUEUE
PROGRAM_CERTIFICATES_ROUTING_KEY = 'edx.lms.core.default'

# Settings for Comprehensive Theming app

Expand Down Expand Up @@ -3526,6 +3566,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring
ENTERPRISE_SUPPORT_URL = ''
ENTERPRISE_CUSTOMER_CATALOG_DEFAULT_CONTENT_FILTER = {}
ENTERPRISE_CUSTOMER_SUCCESS_EMAIL = "customersuccess@edx.org"
ENTERPRISE_INTEGRATIONS_EMAIL = "enterprise-integrations@edx.org"

############## ENTERPRISE SERVICE API CLIENT CONFIGURATION ######################
# The LMS communicates with the Enterprise service via the EdxRestApiClient class
Expand Down Expand Up @@ -3720,6 +3761,8 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring
ACE_ROUTING_KEY = 'edx.lms.core.default'
ACE_CHANNEL_DEFAULT_EMAIL = 'django_email'
ACE_CHANNEL_TRANSACTIONAL_EMAIL = 'django_email'
ACE_CHANNEL_SAILTHRU_API_KEY = ""
ACE_CHANNEL_SAILTHRU_API_SECRET = ""

############### Settings swift #####################################
SWIFT_USERNAME = None
Expand Down Expand Up @@ -3781,6 +3824,24 @@ def _make_locale_paths(settings): # pylint: disable=missing-docstring
SOCIAL_AUTH_SAML_SP_PRIVATE_KEY_DICT = {}
SOCIAL_AUTH_SAML_SP_PUBLIC_CERT_DICT = {}

######################### rate limit for yt_video_metadata api ############
######################### rate limit for yt_video_metadata api ##############

RATE_LIMIT_FOR_VIDEO_METADATA_API = '10/minute'

########################## MAILCHIMP SETTINGS #################################
MAILCHIMP_NEW_USER_LIST_ID = ""

########################## BLOCKSTORE #####################################
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 = {}

SYSLOG_SERVER = ''
FEEDBACK_SUBMISSION_EMAIL = ''
GITHUB_REPO_ROOT = '/edx/var/edxapp/data'