diff --git a/lms/templates/admin/base_site.html b/lms/templates/admin/base_site.html index 2dfd0bef7a..fa93f9c3e8 100644 --- a/lms/templates/admin/base_site.html +++ b/lms/templates/admin/base_site.html @@ -21,6 +21,6 @@ {% endblock %} -{% block messages %}{{ block.super }} +{% block header %}{{ block.super }} {% include "survey_report/admin_banner.html" %} -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/openedx/features/survey_report/admin.py b/openedx/features/survey_report/admin.py index 8d4652282b..f2a422de2e 100644 --- a/openedx/features/survey_report/admin.py +++ b/openedx/features/survey_report/admin.py @@ -21,7 +21,7 @@ class SurveyReportAdmin(admin.ModelAdmin): ) list_display = ( - 'id', 'summary', 'created_at', 'report_state' + 'id', 'summary', 'created_at', 'state' ) actions = ['send_report'] @@ -80,16 +80,4 @@ class SurveyReportAdmin(admin.ModelAdmin): del actions['delete_selected'] return actions - def report_state(self, obj): - """ - Method to define the custom State column with the new "send" state, - to avoid modifying the current models. - """ - try: - if obj.surveyreportupload_set.last().is_uploaded(): - return "Sent" - except AttributeError: - return obj.state.capitalize() - report_state.short_description = 'State' - admin.site.register(SurveyReport, SurveyReportAdmin) diff --git a/openedx/features/survey_report/templates/survey_report/admin_banner.html b/openedx/features/survey_report/templates/survey_report/admin_banner.html index e881966f14..6a8e2ea92e 100644 --- a/openedx/features/survey_report/templates/survey_report/admin_banner.html +++ b/openedx/features/survey_report/templates/survey_report/admin_banner.html @@ -1,6 +1,5 @@ {% block survey_report_banner %} {% if show_survey_report_banner %} -{% load static %}