Fix display_time
This commit is contained in:
parent
4b5c09f63b
commit
2969a24cb0
@ -8,15 +8,16 @@ module CompletionsConcern
|
|||||||
"0" + n.to_s
|
"0" + n.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def display_time(seconds)
|
def display_time(time)
|
||||||
if seconds > 3600
|
h = time / 3600
|
||||||
hours = seconds / 3600
|
m = (time % 3600) / 60
|
||||||
return hours.to_s + ":" + display_time(seconds % 3600)
|
s = (time % 3600) % 60
|
||||||
elsif seconds > 60
|
if h > 0
|
||||||
minutes = seconds / 60
|
return h.to_s + ":" + pad(m) + ":" + pad(s)
|
||||||
return pad(minutes) + ":" + display_time(seconds % 60)
|
elsif m > 0
|
||||||
|
return m.to_s + ":" + pad(s)
|
||||||
end
|
end
|
||||||
pad(seconds)
|
s.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def extend_completions!(contestant)
|
def extend_completions!(contestant)
|
||||||
|
@ -28,7 +28,7 @@ javascript:
|
|||||||
</svg>
|
</svg>
|
||||||
=< t("contests.show.copy_extension_url")
|
=< t("contests.show.copy_extension_url")
|
||||||
|
|
||||||
.row.mb-4 style="height: calc(100vh - 320px)"
|
.row.mb-4 style="height: calc(100vh - 280px)"
|
||||||
.col-7.d-flex.flex-column style="height: 100%"
|
.col-7.d-flex.flex-column style="height: 100%"
|
||||||
.row
|
.row
|
||||||
.col
|
.col
|
||||||
|
Loading…
x
Reference in New Issue
Block a user