edit comment and pdf export
Some checks failed
/ Run tests (push) Successful in 2m6s
/ Run system tests (push) Failing after 2m29s
/ Build, push and deploy image (push) Successful in 1m46s

This commit is contained in:
david 2024-11-23 21:11:01 +01:00
parent 110d75f2b7
commit c36230b8ba
10 changed files with 90 additions and 19 deletions

View file

@ -15,6 +15,8 @@ class Element < ApplicationRecord
attachable.variant :thumbnail, resize_to_limit: [ 200, 200 ]
end
scope :failed, -> { where(SuccessCriterion.where(result: SuccessCriterion.results[:failed]).arel.exists) }
# Calculate actual conformity level:
# - if a success_criterion has result :failed -> the confirmity_level
# of that success_criterion is not reached.