Distinguish between intermediate and final feedback

* Also add more information to user_exercise_feedback
* Migrate existing feedback to enrich with submissions
This commit is contained in:
Sebastian Serth
2020-10-20 13:50:04 +02:00
parent 712810dada
commit ad467fa58f
7 changed files with 63 additions and 9 deletions

View File

@ -101,9 +101,9 @@ class Submission < ApplicationRecord
end
def redirect_to_feedback?
# Redirect 10% of users to the exercise feedback page. Ensure, that always the
# same users get redirected per exercise and different users for different exercises.
# If desired, the number of feedbacks can be limited with exercise.needs_more_feedback?
# Redirect 10% of users to the exercise feedback page. Ensure, that always the same
# users get redirected per exercise and different users for different exercises. If
# desired, the number of feedbacks can be limited with exercise.needs_more_feedback?(submission)
(user_id + exercise.created_at.to_i) % 10 == 1
end