<h1>Summary report for <%= @assignment.name %></h1>
<BR/>
<% if @scores[:teams] %>
	<a href="#" onClick="toggleAll(<%= @scores[:teams].length %>);return false;" id="teamAll" name="teamAll">Show all teams</a>
    <BR/><BR/>
<% end %>
<TABLE class="grades" width="100%">
  <!--ACS Render the appropriate partial for displaying the scores depending on the team size -->
<% if @assignment.max_team_size > 1 && @scores[:teams].length > 0 %>
  <%= render :partial => 'teams' %>
<% elsif @assignment.max_team_size == 1 && @scores[:participants].length > 0 %>
  <%= render :partial => 'participants' %>
<% else %>
  <TR><TD>No <%if @assignment.max_team_size > 1%>teams<%else%>participants<%end%> are defined for this assignment</TD></TR>
<% end %>
</TABLE>
<BR/><BR/>
<%= link_to 'Export '+'Grades',
            :controller=>'export_file',
            :action=>'start',
            :model=>'Assignment',
            :id=>@assignment.id %> <BR/><BR/>
<a href="javascript:window.history.back()">Back</a>




<h1>Summary report for <%= @assignment.name %></h1>
<BR/>
<% if @scores[:teams] %>
	<a href="#" onClick="toggleAll(<%= @scores[:teams].length %>);return false;" id="teamAll" name="teamAll">Show all teams</a>
    <BR/><BR/>
<% end %>
<TABLE class="grades" width="100%">
  <!--ACS Render the appropriate partial for displaying the scores depending on the team size -->
<% if @assignment.team_assignment? && @scores[:teams].length > 0 %>
  <%= render :partial => 'teams' %>
<% elsif !@assignment.team_assignment? && @scores[:participants].length > 0 %>
  <%= render :partial => 'participants' %>
<% else %>
  <TR><TD>No <%if @assignment.team_assignment? %>teams<%else%>participants<%end%> are defined for this assignment</TD></TR>
<% end %>
</TABLE>
<BR/><BR/>
<%= link_to 'Export '+'Grades',
            :controller=>'export_file',
            :action=>'start',
            :model=>'Assignment',
            :id=>@assignment.id %> <BR/><BR/>
<a href="javascript:window.history.back()">Back</a>




Use team_assignment? method instead of checking max_team_size.
Use team_assignment? method instead of checking max_team_size.
