<commit_before>script src="http://labratrevenge.com/d3-tip/javascripts/d3.tip.v0.6.3.js"
h1 = @exercise

= row(label: '.participants', value: @exercise.users.distinct.count)
- [:intermediate, :final].each do |scope|
  = row(label: ".#{scope}_submissions") do
    = "#{@exercise.submissions.send(scope).count} (#{t('.users', count: @exercise.submissions.send(scope).distinct.count(:user_id))})"
= row(label: '.average_score') do
  p == @exercise.average_score ? t('shared.out_of', maximum_value: @exercise.maximum_score, value: @exercise.average_score.round(2)) : empty
  p = progress_bar(@exercise.average_percentage)

= row(label: '.average_worktime') do
  p = @exercise.average_working_time

- 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)
    .graph-functions
    div#chart_1
    hr
    /div#chart_2
    /hr
  .table-responsive
    table.table.table-striped.sortable
      thead
        tr
          - ['.user', '.score', '.runs', '.worktime'].each do |title|
            th.header = t(title)
      tbody
        - @exercise.send(symbol).distinct().each do |user|
          - if user_statistics[user.id] then us = user_statistics[user.id] else us = {"maximum_score" => nil, "runs" => nil}
          - label = current_user.teacher? ? "#{user.name}" : "#{user.name} (#{user.email})"
          tr
            td = link_to_if symbol==:external_users, label, {controller: "exercises", action: "statistics", external_user_id: user.id, id: @exercise.id}
            td = us['maximum_score'] or 0
            td = us['runs']
            td = @exercise.average_working_time_for(user.id) or 0<commit_msg>remove email adress from statistics view (also for admins)<commit_after>script src="http://labratrevenge.com/d3-tip/javascripts/d3.tip.v0.6.3.js"
h1 = @exercise

= row(label: '.participants', value: @exercise.users.distinct.count)
- [:intermediate, :final].each do |scope|
  = row(label: ".#{scope}_submissions") do
    = "#{@exercise.submissions.send(scope).count} (#{t('.users', count: @exercise.submissions.send(scope).distinct.count(:user_id))})"
= row(label: '.average_score') do
  p == @exercise.average_score ? t('shared.out_of', maximum_value: @exercise.maximum_score, value: @exercise.average_score.round(2)) : empty
  p = progress_bar(@exercise.average_percentage)

= row(label: '.average_worktime') do
  p = @exercise.average_working_time

- 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)
    .graph-functions
    div#chart_1
    hr
    /div#chart_2
    /hr
  .table-responsive
    table.table.table-striped.sortable
      thead
        tr
          - ['.user', '.score', '.runs', '.worktime'].each do |title|
            th.header = t(title)
      tbody
        - @exercise.send(symbol).distinct().each do |user|
          - if user_statistics[user.id] then us = user_statistics[user.id] else us = {"maximum_score" => nil, "runs" => nil}
          - label = "#{user.displayname}"
          tr
            td = link_to_if symbol==:external_users, label, {controller: "exercises", action: "statistics", external_user_id: user.id, id: @exercise.id}
            td = us['maximum_score'] or 0
            td = us['runs']
            td = @exercise.average_working_time_for(user.id) or 0
{'fraction_non_alphanumeric': 0.1585396349087272, 'fraction_numerical': 0.006001500375093774, 'mean_word_length': 3.489337822671156, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4541256', 'n_tokens_mistral': 1396, 'n_tokens_neox': 1326, 'n_words': 246}