|
@@ -3,8 +3,8 @@ link rel="stylesheet" href=url("/assets/bootstrap/3.3.5/bootstrap.min.css")
|
|
|
link rel="stylesheet" href=url("/css/print.css")
|
|
|
link href=url("/css/print_a4_landscape.css") rel="stylesheet" media="all"
|
|
|
-alle_faecher = Set.new
|
|
|
--gesamtzahl_slices= (schueler.count/4) + (1 if (schueler.count.%(4)>0))
|
|
|
--schueler.select{|s| s.bk_abschluss }.each_slice(4).with_index do |(*schueler_slice), slice_i|
|
|
|
+-gesamtzahl_slices= (schueler.count/5) + (1 if (schueler.count.%(5)>0))
|
|
|
+-schueler.select{|s| s.bk_abschluss }.each_slice(5).with_index do |(*schueler_slice), slice_i|
|
|
|
.page
|
|
|
.subpage
|
|
|
.row
|
|
@@ -30,15 +30,15 @@ link href=url("/css/print_a4_landscape.css") rel="stylesheet" media="all"
|
|
|
-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)
|
|
|
-inner_array << vornote
|
|
|
- -inner_array << (NotenHelfer.note_aus_punkten(n.abi_pruef_ergebnis) if %w(1 2 3).any?(n.abi_fach))
|
|
|
+ -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?(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) + n.abi_pruef_ergebnis)/2).round.to_i) : vornote)
|
|
|
-array << inner_array
|
|
|
-array = array.transpose
|
|
|
-faecher = array.shift
|
|
|
.row.font-small
|
|
|
.col-xs-8
|
|
|
- b #{i+1+(4*slice_i)}. #{s.name}, #{s.vorname}
|
|
|
+ b #{i+1+(5*slice_i)}. #{s.name}, #{s.vorname}
|
|
|
table.table.table-condensed.table-bordered.fixed.table-eng
|
|
|
tr
|
|
|
-faecher.each do |f|
|