[BD-03] [TNL-7350] [BB-2524] Discussion configuration API

Description

This PR adds a new abstract model to store configuration options in `CourseAppConfigOptionsModel`. This new model is designed to make configuration options defined such that configuration options can be defined at different levels and are accordingly available in different contexts. The aim is to allow different sets of people to design the settings vs those who use them.

For instance, a configuration defined for the site will be available globally on that site. A configuration defined for an org can only be available for courses (or potentially other content) in that org. Likewise, configurations can be restricted to a particular course or course run. This can allow, for instance, an admin to pre-populate LTI or other secret configuration, which can then be selected by the relevant course authors from a list without needing access to the secret configuration.

Each configuration option has a name and description which is meant to be displayed on a UI, and a slug that is designed for internal reference. Configurations are always referenced via their slug, which makes it possible to update the settings without needing to change the reference in multiple places, there is a mechanism to fetch the current/latest version of the config.

This PR also utilises this new abstract model to create a new discussion configuration model, and APIs to access them. The discussion configuration model adds on a `provider` field and two config fields `config`, and `private_config`. The provider field is meant to reference the discussion plugin that this configuration is referencing. The actual configuration is divided into config and private_config so any secrets such as API keys, client ids, and client secrets etc can be put in private config while the regular config object can contain other configurable parameters for the config.

*JIRA tickets*: https://openedx.atlassian.net/browse/TNL-7350

*Dependencies*: None

*Sandbox URL*: TBD - sandbox is being provisioned.

*Merge deadline*: "None"

*Testing instructions*:

There is no UI or external API at the moment, so automates tests should do it.

*Author notes and concerns*:

The final location of this code is still uncertain, but is added to a new discussions app in openedx.core for now.

*Reviewers*

  • [ ] @Agrendalath

  • [ ] @taniwha

  • [ ] edX reviewer[s] TBD

*Settings*
```yaml
EDXAPP_FEATURES:
ENABLE_COMBINED_LOGIN_REGISTRATION: true
```

Assignee

sburch

Reporter

Open Source Pull Request Bot

Labels

Github Latest Action by edX

No

Github PR Last Updated At

Jul 17, 2020, 6:04 PM

Github PR Last Updated By

xitij2000

Github Organization

None

Customer

PR Number

24,190

Repo

edx/edx-platform

Contributor Name

Kshitij Sobti

Github Latest Action

pull_request: synchronize

Platform Map Area (Levels 1 & 2)

None

Platform Map Area (Levels 3 & 4)

None

Blended Project Status Page

None

Sprint

Priority

Unset
Configure