use url helpers in messages

fixes CNVS-11838

and then choose the host more intelligently to use one the user
can actually log in to

test plan
- have accounts on two shards, referred to as "account 1" and
 "account 2" from now on
- have account domains that are resolvable for the accounts,
 referred to as account1.canvas.dev and account2.canvas.dev from
 now on
- have account 2 trust account 1 by POSTing to
 account2.canvas.dev/api/v1/accounts/<account 2 id>/trust_links
 with a site admin's auth token and setting
 trust_link[managing_account_id] to account 1's global id.
 you can now use users from account 1 on account 2

- regression test notifications, especially considering
 notifications generated by account 2 that are sent to account 1
 users.
- account 1 users should have links that use account1.canvas.dev
 and have global ids for referenced objects that live on
 account 2's shard,
 e.g. account1.canvas.dev/courses/2~1/discussion_topics/2~30
- avatars should use the avatar owner's account domain
- account 2 users should have links that use account2.canvas.dev
 and have local ids,
 e.g. account2.canvas.dev/courses/1/discussion_topics/30
- following the links when the user receiving the notification is
 logged in should take the user to the linked object
- following the links when not logged in should take the user to
 a login page that they are able to log in to
- be sure to at least check:
 context file downloads links (e.g. discussion topic attachments)
 file downloads links (e.g. conversation message attachments)
 avatars links
 conversation notifications
 discussion notifications
 peer review notifications

Change-Id: Idebd247fee99a2b973d3fa6f4f2fca0e723d99a5
Reviewed-on: https://gerrit.instructure.com/31867
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
This commit is contained in:
Cody Cutrer 2014-03-13 11:44:09 -06:00 committed by Joel Hough
parent 8993232f35
commit d6312b7e0d
308 changed files with 477 additions and 475 deletions

View File

@ -1,4 +1,4 @@
<%= t "#messages.email.footer", <<-TEXT, :url => "#{HostUrl.protocol}://#{primary_host}/profile/communication"
<%= t "#messages.email.footer", <<-TEXT, :url => communication_profile_url
You received this email because you are participating in one or more classes using Canvas. To change or turn off email notifications, visit:
%{url}
TEXT

View File

@ -49,7 +49,7 @@
<td width="375"></td>
<% end %>
<td width="50" align="center"> | </td>
<td width="375" align="left"><a href="<%= "#{HostUrl.protocol}://#{primary_host}/profile/communication" %>">
<td width="375" align="left"><a href="<%= communication_profile_url %>">
<%= t 'click_to_preferences', "Update your notification settings" %></a></td>
</tr>
</table>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.account) %>/accounts/<%= asset.account_id %>
<%= account_url(asset.account_id) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.account) %>/accounts/<%= asset.account_id %>
<%= account_url(asset.account_id) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.account) %>/register/<%= asset.user.communication_channel.confirmation_code %>
<%= registration_confirmation_url(asset.user.communication_channel.confirmation_code) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.account) %>/register/<%= asset.user.communication_channel.confirmation_code %>
<%= registration_confirmation_url(asset.user.communication_channel.confirmation_code) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/conversations/<%= asset.conversation_id %>
<%= conversation_url(asset.conversation_id) %>
<% end %>
<% define_content :user_name do %>
<%= asset.author_short_name_with_shared_contexts(user) rescue t(:unknown_user, "Unknown User") %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/conversations/<%= asset.conversation_id %>
<%= conversation_url(asset.conversation_id) %>
<% end %>
<% define_content :user_name do %>
@ -16,4 +16,4 @@
</a>
<% end %>
<p><%= t :body, "%{user_name} just added you to a conversation in Canvas.", :user_name => content(:user_name) %></p>
<p><%= t :body, "%{user_name} just added you to a conversation in Canvas.", :user_name => content(:user_name) %></p>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/conversations/<%= asset.conversation_id %>
<%= conversation_url(asset.conversation_id) %>
<% end %>
<% define_content :user_name do %>
<%= asset.author_short_name_with_shared_contexts(user) rescue t(:unknown_user, "Unknown User") %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/conversations/<%= asset.conversation_id %>
<%= conversation_url(asset.conversation_id) %>
<% end %>
<% define_content :user_name do %>
<%= asset.author_short_name_with_shared_contexts(user) rescue t(:unknown_user, "Unknown User") %>

View File

