feat(assessment): record capture hints and keep one window per attempt
This commit is contained in:
1 parent
c975a0d506
commit
bb917bf62e
108 files changed
+6649
-139
No files matched your search
@@ -27,6 +27,10 @@ type SubmitAttemptAnswerCommand struct {
|
||||
// Origin is the sender of the request. It feeds the server signals only and
|
||||
// is not part of the idempotency fingerprint.
|
||||
Origin RequestOrigin
|
||||
// Client is the identifier of the open page, or empty when the request has
|
||||
// none. A page that does not hold the work session is refused while another
|
||||
// page does, and the refusal is not stored under the idempotency key.
|
||||
Client string
|
||||
}
|
||||
|
||||
type canonicalAttemptAnswerBody struct {
|
||||
@@ -135,6 +139,9 @@ func (service *AttemptService) submitNewAnswer(
|
||||
return fmt.Errorf("%s - read database time after consent and attempt locks: %w", location, err)
|
||||
}
|
||||
databaseTime = databaseTime.UTC().Truncate(time.Microsecond)
|
||||
if err := service.workSessions.requireHolder(ctx, unit, current, command.Client, databaseTime); err != nil {
|
||||
return fmt.Errorf("%s - check the holder of the work session: %w", location, err)
|
||||
}
|
||||
return service.persistSubmittedAnswer(ctx, unit, repository, scope, command, current, databaseTime, result)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user