Skip to content
Snippets Groups Projects
common.py 187 KiB
Newer Older
    'lms.djangoapps.lms_xblock.apps.LMSXBlockConfig',
    # Course data caching
    'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig',
    'openedx.core.djangoapps.content.block_structure.apps.BlockStructureConfig',
    'lms.djangoapps.course_blocks',

    # Coursegraph
    'openedx.core.djangoapps.coursegraph.apps.CoursegraphConfig',

    # Mailchimp Syncing
    'lms.djangoapps.mailing',
Will Daly's avatar
Will Daly committed
    # CORS and cross-domain CSRF
    'corsheaders',
    'openedx.core.djangoapps.cors_csrf',
    'lms.djangoapps.commerce.apps.CommerceConfig',
    'openedx.core.djangoapps.credit.apps.CreditConfig',
Diana Huang's avatar
Diana Huang committed

    # Course teams
    'lms.djangoapps.teams',
    'openedx.core.djangoapps.programs.apps.ProgramsConfig',
    # Catalog integration
    'openedx.core.djangoapps.catalog',

    # Self-paced course configuration
    'openedx.core.djangoapps.self_paced',

    'sorl.thumbnail',
    # edx-milestones service
    'milestones',

    # Gating of course content
    'lms.djangoapps.gating.apps.GatingConfig',

    # Static i18n support
    'statici18n',
erm0l0v's avatar
erm0l0v committed

    # API access administration
    'openedx.core.djangoapps.api_admin',
    # Verified Track Content Cohorting (Beta feature that will hopefully be removed)
    'openedx.core.djangoapps.verified_track_content',
    'lms.djangoapps.learner_dashboard',

    # Needed whether or not enabled, due to migrations
    'lms.djangoapps.badges.apps.BadgesConfig',

    # Enables default site and redirects
    'django_sites_extensions',

    # Email marketing integration
    'lms.djangoapps.email_marketing.apps.EmailMarketingConfig',

    # additional release utilities to ease automation
    'release_util',
    # rule-based authorization
    'rules.apps.AutodiscoverRulesConfig',
    # Customized celery tasks, including persisting failed tasks so they can
    # be retried

    # Ability to detect and special-case crawler behavior
    'openedx.core.djangoapps.crawlers',

    # Unusual migrations
    'openedx.core.djangoapps.waffle_utils',

    # Course Goals
Stu Young's avatar
Stu Young committed
    'lms.djangoapps.course_goals.apps.CourseGoalsConfig',
    # Features
    'openedx.features.calendar_sync',
    'openedx.features.course_bookmarks',
    'openedx.features.course_experience',
    'openedx.features.course_search',
    'openedx.features.enterprise_support.apps.EnterpriseSupportConfig',
    'openedx.features.learner_profile',
    'openedx.features.course_duration_limits',
    'openedx.features.content_type_gating',
Emma Green's avatar
Emma Green committed
    'openedx.features.discounts',
    'openedx.features.effort_estimation',
    'openedx.features.name_affirmation_api.apps.NameAffirmationApiConfig',
Ned Batchelder's avatar
Ned Batchelder committed
    'drf_yasg',

    # edx-drf-extensions
    'csrf.apps.CsrfAppConfig',  # Enables frontend apps to retrieve CSRF tokens.
    'xss_utils',

    # so sample_task is available to celery workers
    'openedx.core.djangoapps.heartbeat',

    # signal handlers to capture course dates into edx-when
    'openedx.core.djangoapps.course_date_signals',

    # Management of external user ids
    'openedx.core.djangoapps.external_user_ids',
    # Provides api for Demographics support
    'openedx.core.djangoapps.demographics',

    # Management of per-user schedules
    'openedx.core.djangoapps.schedules',
Ayub-khan's avatar
Ayub-khan committed
    'rest_framework_jwt',
    # Learning Sequence Navigation
    'openedx.core.djangoapps.content.learning_sequences.apps.LearningSequencesConfig',
    # Backends for receiving edX LMS events
    'event_routing_backends.apps.EventRoutingBackendsConfig',

    # Database-backed Organizations App (http://github.com/edx/edx-organizations)
    'organizations',
    # Bulk User Retirement
    'lms.djangoapps.bulk_user_retirement',

    # Agreements
    'openedx.core.djangoapps.agreements'
Will Daly's avatar
Will Daly committed
######################### CSRF #########################################

# Forwards-compatibility with Django 1.7
CSRF_COOKIE_AGE = 60 * 60 * 24 * 7 * 52
e0d's avatar
e0d committed
# It is highly recommended that you override this in any environment accessed by
# end users
CSRF_COOKIE_SECURE = False
nadeemshahzad's avatar
nadeemshahzad committed
CROSS_DOMAIN_CSRF_COOKIE_DOMAIN = ''
CROSS_DOMAIN_CSRF_COOKIE_NAME = ''
######################### Django Rest Framework ########################

