Files
codeocean/app/views/exercises/feedback.html.slim
Sebastian Serth 9a9efd5caa Lint Slim files and fix offenses
The fixing was partially done manually and partially automatically.
2024-04-18 08:31:24 +02:00

38 lines
2.1 KiB
Plaintext

h1 = link_to_if(policy(@exercise).show?, @exercise, exercise_path(@exercise))
.feedback-page
.header = t('activerecord.attributes.exercise.description')
.value = render_markdown(@exercise.description)
span.header.col-sm-3.ps-0 = "#{t('activerecord.attributes.exercise.maximum_score')}:"
span.col-sm-9 =< @exercise.maximum_score
.header.mt-3 = t('activerecord.models.user_exercise_feedback.other')
- if @feedbacks.blank?
.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#heading role='tab'
.clearfix.feedback-header
- if policy(@exercise).detailed_statistics?
span.username = link_to_if(policy(feedback.user).show?, feedback.user.displayname, statistics_external_user_exercise_path(id: @exercise.id, external_user_id: feedback.user.id))
- if feedback.anomaly_notification
i.fa-regular.fa-envelope data-bs-placement='top' data-bs-toggle='tooltip' data-bs-container='body' title=feedback.anomaly_notification.reason
span.date = feedback.created_at
.card-collapse role='tabpanel'
.card-body.feedback
.text style="white-space: pre-wrap;" = feedback.feedback_text
.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
- if policy(@exercise).detailed_statistics?
.card-footer
.clearfix.feedback-header
span.points.flex-grow-1 = "#{t('exercises.statistics.score')}: #{@submissions[index].score}"
span.working_time.float-end = "#{t('exercises.statistics.worktime')}: #{@exercise.average_working_time_for(feedback.user) || 0}"
= render('shared/pagination', collection: @feedbacks)