Extracting plugin app from edx-platform (#24678)

* Moving plugins infrastructure to edx-django-utils
This PR extracts the code that enables plugins in edx-platform and puts it in edx-django-utils. This is done to allow other IDAS to add plugin functionality.
This commit is contained in:
Manjinder Singh
2020-08-12 07:48:53 -04:00
committed by GitHub
parent 7666e131f2
commit c76ed6ae45
51 changed files with 149 additions and 848 deletions

View File

@@ -15,6 +15,7 @@ from django.urls import reverse
from django.utils.translation import ugettext as _
from django.views.decorators.csrf import ensure_csrf_cookie
from edx_django_utils import monitoring as monitoring_utils
from edx_django_utils.plugins import get_plugins_view_context
from opaque_keys.edx.keys import CourseKey
from pytz import UTC
from six import iteritems, text_type
@@ -35,8 +36,7 @@ from openedx.core.djangoapps.catalog.utils import (
get_visible_sessions_for_entitlement
)
from openedx.core.djangoapps.credit.email_utils import get_credit_provider_attribute_values, make_providers_strings
from openedx.core.djangoapps.plugins import constants as plugin_constants
from openedx.core.djangoapps.plugins.plugin_contexts import get_plugins_view_context
from openedx.core.djangoapps.plugins.constants import ProjectType
from openedx.core.djangoapps.programs.models import ProgramsApiConfig
from openedx.core.djangoapps.programs.utils import ProgramDataExtender, ProgramProgressMeter
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
@@ -800,7 +800,7 @@ def student_dashboard(request):
}
context_from_plugins = get_plugins_view_context(
plugin_constants.ProjectType.LMS,
ProjectType.LMS,
COURSE_DASHBOARD_PLUGIN_VIEW_NAME,
context
)