Browse Source

korrekturen

burningTyger 6 years ago
parent
commit
4781e2f15c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      views/vornoten_abi_ba.slim

+ 2 - 2
views/vornoten_abi_ba.slim

@@ -28,11 +28,11 @@ link href=url("/css/print_a4_landscape.css") rel="stylesheet" media="all"
               -inner_array << NotenHelfer.note_aus_punkten(n.p13_1) || ""
               -inner_array << NotenHelfer.note_aus_punkten(n.p13_2) || ""
               -anzahl_noten = [n.p13_1, n.p13_2].reject{ |n| n.to_i == 0 }.count
-              -vornote = ((n.p13_1.to_i+n.p13_2.to_i == 0) ? "" : NotenHelfer.note_aus_punkten(((n.p13_1.to_f + n.p13_2.to_f)/anzahl_noten).round).to_i)
+              -vornote = ((n.p13_1.to_i+n.p13_2.to_i == 0) ? "" : NotenHelfer.note_aus_punkten(((n.p13_1.to_f + n.p13_2.to_f)/anzahl_noten).round))
               -inner_array << vornote
               -inner_array << (NotenHelfer.note_aus_punkten(n.abi_pruef_ergebnis) if %w(1 2 3).any?{|x| x == n.abi_fach})
               / -inner_array << (%w(1 2 3).any?(n.abi_fach) ? vornote : vornote)
-              -inner_array << (%w(1 2 3).any?{|x| x == n.abi_fach} ? NotenHelfer.note_aus_punkten(((NotenHelfer.punkte_aus_note(vornote.to_s) + n.abi_pruef_ergebnis)/2).round.to_i) : vornote)
+              -inner_array << (%w(1 2 3).any?{|x| x == n.abi_fach} ? NotenHelfer.note_aus_punkten(((NotenHelfer.punkte_aus_note(vornote.to_s).to_f + n.abi_pruef_ergebnis)/2).round) : vornote).to_i
               -array << inner_array
             -array = array.transpose
             -faecher = array.shift