<% if @request_for_comment.solved? %> <% end %> <%= link_to(@request_for_comment.exercise.title, [:implement, @request_for_comment.exercise]) %>

<% user = @request_for_comment.user submission = @request_for_comment.submission testruns = Testrun.where(:submission_id => @request_for_comment.submission) %> <%= user.displayname %> | <%= @request_for_comment.created_at.localtime %>

<%= t('activerecord.attributes.exercise.description') %>
<%= render_markdown(@request_for_comment.exercise.description) %>
<%= t('activerecord.attributes.request_for_comments.question')%>
<% question = @request_for_comment.question %> <%= question.nil? or question.empty? ? t('request_for_comments.no_question') : question %>
<% if policy(@request_for_comment).mark_as_solved? and not @request_for_comment.solved? %> <%= render('mark_as_solved') %> <% end %> <% if testruns.size > 0 %>
<% output_runs = testruns.select { |run| run.cause == 'run' } %> <% if output_runs.size > 0 %>
<%= t('request_for_comments.runtime_output') %>
<% output_runs.each do |testrun| %>
<%= testrun.try(:output) or t('request_for_comments.no_output') %>
<% end %>
<% end %> <% assess_runs = testruns.select { |run| run.cause == 'assess' } %> <% if assess_runs.size > 0 %>
<%= t('request_for_comments.test_results') %>
<% assess_runs.each do |testrun| %>
<% end %>
<% end %>
<% end %> <% if @current_user.admin? && user.is_a?(ExternalUser) %> <%= render('admin_menu') %> <% end %>
<%= t('request_for_comments.howto_title') %>
<%= render_markdown(t('request_for_comments.howto')) %>
<% submission.files.each do |file| %> <%= (file.path or "") + "/" + file.name + file.file_type.file_extension %>
   <%= t('request_for_comments.click_here') %>
<%= file.content %>
<% end %> <%= render('shared/modal', id: 'comment-modal', title: t('exercises.implement.comment.dialogtitle'), template: 'exercises/_comment_dialogcontent') %>