Translate feedback to text meaning
This commit is contained in:
@ -12,6 +12,8 @@ h1 = link_to_if(policy(@exercise).show?, @exercise, exercise_path(@exercise))
|
||||
.no-feedback = t('user_exercise_feedback.no_feedback')
|
||||
|
||||
ul.list-unstyled
|
||||
- comment_presets = UserExerciseFeedbacksController.new.comment_presets
|
||||
- time_presets = UserExerciseFeedbacksController.new.time_presets
|
||||
- @feedbacks.each_with_index do |feedback, index|
|
||||
li.card.mt-2
|
||||
.card-header role="tab" id="heading"
|
||||
@ -23,8 +25,8 @@ h1 = link_to_if(policy(@exercise).show?, @exercise, exercise_path(@exercise))
|
||||
.card-collapse role="tabpanel"
|
||||
.card-body.feedback
|
||||
.text = feedback.feedback_text
|
||||
.difficulty = "#{t('user_exercise_feedback.difficulty')} #{feedback.difficulty}" if feedback.difficulty
|
||||
.worktime = "#{t('user_exercise_feedback.working_time')} #{feedback.user_estimated_worktime}" if feedback.user_estimated_worktime
|
||||
.difficulty = "#{t('user_exercise_feedback.difficulty')} #{comment_presets[feedback.difficulty].join(' - ')}" if feedback.difficulty
|
||||
.worktime = "#{t('user_exercise_feedback.working_time')} #{time_presets[feedback.user_estimated_worktime].join(' - ')}" if feedback.user_estimated_worktime
|
||||
.card-footer
|
||||
span.points = "#{t('exercises.statistics.score')}: #{@submissions[index].score}"
|
||||
span.working_time.pull-right = "#{t('exercises.statistics.worktime')}: #{@exercise.average_working_time_for(feedback.user.id) or 0}"
|
||||
|
Reference in New Issue
Block a user