Skip to content

Commit

Permalink
Fix <% end %> nesting errors in _responses.html.erb partial.
Browse files Browse the repository at this point in the history
  • Loading branch information
efg committed Mar 20, 2014
1 parent d917098 commit 10eb7b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 37 deletions.
42 changes: 6 additions & 36 deletions app/views/student_review/_responses.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<% end %>
<% end %>
<%# if (array_not_empty == 1) %>
<% @sorted = @sorted_array.sort { |m1, m2| (m1.version_num and m2.version_num) ? m2.version_num <=> m1.version_num : (m1.version_num ? -1 : 1) } %>
<% @largest_version_num = @sorted[0] %>
Expand Down Expand Up @@ -92,43 +93,11 @@
<td><%= link_to "Update", {:controller => 'response', :action => 'new', :id => map.map_id} %></td>
<% end %>
<% end %>
<% elsif @assignment.get_current_stage(participant.topic_id) != "Complete" %>
<% if @assignment.staggered_deadline? %>
<% if map.type.to_s == "MetareviewResponseMap" %>
<% if @assignment.get_current_stage(participant.topic_id) == 'metareview' %>
<td><%= link_to "Begin", {:controller => 'response', :action => 'new', :id => map.map_id} %></td>
<% else %>
<td>Begin</td>
<td> (Work has not yet been submitted)</td>
<% end %>
<% else %>
<% if @assignment.get_current_stage(participant.topic_id) != 'submission' %>
<td><%= link_to "Begin", {:controller => 'response', :action => 'new', :id => map.map_id} %></td>
<td>&nbsp;&nbsp;</td>
<%- # Display link for code review if 'any' code review files -%>
<%- # have been uploaded i.e. files present in code review dir -%>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
<% if participant.get_files(ReviewFilesHelper::get_code_review_file_dir(participant)).length > 0 %>
<%= link_to "Review Code", {:controller => 'review_files', :action => 'show_all_submitted_files', :participant_id => participant.id} %>
<% end %>
</td>
<% else %>
<td>Begin</td>
<td> (Work has not yet been submitted)</td>
<% end %>
<% end %>
<% else %>
<td><%= link_to "Begin", {:controller => 'response', :action => 'new', :id => map.map_id} %></td>
<td>&nbsp;&nbsp;</td>
<%- # Display link for code review if 'any' code review files -%>
<%- # have been uploaded i.e. files present in code review dir -%>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
<% if participant.get_files(ReviewFilesHelper::get_code_review_file_dir(participant)).length > 0 %>
<%= link_to "Review Code", {:controller => 'review_files', :action => 'show_all_submitted_files', :participant_id => participant.id} %>
<% end %>
</td>
<% end %>
<% else %>
<% end %>
<% end %>
<% else %>
<td>Begin</td>
<td> (Work has not yet been submitted)</td>
for
Expand Down Expand Up @@ -156,3 +125,4 @@
<% end %>
<% end %>
</table>

1 change: 0 additions & 1 deletion app/views/student_review/list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<% elsif @assignment.review_assignment_strategy == Assignment::RS_STUDENT_SELECTED %>
<%= render :partial => 'set_self_review', :locals => {:assignment => @assignment} %>
<% end %>
<% end %>
<% end %>
<% else %>
<p><em>Reviews cannot be performed at this time</em></p>
Expand Down

0 comments on commit 10eb7b6

Please sign in to comment.