From bca5c318b0099f5272eb06a83e17cebc1c92a834 Mon Sep 17 00:00:00 2001 From: ochan1 Date: Sun, 7 Feb 2021 16:16:13 -0800 Subject: [PATCH] Tutor display Slot Hour bug fix --- app/models/slot.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/slot.rb b/app/models/slot.rb index 1c1c5fc5..250cc266 100644 --- a/app/models/slot.rb +++ b/app/models/slot.rb @@ -53,7 +53,7 @@ def inspect def display applyTempFix = true - start, stop = [hour, hour + 1].collect { |h| h > 12 ? h - 12 : h } + start, stop = [hour, hour + 1].collect { |h| h } if applyTempFix if start == 11 or start == 12 start = start + 2 @@ -62,11 +62,13 @@ def display # Large slot between 3 PM to 7 PM - for No Tutoring start = start + 2 stop = stop + 5 + # This time section shouldn't show for the Spring 2021 tutors anyway... else (2 + 12) <= start and start <= (4 + 12) start = start + 5 stop = stop + 5 end end + start, stop = [start, stop].collect { |h| h > 12 ? h - 12 : h } "#{day_name}, #{start}-#{stop} @ Online" # @ #{room_name}" end