This commit is contained in:
BoHung Chiu 2021-11-04 16:47:14 +08:00
parent a39e5738a5
commit ecd052b9af
1 changed files with 1 additions and 1 deletions

View File

@ -465,7 +465,7 @@ class QuestionnaireSurvey
answer.scored_points = total answer.scored_points = total
answer.individual_total = individual_total answer.individual_total = individual_total
if tmp_total_weight != 0 if tmp_total_weight != 0
answer.avg_points = (individual_total.to_f / tmp_total_weight).round answer.avg_points = (total.to_f / tmp_total_weight).round
else else
answer.avg_points = 0 answer.avg_points = 0
end end