Graph in exercise statistics

This commit is contained in:
johnmgeiger
2016-03-22 09:23:21 +01:00
parent cc0a541add
commit b530ea47d9
7 changed files with 220 additions and 0 deletions

View File

@@ -13,6 +13,16 @@ h1 = @exercise
- Hash[:internal_users => t('.internal_users'), :external_users => t('.external_users')].each_pair do |symbol, label|
strong = label
-if symbol==:external_users
-working_time_array = []
- @exercise.send(symbol).distinct().each do |user|
-working_time = @exercise.average_working_time_for(user.id) or 0
-working_time_array.push working_time
hr
.hidden#data data-working-time=ActiveSupport::JSON.encode(working_time_array)
div#chart_1
.graph-functions
hr
.table-responsive
table.table.table-striped.sortable
thead