Files
codeocean/app/views/user_mailer/exercise_anomaly_detected.html.slim
Sebastian Serth 9485c15c57 Fix exercise anomaly detection
* The SQL query and mail template was erroneous
* Including the `url_helpers` influenced the specs due different url helpers within the specs. Test by executing `rspec './spec/db/seeds_spec.rb[1:1:1]' './spec/features/request_for_comments_filter_spec.rb[1:1]' -f progress --fail-fast --seed 55564`
2021-04-07 14:06:33 +02:00

39 lines
1.5 KiB
Plaintext

== t('mailers.user_mailer.exercise_anomaly_detected.body1',
receiver_displayname: @receiver_displayname,
collection_name: @collection.name)
table(border=1)
thead
tr
td = t('activerecord.attributes.exercise.title', locale: :de)
td = t('exercises.statistics.average_worktime', locale: :de)
td = t('shared.actions', locale: :de)
tbody
- @anomalies.keys.each do | id |
- exercise = Exercise.find(id)
tr
td = link_to_if(ExercisePolicy.new(@user, exercise).show?, exercise.title, exercise_url(exercise))
td = @anomalies[id]
td = link_to_if(ExercisePolicy.new(@user, exercise).statistics?, t('shared.statistics', locale: :de), statistics_exercise_url(exercise))
== t('mailers.user_mailer.exercise_anomaly_detected.body2',
receiver_displayname: @receiver_displayname,
collection_name: @collection.name)
table(border=1)
thead
tr
td = t('activerecord.attributes.exercise.title', locale: :en)
td = t('exercises.statistics.average_worktime', locale: :en)
td = t('shared.actions', locale: :en)
tbody
- @anomalies.keys.each do | id |
- exercise = Exercise.find(id)
tr
td = link_to_if(ExercisePolicy.new(@user, exercise).show?, exercise.title, exercise_url(exercise))
td = @anomalies[id]
td = link_to_if(ExercisePolicy.new(@user, exercise).statistics?, t('shared.statistics', locale: :en), statistics_exercise_url(exercise))
== t('mailers.user_mailer.exercise_anomaly_detected.body3')