mitodl / edx-platform

The Open edX platform, the software that powers edX!
http://open.edx.org/
GNU Affero General Public License v3.0
6 stars 1 forks source link

feat: external plugin integration in instructor dashboard #284

Closed MAbdurrehman12 closed 2 years ago

MAbdurrehman12 commented 2 years ago

Description

There are plugins which return context which is then embedded/used accordingly. So in instructor dashboard we need a flow/function which get/fetches the context from external plugins and updates the existing context with the context returned from external plugins. This has been done via a function get_plugins_view_context of edx_django_utils.plugins. A separate constant file has been created in instructor which consists of a constant: INSTRUCTOR_DASHBOARD_PLUGIN_VIEW_NAME. Any external plugin which uses this constant, will return context to instructor dashboard.

While installing an external plugin, all the settings should be derived first and add_plugins function should be called afterwards in lms -> envs -> production.py but currently add_plugins function is being called before derive_settings function, hence their order has been switched. Same goes for cms -> envs -> production.py

In lms/templates/instructor/instructor_dashboard_2/instructor_dashboard_2.html, we include the html files of sections from relative path, but in case of plugin, we need to give absolute path, as plugin's html file is inside plugin so in order to give absolute path we need to add a prefix "/".

Supporting information

None

Testing instructions

Deadline

None

Other information

None

pdpinch commented 2 years ago

We've decided not to do this for now. We can wait until the nutmeg release of open edX to pick up this change.