33 lines
1.5 KiB
Plaintext
33 lines
1.5 KiB
Plaintext
h1 = @execution_environment
|
|
|
|
.table-responsive
|
|
table.table.table-striped class=(@execution_environment.present? ? 'sortable' : '')
|
|
thead
|
|
tr
|
|
th.header = t('.exercise')
|
|
th.header = t('.users_and_programming_groups')
|
|
th.header = t('.score')
|
|
th.header = t('.maximum_score')
|
|
th.header = t('.stddev_score')
|
|
th.header = t('.percentage_correct')
|
|
th.header = t('.runs')
|
|
th.header = t('.worktime')
|
|
th.header = t('.stddev_worktime')
|
|
tbody
|
|
- @execution_environment.exercises.each do |exercise|
|
|
- us = contributor_statistics[exercise.id]
|
|
- us ||= {'contributors' => 0, 'average_score' => 0.0, 'maximum_score' => 0, 'stddev_score' => 0.0, 'percent_correct' => nil, 'average_submission_count' => 0}
|
|
- wts = working_time_statistics[exercise.id]
|
|
- if wts then average_time = wts['average_time'] else 0 # rubocop:disable Lint/ElseLayout
|
|
- if wts then stddev_time = wts['stddev_time'] else 0 # rubocop:disable Lint/ElseLayout
|
|
tr
|
|
td = link_to_if policy(exercise).statistics?, exercise.title, controller: 'exercises', action: 'statistics', id: exercise.id, 'data-turbolinks': 'false'
|
|
td = us['contributors']
|
|
td = us['average_score'].to_f.round(4)
|
|
td = us['maximum_score'].to_f.round(2)
|
|
td = us['stddev_score'].to_f.round(4)
|
|
td = (us['percent_correct'].to_f || 0).round(4)
|
|
td = us['average_submission_count'].to_f.round(2)
|
|
td = average_time
|
|
td = stddev_time
|