submission_grade_changed.email.mustache 1.2 KB

1234567891011121314151617181920212223242526
  1. <% # evizitei: this template is used for submissions AND quiz_submissions, make sure methods used are available on both models %>
  2. <% define_content :link do %>
  3. <%= polymorphic_url([asset.assignment.context, asset.assignment, :submission], id: asset.user) %>
  4. <% end %>
  5. <% define_content :subject do %>
  6. <%= t :subject, "Grade Changed: %{assignment}, %{context}", :assignment => asset.assignment.title, :context => asset.assignment.context.name %>
  7. <% end %>
  8. <%= t :body, "The grade on your assignment, %{assignment_title} has been changed.", :assignment_title => asset.assignment.title %>
  9. <%= t :regraded_date, "re-graded: %{date}", :date => (datetime_string(force_zone(asset.graded_at)) rescue t(:no_date_set, "No Date Set")) %>
  10. <% if user.try(:send_scores_in_emails?, asset.assignment.context.root_account) %>
  11. <% if asset.excused? %>
  12. <%= t :excused, "This assignment has been excused." %>
  13. <% elsif asset.score %>
  14. <%= t :score, "score: %{score} out of %{total}", :score => asset.score, :total => (asset.assignment.points_possible || t(:not_applicable, "N/A")) %>
  15. <% end %>
  16. <% end %>
  17. <%= t(:score_pending, "score pending review by the teacher") if asset.pending_review? %>
  18. <%= t :link_message, "You can review the assignment here:" %>
  19. <%= content :link %>