canvas-lms/app/messages/new_discussion_topic.summar...

10 lines
567 B
Plaintext

<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.context) %>/<%= asset.context.class.to_s.downcase.pluralize %>/<%= asset.context_id %>/discussion_topics/<%= asset.id %>
<% end %>
<% define_content :subject do %>
<%= t :subject, "New Discussion - %{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) %>