Newer
Older
"""
This is the common settings file, intended to set sane defaults. If you have a
piece of configuration that's dependent on a set of feature flags being set,
then create a function that returns the calculated value based on the value of
FEATURES[...]. Modules that extend this one can change the feature
configuration in an environment specific config file and re-calculate those
values.
We should make a method that calls all these config methods so that you just
make one call at the end of your site-specific dev file to reset all the
dependent variables (like INSTALLED_APPS) for you.
1. Right now our treatment of static content in general and in particular
course-specific static content is haphazard.
2. We should have a more disciplined approach to feature flagging, even if it
just means that we stick them in a dict called FEATURES.
3. We need to handle configuration for multiple courses. This could be as
multiple sites, but we do need a way to map their data assets.
"""
Calen Pennington
committed
# We intentionally define lots of variables that aren't used
# pylint: disable=unused-import
Calen Pennington
committed
# Pylint gets confused by path.py instances, which report themselves as class
# objects. As a result, pylint applies the wrong regex in validating names,
# and throws spurious errors. Therefore, we disable invalid-name checking.
# pylint: disable=invalid-name
from corsheaders.defaults import default_headers as corsheaders_default_headers
from path import Path as path
from django.utils.translation import ugettext_lazy as _
from enterprise.constants import (
ENTERPRISE_ADMIN_ROLE,
ENTERPRISE_OPERATOR_ROLE,
ENTERPRISE_DASHBOARD_ADMIN_ROLE,
ENTERPRISE_CATALOG_ADMIN_ROLE,
ENTERPRISE_ENROLLMENT_API_ADMIN_ROLE
)
David Ormsbee
committed
from openedx.core.constants import COURSE_KEY_REGEX, COURSE_KEY_PATTERN, COURSE_ID_PATTERN
from openedx.core.djangoapps.theming.helpers_dirs import (
get_themes_unchecked,
get_theme_base_dirs_from_settings
)
from openedx.core.lib.derived import derived, derived_collection_entry
from openedx.core.release import doc_version
Nimisha Asthagiri
committed
from xmodule.modulestore.modulestore_settings import update_module_store_settings
David Ormsbee
committed
from xmodule.modulestore.edit_info import EditInfoMixin
Calen Pennington
committed
from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
################################### FEATURES ###################################
# The display name of the platform to be used in templates/emails/etc.
PLATFORM_NAME = _('Your Platform Name Here')
PLATFORM_DESCRIPTION = _('Your Platform Description Here')
PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount"
PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount"
Calen Pennington
committed
ENABLE_JASMINE = False
Calen Pennington
committed
LMS_ROOT_URL = "http://localhost:8000"
LMS_ENROLLMENT_API_PATH = "/api/enrollment/v1/"
# Default choices for role dropdown in the membership tab of the instructor dashboard
# This setting is used when a site does not define its own choices via site configuration
MANUAL_ENROLLMENT_ROLE_CHOICES = ['Learner', 'Support', 'Partner']
# List of logout URIs for each IDA that the learner should be logged out of when they logout of the LMS. Only applies to
# IDA for which the social auth flow uses DOT (Django OAuth Toolkit).
IDA_LOGOUT_URI_LIST = []
'DISPLAY_DEBUG_INFO_TO_STAFF': True,
Usman Khalid
committed
'DISPLAY_HISTOGRAMS_TO_STAFF': False, # For large courses this slows down courseware access for staff.
'REROUTE_ACTIVATION_EMAIL': False, # nonempty string = address for all activation emails
## DO NOT SET TO True IN THIS FILE
## Doing so will cause all courses to be released on production
'DISABLE_START_DATES': False, # When True, all courses will be active, regardless of start date
# for consistency in user-experience, keep the value of the following 3 settings
# in sync with the corresponding ones in cms/envs/common.py
'ENABLE_DISCUSSION_SERVICE': True,
# .. toggle_name: ENABLE_STUDENT_NOTES
# .. toggle_type: feature_flag
# .. toggle_default: True
# .. toggle_description: Enables the Student Notes API and UI.
# .. toggle_category: ????
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-11-13
# .. toggle_expiration_date: None
# .. toggle_warnings: None
# .. toggle_tickets: TNL-659
# .. toggle_status: supported
'ENABLE_STUDENT_NOTES': True,
# discussion home panel, which includes a subscription on/off setting for discussion digest emails.
# this should remain off in production until digest notifications are online.
Alan Boudreault
committed
# Set this to True if you want the discussion digest emails enabled automatically for new users.
# This will be set on all new account registrations.
# It is not recommended to enable this feature if ENABLE_DISCUSSION_HOME_PANEL is not enabled, since
# subscribers who receive digests in that case will only be able to unsubscribe via links embedded
# in their emails, and they will have no way to resubscribe.
'ENABLE_DISCUSSION_EMAIL_DIGEST': False,
'ENABLE_DJANGO_ADMIN_SITE': True, # set true to enable django's admin site, even on prod (e.g. for course ops)
'ENABLE_SQL_TRACKING_LOGS': False,
'ENABLE_LMS_MIGRATION': False,
'ENABLE_MASQUERADE': True, # allow course staff to change to student view of courseware
# .. toggle_name: ENABLE_SYSADMIN_DASHBOARD
# .. toggle_type: feature_flag
# .. toggle_default: False
# .. toggle_description: enables dashboard at /syadmin/ for django staff, for seeing overview of system status, for deleting and loading courses, for seeing log of git imports of courseware.
# .. toggle_category: admin
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-12-12
# .. toggle_expiration_date: None
# .. toggle_warnings: some views are not performant when there are more than 100 courses
# .. toggle_tickets: None
# .. toggle_status: unsupported
'ENABLE_SYSADMIN_DASHBOARD': False, # sysadmin dashboard, to see what courses are loaded, to delete & load courses
'DISABLE_LOGIN_BUTTON': False, # used in systems where login is automatic, eg MIT SSL
# Toggles OAuth2 authentication provider
'ENABLE_OAUTH2_PROVIDER': False,
# Allows to enable an API endpoint to serve XBlock view, used for example by external applications.
# See jquey-xblock: https://github.com/edx-solutions/jquery-xblock
'ENABLE_XBLOCK_VIEW_ENDPOINT': False,
# Allows to configure the LMS to provide CORS headers to serve requests from other domains
'ENABLE_CORS_HEADERS': False,
# Can be turned off if course lists need to be hidden. Effects views and templates.
'COURSES_ARE_BROWSABLE': True,
# Set to hide the courses list on the Learner Dashboard if they are not enrolled in any courses yet.
'HIDE_DASHBOARD_COURSES_UNTIL_ACTIVATED': False,
# enable analytics server.
# WARNING: THIS SHOULD ALWAYS BE SET TO FALSE UNDER NORMAL
# LMS OPERATION. See analytics.py for details about what
# this does.
'RUN_AS_ANALYTICS_SERVER_ENABLED': False,
# Give a UI to show a student's submission history in a problem by the
'ENABLE_STUDENT_HISTORY_VIEW': True,
# Provide a UI to allow users to submit feedback from the LMS (left-hand help modal)
'ENABLE_FEEDBACK_SUBMISSION': False,
# Turn on a page that lets staff enter Python code to be run in the
# sandbox, for testing whether it's enabled properly.
'ENABLE_DEBUG_RUN_PYTHON': False,
# Enable URL that shows information about the status of variuous services
'ENABLE_SERVICE_STATUS': False,
# Don't autoplay videos for students
'AUTOPLAY_VIDEOS': False,
Brian Wilson
committed
# Move the student to next page when a video finishes. Set to True to show
# an auto-advance button in videos. If False, videos never auto-advance.
'ENABLE_AUTOADVANCE_VIDEOS': False,
# Enable instructor dash to submit background tasks
'ENABLE_INSTRUCTOR_BACKGROUND_TASKS': True,
# Enable instructor to assign individual due dates
# Note: In order for this feature to work, you must also add
# 'lms.djangoapps.courseware.student_field_overrides.IndividualStudentOverrideProvider' to
# the setting FIELD_OVERRIDE_PROVIDERS, in addition to setting this flag to
# True.
# Enable Custom Courses for EdX
'CUSTOM_COURSES_EDX': False,
# Toggle to enable certificates of courses on dashboard
'ENABLE_VERIFIED_CERTIFICATES': False,
# .. toggle_name: DISABLE_HONOR_CERTIFICATES
Loading
Loading full blame...