You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #1031, I really think #932 is the wrong approach to generate the emails:
all_submissions_by_grader_for_index generates a view (JSON string), which is then converted back to a "model" using Jason.decode, which is then further manipulated, and the final view is generated using the email template.
This results in a lot of coupling, especially across the various layers of the backend, which means PRs like #1031 are unnecessarily breaking.
My proposal would be to create a separate function entirely for this functionality, which would optimise everything as well.
The text was updated successfully, but these errors were encountered:
I feel the ideal way would simply be to create a function all_ungraded_submissions_by_grader which has a much more optimised SQL query to only return the necessary fields for the email (especially since the second argument to all_ungraded_submissions_by_grader is always true for emails)
As mentioned in #1031, I really think #932 is the wrong approach to generate the emails:
all_submissions_by_grader_for_index
generates a view (JSON string), which is then converted back to a "model" usingJason.decode
, which is then further manipulated, and the final view is generated using the email template.This results in a lot of coupling, especially across the various layers of the backend, which means PRs like #1031 are unnecessarily breaking.
My proposal would be to create a separate function entirely for this functionality, which would optimise everything as well.
The text was updated successfully, but these errors were encountered: