<%= t('name') %> : <%= @student.full_name %>
<%= t('adm_no') %> : <%= @student.admission_no.present? ? @student.admission_no : "-" %>
<%= t('course_text') %> : <%= @student.batch.course.course_name %>
<% reports = GroupedExamReport.find_all_by_student_id_and_score_type(@student.id,'c') %>
<% if reports.empty? %>
<% c= 'even' %>
<% unless st_mark.nil? %>
<% mark = st_mark.marks || 0 %>
<% else %>
<% mark=0 %>
<% end %>
<% grades << mark %>
<% if grade_type=="CWA" %>
<%= t('grouped_exam_reports_not_generated') %>
<% else %> <% grades = [] %> <% grade_type = "normal" %> <% grade_type = "GPA" if @student.batch.gpa_enabled? %> <% grade_type = "CWA" if @student.batch.cwa_enabled? %> <% @batches.each do|batch| %> <% st_mark = GroupedExamReport.find_by_batch_id_and_student_id_and_score_type(batch.id,@student.id,"c") %> <% unless st_mark.nil? %> <% general_subjects = Subject.find_all_by_batch_id(batch.id, :conditions=>"elective_group_id IS NULL AND is_deleted=false") %> <% student_electives = StudentsSubject.find_all_by_student_id(@student.id,:conditions=>"batch_id = #{batch.id}") %> <% elective_subjects = [] %> <% student_electives.each do |elect| %> <% elective_subjects.push Subject.find(elect.subject_id) %> <% end %> <% @subjects = general_subjects + elective_subjects %> <% unless @subjects.empty? %><%= batch.full_name %>
<% total_credits=0 %><%= t('subject_code') %> | <%= t('subject_title') %> | <% if grade_type=="GPA" or grade_type=="CWA" %><%= t('credit') %> | <%= t('marks') %> | <% else %><%= t('percentage') %>(%) | <% end %>
<%= s.code %> - | <% else %><%= s.code %> | <% end %><%= s.name %> | <% if grade_type=="GPA" or grade_type=="CWA" %><%= s.credit_hours %> | <% total_credits = total_credits + s.credit_hours.to_f %> <% end %><%= subject_average.present? ? subject_average.marks : "-" %> |
<%= t('total') %> | <%= total_credits %> | - |
<%= t('combined_weighted_average') %> = <%= mark==0 ? "-" : mark %>
<% elsif grade_type=="GPA" %><%= t('batch_wise_cumulative_grade_point_average') %> = <%= mark==0 ? "-" : mark %>
<% else %><%= t('combined_percentage') %> = <%= mark==0 ? "-" : mark %>
<% end %> <% end %> <% end %> <% end %>
<% unless grades.count.to_f == 0 %>
<% cgpa = (grades.sum.to_f)/(grades.count.to_f) %>
<% else %>
<% cgpa = 0 %>
<% end %>
<% if grade_type=="GPA" %>
<% designations = ClassDesignation.find(:all,:conditions=>["cgpa <= ? AND course_id = ?",cgpa,@student.batch.course_id],:order=>"cgpa DESC") %>
<% end %>