School Report

<% @subjects.each do |subject| %> <% end %> <% @departments.each do |department| %> <% end %> <% @total_students = 0 %> <% @total_enrollments = 0 %> <% @total_assessments = 0 %> <% @total_assessment_counts = 0 %> <% @distinct_students = 0 %> <% @schools.each do |school| %> <% #@total_students = @total_students + school.enrollments #@total_enrollments = @total_enrollments + school.total_enrollments #@distinct_students = @distinct_students + school.unique_students #@total_assessments = @total_assessments + school.assessments #@total_assessment_counts = @total_assessment_counts + school.total_assessments %> <% @subjects.each do |subject| %> <% end %> <% @departments.each do |department| %> <% end %> <% end %>
School Name DISE Code Cluster Block District Enrollments Total Assessments Unique Students<%=subject.name%><%=department.name%>
<%= school.schoolName %> <%= school.diseCode %> <%= (school.clustermaster.present?) ? school.clustermaster.name : '-' %> <%= (school.blockmaster.present?) ? school.blockmaster.name : '-' %> <%= (school.districtmaster.present?) ? school.districtmaster.name : '-' %> <%= school.enrollments %> <%= school.total_assessments %> <%= school.unique_students %><%=(school.subject_data.present? and school.subject_data[subject.id.to_s].present?) ? school.subject_data[subject.id.to_s] : 0%><%=(school.department_data.present? and school.department_data[department.id.to_s].present?) ? school.department_data[department.id.to_s] : 0%>
Total Enrollments : <%=@total_students%>
Total Enrollments : <%=@total_enrollments%>
Total Assessments Given : <%=@total_assessments%>
Total Assessments Counts Given : <%=@total_assessment_counts%>
Total Unique Students : <%=@distinct_students%>