merge
This commit is contained in:
@@ -40,11 +40,11 @@ DISCUSSION_SETTINGS = {
|
||||
|
||||
# Features
|
||||
MITX_FEATURES = {
|
||||
'SAMPLE' : False,
|
||||
'USE_DJANGO_PIPELINE' : True,
|
||||
'DISPLAY_HISTOGRAMS_TO_STAFF' : True,
|
||||
'REROUTE_ACTIVATION_EMAIL' : False, # nonempty string = address for all activation emails
|
||||
'DEBUG_LEVEL' : 0, # 0 = lowest level, least verbose, 255 = max level, most verbose
|
||||
'SAMPLE': False,
|
||||
'USE_DJANGO_PIPELINE': True,
|
||||
'DISPLAY_HISTOGRAMS_TO_STAFF': True,
|
||||
'REROUTE_ACTIVATION_EMAIL': False, # nonempty string = address for all activation emails
|
||||
'DEBUG_LEVEL': 0, # 0 = lowest level, least verbose, 255 = max level, most verbose
|
||||
|
||||
## DO NOT SET TO True IN THIS FILE
|
||||
## Doing so will cause all courses to be released on production
|
||||
@@ -53,20 +53,20 @@ MITX_FEATURES = {
|
||||
# When True, will only publicly list courses by the subdomain. Expects you
|
||||
# to define COURSE_LISTINGS, a dictionary mapping subdomains to lists of
|
||||
# course_ids (see dev_int.py for an example)
|
||||
'SUBDOMAIN_COURSE_LISTINGS' : False,
|
||||
'SUBDOMAIN_COURSE_LISTINGS': False,
|
||||
|
||||
# When True, will override certain branding with university specific values
|
||||
# Expects a SUBDOMAIN_BRANDING dictionary that maps the subdomain to the
|
||||
# university to use for branding purposes
|
||||
'SUBDOMAIN_BRANDING': False,
|
||||
|
||||
'FORCE_UNIVERSITY_DOMAIN': False, # set this to the university domain to use, as an override to HTTP_HOST
|
||||
'FORCE_UNIVERSITY_DOMAIN': False, # set this to the university domain to use, as an override to HTTP_HOST
|
||||
# set to None to do no university selection
|
||||
|
||||
'ENABLE_TEXTBOOK' : True,
|
||||
'ENABLE_TEXTBOOK': True,
|
||||
'ENABLE_DISCUSSION_SERVICE': True,
|
||||
|
||||
'ENABLE_PSYCHOMETRICS': False, # real-time psychometrics (eg item response theory analysis in instructor dashboard)
|
||||
'ENABLE_PSYCHOMETRICS': False, # real-time psychometrics (eg item response theory analysis in instructor dashboard)
|
||||
|
||||
'ENABLE_SQL_TRACKING_LOGS': False,
|
||||
'ENABLE_LMS_MIGRATION': False,
|
||||
@@ -74,13 +74,16 @@ MITX_FEATURES = {
|
||||
|
||||
'DISABLE_LOGIN_BUTTON': False, # used in systems where login is automatic, eg MIT SSL
|
||||
|
||||
'STUB_VIDEO_FOR_TESTING': False, # do not display video when running automated acceptance tests
|
||||
'STUB_VIDEO_FOR_TESTING': False, # do not display video when running automated acceptance tests
|
||||
|
||||
# extrernal access methods
|
||||
'ACCESS_REQUIRE_STAFF_FOR_COURSE': False,
|
||||
'AUTH_USE_OPENID': False,
|
||||
'AUTH_USE_MIT_CERTIFICATES' : False,
|
||||
'AUTH_USE_MIT_CERTIFICATES': False,
|
||||
'AUTH_USE_OPENID_PROVIDER': False,
|
||||
|
||||
# Flip to True when the YouTube iframe API breaks (again)
|
||||
'USE_YOUTUBE_OBJECT_API': False,
|
||||
}
|
||||
|
||||
# Used for A/B testing
|
||||
@@ -90,7 +93,7 @@ DEFAULT_GROUPS = []
|
||||
GENERATE_PROFILE_SCORES = False
|
||||
|
||||
# Used with XQueue
|
||||
XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds
|
||||
XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds
|
||||
|
||||
|
||||
############################# SET PATH INFORMATION #############################
|
||||
@@ -151,8 +154,8 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.core.context_processors.static',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
#'django.core.context_processors.i18n',
|
||||
'django.contrib.auth.context_processors.auth', #this is required for admin
|
||||
'django.core.context_processors.csrf', #necessary for csrf protection
|
||||
'django.contrib.auth.context_processors.auth', # this is required for admin
|
||||
'django.core.context_processors.csrf', # necessary for csrf protection
|
||||
|
||||
# Added for django-wiki
|
||||
'django.core.context_processors.media',
|
||||
@@ -162,7 +165,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'course_wiki.course_nav.context_processor',
|
||||
)
|
||||
|
||||
STUDENT_FILEUPLOAD_MAX_SIZE = 4*1000*1000 # 4 MB
|
||||
STUDENT_FILEUPLOAD_MAX_SIZE = 4 * 1000 * 1000 # 4 MB
|
||||
MAX_FILEUPLOADS_PER_INPUT = 20
|
||||
|
||||
# FIXME:
|
||||
@@ -172,7 +175,7 @@ LIB_URL = '/static/js/'
|
||||
|
||||
# Dev machines shouldn't need the book
|
||||
# BOOK_URL = '/static/book/'
|
||||
BOOK_URL = 'https://mitxstatic.s3.amazonaws.com/book_images/' # For AWS deploys
|
||||
BOOK_URL = 'https://mitxstatic.s3.amazonaws.com/book_images/' # For AWS deploys
|
||||
# RSS_URL = r'lms/templates/feed.rss'
|
||||
# PRESS_URL = r''
|
||||
RSS_TIMEOUT = 600
|
||||
@@ -197,7 +200,6 @@ COURSE_TITLE = "Circuits and Electronics"
|
||||
### Dark code. Should be enabled in local settings for devel.
|
||||
|
||||
ENABLE_MULTICOURSE = False # set to False to disable multicourse display (see lib.util.views.mitxhome)
|
||||
QUICKEDIT = False
|
||||
|
||||
WIKI_ENABLED = False
|
||||
|
||||
@@ -266,28 +268,10 @@ STATICFILES_DIRS = [
|
||||
COMMON_ROOT / "static",
|
||||
PROJECT_ROOT / "static",
|
||||
]
|
||||
if os.path.isdir(DATA_DIR):
|
||||
# Add the full course repo if there is no static directory
|
||||
STATICFILES_DIRS += [
|
||||
# TODO (cpennington): When courses are stored in a database, this
|
||||
# should no longer be added to STATICFILES
|
||||
(course_dir, DATA_DIR / course_dir)
|
||||
for course_dir in os.listdir(DATA_DIR)
|
||||
if (os.path.isdir(DATA_DIR / course_dir) and
|
||||
not os.path.isdir(DATA_DIR / course_dir / 'static'))
|
||||
]
|
||||
# Otherwise, add only the static directory from the course dir
|
||||
STATICFILES_DIRS += [
|
||||
# TODO (cpennington): When courses are stored in a database, this
|
||||
# should no longer be added to STATICFILES
|
||||
(course_dir, DATA_DIR / course_dir / 'static')
|
||||
for course_dir in os.listdir(DATA_DIR)
|
||||
if (os.path.isdir(DATA_DIR / course_dir / 'static'))
|
||||
]
|
||||
|
||||
# Locale/Internationalization
|
||||
TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||
LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html
|
||||
TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||
LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html
|
||||
USE_I18N = True
|
||||
USE_L10N = True
|
||||
|
||||
@@ -308,7 +292,7 @@ ALLOWED_GITRELOAD_IPS = ['207.97.227.253', '50.57.128.197', '108.171.174.178']
|
||||
# setting is, I'm just bumping the expiration time to something absurd (100
|
||||
# years). This is only used if DEFAULT_FILE_STORAGE is overriden to use S3
|
||||
# in the global settings.py
|
||||
AWS_QUERYSTRING_EXPIRE = 10 * 365 * 24 * 60 * 60 # 10 years
|
||||
AWS_QUERYSTRING_EXPIRE = 10 * 365 * 24 * 60 * 60 # 10 years
|
||||
|
||||
################################# SIMPLEWIKI ###################################
|
||||
SIMPLE_WIKI_REQUIRE_LOGIN_EDIT = True
|
||||
@@ -317,8 +301,8 @@ SIMPLE_WIKI_REQUIRE_LOGIN_VIEW = False
|
||||
################################# WIKI ###################################
|
||||
WIKI_ACCOUNT_HANDLING = False
|
||||
WIKI_EDITOR = 'course_wiki.editors.CodeMirror'
|
||||
WIKI_SHOW_MAX_CHILDREN = 0 # We don't use the little menu that shows children of an article in the breadcrumb
|
||||
WIKI_ANONYMOUS = False # Don't allow anonymous access until the styling is figured out
|
||||
WIKI_SHOW_MAX_CHILDREN = 0 # We don't use the little menu that shows children of an article in the breadcrumb
|
||||
WIKI_ANONYMOUS = False # Don't allow anonymous access until the styling is figured out
|
||||
WIKI_CAN_CHANGE_PERMISSIONS = lambda article, user: user.is_staff or user.is_superuser
|
||||
WIKI_CAN_ASSIGN = lambda article, user: user.is_staff or user.is_superuser
|
||||
|
||||
@@ -437,7 +421,7 @@ main_vendor_js = [
|
||||
|
||||
discussion_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/discussion/**/*.coffee'))
|
||||
staff_grading_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/staff_grading/**/*.coffee'))
|
||||
peer_grading_js = sorted(rooted_glob(PROJECT_ROOT / 'static','coffee/src/peer_grading/**/*.coffee'))
|
||||
open_ended_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/open_ended/**/*.coffee'))
|
||||
|
||||
PIPELINE_CSS = {
|
||||
'application': {
|
||||
@@ -468,7 +452,7 @@ PIPELINE_JS = {
|
||||
'source_filenames': sorted(
|
||||
set(rooted_glob(COMMON_ROOT / 'static', 'coffee/src/**/*.coffee') +
|
||||
rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/**/*.coffee')) -
|
||||
set(courseware_js + discussion_js + staff_grading_js + peer_grading_js)
|
||||
set(courseware_js + discussion_js + staff_grading_js + open_ended_js)
|
||||
) + [
|
||||
'js/form.ext.js',
|
||||
'js/my_courses_dropdown.js',
|
||||
@@ -494,13 +478,13 @@ PIPELINE_JS = {
|
||||
'source_filenames': discussion_js,
|
||||
'output_filename': 'js/discussion.js'
|
||||
},
|
||||
'staff_grading' : {
|
||||
'staff_grading': {
|
||||
'source_filenames': staff_grading_js,
|
||||
'output_filename': 'js/staff_grading.js'
|
||||
},
|
||||
'peer_grading' : {
|
||||
'source_filenames': peer_grading_js,
|
||||
'output_filename': 'js/peer_grading.js'
|
||||
'open_ended': {
|
||||
'source_filenames': open_ended_js,
|
||||
'output_filename': 'js/open_ended.js'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -561,6 +545,7 @@ INSTALLED_APPS = (
|
||||
# For asset pipelining
|
||||
'pipeline',
|
||||
'staticfiles',
|
||||
'static_replace',
|
||||
|
||||
# Our courseware
|
||||
'circuit',
|
||||
@@ -580,9 +565,9 @@ INSTALLED_APPS = (
|
||||
'course_groups',
|
||||
|
||||
#For the wiki
|
||||
'wiki', # The new django-wiki from benjaoming
|
||||
'wiki', # The new django-wiki from benjaoming
|
||||
'django_notify',
|
||||
'course_wiki', # Our customizations
|
||||
'course_wiki', # Our customizations
|
||||
'mptt',
|
||||
'sekizai',
|
||||
#'wiki.plugins.attachments',
|
||||
|
||||
Reference in New Issue
Block a user