<% if @topic.for_assignment? %>
<%= render :partial => 'assignment_details' %>
<%= render :partial => 'peer_reviews' %>
<% end %>
<% if @topic.todo_date? %>
<%= render :partial => 'assignment_todo' %>
<% end %>
<% if @topic.for_group_discussion? %>
<%= render :partial => 'group_discussion', :locals => {show_da_note: (@topic.for_assignment? && @topic.assignment.only_visible_to_overrides)} %>
<% end %>
<%= avatar((@topic.user), context_code: @context.asset_string) if @topic.user %>
<% unless @locked.is_a?(Hash) && !@locked[:can_view] && !can_do(@topic, @current_user, :update) %>
<%= public_user_content(@topic.message) %>
<% end %>
<% if @unlock_at && @unlock_at > Time.now && @topic.is_a?(Announcement) %>
<%= t 'announcement_locked', 'The content of this announcement will not be visible to users until %{date}', :date => datetime_string(@unlock_at) %>
<% end %>
<% if @locked %>
<% if @topic.is_a? Announcement %>
<%= t 'announcement_closed', 'This announcement is closed for comments' %>
<% elsif @locked.is_a?(Hash) %>
<%= lock_explanation(@locked, 'topic', @context) %>
<% end %>
<% end %>
<% if @topic.editor_id && @topic.user_id && @topic.editor_id != @topic.user_id %>
<%= t 'edited_by', 'This topic was edited by %{user}', :user => link_to(context_user_name(@topic.context, @topic.editor_id), context_url(@topic.context, :context_user_url, @topic.editor_id)) %>
<% end %>
<% if @topic.podcast_enabled %>
<% if @context_enrollment %>
<% elsif @context.available? %>
<% end %>
<% end %>
<% if @topic.external_feed %>
<%= t 'retrieved_from_feed', 'Retrieved from %{feed}', :feed => link_to(@topic.external_feed.display_name, @topic.external_feed.url) %>
<% end %>
<% if @topic.attachment %>
<% end %>