Skip to content

Commit

Permalink
chore: added comment to new state column and added reference to stati…
Browse files Browse the repository at this point in the history
…c jquery.
  • Loading branch information
Asespinel committed Jan 10, 2024
1 parent 660f3f6 commit e1124b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions openedx/features/survey_report/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ def get_actions(self, request):
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.
"""
if obj.surveyreportupload_set.last().is_uploaded():
return "Sent"
return obj.state.capitalize()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% block survey_report_banner %}
{% if show_survey_report_banner %}
{% load static %}
<div id="originalContent" style="border: 3px solid #06405d; margin-bottom: 50px; rgb(0 0 0 / 18%) 0px 3px 5px;">
<div style="background-color: #06405d;padding: 17px 37px;">
<h1 style="margin: 0; color: #FFFF; font-weight: 600;">Join the Open edX Data Sharing Initiative and shape the future of learning</h1>
Expand Down Expand Up @@ -31,7 +32,7 @@ <h1 style="margin: 0; color: #FFFF; font-weight: 600;">Join the Open edX Data Sh
{% endif %}

<!-- The original content of the block -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="{% static 'common/js/vendor/jquery.js' %}"></script>
<script>
$(document).ready(function(){
$('#dismissButton').click(function() {
Expand Down

0 comments on commit e1124b7

Please sign in to comment.