Skip to content

SE-3223 Enable the toggle button for custom pages in OCIM console

Boros Gábor requested to merge s0b0lev/SE-3223-toggle-button into master

Created by: s0b0lev

This PR introduce the way to disable any static page from users console.

Configurable static pages:

  • About
  • Contact
  • Donate
  • Terms of service
  • Honor code
  • Privacy policy

Screens

image

Testing instruction

  1. Create new account using console frontend
  2. Configure static pages content and toggle checkbox Show this page for some static pages
  3. Deploy changes to the OpenEdXInstance. I did it using django shell:
>>> application = BetaTestApplication.objects.get(<get_your_app>)
# this method will copy configuration from BetaTestApplication to the OpenEdXInstance
>>> application.commit_changes_to_instance() 
  # update instance from database (possibly will be cached)
>>> application.instance.refresh_from_db()
# this method will create appserver, without any deployments, so we will be able to check it locally
>>> application.instance._create_owned_appserver()
  1. Open OCIM /manage/ interface and check your instance appserver

Check that Combined ansible vars has expected values: image

Author notes and concerns

It is possible to disable static pages using LMS env variable MKTG_URL_LINK_MAP. That's why I add this key to the config template EDXAPP_LMS_ENV_EXTRA. Some links are required, so they were hardcoded directly to the config template.

Reviewers

Merge request reports