diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 1a3bfa6e2e..5b4522beb7 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -109,6 +109,11 @@ if STATIC_URL_BASE: # DEFAULT_COURSE_ABOUT_IMAGE_URL specifies the default image to show for courses that don't provide one DEFAULT_COURSE_ABOUT_IMAGE_URL = ENV_TOKENS.get('DEFAULT_COURSE_ABOUT_IMAGE_URL', DEFAULT_COURSE_ABOUT_IMAGE_URL) +DEFAULT_COURSE_VISIBILITY_IN_CATALOG = ENV_TOKENS.get( + 'DEFAULT_COURSE_VISIBILITY_IN_CATALOG', + DEFAULT_COURSE_VISIBILITY_IN_CATALOG +) + # DEFAULT_MOBILE_AVAILABLE specifies if the course is available for mobile by default DEFAULT_MOBILE_AVAILABLE = ENV_TOKENS.get( 'DEFAULT_MOBILE_AVAILABLE', diff --git a/cms/envs/common.py b/cms/envs/common.py index f7d289a7d2..7b6de3b6ec 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -112,6 +112,7 @@ from lms.envs.common import ( PASSWORD_RESET_SUPPORT_LINK, ACTIVATION_EMAIL_SUPPORT_LINK, + DEFAULT_COURSE_VISIBILITY_IN_CATALOG, DEFAULT_MOBILE_AVAILABLE, CONTACT_EMAIL, diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 97ea6d0ab9..2b450e5a05 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -35,6 +35,12 @@ CATALOG_VISIBILITY_CATALOG_AND_ABOUT = "both" CATALOG_VISIBILITY_ABOUT = "about" CATALOG_VISIBILITY_NONE = "none" +DEFAULT_COURSE_VISIBILITY_IN_CATALOG = getattr( + settings, + 'DEFAULT_COURSE_VISIBILITY_IN_CATALOG', + 'both' +) + DEFAULT_MOBILE_AVAILABLE = getattr(settings, 'DEFAULT_MOBILE_AVAILABLE', False) @@ -671,7 +677,7 @@ class CourseFields(object): "of three values: 'both' (show in catalog and allow access to about page), 'about' (only allow access " "to about page), 'none' (do not show in catalog and do not allow access to an about page)." ), - default=CATALOG_VISIBILITY_CATALOG_AND_ABOUT, + default=DEFAULT_COURSE_VISIBILITY_IN_CATALOG, scope=Scope.settings, values=[ {"display_name": _("Both"), "value": CATALOG_VISIBILITY_CATALOG_AND_ABOUT}, diff --git a/lms/envs/aws.py b/lms/envs/aws.py index b18abdedac..cf885520b7 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -768,6 +768,11 @@ COURSE_ABOUT_VISIBILITY_PERMISSION = ENV_TOKENS.get( COURSE_ABOUT_VISIBILITY_PERMISSION ) +DEFAULT_COURSE_VISIBILITY_IN_CATALOG = ENV_TOKENS.get( + 'DEFAULT_COURSE_VISIBILITY_IN_CATALOG', + DEFAULT_COURSE_VISIBILITY_IN_CATALOG +) + DEFAULT_MOBILE_AVAILABLE = ENV_TOKENS.get( 'DEFAULT_MOBILE_AVAILABLE', DEFAULT_MOBILE_AVAILABLE diff --git a/lms/envs/common.py b/lms/envs/common.py index 776695175a..be33a77734 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2995,6 +2995,7 @@ COURSE_CATALOG_VISIBILITY_PERMISSION = 'see_exists' # visible. We default this to the legacy permission 'see_exists'. COURSE_ABOUT_VISIBILITY_PERMISSION = 'see_exists' +DEFAULT_COURSE_VISIBILITY_IN_CATALOG = "both" DEFAULT_MOBILE_AVAILABLE = True # Enrollment API Cache Timeout