Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: changed survey report message location and added a new info… #34033

Merged
merged 4 commits into from
Jan 16, 2024

Conversation

Asespinel
Copy link
Contributor

Description

This pull request introduces a refactor of the Survey Report management in the Django admin site. The changes include two key modifications aimed at enhancing the clarity and functionality of the admin interface.

  1. Moving Survey Report Banner to the "Messages" Section
  • The Survey Report Banner, previously located in the header section, has now been moved to the "Messages" side of the admin site.
  • This change aims to make the banner more intuitive and user-friendly.
  1. Adding a New State "Sent" to Reports
  • A new state, "Sent," has been added to the reports.
  • This state is applied to reports that have been successfully sent to Axim.
  • Previously, only the state "generated" was implemented which could be confusing and didn't confirm if the report was sent or not.
  • The main difference with
    refactor: changed survey report banner location and added the sent state #34024
    is that we don't touch the models file and we just change the state column to show the "sent" status based on the SurveyReportUpload status code.

Testing

  1. You can click on the "send report" button to send the report and a confirmation message should appear
  2. You can also click on the "Dismiss" button to close the banner message
  3. You should see the recently sent message under {{domain}}/admin/survey_report/ with the state "sent"

Example:
survey_report

@openedx-webhooks
Copy link

Thanks for the pull request, @Asespinel! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jan 9, 2024
Copy link
Member

@felipemontoya felipemontoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, lgtm. The wording is clearer now and the banner is in a better location

@MaferMazu
Copy link
Contributor

Thanks for this refactor @Asespinel. The changes you proposed make sense. I have two comments:

  • Can you add an end new line in the admin/base_site.html file?
  • Can we add some conditional before if obj.surveyreportupload_set.last().is_uploaded(): in the report_state function? To avoid AttributeError: 'NoneType' object has no attribute 'is_uploaded'. I think I had that error because I don't have a survey report yet.

@Asespinel
Copy link
Contributor Author

Thanks for the help @MaferMazu I implemented the fix for your problem and I also added the blank line as requested. Let me know if you need anything else.

Copy link
Contributor

@MaferMazu MaferMazu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as expected. Thanks for the fix @Asespinel.

Can we merge this, or should we wait for comments by @ormsbee?

@ormsbee
Copy link
Contributor

ormsbee commented Jan 16, 2024

No need to wait on my review. Thank you.

@MaferMazu MaferMazu merged commit 00630cf into openedx:master Jan 16, 2024
64 checks passed
@openedx-webhooks
Copy link

@Asespinel 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants