add the maintenance banner to the student dashboard and course homepage
This commit is contained in:
@@ -38,6 +38,7 @@ from openedx.core.djangoapps.credit.email_utils import get_credit_provider_displ
|
||||
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
|
||||
from openedx.core.djangoapps.util.maintenance_banner import add_maintenance_banner
|
||||
from openedx.core.djangoapps.waffle_utils import WaffleFlag, WaffleFlagNamespace
|
||||
from openedx.features.enterprise_support.api import get_dashboard_consent_notification
|
||||
from shoppingcart.api import order_history
|
||||
@@ -527,6 +528,7 @@ def _get_urls_for_resume_buttons(user, enrollments):
|
||||
|
||||
@login_required
|
||||
@ensure_csrf_cookie
|
||||
@add_maintenance_banner
|
||||
def student_dashboard(request):
|
||||
"""
|
||||
Provides the LMS dashboard view
|
||||
|
||||
@@ -24,6 +24,7 @@ from lms.djangoapps.course_goals.api import (
|
||||
from lms.djangoapps.courseware.exceptions import CourseAccessRedirect
|
||||
from lms.djangoapps.courseware.views.views import CourseTabView
|
||||
from openedx.core.djangoapps.plugin_api.views import EdxFragmentView
|
||||
from openedx.core.djangoapps.util.maintenance_banner import add_maintenance_banner
|
||||
from openedx.features.course_experience.course_tools import CourseToolsPluginManager
|
||||
from student.models import CourseEnrollment
|
||||
from util.views import ensure_valid_course_key
|
||||
@@ -48,6 +49,7 @@ class CourseHomeView(CourseTabView):
|
||||
@method_decorator(ensure_csrf_cookie)
|
||||
@method_decorator(cache_control(no_cache=True, no_store=True, must_revalidate=True))
|
||||
@method_decorator(ensure_valid_course_key)
|
||||
@method_decorator(add_maintenance_banner)
|
||||
def get(self, request, course_id, **kwargs):
|
||||
"""
|
||||
Displays the home page for the specified course.
|
||||
|
||||
Reference in New Issue
Block a user