@oedx Unfortunately, this setting is much trickier than it should be. I’m glad you asked! Hopefully having this posted will help others too.
To get the LMS to use the Advanced Settings Course Visibility setting in Studio, you have to change another setting on the LMS service.
Site configuration
-
Login to your LMS as a staff + superuser, and go to the Django Admin (https://your-lms-url/admin).
-
Find the “Site configurations” link, and click that.
-
Add a new Site Configuration, or edit the existing entry if you already have one.
-
Click “Enabled” to ensure the site configuration will be used.
-
Add these values to the “Site values” field.
This field is in JSON format, which is fussy about quotes and commas, so you can use a JSON validator if you’re having trouble getting it to save.
{
"COURSE_CATALOG_VISIBILITY_PERMISSION": "see_in_catalog",
"COURSE_ABOUT_VISIBILITY_PERMISSION": "see_about_page"
}
-
Wait 3 minutes for the site configuration cache to clear and these settings to take effect.
(Backstory: the default settings for these permissions for legacy reasons is "see_exists"
, which means, "if the course exists, then show the course in the Discover Courses list and show its About page. Not a very useful default!)
New courses
There’s another useful setting, DEFAULT_COURSE_VISIBILITY_IN_CATALOG
, which affects the default value Course Visibility when new courses are created. Like the Advanced Settings Course Visibility setting, this one accepts 3 different values: "both"
, "about"
, or "none"
.
So if you always want your new courses to have About pages, but you don’t want them to appear in the Discover Courses list until you enable them, you can include this setting inside the Site Configuration brackets ({}
) too:
"DEFAULT_COURSE_VISIBILITY_IN_CATALOG": "about"
Ansible or /edx/etc
Alternatively, you can change these settings from ansible or in the lms.yml
, but you’ll need to restart your LMS service in order for them to take effect.
Ansible variables:
EDXAPP_COURSE_CATALOG_VISIBILITY_PERMISSION: 'see_in_catalog'
EDXAPP_COURSE_ABOUT_VISIBILITY_PERMISSION: 'see_about_page'
EDXAPP_DEFAULT_COURSE_VISIBILITY_IN_CATALOG: 'about'
Or directly in the /edx/etc/lms.yml
and /etc/etc/studio.yml
files:
COURSE_CATALOG_VISIBILITY_PERMISSION: 'see_in_catalog'
COURSE_ABOUT_VISIBILITY_PERMISSION: 'see_about_page'
DEFAULT_COURSE_VISIBILITY_IN_CATALOG: 'about'