diff --git a/app/assets/javascripts/editor/editor.js.erb b/app/assets/javascripts/editor/editor.js.erb index 9c38aca6..f978ad0a 100644 --- a/app/assets/javascripts/editor/editor.js.erb +++ b/app/assets/javascripts/editor/editor.js.erb @@ -584,9 +584,9 @@ configureEditors: function () { method: 'GET', url: $('#editor').data('working-times-url'), success: function (data) { - var avg = data['working_time_avg']; + var percentile75 = data['working_time_75_percentile']; var accu = data['working_time_accumulated']; - $('#avg-working-time').text(`avg time: ${avg} and accumulated time: ${accu}`); + $('#avg-working-time').text(`75th percentile: ${percentile75} and accumulated time: ${accu}`); setTimeout(function() { $('#intervention-modal').modal('show') }, 10000); diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index c2d50125..b9f4972b 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -168,8 +168,8 @@ class ExercisesController < ApplicationController def working_times working_time_accumulated = @exercise.accumulated_working_time_for_only(current_user.id) - working_time_avg = @exercise.get_quantiles([0.75]).first - render(json: {working_time_avg: working_time_avg, working_time_accumulated: working_time_accumulated}) + working_time_75_percentile = @exercise.get_quantiles([0.75]).first + render(json: {working_time_75_percentile: working_time_75_percentile, working_time_accumulated: working_time_accumulated}) end def index