Skip to content

Commit

Permalink
Fix scoring issues with special score_type_parameters in task_yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mraron committed Apr 7, 2024
1 parent 572a2a5 commit a49d73a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/problems/tasktype/batch/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,12 @@ func (b Batch) Run(judging problems.Judgeable, sp *language.SandboxProvider, lan

if _, ok := testCache[tc.InputPath]; ok {
tmpIndex, tmpGroup := tc.Index, tc.Group
maxScore := tc.MaxScore
*tc = *testCache[tc.InputPath]
tc.Index = tmpIndex
tc.Group = tmpGroup
tc.Score = 0.0
tc.MaxScore = 0.0
tc.Score = tc.Score / tc.MaxScore * maxScore
tc.MaxScore = maxScore
continue
}
testCache[tc.InputPath] = tc
Expand Down

0 comments on commit a49d73a

Please sign in to comment.