small fix in calculation algo
This commit is contained in:
parent
730d6b896a
commit
9917cb186d
|
@ -9,7 +9,7 @@
|
||||||
<% @survey.result_criteria.each do |criteria| %>
|
<% @survey.result_criteria.each do |criteria| %>
|
||||||
<%
|
<%
|
||||||
total_criteria_score = 0
|
total_criteria_score = 0
|
||||||
(criteria["questions"][0].to_i..criteria["questions"][1].to_i).each do |x|
|
((criteria["questions"][0].to_i - 1)..(criteria["questions"][1].to_i - 1)).each do |x|
|
||||||
total_criteria_score = (total_criteria_score + @answer_model.individual_total[x].to_i) rescue 0
|
total_criteria_score = (total_criteria_score + @answer_model.individual_total[x].to_i) rescue 0
|
||||||
end
|
end
|
||||||
%>
|
%>
|
||||||
|
|
Loading…
Reference in New Issue