<%-# 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. -%>
<%= image_tag("/images/examination/show_exam.png") %>

<%= t('exams_text') %>

<%= t('grouping') %>

<%= link_to_function image_tag("/images/buttons/back.png",:border => 0), "history.back()" %>
<% unless flash[:notice].nil? %>

<%= flash[:notice] %>

<% end %>
<%#*
%> <%#= t('select') %><%#: <%= link_to_function t('all'), "$$('input.right').each(function(checkbox) { checkbox.checked = true; });" %> <%#= link_to_function t('none'), "$$('input.right').each(function(checkbox) { checkbox.checked = false; });" %> <%#*
%> <% unless @exam_groups.empty? %>

<%= t('connect_exams') %>

<% form_for :exam_grouping do |f| %> <% count=@exam_groups.count.to_i - 1 %> <% i=0 %> <% total = 0 %> <% @exam_groups.each do |e| %> <% already_grouped = GroupedExam.find_by_batch_id_and_exam_group_id(@batch.id,e) %> <% is_already_grouped = already_grouped.present? %> <% if is_already_grouped==true %> <% total += already_grouped.weightage if already_grouped.weightage.present? %> <% else %> <% end %> <% i=i+1 %> <% end %>
<%= check_box_tag 'chck1','yes', false,{:onClick=> "check_all_or_none(#{count})"} %> <%= t('exam_group') %> <%= t('weightage') %>(%)
<%= check_box_tag "exam_grouping[exam_group_ids][]", e.id,is_already_grouped,{:class=>'right',:id=>"check#{i}",:onClick=>"set_weightage(this,#{count})"} %> <%= e.name %><%=text_field_tag 'weightage[]',already_grouped.weightage,:class=>'total-box',:id=>"weightage#{i}",:onchange=>"check_weightage(this,#{count})"%><%=text_field_tag 'weightage[]',"0",:class=>'total-box',:disabled=>true,:id=>"weightage#{i}",:onchange=>"check_weightage(this,#{count})"%>
<%= t('total_weghtage') %> <%=label_tag 'total',total,:id=>"tot"%>
<%#*
"right"%><%#
<%= e.name %><%#
%> <%#*
%> <%# end %> <%= submit_tag "", :value => "#{t('save')}", :class => "submit_button" %> <% end %> <% else %>

No valid exams available to connect.

<% end %>