Corrige status de prova para 'finished' quando aluno finaliza durante…#75
Merged
biancastephani merged 5 commits intodevelopmentfrom Mar 30, 2026
Merged
Corrige status de prova para 'finished' quando aluno finaliza durante…#75biancastephani merged 5 commits intodevelopmentfrom
biancastephani merged 5 commits intodevelopmentfrom
Conversation
JailsonPLima03
approved these changes
Jan 6, 2026
biancastephani
requested changes
Jan 12, 2026
Member
biancastephani
left a comment
There was a problem hiding this comment.
Uma prova pode ter 1-N tentativas.
Com a correção feita, o sistema não me permite realizar novas tentativas, mesmo que eu possa.
Talvez a melhor situação seja a 'retake', analisar se isso é o suficiente
- Altera controller para retornar JSON ao invés de redirect - Corrige validação de tentativas no cálculo de status - Melhora comportamento do modal ao finalizar prova
Author
|
Correção feita. |
mirele-ufc
approved these changes
Jan 23, 2026
O erro "undefined method total_time for ExamUserAttempt" ocorria porque o código chamava diretamente o atributo total_time, que é interno do modelo. O método público correto é get_total_time. IMPORTANTE: Executar migração pendente para a branch A tabela exam_user_attempts não possui as colunas total_time e start_tmp. Essas colunas são adicionadas pela migração: db/migrate/20251112165314_add_start_tmp_exam_user_attempt.rb Que adiciona: - start_tmp (datetime) - total_time (integer, default: 0) rode rails db:migrate
helderufc
approved these changes
Jan 28, 2026
biancastephani
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descrição
Corrige o problema onde o status da prova aparecia como "não enviado" quando o aluno finalizava a prova durante o período ativo, mas antes do término.
Problema
academic_allocation_users.status = 1eexam_user_attempts.complete = trueSolução Implementada
Adiciona verificação para exibir status
'finished'quando:complete=TRUE)grade IS NULL)Detalhes Técnicos
app/models/score.rb(linha 699)'not_finished'(linha 698)grade IS NULLem vez destatus=1para maior precisão'not_finished'Como Testar