Skip to content

Commit

Permalink
Merge pull request openedx#840 from edx-solutions/aamishbaloch/YONK-725
Browse files Browse the repository at this point in the history
YONK-725: Some settings to be configurable
  • Loading branch information
aamishbaloch authored Aug 15, 2017
2 parents 838d534 + 9b75fec commit d24d619
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 30 deletions.
7 changes: 0 additions & 7 deletions cms/envs/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,10 +509,3 @@
############## Settings for Studio Context Sensitive Help ##############

DOC_LINK_BASE_URL = ENV_TOKENS.get('DOC_LINK_BASE_URL', DOC_LINK_BASE_URL)

############## Settings for Profile Image Size ######################

PROFILE_IMAGE_SIZES_MAP = ENV_TOKENS.get(
'PROFILE_IMAGE_SIZES_MAP',
PROFILE_IMAGE_SIZES_MAP
)
11 changes: 1 addition & 10 deletions cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# indirectly accessed through the email opt-in API, which is
# technically accessible through the CMS via legacy URLs.
PROFILE_IMAGE_BACKEND, PROFILE_IMAGE_DEFAULT_FILENAME, PROFILE_IMAGE_DEFAULT_FILE_EXTENSION,
PROFILE_IMAGE_SECRET_KEY, PROFILE_IMAGE_MIN_BYTES, PROFILE_IMAGE_MAX_BYTES,
PROFILE_IMAGE_SECRET_KEY, PROFILE_IMAGE_MIN_BYTES, PROFILE_IMAGE_MAX_BYTES, PROFILE_IMAGE_SIZES_MAP,
PROGRESS_DETACHED_VERTICAL_CATEGORIES, PROGRESS_DETACHED_CATEGORIES,
# The following setting is included as it is used to check whether to
# display credit eligibility table on the CMS or not.
Expand Down Expand Up @@ -1320,12 +1320,3 @@

# How long until database records about the outcome of a task and its artifacts get deleted?
USER_TASKS_MAX_AGE = timedelta(days=7)

############## Settings for Profile Image Size ######################

PROFILE_IMAGE_SIZES_MAP = {
'full': 500,
'large': 120,
'medium': 50,
'small': 30
}
14 changes: 10 additions & 4 deletions lms/envs/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,10 @@
PROFILE_IMAGE_MAX_BYTES = ENV_TOKENS.get('PROFILE_IMAGE_MAX_BYTES', PROFILE_IMAGE_MAX_BYTES)
PROFILE_IMAGE_MIN_BYTES = ENV_TOKENS.get('PROFILE_IMAGE_MIN_BYTES', PROFILE_IMAGE_MIN_BYTES)
PROFILE_IMAGE_DEFAULT_FILENAME = 'images/profiles/default'
PROFILE_IMAGE_SIZES_MAP = ENV_TOKENS.get(
'PROFILE_IMAGE_SIZES_MAP',
PROFILE_IMAGE_SIZES_MAP
)

# EdxNotes config

Expand Down Expand Up @@ -999,9 +1003,11 @@

ENTERPRISE_ENROLLMENT_API_URL = ENV_TOKENS.get('ENTERPRISE_ENROLLMENT_API_URL', ENTERPRISE_ENROLLMENT_API_URL)

############## Settings for Profile Image Size ######################
########################## Parental controls config #######################

PROFILE_IMAGE_SIZES_MAP = ENV_TOKENS.get(
'PROFILE_IMAGE_SIZES_MAP',
PROFILE_IMAGE_SIZES_MAP
# The age at which a learner no longer requires parental consent, or None
# if parental consent is never required.
PARENTAL_CONSENT_AGE_LIMIT = ENV_TOKENS.get(
'PARENTAL_CONSENT_AGE_LIMIT',
PARENTAL_CONSENT_AGE_LIMIT
)
15 changes: 6 additions & 9 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2889,6 +2889,12 @@
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
Expand Down Expand Up @@ -3138,12 +3144,3 @@
############## Settings for the Enterprise App ######################

ENTERPRISE_ENROLLMENT_API_URL = LMS_ROOT_URL + "/api/enrollment/v1/"

############## Settings for Profile Image Size ######################

PROFILE_IMAGE_SIZES_MAP = {
'full': 500,
'large': 120,
'medium': 50,
'small': 30
}

0 comments on commit d24d619

Please sign in to comment.