fix recordings lengths

This commit is contained in:
Joshua Arts
2018-07-30 11:48:11 -04:00
parent 8220a09aa1
commit c7fbaa3f80
5 changed files with 11 additions and 9 deletions

View File

@ -114,11 +114,9 @@ class RoomsController < ApplicationController
helper_method :recording_date
# Helper for converting BigBlueButton dates into a nice length string.
def recording_length(start_time, end_time)
len = ((end_time - start_time) * 24 * 60).to_i
def recording_length(len)
if len > 60
"#{len / 60} hrs"
"#{(len / 60).round} hrs"
elsif len == 0
"< 1 min"
else