Sort exercises in anomaly detection task according to position in exercise collection
This commit is contained in:
@ -69,9 +69,9 @@ namespace :detect_exercise_anomalies do
|
|||||||
|
|
||||||
def collect_working_times(collection)
|
def collect_working_times(collection)
|
||||||
working_times = {}
|
working_times = {}
|
||||||
collection.exercises.each do |exercise|
|
collection.exercise_collection_items.order(:position).each do |eci|
|
||||||
log(exercise.title, 2, '> ')
|
log(eci.exercise.title, 2, '> ')
|
||||||
working_times[exercise.id] = get_average_working_time(exercise)
|
working_times[eci.exercise.id] = get_average_working_time(eci.exercise)
|
||||||
end
|
end
|
||||||
working_times
|
working_times
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user