Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions signinapp/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,11 @@ def stats():
users = defaultdict(timedelta)
subteams = defaultdict(timedelta)
blocks = defaultdict(list)
total_time = timedelta()
for stamp in event.stamps:
users[stamp.user] += stamp.elapsed
subteams[stamp.user.subteam] += stamp.elapsed
total_time += stamp.elapsed
now = datetime.now(tz=UTC)
for active in event.active:
users[active.user] += now - correct_time_from_storage(active.start)
Expand Down Expand Up @@ -252,6 +254,7 @@ def stats():
subteams=subteams,
blocks=blocks,
registration_url=registration_url,
total_time=total_time,
)


Expand Down
7 changes: 7 additions & 0 deletions signinapp/templates/event_stats.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@
</tr>
{%- endfor -%}
</tbody>
<tfoot>
<tr>
<td>TOTAL</td>
<td>{{ total_time }}</td>
<td>{{ event.funds_human }}</td>
</tr>
</tfoot>
</table>
</div>
<div class="table-responsive">
Expand Down
Loading