Common Microsite Configurations
When you create a microsite, it comes with default configuration already defined in lms.env.json and cms.env.json. To override these default configuration/basic settings, you need to create site configuration for LMS and Studio in each microsite.
Create Site Configuration Entry:
Login to the admin panel (/admin) of Open Edx instance.
Go to the Site_Configuration > Site configurations and create two records one for LMS and one for Studio.
Click on ADD SITE CONFIGURATION, select LMS subdomain campus1.university.com as Site, click Enable checkbox and enter following JSON as Values.
{ "PLATFORM_NAME":"Campus1 - LMS", "domain_prefix":"campus1", "site_domain":"campus1.university.com", "SITE_NAME":"campus1.university.com", "course_org_filter":"campus1", "SESSION_COOKIE_DOMAIN":"university.com", "ENABLE_COMBINED_LOGIN_REGISTRATION":true, "LMS_BASE":"campus1.university.com", "CMS_BASE":"campus1.university.com", "PREVIEW_LMS_BASE":"campus1.university.com" }
Click on ADD SITE CONFIGURATION again, select Studio subdomain campus1.studio.university.com as Site, click Enable checkbox and enter following JSON as Values.
{ "PLATFORM_NAME":"Campus1 - LMS", "course_org_filter":"Campus1", "LMS_ROOT_URL":"http://campus1.university.com", "SESSION_COOKIE_DOMAIN":"university.com", "LMS_BASE":"campus1.university.com", "CMS_BASE":"campus1.studio.university.com" }
Now, refresh/open the LMS and Studio and you will see the changes regarding each microsite. These are the minimal JSON configuration, however, you can override any of the key-value pairs provided by Open Edx.
Site Configuration Reference
Below is the complete list of JSON key-value pairs that could be overridden and are termed as microsite aware configuration.
{
"ECOMMERCE_API_URL":"https://my-site.sandbox.edx.org/api/v2",
"ECOMMERCE_PUBLIC_URL_ROOT":"https://my-site.sandbox.edx.org",
"ECOMMERCE_API_SIGNING_KEY":"ecommerce-secret",
"COURSE_CATALOG_VISIBILITY_PERMISSION":"see_in_catalog",
"COURSE_ABOUT_VISIBILITY_PERMISSION":"see_about_page",
"ENABLE_COMBINED_LOGIN_REGISTRATION":true,
"ENABLE_PAID_COURSE_REGISTRATION":true,
"course_email_template_name":"my-site",
"course_email_from_addr":"my-site@example.com",
"ALLOW_AUTOMATED_SIGNUPS":true,
"domain_prefix":"my-site",
"university":"Education Programs",
"PLATFORM_NAME":"Education Programs",
"platform_name":"Education Programs",
"show_only_org_on_student_dashboard":true,
"email_from_address":"my-site@example.com",
"payment_support_email":"payments@example.com",
"SITE_NAME":"my-site.sandbox.edx.org",
"site_domain":"my-site.sandbox.edx.org",
"SESSION_COOKIE_DOMAIN":"my-site.sandbox.edx.org",
"course_org_filter":"MyOrgX",
"course_index_overlay_text":"<img src='/static/my-site/images/400x103.png' width='400' height='103' />",
"homepage_overlay_html":"<img src='/static/my-site/images/400x103.png' width='400' height='103' />",
"payment_email_signature":"Education Programs<br>The Digital Programs Team<br>my-site@example.com<br>101 Example Street<br>Example State"
}
Another way to tell that a JSON key-value pair is microsite aware or not is to debug the code. There you can see the helper method of site_configuration djangoapps. This helper method can be used to retrieve the key-value in a site_configuration table. If none find, it will fallback to the key-value defined in lms.env.json and cms.env.json.