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

Merge branch with master #2885

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trevorsaunders
Copy link

Who is this PR for?

What problem does this PR fix?

What does this PR do?

Screenshot (if adding a client-side feature)

Checklists

Which features or pages does this PR touch?

  • Home page
  • Student Profile
  • Homeroom
  • Section
  • My Sections
  • My Notes
  • My Students
  • Student Report PDF
  • School Overview
  • Absences
  • Tardies
  • Discipline
  • Levels
  • Core

Does this PR use tests to help verify we can deploy these changes quickly and confidently?

  • Included specs for changes
  • Improved specs for existing code in need of better test coverage
  • Manual testing made more sense here

post_data = Net::HTTP.post_form(URI.parse(mailgun_url), {
:from => "Student Insights job <kevin.robinson.0@gmail.com>",
:to => target_email,
:subject => "Weekly Reminder #{date_text}",
Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be a good idea to add "Student Insights" to the subject here

.joins(:event_notes)
.joins(:homeroom)
.joins(:students)
.where("students.grade IN ('KF', '1', '2', '3', '4', '5', '6', '7', '8') AND event_notes.created_at >= now() - INTERVAL '7 DAYS' ")
Copy link
Collaborator

Choose a reason for hiding this comment

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

3 comments here:

event_notes has a recorded_at field that we should use instead of created_at.

We'd also like to capture notes that were updated within the time period. The event_note model has a method latest_revision_at that I think would work here.

Also, should now() be @time_now?

@edavidsonsawyer
Copy link
Collaborator

This looks good, @trevorsaunders! We'll talk in a few minutes but in the meantime I left a couple comments.

@trevorsaunders
Copy link
Author

trevorsaunders commented Jun 2, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants