feat(procedure): estimate fill duration takes account of libelle & description read time

Sometimes long description on types de champ
significantly increases global fill duration.

140 words per minute is a good estimate of attentive off-voice read time.
(This is independent of characters per word).

Closes #7963
This commit is contained in:
Colin Darie 2022-10-27 20:13:21 +02:00
parent c59867b456
commit 7731c6ad64
5 changed files with 56 additions and 17 deletions

View file

@ -204,7 +204,7 @@ class ProcedureRevision < ApplicationRecord
def compute_estimated_fill_duration
tdc_durations = types_de_champ_public.fillable.map do |tdc|
duration = tdc.estimated_fill_duration(self)
duration = tdc.estimated_fill_duration(self) + tdc.estimated_read_duration
tdc.mandatory ? duration : duration / 2
end
tdc_durations.sum