REST_FRAMEWORK = {
    'DEFAULT_PAGINATION_CLASS': 'edx_rest_framework_extensions.paginators.DefaultPagination',
    'DEFAULT_RENDERER_CLASSES': (
        'rest_framework.renderers.JSONRenderer',
    ),
    'EXCEPTION_HANDLER': 'openedx.core.lib.request_utils.expected_error_exception_handler',
    'PAGE_SIZE': 10,
    'URL_FORMAT_OVERRIDE': None,
    'DEFAULT_THROTTLE_RATES': {
        'user': '60/minute',
        'registration_validation': '30/minute',
REGISTRATION_VALIDATION_RATELIMIT = '30/7d'
REGISTRATION_RATELIMIT = '60/7d'
Ned Batchelder's avatar
Ned Batchelder committed
SWAGGER_SETTINGS = {
    'DEFAULT_INFO': 'openedx.core.apidocs.api_info',
Ned Batchelder's avatar
Ned Batchelder committed
}
# How long to cache OpenAPI schemas and UI, in seconds.
OPENAPI_CACHE_TIMEOUT = 0

######################### MARKETING SITE ###############################
Will Daly's avatar
Will Daly committed
EDXMKTG_LOGGED_IN_COOKIE_NAME = 'edxloggedin'
EDXMKTG_USER_INFO_COOKIE_NAME = 'edx-user-info'
EDXMKTG_USER_INFO_COOKIE_VERSION = 1

MKTG_URLS = {}
MKTG_URL_OVERRIDES = {}
MKTG_URL_LINK_MAP = {
    'ABOUT': 'about',
    'CONTACT': 'contact',
    'FAQ': 'help',
    'COURSES': 'courses',
    'ROOT': 'root',
    'TOS': 'tos',
    'HONOR': 'honor',  # If your site does not have an honor code, simply delete this line.
    'TOS_AND_HONOR': 'edx-terms-service',
    'PRIVACY': 'privacy',
    'PRESS': 'press',
    'BLOG': 'blog',
    'DONATE': 'donate',
    'SITEMAP.XML': 'sitemap_xml',

    # Verified Certificates
    'WHAT_IS_VERIFIED_CERT': 'verified-certificate',
}
STATIC_TEMPLATE_VIEW_DEFAULT_FILE_EXTENSION = 'html'

Peter Fogg's avatar
Peter Fogg committed
SUPPORT_SITE_LINK = ''
ID_VERIFICATION_SUPPORT_LINK = ''
PASSWORD_RESET_SUPPORT_LINK = ''
ACTIVATION_EMAIL_SUPPORT_LINK = ''
LOGIN_ISSUE_SUPPORT_LINK = ''
# Days before the expired date that we warn the user
ENTITLEMENT_EXPIRED_ALERT_PERIOD = 90

############################# SOCIAL MEDIA SHARING #############################
# Social Media Sharing on Student Dashboard
SOCIAL_SHARING_SETTINGS = {
    # Note: Ensure 'CUSTOM_COURSE_URLS' has a matching value in cms/envs/common.py
    'CUSTOM_COURSE_URLS': False,
    'DASHBOARD_FACEBOOK': False,
    'FACEBOOK_BRAND': None,
    'CERTIFICATE_FACEBOOK': False,
    'CERTIFICATE_FACEBOOK_TEXT': None,
    'CERTIFICATE_TWITTER': False,
    'CERTIFICATE_TWITTER_TEXT': None,
    'DASHBOARD_TWITTER': False,
    'DASHBOARD_TWITTER_TEXT': None,
    'TWITTER_BRAND': None
################# Social Media Footer Links #######################
# The names list controls the order of social media
# links in the footer.
SOCIAL_MEDIA_FOOTER_NAMES = [
    "facebook",
    "twitter",
    # "youtube", see PROD-816 for more details
    "linkedin",
    "reddit",
]

# The footer URLs dictionary maps social footer names
# to URLs defined in configuration.
SOCIAL_MEDIA_FOOTER_URLS = {}

# The display dictionary defines the title
# and icon class for each social media link.
SOCIAL_MEDIA_FOOTER_DISPLAY = {
    "facebook": {
        # Translators: This is the website name of www.facebook.com.  Please
        # translate this the way that Facebook advertises in your language.
        "title": _("Facebook"),
        "icon": "fa-facebook-square",
        "action": _("Like {platform_name} on Facebook")
    },
    "twitter": {
        # Translators: This is the website name of www.twitter.com.  Please
        # translate this the way that Twitter advertises in your language.
        "title": _("Twitter"),
        "icon": "fa-twitter-square",
        "action": _("Follow {platform_name} on Twitter")
    },
    "linkedin": {
        # Translators: This is the website name of www.linkedin.com.  Please
        # translate this the way that LinkedIn advertises in your language.
        "title": _("LinkedIn"),
        "icon": "fa-linkedin-square",
        "action": _("Follow {platform_name} on LinkedIn")
    "instagram": {
        # Translators: This is the website name of www.instagram.com.  Please
        # translate this the way that Instagram advertises in your language.
        "title": _("Instagram"),
        "icon": "fa-instagram",
        "action": _("Follow {platform_name} on Instagram")
    },
    "tumblr": {
        # Translators: This is the website name of www.tumblr.com.  Please
        # translate this the way that Tumblr advertises in your language.
        "title": _("Tumblr"),
        "icon": "fa-tumblr"
    },
    "meetup": {
        # Translators: This is the website name of www.meetup.com.  Please
        # translate this the way that MeetUp advertises in your language.
        "title": _("Meetup"),
        "icon": "fa-calendar"
    },
    "reddit": {
        # Translators: This is the website name of www.reddit.com.  Please
        # translate this the way that Reddit advertises in your language.
        "title": _("Reddit"),
        "icon": "fa-reddit-square",
        "action": _("Subscribe to the {platform_name} subreddit"),
    "vk": {
        # Translators: This is the website name of https://vk.com.  Please
        # translate this the way that VK advertises in your language.
        "title": _("VK"),
        "icon": "fa-vk"
    },
    "weibo": {
        # Translators: This is the website name of http://www.weibo.com.  Please
        # translate this the way that Weibo advertises in your language.
        "title": _("Weibo"),
        "icon": "fa-weibo"
    },
    "youtube": {
        # Translators: This is the website name of www.youtube.com.  Please
        # translate this the way that YouTube advertises in your language.
        "title": _("Youtube"),
        "icon": "fa-youtube-square",
        "action": _("Subscribe to the {platform_name} YouTube channel")
#################SOCAIL AUTH OAUTH######################
SOCIAL_AUTH_OAUTH_SECRETS = {}

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

# These are URLs to the app store for mobile.
nadeemshahzad's avatar
nadeemshahzad committed
MOBILE_STORE_URLS = {}
################# Student Verification #################
VERIFY_STUDENT = {
    "DAYS_GOOD_FOR": 365,  # How many days is a verficiation good for?
    # The variable represents the window within which a verification is considered to be "expiring soon."
    "EXPIRING_SOON_WINDOW": 28,

################# Student Verification Expiry Email #################
VERIFICATION_EXPIRY_EMAIL = {
    "RESEND_DAYS": 15,
    "DAYS_RANGE": 1,
    "DEFAULT_EMAILS": 2,
}

DISABLE_ACCOUNT_ACTIVATION_REQUIREMENT_SWITCH = "verify_student_disable_account_activation_requirement"
################ Enable credit eligibility feature ####################
ENABLE_CREDIT_ELIGIBILITY = True
# .. toggle_name: FEATURES['ENABLE_CREDIT_ELIGIBILITY']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When enabled, it is possible to define a credit eligibility criteria in the CMS. A "Credit
#   Eligibility" section then appears for those courses in the LMS.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-06-17
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/8550
FEATURES['ENABLE_CREDIT_ELIGIBILITY'] = ENABLE_CREDIT_ELIGIBILITY

############# Cross-domain requests #################

if FEATURES.get('ENABLE_CORS_HEADERS'):
    CORS_ALLOW_CREDENTIALS = True
    CORS_ORIGIN_WHITELIST = ()
    CORS_ORIGIN_ALLOW_ALL = False
    CORS_ALLOW_INSECURE = False
    CORS_ALLOW_HEADERS = corsheaders_default_headers + (
        'use-jwt-cookie',
    )
# Default cache expiration for the cross-domain proxy HTML page.
# This is a static page that can be iframed into an external page
# to simulate cross-domain requests.
XDOMAIN_PROXY_CACHE_TIMEOUT = 60 * 15

# .. setting_name: LOGIN_REDIRECT_WHITELIST
# .. setting_default: empty list ([])
# .. setting_description: While logout, if logout request has a redirect-url as query strings,
#   then the redirect-url is validated through LOGIN_REDIRECT_WHITELIST.
nadeemshahzad's avatar
nadeemshahzad committed
LOGIN_REDIRECT_WHITELIST = []
###################### Registration ##################################

# .. setting_name: REGISTRATION_EXTRA_FIELDS
# .. setting_default: {'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'}
# .. setting_description: The signup form may contain extra fields that are presented to every user. For every field, we
#   can specifiy whether it should be "required": to display the field, and make it mandatory; "optional": to display
#   the field, and make it non-mandatory; "hidden": to not display the field.
#   When the terms of service are not visible and agreement to the honor code is required (the default), the signup page
#   includes a paragraph that links to the honor code page (defined my MKTG_URLS["HONOR"]). This page might not be
#   available for all Open edX platforms. In such cases, the "honor_code" registration field should be "hidden".
    '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',
REGISTRATION_FIELD_ORDER = [
    "name",
    "first_name",
    "last_name",
    "city",
    "state",
    "country",
    "gender",
    "year_of_birth",
    "level_of_education",
    "specialty",
    "profession"
    "company",
    "title",
    "mailing_address",
    "goals",
    "honor_code",
    "terms_of_service",
]

# Optional setting to restrict registration / account creation to only emails
# that match a regex in this list. Set to None to allow any email (default).
REGISTRATION_EMAIL_PATTERNS_ALLOWED = None

########################## CERTIFICATE NAME ########################
CERT_NAME_SHORT = "Certificate"
CERT_NAME_LONG = "Certificate of Achievement"

#################### OpenBadges Settings #######################

# .. setting_name: BADGING_BACKEND
# .. setting_default: 'lms.djangoapps.badges.backends.badgr.BadgrBackend'
# .. setting_description: The backend service class (or callable) for creating OpenBadges. It must implement
#    the interface provided by lms.djangoapps.badges.backends.base.BadgeBackend
# .. setting_warning: Review FEATURES['ENABLE_OPENBADGES'] for further context.
BADGING_BACKEND = 'lms.djangoapps.badges.backends.badgr.BadgrBackend'
# .. setting_name: BADGR_BASE_URL
# .. setting_default: 'http://localhost:8005'
# .. setting_description: The base URL for the Badgr server.
# .. setting_warning: DO NOT include a trailing slash. Review FEATURES['ENABLE_OPENBADGES'] for further context.

# .. setting_name: BADGR_ISSUER_SLUG
# .. setting_default: 'example-issuer'
# .. setting_description: A string that is the slug for the Badgr issuer. The slug can be obtained from the URL of
#    the Badgr Server page that displays the issuer. For example, in the URL
#    http://exampleserver.com/issuer/test-issuer, the issuer slug is "test-issuer".
# .. setting_warning: Review FEATURES['ENABLE_OPENBADGES'] for further context.
# .. setting_name: BADGR_USERNAME
# .. setting_default: None
# .. setting_description: The username for Badgr. You should set up an issuer application with Badgr
#    (https://badgr.org/app-developers/). The username and password will then be used to create or renew
#    OAuth2 tokens.
# .. setting_warning: Review FEATURES['ENABLE_OPENBADGES'] for further context.
BADGR_USERNAME = None

# .. setting_name: BADGR_PASSWORD
# .. setting_default: None
# .. setting_description: The password for Badgr. You should set up an issuer application with Badgr
#    (https://badgr.org/app-developers/). The username and password will then be used to create or renew
#    OAuth2 tokens.
# .. setting_warning: Review FEATURES['ENABLE_OPENBADGES'] for further context.
BADGR_PASSWORD = None

# .. setting_name: BADGR_TOKENS_CACHE_KEY
# .. setting_default: None
# .. setting_description: The cache key for Badgr API tokens. Once created, the tokens will be stored in cache.
#    Define the key here for setting and retrieveing the tokens.
# .. setting_warning: Review FEATURES['ENABLE_OPENBADGES'] for further context.
BADGR_TOKENS_CACHE_KEY = None

# .. setting_name: BADGR_TIMEOUT
# .. setting_default: 10
# .. setting_description: Number of seconds to wait on the badging server when contacting it before giving up.
# .. setting_warning: Review FEATURES['ENABLE_OPENBADGES'] for further context.
BADGR_TIMEOUT = 10
# .. toggle_name: BADGR_ENABLE_NOTIFICATIONS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Optional setting for enabling email notifications. When set to "True",
#    learners will be notified by email when they earn a badge.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-07-29
# .. toggle_warnings: Review FEATURES['ENABLE_OPENBADGES'] for further context.
BADGR_ENABLE_NOTIFICATIONS = False

###################### Grade Downloads ######################
# These keys are used for all of our asynchronous downloadable files, including
# the ones that contain information other than grades.
nadeemshahzad's avatar
nadeemshahzad committed
POLICY_CHANGE_GRADES_ROUTING_KEY = 'edx.lms.core.default'

RECALCULATE_GRADES_ROUTING_KEY = 'edx.lms.core.default'

SOFTWARE_SECURE_VERIFICATION_ROUTING_KEY = 'edx.lms.core.default'

nadeemshahzad's avatar
nadeemshahzad committed
    'STORAGE_CLASS': 'django.core.files.storage.FileSystemStorage',
    'STORAGE_KWARGS': {
        'location': '/tmp/edx-s3/grades',
    },
    'STORAGE_TYPE': None,
    'BUCKET': None,
    'ROOT_PATH': None,
FINANCIAL_REPORTS = {
    'STORAGE_TYPE': 'localfs',
nadeemshahzad's avatar
nadeemshahzad committed
    'BUCKET': None,
    'ROOT_PATH': 'sandbox',
Sanford Student's avatar
Sanford Student committed
#### Grading policy change-related settings #####
# Rate limit for regrading tasks that a grading policy change can kick off
POLICY_CHANGE_TASK_RATE_LIMIT = '300/h'

AUTH_PASSWORD_VALIDATORS = [
    {
        "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
    },
    {
        "NAME": "common.djangoapps.util.password_policy_validators.MinimumLengthValidator",
        "NAME": "common.djangoapps.util.password_policy_validators.MaximumLengthValidator",
nadeemshahzad's avatar
nadeemshahzad committed
PASSWORD_POLICY_COMPLIANCE_ROLLOUT_CONFIG = {
    'ENFORCE_COMPLIANCE_ON_LOGIN': False
}

############################ ORA 2 ############################################

# By default, don't use a file prefix
ORA2_FILE_PREFIX = None

Stephen Sanchez's avatar
Stephen Sanchez committed
# Default File Upload Storage bucket and prefix. Used by the FileUpload Service.
nadeemshahzad's avatar
nadeemshahzad committed
FILE_UPLOAD_STORAGE_BUCKET_NAME = 'SET-ME-PLEASE (ex. bucket-name)'
Stephen Sanchez's avatar
Stephen Sanchez committed
FILE_UPLOAD_STORAGE_PREFIX = 'submissions_attachments'
##### ACCOUNT LOCKOUT DEFAULT PARAMETERS #####
# .. setting_name: MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED
# .. setting_default: 6
# .. setting_description: Specifies the maximum failed login attempts allowed to users. Once the user reaches this
#   failure threshold then the account will be locked for a configurable amount of seconds (30 minutes) which will
#   prevent additional login attempts until this time period has passed. This setting is related with
#   MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS and only used when ENABLE_MAX_FAILED_LOGIN_ATTEMPTS is enabled.
MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED = 6

# .. setting_name: MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS
# .. setting_default: 30 * 60
# .. setting_description: Specifies the lockout period in seconds for consecutive failed login attempts. Once the user
#   reaches the threshold of the login failure, then the account will be locked for the given amount of seconds
#   (30 minutes) which will prevent additional login attempts until this time period has passed. This setting is
#   related with MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED and only used when ENABLE_MAX_FAILED_LOGIN_ATTEMPTS is enabled.
MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS = 30 * 60


##### LMS DEADLINE DISPLAY TIME_ZONE #######
TIME_ZONE_DISPLAYED_FOR_DEADLINES = 'UTC'
########################## VIDEO IMAGE STORAGE ############################

VIDEO_IMAGE_SETTINGS = dict(
    VIDEO_IMAGE_MAX_BYTES=2 * 1024 * 1024,    # 2 MB
    VIDEO_IMAGE_MIN_BYTES=2 * 1024,       # 2 KB
    # Backend storage
    # STORAGE_CLASS='storages.backends.s3boto.S3BotoStorage',
    # STORAGE_KWARGS=dict(bucket='video-image-bucket'),
    STORAGE_KWARGS=dict(
        location=MEDIA_ROOT,
        base_url=MEDIA_URL,
    ),
muhammad-ammar's avatar
muhammad-ammar committed
    DIRECTORY_PREFIX='video-images/',
nadeemshahzad's avatar
nadeemshahzad committed
VIDEO_IMAGE_MAX_AGE = 31536000

########################## VIDEO TRANSCRIPTS STORAGE ############################

VIDEO_TRANSCRIPTS_SETTINGS = dict(
    VIDEO_TRANSCRIPTS_MAX_BYTES=3 * 1024 * 1024,    # 3 MB
    # Backend storage
    # STORAGE_CLASS='storages.backends.s3boto.S3BotoStorage',
    # STORAGE_KWARGS=dict(bucket='video-transcripts-bucket'),
    STORAGE_KWARGS=dict(
        location=MEDIA_ROOT,
        base_url=MEDIA_URL,
    ),
    DIRECTORY_PREFIX='video-transcripts/',
)

nadeemshahzad's avatar
nadeemshahzad committed
VIDEO_TRANSCRIPTS_MAX_AGE = 31536000
# Source:
# http://loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt according to http://en.wikipedia.org/wiki/ISO_639-1
# Note that this is used as the set of choices to the `code` field of the
# `LanguageProficiency` model.
    ["aa", "Afar"],
    ["ab", "Abkhazian"],
    ["af", "Afrikaans"],
    ["ak", "Akan"],
    ["sq", "Albanian"],
    ["am", "Amharic"],
    ["ar", "Arabic"],
    ["an", "Aragonese"],
    ["hy", "Armenian"],
    ["as", "Assamese"],
    ["av", "Avaric"],
    ["ae", "Avestan"],
    ["ay", "Aymara"],
    ["az", "Azerbaijani"],
    ["ba", "Bashkir"],
    ["bm", "Bambara"],
    ["eu", "Basque"],
    ["be", "Belarusian"],
    ["bn", "Bengali"],
    ["bh", "Bihari languages"],
    ["bi", "Bislama"],
    ["bs", "Bosnian"],
    ["br", "Breton"],
    ["bg", "Bulgarian"],
    ["my", "Burmese"],
    ["ca", "Catalan"],
    ["ch", "Chamorro"],
    ["ce", "Chechen"],
    ["zh", "Chinese"],
    ["zh_HANS", "Simplified Chinese"],
    ["zh_HANT", "Traditional Chinese"],
    ["cu", "Church Slavic"],
    ["cv", "Chuvash"],
    ["kw", "Cornish"],
    ["co", "Corsican"],
    ["cr", "Cree"],
    ["cs", "Czech"],
    ["da", "Danish"],
    ["dv", "Divehi"],
    ["nl", "Dutch"],
    ["dz", "Dzongkha"],
    ["en", "English"],
    ["eo", "Esperanto"],
    ["et", "Estonian"],
    ["ee", "Ewe"],
    ["fo", "Faroese"],
    ["fj", "Fijian"],
    ["fi", "Finnish"],
    ["fr", "French"],
    ["fy", "Western Frisian"],
    ["ff", "Fulah"],
    ["ka", "Georgian"],
    ["de", "German"],
    ["gd", "Gaelic"],
    ["ga", "Irish"],
    ["gl", "Galician"],
    ["gv", "Manx"],
    ["el", "Greek"],
    ["gn", "Guarani"],
    ["gu", "Gujarati"],
    ["ht", "Haitian"],
    ["ha", "Hausa"],
    ["he", "Hebrew"],
    ["hz", "Herero"],
    ["hi", "Hindi"],
    ["ho", "Hiri Motu"],
    ["hr", "Croatian"],
    ["hu", "Hungarian"],
    ["ig", "Igbo"],
    ["is", "Icelandic"],
    ["io", "Ido"],
    ["ii", "Sichuan Yi"],
    ["iu", "Inuktitut"],
    ["ie", "Interlingue"],
    ["ia", "Interlingua"],
    ["id", "Indonesian"],
    ["ik", "Inupiaq"],
    ["it", "Italian"],
    ["jv", "Javanese"],
    ["ja", "Japanese"],
    ["kl", "Kalaallisut"],
    ["kn", "Kannada"],
    ["ks", "Kashmiri"],
    ["kr", "Kanuri"],
    ["kk", "Kazakh"],
    ["km", "Central Khmer"],
    ["ki", "Kikuyu"],
    ["rw", "Kinyarwanda"],
    ["ky", "Kirghiz"],
    ["kv", "Komi"],
    ["kg", "Kongo"],
    ["ko", "Korean"],
    ["kj", "Kuanyama"],
    ["ku", "Kurdish"],
    ["lo", "Lao"],
    ["la", "Latin"],
    ["lv", "Latvian"],
    ["li", "Limburgan"],
    ["ln", "Lingala"],
    ["lt", "Lithuanian"],
    ["lb", "Luxembourgish"],
    ["lu", "Luba-Katanga"],
    ["lg", "Ganda"],
    ["mk", "Macedonian"],
    ["mh", "Marshallese"],
    ["ml", "Malayalam"],
    ["mi", "Maori"],
    ["mr", "Marathi"],
    ["ms", "Malay"],
    ["mg", "Malagasy"],
    ["mt", "Maltese"],
    ["mn", "Mongolian"],
    ["na", "Nauru"],
    ["nv", "Navajo"],
    ["nr", "Ndebele, South"],
    ["nd", "Ndebele, North"],
    ["ng", "Ndonga"],
    ["ne", "Nepali"],
    ["nn", "Norwegian Nynorsk"],
    ["nb", "Bokmål, Norwegian"],
    ["no", "Norwegian"],
    ["ny", "Chichewa"],
    ["oc", "Occitan"],
    ["oj", "Ojibwa"],
    ["or", "Oriya"],
    ["om", "Oromo"],
    ["os", "Ossetian"],
    ["pa", "Panjabi"],
    ["fa", "Persian"],
    ["pi", "Pali"],
    ["pl", "Polish"],
    ["pt", "Portuguese"],
    ["ps", "Pushto"],
    ["qu", "Quechua"],
    ["rm", "Romansh"],
    ["ro", "Romanian"],
    ["rn", "Rundi"],
    ["ru", "Russian"],
    ["sg", "Sango"],
    ["sa", "Sanskrit"],
    ["si", "Sinhala"],
    ["sk", "Slovak"],
    ["sl", "Slovenian"],
    ["se", "Northern Sami"],
    ["sm", "Samoan"],
    ["sn", "Shona"],
    ["sd", "Sindhi"],
    ["so", "Somali"],
    ["st", "Sotho, Southern"],
    ["es", "Spanish"],
    ["sc", "Sardinian"],
    ["sr", "Serbian"],
    ["ss", "Swati"],
    ["su", "Sundanese"],
    ["sw", "Swahili"],
    ["sv", "Swedish"],
    ["ty", "Tahitian"],
    ["ta", "Tamil"],
    ["tt", "Tatar"],
    ["te", "Telugu"],
    ["tg", "Tajik"],
    ["tl", "Tagalog"],
    ["th", "Thai"],
    ["bo", "Tibetan"],
    ["ti", "Tigrinya"],
    ["to", "Tonga (Tonga Islands)"],
    ["tn", "Tswana"],
    ["ts", "Tsonga"],
    ["tk", "Turkmen"],
    ["tr", "Turkish"],
    ["tw", "Twi"],
    ["ug", "Uighur"],
    ["uk", "Ukrainian"],
    ["ur", "Urdu"],
    ["uz", "Uzbek"],
    ["ve", "Venda"],
    ["vi", "Vietnamese"],
    ["vo", "Volapük"],
    ["cy", "Welsh"],
    ["wa", "Walloon"],
    ["wo", "Wolof"],
    ["xh", "Xhosa"],
    ["yi", "Yiddish"],
    ["yo", "Yoruba"],
    ["za", "Zhuang"],
    ["zu", "Zulu"]
### Apps only installed in some instances
# The order of INSTALLED_APPS matters, so this tuple is the app name and the item in INSTALLED_APPS
# that this app should be inserted *before*. A None here means it should be appended to the list.
    ('problem_builder', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'),
Will Daly's avatar
Will Daly committed

    # edx-ora2
    ('submissions', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'),
    ('openassessment', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'),
    ('openassessment.assessment', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'),
    ('openassessment.fileupload', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'),
    ('openassessment.workflow', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'),
    ('openassessment.xblock', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'),
    ('edxval', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'),
    # Enterprise Apps (http://github.com/edx/edx-enterprise)
    ('consent', None),
    ('integrated_channels.integrated_channel', None),
    ('integrated_channels.degreed', None),
    ('integrated_channels.sap_success_factors', None),
    ('integrated_channels.cornerstone', None),
    ('integrated_channels.xapi', None),
binodpant's avatar
binodpant committed
    ('integrated_channels.blackboard', None),
    ('integrated_channels.canvas', None),
    ('integrated_channels.moodle', None),
    # Required by the Enterprise App
    ('django_object_actions', None),  # https://github.com/crccheck/django-object-actions
for app_name, insert_before in OPTIONAL_APPS:
    # First attempt to only find the module rather than actually importing it,
    # to avoid circular references - only try to import if it can't be found
    # by find_spec, which doesn't work with import hooks
    if importlib.util.find_spec(app_name) is None:
        try:
            __import__(app_name)
        except ImportError:
            continue

    try:
        INSTALLED_APPS.insert(INSTALLED_APPS.index(insert_before), app_name)
    except (IndexError, ValueError):
        INSTALLED_APPS.append(app_name)
### External auth usage -- prefixes for ENROLLMENT_DOMAIN
SHIBBOLETH_DOMAIN_PREFIX = 'shib:'
### Analytics API
ANALYTICS_API_KEY = ""
ANALYTICS_API_URL = "http://localhost:18100"
nadeemshahzad's avatar
nadeemshahzad committed
ANALYTICS_DASHBOARD_URL = 'http://localhost:18110/courses'
ANALYTICS_DASHBOARD_NAME = 'Your Platform Name Here Insights'
# REGISTRATION CODES DISPLAY INFORMATION SUBTITUTIONS IN THE INVOICE ATTACHMENT
INVOICE_CORP_ADDRESS = "Please place your corporate address\nin this configuration"
INVOICE_PAYMENT_INSTRUCTIONS = "This is where you can\nput directions on how people\nbuying registration codes"

# Country code overrides
# Used by django-countries
COUNTRIES_OVERRIDE = {
    # Taiwan is specifically not translated to avoid it being translated as "Taiwan (Province of China)"
    "TW": "Taiwan",
    'XK': _('Kosovo'),

# which access.py permission name to check in order to determine if a course is visible in
# the course catalog. We default this to the legacy permission 'see_exists'.
COURSE_CATALOG_VISIBILITY_PERMISSION = 'see_exists'

# which access.py permission name to check in order to determine if a course about page is
# visible. We default this to the legacy permission 'see_exists'.
COURSE_ABOUT_VISIBILITY_PERMISSION = 'see_exists'
DEFAULT_COURSE_VISIBILITY_IN_CATALOG = "both"

# .. toggle_name: DEFAULT_MOBILE_AVAILABLE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: This specifies if the courses are available for mobile by default. To make any individual
#   course available for mobile one can set the value of Mobile Course Available to true in Advanced Settings from the
#   studio when this is False.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-01-26
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1985
nadeemshahzad's avatar
nadeemshahzad committed
DEFAULT_MOBILE_AVAILABLE = False
# Enrollment API Cache Timeout
ENROLLMENT_COURSE_DETAILS_CACHE_TIMEOUT = 60

# These tabs are currently disabled
NOTES_DISABLED_TABS = ['course_structure', 'tags']

# Configuration used for generating PDF Receipts/Invoices
nadeemshahzad's avatar
nadeemshahzad committed
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 billing address here.'
nadeemshahzad's avatar
nadeemshahzad committed
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'
# Height of the Logo in mm
PDF_RECEIPT_LOGO_HEIGHT_MM = 12
PDF_RECEIPT_COBRAND_LOGO_PATH = PROJECT_ROOT + '/static/images/logo.png'
# Height of the Co-brand Logo in mm
PDF_RECEIPT_COBRAND_LOGO_HEIGHT_MM = 12

# Use None for the default search engine
# Use LMS specific search initializer
SEARCH_INITIALIZER = "lms.lib.courseware_search.lms_search_initializer.LmsSearchInitializer"
# Use the LMS specific result processor
SEARCH_RESULT_PROCESSOR = "lms.lib.courseware_search.lms_result_processor.LmsSearchResultProcessor"
Davorin Sego's avatar
Davorin Sego committed
# Use the LMS specific filter generator
SEARCH_FILTER_GENERATOR = "lms.lib.courseware_search.lms_filter_generator.LmsSearchFilterGenerator"
# Override to skip enrollment start date filtering in course search
SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING = False
# The configuration visibility of account fields.
ACCOUNT_VISIBILITY_CONFIGURATION = {
Andy Armstrong's avatar
Andy Armstrong committed
    # Default visibility level for accounts without a specified value
    # The value is one of: 'all_users', 'private'
    "default_visibility": "all_users",
    # The list of account fields that are always public
    "public_fields": [
        'account_privacy',
Andy Armstrong's avatar
Andy Armstrong committed
        'profile_image',
# The list of all fields that are shared with other users using the bulk 'all_users' privacy setting
ACCOUNT_VISIBILITY_CONFIGURATION["bulk_shareable_fields"] = (
    ACCOUNT_VISIBILITY_CONFIGURATION["public_fields"] + [
        'bio',
Andy Armstrong's avatar
Andy Armstrong committed
        'country',
        'date_joined',
        'language_proficiencies',
        "level_of_education",
        'social_links',
        # Not an actual field, but used to signal whether badges should be public.
        'accomplishments_shared',
# The list of all fields that can be shared selectively with other users using the 'custom' privacy setting
ACCOUNT_VISIBILITY_CONFIGURATION["custom_shareable_fields"] = (
    ACCOUNT_VISIBILITY_CONFIGURATION["bulk_shareable_fields"] + [
        "name",
    ]
)

# The list of account fields that are visible only to staff and users viewing their own profiles
ACCOUNT_VISIBILITY_CONFIGURATION["admin_fields"] = (
    ACCOUNT_VISIBILITY_CONFIGURATION["custom_shareable_fields"] + [
        "extended_profile",
        "mailing_address",
        "requires_parental_consent",
        "secondary_email",
        "phone_number",
        "activation_key",
        "is_verified_name_enabled",
# The current list of social platforms to be shown to the user.
#
# url_stub represents the host URL, it must end with a forward