@ -1,5 +1,5 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/conversations/<%= asset.conversation_id %>
<%= conversation_url(asset.conversation_id) %>
<% end -%>
<% define_content :user_name do -%>
<%= asset.author_short_name_with_shared_contexts(user) rescue t(:unknown_user, "Unknown User") %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= polymorphic_url asset_context.course %>
<%= course_url asset_context.course_id %>
<% end %>
<% define_content :subject do %>
<%= t('subject', 'Alert: %{user_name}', :user_name => asset_context.user.name) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= polymorphic_url asset_context.course %>
<%= course_url asset_context.course_id %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= polymorphic_url asset_context.course %>
<%= course_url asset_context.course_id %>
<% end %>
<%=

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= polymorphic_url asset_context.course %>
<%= course_url asset_context.course_id %>
<% end %>
<% define_content :subject do %>
<%= t('subject', 'Alert: %{user_name}', :user_name => asset_context.user.name) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do -%>
<%= polymorphic_url asset_context.course %>
<%= course_url asset_context.course_id %>
<% end -%>
<%=
if asset_context.user_id == user.id
@ -7,4 +7,4 @@
else
t('body', "An alert has been triggered for %{student}", :student => asset_context.user.name)
end
%>
%>

View File

@ -1,5 +1,5 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.base_class.to_s.downcase.pluralize %>/<%= asset.context_id %>/announcements/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do -%>
<%= before_label asset.title %> <%= asset.context.name %>
@ -7,9 +7,10 @@
You created this Announcement:
<%= html_to_text(asset.message, :base_url => "#{HostUrl.protocol}://#{HostUrl.context_host(asset.context)}") %>
<%= html_to_text(asset.message, :base_url => dashboard_url) %>
<% if asset.attachment %><%= before_label :file_included, "File Included" %> <%= asset.attachment.display_name %> - <%= asset.attachment.readable_size %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.base_class.to_s.downcase.pluralize %>/<%= asset.context_id %>/files/<%= asset.attachment_id %>/download<% end %>
<%= polymorphic_url([asset.context, :file_download], file_id: asset.attachment) %>
<% end %>
<%= content :link %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.base_class.to_s.downcase.pluralize %>/<%= asset.context_id %>/announcements/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>
@ -14,14 +14,14 @@ You created this Announcement:
</a>
<% end %>
<%= html_to_simple_html(asset.message, :base_url => "#{HostUrl.protocol}://#{HostUrl.context_host(asset.context)}") %>
<%= html_to_text(asset.message, :base_url => dashboard_url) %>
<% if asset.attachment %>
<div style="margin-top: 20px; padding: 10px; border: 1px solid #f1f1f1; background-color: #f3f3f3;">
<p style="margin: 0px;"><%= t :attached_file, "Attached File" %></p>
<ul style="padding-left: 20px;">
<li><%= asset.attachment.display_name %> - <%= asset.attachment.readable_size %>
<a href="<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.base_class.to_s.downcase.pluralize %>/<%= asset.context_id %>/files/<%= asset.attachment_id %>/download">[<%= t :download, "download" %>]</a></li>
<a href="<%= polymorphic_url([asset.context, :file_download], file_id: asset.attachment) %>">[<%= t :download, "download" %>]</a></li>
</ul>
</div>
<% end %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.base_class.to_s.downcase.pluralize %>/<%= asset.context_id %>/announcements/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<%= t :body, "You created this Announcement: %{title}, %{course}", :title => %{<b><a href="#{ content :link }">#{h asset.title}</a></b>}.html_safe, :course => asset.context.name %>

View File

@ -1,9 +1,9 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.base_class.to_s.downcase.pluralize %>/<%= asset.context_id %>/announcements/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>
<%= before_label asset.title %> <%= asset.context.name %>
<% end %>
<%= CanvasTextHelper.truncate_text(html_to_text(asset.message, :base_url => "#{HostUrl.protocol}://#{HostUrl.context_host(asset.context)}"), :max_length => 500) %>
<%= CanvasTextHelper.truncate_text(html_to_text(asset.message, :base_url => dashboard_url), :max_length => 500) %>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.base_class.to_s.downcase.pluralize %>/<%= asset.context_id %>/announcements/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end -%>
<%= t :body, "Canvas Alert - You created this Announcement: %{title}, %{course}.", :title => asset.title, :course => asset.context.name %>
<%= t :body, "Canvas Alert - You created this Announcement: %{title}, %{course}.", :title => asset.title, :course => asset.context.name %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/discussion_topics/<%= asset.discussion_topic_id %>
<%= polymorphic_url([asset.context, :discussion_topic], id: asset.discussion_topic_id) %>
<% end %>
<% define_content :subject do %>
@ -8,7 +8,7 @@
<%= t :body, "%{user} posted a new comment on the announcement: %{discussion_topic} for %{course}:", :user => asset.user.short_name, :discussion_topic => asset.title, :course => asset.context.name %>
<%= html_to_text(asset.message, :base_url => "#{HostUrl.protocol}://#{HostUrl.context_host(asset.context)}") %>
<%= html_to_text(asset.message, :base_url => dashboard_url) %>
<%= t :discussion_entry_reply_message, "Join the conversation using the link below, or comment by replying to this message." %>
<%= content :link %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/discussion_topics/<%= asset.discussion_topic_id %>
<%= polymorphic_url([asset.context, :discussion_topic], id: asset.discussion_topic_id) %>
<% end %>
<% define_content :subject do %>
@ -15,7 +15,7 @@
<p><%= t :body, "%{user} posted a new comment on the announcement: %{discussion_topic} for %{course}:", :user => asset.user.short_name, :discussion_topic => asset.title, :course => asset.context.name %></p>
<p>
<%= html_to_simple_html(asset.message, :base_url => "#{HostUrl.protocol}://#{HostUrl.context_host(asset.context)}") %>
<%= html_to_text(asset.message, :base_url => dashboard_url) %>
</p>
<% if avatar_enabled? %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/discussion_topics/<%= asset.discussion_topic_id %>
<%= polymorphic_url([asset.context, :discussion_topic], id: asset.discussion_topic_id) %>
<% end %>
<%= t :body, "New Comment on Announcement: %{discussion_topic}, %{course}", :discussion_topic => %{<b><a href="#{ content :link }">#{ h asset.title }</a></b>}.html_safe, :course => asset.context.name %>

View File

@ -1,9 +1,9 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/discussion_topics/<%= asset.discussion_topic_id %>
<%= polymorphic_url([asset.context, :discussion_topic], id: asset.discussion_topic_id) %>
<% end %>
<% define_content :subject do %>
<%= t :subject, "New Comment on Announcement: %{discussion_topic}: %{course}", :discussion_topic => asset.title, :course => asset.context.name %>
<% end %>
<%= CanvasTextHelper.truncate_text(html_to_text(asset.message, :base_url => "#{HostUrl.protocol}://#{HostUrl.context_host(asset.context)}"), :max_length => 200) %>
<%= CanvasTextHelper.truncate_text(html_to_text(asset.message, :base_url => dashboard_url), :max_length => 200) %>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/discussion_topics/<%= asset.discussion_topic_id %>
<%= polymorphic_url([asset.context, :discussion_topic], id: asset.discussion_topic_id) %>
<% end -%>
<%= t :body, "Canvas Alert - Announcement Comment: %{discussion_topic}, %{course}.", :discussion_topic => asset.title, :course => asset.context.name %>
<%= t :body, "Canvas Alert - Announcement Comment: %{discussion_topic}, %{course}.", :discussion_topic => asset.title, :course => asset.context.name %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<% courses = asset.appointment_group.participant_type == 'Group' ?

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<% define_content :footer_link do %>
@ -50,4 +50,3 @@
</table>
<p style="font-weight: bold;"><%= t :cancel_reason, 'Reason for canceling' %></p>
<p><%= data.cancel_reason || t(:no_reason_given, "none given") %></p>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<%= t :message, '%{user} canceled his/her reservation for "%{appointment_name}".', :user => data.updating_user.name, :appointment_name => asset.title %>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end -%>
<%= t :message, 'Canvas Alert - %{user} canceled his/her reservation for "%{appointment_name}".', :user => data.updating_user.name, :appointment_name => asset.title %>
<%= t :message, 'Canvas Alert - %{user} canceled his/her reservation for "%{appointment_name}".', :user => data.updating_user.name, :appointment_name => asset.title %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<% courses = asset.appointment_group.participant_type == 'Group' ?

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<% define_content :footer_link do %>
@ -48,4 +48,3 @@
</table>
<p style="font-weight: bold;"><%= t :cancel_reason, 'Reason for canceling' %></p>
<p><%= data.cancel_reason || t(:no_reason_given, "none given") %></p>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<%= t :message, '%{user} canceled your time slot for "%{appointment_name}".', :user => data.updating_user.name, :appointment_name => asset.title %><br>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end -%>
<%= t :message, 'Canvas Alert - Your time slot for "%{appointment_name} was canceled".', :appointment_name => asset.title %>
<%= t :message, 'Canvas Alert - Your time slot for "%{appointment_name} was canceled".', :appointment_name => asset.title %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups
<%= appointment_groups_url %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups
<%= appointment_groups_url %>
<% end %>
<% define_content :subject do %>
@ -33,4 +33,4 @@
</tr>
</table>
<p style="font-weight: bold;"><%= t :cancel_reason, 'Reason for canceling' %></p>
<p><%= data.cancel_reason || t(:no_reason_given, "none given") %></p>
<p><%= data.cancel_reason || t(:no_reason_given, "none given") %></p>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups
<%= appointment_groups_url %>
<% end -%>
<%= t :message, 'Canvas Alert - All appointments for "%{appointment_name} have been canceled".', :appointment_name => asset.title %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups/<%= asset.id %>
<%= appointment_group_url(asset) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups/<%= asset.id %>
<%= appointment_group_url(asset) %>
<% end %>
<% define_content :subject do %>
@ -42,4 +42,4 @@
<td valign="top"><%= asset.available_slots %></td>
</tr>
<% end %>
</table>
</table>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups/<%= asset.id %>
<%= appointment_group_url(asset) %>
<% end %>
<%= t :message, 'Time slots for "%{appointment_name}" are now available for signup.', :appointment_name => asset.title %><br>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups/<%= asset.id %>
<%= appointment_group_url(asset) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups/<%= asset.id %>
<%= appointment_group_url(asset) %>
<% end -%>
<%= t :message, 'Canvas Alert - Signups are open for "%{appointment_name}".', :appointment_name => asset.title %>
<%= t :message, 'Canvas Alert - Signups are open for "%{appointment_name}".', :appointment_name => asset.title %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups/<%= asset.id %>
<%= appointment_group_url(asset) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups/<%= asset.id %>
<%= appointment_group_url(asset) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups/<%= asset.id %>
<%= appointment_group_url(asset) %>
<% end %>
<%= t :message, 'Time slots have been added to "%{appointment_name}" and are available for signup.', :appointment_name => asset.title %><br>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups/<%= asset.id %>
<%= appointment_group_url(asset) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.contexts.first) %>/appointment_groups/<%= asset.id %>
<%= appointment_group_url(asset) %>
<% end -%>
<%= t :message, 'Canvas Alert - New time slots are available for "%{appointment_name}".', :appointment_name => asset.title %>
<%= t :message, 'Canvas Alert - New time slots are available for "%{appointment_name}".', :appointment_name => asset.title %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<%= t :message, '%{user} has signed up for "%{appointment_name}".', :user => data.updating_user.name, :appointment_name => asset.title %><br>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end -%>
<%= t :message, 'Canvas Alert - %{user} has signed up for "%{appointment_name}".', :user => data.updating_user.name, :appointment_name => asset.title %>
<%= t :message, 'Canvas Alert - %{user} has signed up for "%{appointment_name}".', :user => data.updating_user.name, :appointment_name => asset.title %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<% define_content :subject do %>
@ -49,4 +49,4 @@
<td valign="top"><%= asset.appointment_group.available_slots %></td>
</tr>
<% end %>
</table>
</table>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<%= t :message, '%{user} has signed you up for "%{appointment_name}".', :user => data.updating_user.name, :appointment_name => asset.title %><br>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.appointment_group.contexts.first) %>/appointment_groups/<%= asset.appointment_group.id %>
<%= appointment_group_url(asset.appointment_group) %>
<% end -%>
<%= t :message, 'Canvas Alert - You have been signed up for "%{appointment_name}".', :appointment_name => asset.title %>
<%= t :message, 'Canvas Alert - You have been signed up for "%{appointment_name}".', :appointment_name => asset.title %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :footer_link do %>
@ -12,4 +12,4 @@
<%= t :subject, "Assignment Changed: %{title}, %{course}", :title => asset.title, :course => asset.context.name %>
<% end %>
<p><%= t :body, 'The assignment "%{title}" for %{course} has changed.', :title => asset.title, :course => asset.context.name %></p>
<p><%= t :body, 'The assignment "%{title}" for %{course} has changed.', :title => asset.title, :course => asset.context.name %></p>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<%= mt :body, "The assignment %{title_link} for %{course} has changed.", :title_link => markdown_safe("**[#{markdown_escape(asset.title)}](#{content(:link)})**"), :course => asset.context.name %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end -%>
<%= t('assignment_change', 'Canvas Alert - Change: %{assignment_name}, %{course_name}', :assignment_name => asset.title, :course_name => asset.context.name) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<%= t('new_assignment', 'A new assignment has been created for %{course_name}', :course_name => asset.context.name) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end -%>
<%= t('assignment_change', 'Canvas Alert - Change: %{assignment_name}, %{course_name}', :assignment_name => asset.title, :course_name => asset.context.name) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>
@ -22,4 +22,4 @@
<% else %>
<%= t('no_due_date', 'No Due Date') %>
<% end %>
</p>
</p>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<%= t('assignment_due_date_changed_sentence', 'The due date for the assignment *%{assignment_name}* for %{course_name}, has changed to:', :assignment_name => asset.title, :course_name => asset.context.name, :wrapper => "<b><a href=\"#{content :link}\">\\1</a></b>") %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end -%>
<%= t('assignment_change', 'Canvas Alert - Date Change: %{assignment_name}, %{course_name}', :assignment_name => asset.title, :course_name => asset.context.name) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment.id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment.id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment.id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment]) %>
<% end %>
<%= t('assignment_due_date_changed_sentence', 'The due date for the assignment *%{assignment_name}* for %{course_name} (%{override}) has changed to:', :assignment_name => asset.assignment.title, :course_name => asset.assignment.context.name, :override => asset.title, :wrapper => "<b><a href=\"#{content :link}\">\\1</a></b>") %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment.id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment.id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment]) %>
<% end -%>
<%= t('assignment_change', 'Canvas Alert - Date Change: %{assignment_name}, %{course_name} (%{override})',
:assignment_name => asset.assignment.title,

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<%= t('the_assignment_is_graded', 'The assignment, %{assignment_name}, has been graded.', :assignment_name => asset.title) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end -%>
<%= t('assignment_graded', 'Canvas Alert - Graded: %{assignment_name}, %{course_name}', :assignment_name => asset.title, :course_name => asset.context.name) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end %>
<%= mt('user_resubmitted', '**%{user_name}** has just turned in a re-submission for **%{assignment_name}** in the course %{course_name}', :user_name => asset.user.name, :assignment_name => asset.assignment.title, :course_name => asset.assignment.context.name) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end -%>
<%= t('user_resubmitted', 'Canvas Alert - Resubmission: %{user_name}, %{assignment_name}', :user_name => asset.user.name, :assignment_name => asset.assignment.title) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end %>
<%= mt('user_submitted', '**%{user_name}** has just turned in a submission for **%{assignment_name}** in the course %{course_name}', :user_name => asset.user.name, :assignment_name => asset.assignment.title, :course_name => asset.assignment.context.name) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end -%>
<%= t('user_submitted', 'Canvas Alert - Submission: %{user_name}, %{assignment_name}', :user_name => asset.user.name, :assignment_name => asset.assignment.title) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end %>
<% define_content :subject do %>
@ -15,4 +15,4 @@
<p><%= t('user_resubmitted_sentence', '%{user_name} has just turned in a late submission for %{assignment_name} in the course %{course_name}',
:user_name => asset.user.name,
:assignment_name => asset.assignment.title,
:course_name => asset.assignment.context.name) %></p>
:course_name => asset.assignment.context.name) %></p>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end %>
<%= mt('user_resubmitted_sentence', '**%{user_name}** has just turned in a late submission for **%{assignment_name}** in the course %{course_name}', :user_name => asset.user.name, :assignment_name => asset.assignment.title, :course_name => asset.assignment.context.name) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,4 +1,4 @@
<% define_content :link do -%>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.assignment.context) %>/<%= asset.assignment.context.class.to_s.downcase.pluralize %>/<%= asset.assignment.context_id %>/assignments/<%= asset.assignment_id %>/submissions/<%= asset.user_id %>
<%= polymorphic_url([asset.assignment.context, asset.assignment, :submissions], id: asset.user_id) %>
<% end -%>
<%= t('user_submitted', 'Canvas Alert - Late Submission: %{user_name}, %{assignment_name}', :user_name => asset.user.name, :assignment_name => asset.assignment.title) %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,7 +1,7 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>
<%= t :subject, "Assignment Unmuted: %{title}, %{course}", :title => asset.title, :course => asset.context.name %>
<% end %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/assignments/<%= asset.id %>
<%= polymorphic_url([asset.context, asset]) %>
<% end %>
<% define_content :subject do %>

View File

@ -1,5 +1,5 @@
<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.collaboration.context) %>/<%= asset.collaboration.context.class.base_class.to_s.downcase.pluralize %>/<%= asset.collaboration.context_id %>/collaborations/<%= asset.collaboration.id %>
<%= polymorphic_url([asset.collaboration.context, asset.collaboration]) %>
<% end %>
<% define_content :subject do %>

Some files were not shown because too many files have changed in this diff Show More