Newer
Older
'account_privacy',
# Not an actual field, but used to signal whether badges should be public.
'accomplishments_shared',
# The list of account fields that are always public
"public_fields": [
'username',
'profile_image',
'account_privacy',
# The list of account fields that are visible only to staff and users viewing their own profiles
"admin_fields": [
"username",
"email",
"is_active",
"bio",
"country",
"profile_image",
"language_proficiencies",
"name",
"gender",
"goals",
"year_of_birth",
"level_of_education",
"mailing_address",
"requires_parental_consent",
"account_privacy",
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
# The current list of social platforms to be shown to the user.
#
# url_stub represents the host URL, it must end with a forward
# slash and represent the profile at https://www.[url_stub][username]
#
# The example will be used as a placeholder in the social link
# input field as well as in some messaging describing an example of a
# valid link.
SOCIAL_PLATFORMS = {
'facebook': {
'display_name': 'Facebook',
'url_stub': 'facebook.com/',
'example': 'https://www.facebook.com/username'
},
'twitter': {
'display_name': 'Twitter',
'url_stub': 'twitter.com/',
'example': 'https://www.twitter.com/username'
},
'linkedin': {
'display_name': 'LinkedIn',
'url_stub': 'linkedin.com/in/',
'example': 'www.linkedin.com/in/username'
}
}
ECOMMERCE_PUBLIC_URL_ROOT = None
ECOMMERCE_API_URL = None
ECOMMERCE_API_TIMEOUT = 5
ECOMMERCE_SERVICE_WORKER_USERNAME = 'ecommerce_worker'
COURSE_CATALOG_API_URL = None
CREDENTIALS_INTERNAL_SERVICE_URL = None
CREDENTIALS_PUBLIC_SERVICE_URL = None
CHECKPOINT_PATTERN = r'(?P<checkpoint_name>[^/]+)'
# For the fields override feature
# If using FEATURES['INDIVIDUAL_DUE_DATES'], you should add
# 'lms.djangoapps.courseware.student_field_overrides.IndividualStudentOverrideProvider' to
# this setting.
FIELD_OVERRIDE_PROVIDERS = ()
# Modulestore-level field override providers. These field override providers don't
# require student context.
MODULESTORE_FIELD_OVERRIDE_PROVIDERS = ('openedx.features.content_type_gating.field_override.ContentTypeGatingFieldOverride',) # pylint: disable=line-too-long
# WARNING: Certain django storage backends do not support atomic
# file overwrites (including the default, OverwriteStorage) - instead
# there are separate calls to delete and then write a new file in the
# storage backend. This introduces the risk of a race condition
# occurring when a user uploads a new profile image to replace an
# earlier one (the file will temporarily be deleted).
PROFILE_IMAGE_BACKEND = {
'class': 'storages.backends.overwrite.OverwriteStorage',
'options': {
'location': os.path.join(MEDIA_ROOT, 'profile-images/'),
'base_url': os.path.join(MEDIA_URL, 'profile-images/'),
},
}
PROFILE_IMAGE_DEFAULT_FILENAME = 'images/profiles/default'
PROFILE_IMAGE_DEFAULT_FILE_EXTENSION = 'png'
# This secret key is used in generating unguessable URLs to users'
# profile images. Once it has been set, changing it will make the
# platform unaware of current image URLs, resulting in reverting all
# users' profile images to the default placeholder image.
PROFILE_IMAGE_SECRET_KEY = 'placeholder secret key'
PROFILE_IMAGE_MAX_BYTES = 1024 * 1024
PROFILE_IMAGE_MIN_BYTES = 100
PROFILE_IMAGE_SIZES_MAP = {
'full': 500,
'large': 120,
'medium': 50,
'small': 30
}
# Sets the maximum number of courses listed on the homepage
# If set to None, all courses will be listed on the homepage
HOMEPAGE_COURSE_MAX = None
################################ Settings for Credit Courses ################################
# Initial delay used for retrying tasks.
# Additional retries use longer delays.
# Value is in seconds.
CREDIT_TASK_DEFAULT_RETRY_DELAY = 30
# Maximum number of retries per task for errors that are not related
# to throttling.
CREDIT_TASK_MAX_RETRIES = 5
# Secret keys shared with credit providers.
# Used to digitally sign credit requests (us --> provider)
# and validate responses (provider --> us).
# Each key in the dictionary is a credit provider ID, and
# the value is the 32-character key.
CREDIT_PROVIDER_SECRET_KEYS = {}
# Maximum age in seconds of timestamps we will accept
# when a credit provider notifies us that a student has been approved
# or denied for credit.
CREDIT_PROVIDER_TIMESTAMP_EXPIRATION = 15 * 60
# The Help link to the FAQ page about the credit
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
# not expected to be active; this setting simply allows administrators to
# route any messages intended for LTI users to a common domain.
LTI_USER_EMAIL_DOMAIN = 'lti.example.com'
# An aggregate score is one derived from multiple problems (such as the
# cumulative score for a vertical element containing many problems). Sending
# aggregate scores immediately introduces two issues: one is a race condition
# between the view method and the Celery task where the updated score may not
# yet be visible to the database if the view has not yet returned (and committed
# its transaction). The other is that the student is likely to receive a stream
# of notifications as the score is updated with every problem. Waiting a
# reasonable period of time allows the view transaction to end, and allows us to
# collapse multiple score updates into a single message.
# The time value is in seconds.
LTI_AGGREGATE_SCORE_PASSBACK_DELAY = 15 * 60
# Credit notifications settings
NOTIFICATION_EMAIL_CSS = "templates/credit_notifications/credit_notification.css"
NOTIFICATION_EMAIL_EDX_LOGO = "templates/credit_notifications/edx-logo-header.png"
################################ Settings for JWTs ################################
JWT_AUTH = {
'JWT_VERIFY_EXPIRATION': True,
'JWT_PAYLOAD_GET_USERNAME_HANDLER': lambda d: d.get('username'),
'JWT_LEEWAY': 1,
'JWT_DECODE_HANDLER': 'edx_rest_framework_extensions.auth.jwt.decoder.jwt_decode_handler',
'JWT_AUTH_COOKIE': 'edx-jwt-cookie',
# Number of seconds before JWTs expire
'JWT_IN_COOKIE_EXPIRATION': 60 * 60,
'JWT_LOGIN_CLIENT_ID': 'login-service-client-id',
'JWT_LOGIN_SERVICE_USERNAME': 'login_service_user',
'JWT_SUPPORTED_VERSION': '1.1.0',
'JWT_ALGORITHM': 'HS256',
'JWT_SECRET_KEY': SECRET_KEY,
'JWT_SIGNING_ALGORITHM': 'RS512',
'JWT_PRIVATE_SIGNING_JWK': None,
'JWT_PUBLIC_SIGNING_JWK_SET': None,
'JWT_ISSUER': 'change-me',
'JWT_AUDIENCE': 'change-me',
################################ Settings for Microsites ################################
### Select an implementation for the microsite backend
# for MICROSITE_BACKEND possible choices are
# 1. microsite_configuration.backends.filebased.FilebasedMicrositeBackend
# 2. microsite_configuration.backends.database.DatabaseMicrositeBackend
MICROSITE_BACKEND = 'microsite_configuration.backends.filebased.FilebasedMicrositeBackend'
# for MICROSITE_TEMPLATE_BACKEND possible choices are
# 1. microsite_configuration.backends.filebased.FilebasedMicrositeTemplateBackend
# 2. microsite_configuration.backends.database.DatabaseMicrositeTemplateBackend
MICROSITE_TEMPLATE_BACKEND = 'microsite_configuration.backends.filebased.FilebasedMicrositeTemplateBackend'
# TTL for microsite database template cache
MICROSITE_DATABASE_TEMPLATE_CACHE_TTL = 5 * 60
################################ Settings for rss_proxy ################################
RSS_PROXY_CACHE_TIMEOUT = 3600 # The length of time we cache RSS retrieved from remote URLs in seconds
#### PROCTORING CONFIGURATION DEFAULTS
PROCTORING_BACKEND_PROVIDER = {
'class': 'edx_proctoring.backends.null.NullBackendProvider',
'options': {},
}
PROCTORING_SETTINGS = {}
#### Custom Courses for EDX (CCX) configuration
# This is an arbitrary hard limit.
# The reason we introcuced this number is because we do not want the CCX
# to compete with the MOOC.
CCX_MAX_STUDENTS_ALLOWED = 200
# Financial assistance settings
# Maximum and minimum length of answers, in characters, for the
# financial assistance form
FINANCIAL_ASSISTANCE_MIN_LENGTH = 250
#### Registration form extension. ####
# Only used if combined login/registration is enabled.
# This can be used to add fields to the registration page.
# It must be a path to a valid form, in dot-separated syntax.
# IE: custom_form_app.forms.RegistrationExtensionForm
# Note: If you want to use a model to store the results of the form, you will
# need to add the model's app to the ADDL_INSTALLED_APPS array in your
# lms.env.json file.
REGISTRATION_EXTENSION_FORM = None
# Identifier included in the User Agent from open edX mobile apps.
MOBILE_APP_USER_AGENT_REGEXES = [
r'edX/org.edx.mobile',
]
# cache timeout in seconds for Mobile App Version Upgrade
APP_UPGRADE_CACHE_TIMEOUT = 3600
# Offset for courseware.StudentModuleHistoryExtended which is used to
# calculate the starting primary key for the underlying table. This gap
# should be large enough that you do not generate more than N courseware.StudentModuleHistory
# records before you have deployed the app to write to coursewarehistoryextended.StudentModuleHistoryExtended
# if you want to avoid an overlap in ids while searching for history across the two tables.
STUDENTMODULEHISTORYEXTENDED_OFFSET = 10000
# Cutoff date for granting audit certificates
AUDIT_CERT_CUTOFF_DATE = None
################################ Settings for Credentials Service ################################
CREDENTIALS_SERVICE_USERNAME = 'credentials_service_user'
CREDENTIALS_GENERATION_ROUTING_KEY = DEFAULT_PRIORITY_QUEUE
# Settings for Comprehensive Theming app
# See https://github.com/edx/edx-django-sites-extensions for more info
# Default site to use if site matching request headers does not exist
SITE_ID = 1
# dir containing all themes
COMPREHENSIVE_THEME_DIRS = [REPO_ROOT / "themes"]
# Theme directory locale paths
COMPREHENSIVE_THEME_LOCALE_PATHS = []
# Theme to use when no site or site theme is defined,
# set to None if you want to use openedx theme
DEFAULT_SITE_THEME = None
ENABLE_COMPREHENSIVE_THEMING = True
# API access management
API_ACCESS_MANAGER_EMAIL = 'api-access@example.com'
API_ACCESS_FROM_EMAIL = 'api-requests@example.com'
API_DOCUMENTATION_URL = 'https://course-catalog-api-guide.readthedocs.io/en/latest/'
AUTH_DOCUMENTATION_URL = 'https://course-catalog-api-guide.readthedocs.io/en/latest/authentication/index.html'
# Affiliate cookie tracking
AFFILIATE_COOKIE_NAME = 'affiliate_id'
Hasnain
committed
############## Settings for RedirectMiddleware ###############
# Setting this to None causes Redirect data to never expire
# The cache is cleared when Redirect models are saved/deleted
REDIRECT_CACHE_TIMEOUT = None # The length of time we cache Redirect model data
REDIRECT_CACHE_KEY_PREFIX = 'redirects'
Peter Desjardins
committed
############## Settings for LMS Context Sensitive Help ##############
HELP_TOKENS_INI_FILE = REPO_ROOT / "lms" / "envs" / "help_tokens.ini"
HELP_TOKENS_LANGUAGE_CODE = lambda settings: settings.LANGUAGE_CODE
HELP_TOKENS_VERSION = lambda settings: doc_version()
HELP_TOKENS_BOOKS = {
'learner': 'https://edx.readthedocs.io/projects/open-edx-learner-guide',
'course_author': 'https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course',
derived('HELP_TOKENS_LANGUAGE_CODE', 'HELP_TOKENS_VERSION')
############## OPEN EDX ENTERPRISE SERVICE CONFIGURATION ######################
# The Open edX Enterprise service is currently hosted via the LMS container/process.
# However, for all intents and purposes this service is treated as a standalone IDA.
# These configuration settings are specific to the Enterprise service and you should
# not find references to them within the edx-platform project.
#
# Only used if FEATURES['ENABLE_ENTERPRISE_INTEGRATION'] == True.
ENTERPRISE_ENROLLMENT_API_URL = LMS_INTERNAL_ROOT_URL + LMS_ENROLLMENT_API_PATH
ENTERPRISE_PUBLIC_ENROLLMENT_API_URL = LMS_ROOT_URL + LMS_ENROLLMENT_API_PATH
ENTERPRISE_COURSE_ENROLLMENT_AUDIT_MODES = ['audit', 'honor']
Uman Shahzad
committed
ENTERPRISE_SUPPORT_URL = ''
Brittney Exline
committed
# The default value of this needs to be a 16 character string
ENTERPRISE_REPORTING_SECRET = '0000000000000000'
ENTERPRISE_CUSTOMER_CATALOG_DEFAULT_CONTENT_FILTER = {}
############## ENTERPRISE SERVICE API CLIENT CONFIGURATION ######################
# The LMS communicates with the Enterprise service via the EdxRestApiClient class
# These default settings are utilized by the LMS when interacting with the service,
# and are overridden by the configuration parameter accessors defined in aws.py
ENTERPRISE_API_URL = LMS_INTERNAL_ROOT_URL + '/enterprise/api/v1/'
ENTERPRISE_CONSENT_API_URL = LMS_INTERNAL_ROOT_URL + '/consent/api/v1/'
ENTERPRISE_SERVICE_WORKER_USERNAME = 'enterprise_worker'
ENTERPRISE_API_CACHE_TIMEOUT = 3600 # Value is in seconds
ENTERPRISE_CUSTOMER_LOGO_IMAGE_SIZE = 512 # Enterprise logo image size limit in KB's
############## ENTERPRISE SERVICE LMS CONFIGURATION ##################################
# The LMS has some features embedded that are related to the Enterprise service, but
# which are not provided by the Enterprise service. These settings provide base values
# for those features.
ENTERPRISE_PLATFORM_WELCOME_TEMPLATE = _(u'Welcome to {platform_name}.')
ENTERPRISE_SPECIFIC_BRANDED_WELCOME_TEMPLATE = _(
'You have left the {start_bold}{enterprise_name}{end_bold} website and are now on the {platform_name} site. '
'{enterprise_name} has partnered with {platform_name} to offer you high-quality, always available learning '
'programs to help you advance your knowledge and career. '
'{line_break}Please note that {platform_name} has a different {privacy_policy_link_start}Privacy Policy'
'{privacy_policy_link_end} from {enterprise_name}.'
)
ENTERPRISE_EXCLUDED_REGISTRATION_FIELDS = {
'age',
'level_of_education',
'gender',
'goals',
'year_of_birth',
'mailing_address',
}
ENTERPRISE_READONLY_ACCOUNT_FIELDS = [
'username',
'name',
'email',
'country',
]
ENTERPRISE_CUSTOMER_COOKIE_NAME = 'enterprise_customer_uuid'
BASE_COOKIE_DOMAIN = 'localhost'
############## Settings for Course Enrollment Modes ######################
COURSE_ENROLLMENT_MODES = {
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
"audit": {
"id": 1,
"slug": "audit",
"display_name": _("Audit"),
"min_price": 0
},
"verified": {
"id": 2,
"slug": "verified",
"display_name": _("Verified"),
"min_price": 0
},
"professional": {
"id": 3,
"slug": "professional",
"display_name": _("Professional"),
"min_price": 0
},
"no-id-professional": {
"id": 4,
"slug": "no-id-professional",
"display_name": _("No-Id-Professional"),
"min_price": 0
},
"credit": {
"id": 5,
"slug": "credit",
"display_name": _("Credit"),
"min_price": 0
},
"honor": {
"id": 6,
"slug": "honor",
"display_name": _("Honor"),
"min_price": 0
},
CONTENT_TYPE_GATE_GROUP_IDS = {
'limited_access': 1,
'full_access': 2,
}
############## Settings for the Discovery App ######################
COURSES_API_CACHE_TIMEOUT = 3600 # Value is in seconds
############## Settings for CourseGraph ############################
COURSEGRAPH_JOB_QUEUE = DEFAULT_PRIORITY_QUEUE
# Initialize to 'unknown', but read from JSON in aws.py
EDX_PLATFORM_REVISION = 'unknown'
############## Settings for Completion API #########################
# Once a user has watched this percentage of a video, mark it as complete:
# (0.0 = 0%, 1.0 = 100%)
COMPLETION_VIDEO_COMPLETE_PERCENTAGE = 0.95
COMPLETION_BY_VIEWING_DELAY_MS = 5000
############### Settings for Django Rate limit #####################
RATELIMIT_ENABLE = True
############### Settings for Retirement #####################
RETIRED_USERNAME_PREFIX = 'retired__user_'
RETIRED_EMAIL_PREFIX = 'retired__user_'
RETIRED_EMAIL_DOMAIN = 'retired.invalid'
RETIRED_USERNAME_FMT = lambda settings: settings.RETIRED_USERNAME_PREFIX + '{}'
RETIRED_EMAIL_FMT = lambda settings: settings.RETIRED_EMAIL_PREFIX + '{}@' + settings.RETIRED_EMAIL_DOMAIN
derived('RETIRED_USERNAME_FMT', 'RETIRED_EMAIL_FMT')
RETIRED_USER_SALTS = ['abc', '123']
RETIREMENT_SERVICE_WORKER_USERNAME = 'RETIREMENT_SERVICE_USER'
# These states are the default, but are designed to be overridden in configuration.
RETIREMENT_STATES = [
'PENDING',
'LOCKING_ACCOUNT',
'LOCKING_COMPLETE',
# Use these states only when ENABLE_DISCUSSION_SERVICE is True.
'RETIRING_FORUMS',
'FORUMS_COMPLETE',
# TODO - Change these states to be the LMS-only email opt-out - PLAT-2189
'RETIRING_EMAIL_LISTS',
'EMAIL_LISTS_COMPLETE',
'RETIRING_ENROLLMENTS',
'ENROLLMENTS_COMPLETE',
# Use these states only when ENABLE_STUDENT_NOTES is True.
'RETIRING_NOTES',
'NOTES_COMPLETE',
'RETIRING_LMS',
'LMS_COMPLETE',
'ERRORED',
'ABORTED',
'COMPLETE',
]
############## Settings for Writable Gradebook #########################
# If running a Gradebook container locally,
# modify lms/envs/private.py to give it a non-null value
WRITABLE_GRADEBOOK_URL = None
############### Settings for django-fernet-fields ##################
FERNET_KEYS = [
'DUMMY KEY CHANGE BEFORE GOING TO PRODUCTION',
]
Daniel Clemente Laboreo
committed
############### Settings for user-state-client ##################
# Maximum number of rows to fetch in XBlockUserStateClient calls. Adjust for performance
USER_STATE_BATCH_SIZE = 5000
############## Plugin Django Apps #########################
from openedx.core.djangoapps.plugins import plugin_apps, plugin_settings, constants as plugin_constants
INSTALLED_APPS.extend(plugin_apps.get_apps(plugin_constants.ProjectType.LMS))
plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.LMS, plugin_constants.SettingsType.COMMON)