<% @school_records.sort_by{|key,sch| sch["students"]}.reverse.each do |disecode,school| if school["total"] > 0 per = ((school["students"].to_f/(school["total"] * 4.0))*100).round(2) else per = 0 end %> <% end %>
SchoolName Total Students Students Scoring Above 50%
<%= school["name"] %> <%= school["total"] %>
<%= per %> %
<% unless @is_download %> <% end %>