Skip to content

Commit

Permalink
Merge pull request #249 from ochan1/tutoring
Browse files Browse the repository at this point in the history
Tutor display Slot Hour bug fix
  • Loading branch information
ochan1 committed Feb 8, 2021
2 parents f2d06ea + bca5c31 commit 3cdc3dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/slot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 3cdc3dd

Please sign in to comment.