From 48d9f29cb979768e19325e35f7293b2565696906 Mon Sep 17 00:00:00 2001 From: Brian Beggs Date: Wed, 24 Jan 2024 17:26:08 -0500 Subject: [PATCH] =?UTF-8?q?Revert=20"refactor:=20changed=20survey=20report?= =?UTF-8?q?=20message=20location=20and=20added=20a=20new=20info=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lms/templates/admin/base_site.html | 4 ++-- openedx/features/survey_report/admin.py | 14 +------------- .../templates/survey_report/admin_banner.html | 2 -- .../templates/survey_report/change_list.html | 2 +- 4 files changed, 4 insertions(+), 18 deletions(-) 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 %}

Join the Open edX Data Sharing Initiative and shape the future of learning

@@ -32,7 +31,6 @@ {% endif %} -