%-# Fedena #Copyright 2010 Foradian Technologies Private Limited # #This product includes software developed at #Project Fedena - http://www.projectfedena.org/ # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required by applicable law or agreed to in writing, #software distributed under the License is distributed on an #"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY #KIND, either express or implied. See the License for the #specific language governing permissions and limitations #under the License. -%>
<%= flash[:notice] %>
<% end %><%= t('name') %> | <% @exam_group.exams.each do |exam| %><%= Subject.find(exam.subject_id).code %><%= "(" + exam.maximum_marks.to_s + ")" unless exam.maximum_marks.nil? %> | <% end %><%= t('percentage') %>(%) | |
<%= student.full_name %> | <% total_marks = 0 %> <% total_max_marks = 0 %> <% @exam_group.exams.each do |exam| %> <% exam_score = ArchivedExamScore.find_by_student_id_and_exam_id(student.id,exam.id) %> <% unless @exam_group.exam_type == "Grades" %><% if @exam_group.exam_type == "MarksAndGrades" %> <%= exam_score.nil? ? '-' : "#{(exam_score.marks || "-")}" + "(#{(exam_score.grading_level || "-")})" %> <% else %> <%= exam_score.nil? ? '-' : exam_score.marks || "-" %> <% end %> | <% total_marks = total_marks+(exam_score.marks || 0) unless exam_score.nil? %> <% total_max_marks = total_max_marks+exam.maximum_marks unless exam_score.nil? %> <% else %><%= exam_score.nil? ? '-' : exam_score.grading_level || "-" %> | <% end %> <% end %><% percentage = total_marks*100/total_max_marks.to_f unless total_max_marks == 0%> <%= "%.2f" %percentage unless total_max_marks == 0 %> |
<%= student.full_name %> | <% total_marks = 0 %> <% total_max_marks = 0 %> <% @exam_group.exams.each do |exam| %> <% exam_score = ExamScore.find_by_student_id_and_exam_id(student.id,exam.id) %> <% unless @exam_group.exam_type == "Grades" %><% if @exam_group.exam_type == "MarksAndGrades" %> <%= exam_score.nil? ? '-' : "#{(exam_score.marks || "-")}" + "(#{(exam_score.grading_level || "-")})" %> <% else %> <%= exam_score.nil? ? '-' : exam_score.marks || "-" %> <% end %> | <% total_marks = total_marks+(exam_score.marks || 0) unless exam_score.nil? %> <% total_max_marks = total_max_marks+exam.maximum_marks unless exam_score.nil? %> <% else %><%= exam_score.nil? ? '-' : exam_score.grading_level || "-" %> | <% end %> <% end %><% percentage = total_marks*100/total_max_marks.to_f unless total_max_marks == 0%> <%= "%.2f" %percentage unless total_max_marks == 0 %> |