Skip to content

Commit

Permalink
Minor changes to responses partial in student_review
Browse files Browse the repository at this point in the history
  • Loading branch information
SaNPai23 committed Feb 25, 2020
1 parent 24d750f commit 5ffcf09
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/views/student_review/_responses.html.erb
Expand Up @@ -32,7 +32,7 @@
</td>
<% latest_submission = team.most_recent_submission %>
<td>&nbsp;</td>
<% if !map.response.empty? && latest_submission%>
<% if !map.response.empty? && latest_submission %>
<% array_not_empty = 0 %>
<% @sorted_responses = Array.new %>
<% @prev = Response.where(:map_id => map.id) %>
Expand All @@ -41,7 +41,7 @@
<% @sorted_responses << element %>
<% end %>
<% if (array_not_empty == 1) %>
<% if array_not_empty == 1 %>
<% @sorted_responses = @sorted_responses.sort_by {|obj| obj.updated_at} # the latest should be at the last%>
<% @latest_response = @sorted_responses.last %>
Expand All @@ -60,10 +60,10 @@
<% if @assignment.get_current_stage(topic_id) != "Finished" %>
<%- # show the link as 'Edit' when latest review is done in current round -%>
<%- # show link as 'Update' when latest review is done in different round or there has been a new submission in current round -%>
<% if (last_response_round == current_round)%>
<% if last_response_round == current_round%>
<td>
<% if (!@latest_response.is_submitted) %>
<% if !@latest_response.is_submitted %>
<%= link_to "Edit", {:controller => 'response', :action => 'edit', :id => @latest_response.id} %>
<% elsif @latest_response.updated_at < latest_submission.updated_at %>
<td><%= link_to "Update", {:controller => 'response', :action => 'new', :id => map.map_id} %></td>
Expand All @@ -80,7 +80,7 @@
<td>&nbsp;&nbsp;</td>
<% else %>
<!-- <td>Begin</td>-->
<td> Work has not yet been submitted for Review No.
<td> Work has not yet been submitted for Review
<%= review_no %></td>
<% end %>
<% review_no+=1 %>
Expand Down

0 comments on commit 5ffcf09

Please sign in to comment.