Experimental support for simplified judgement types #1162
Merged
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.
Adds a new optional property to judgement types, 'simplified_judgement_type_id'. If this is set, any judgements with this type are changed to the simplified judgement type for other teams or anyone who is unauthenticated. (i.e. you can see the detail on your judgements, but not for other teams)
To try this out, set up a contest with a bunch of submissions and judgements, and at least one team account. Create a judgement-types.json in the contest root by capturing the current output of /judgement-types (or just create the content manually). Then add the new property to some of the judgements, e.g.:
[{"id":"OLE","name":"output limit","penalty":true,"solved":false,"simplified_judgement_type_id":"FAIL"}, {"id":"PE","name":"presentation error","penalty":true,"solved":false,"simplified_judgement_type_id":"FAIL"}, {"id":"WA","name":"wrong answer","penalty":true,"solved":false,"simplified_judgement_type_id":"FAIL"}]The id can point to one of the existing judgement types, or you can create a new one for this purpose, e.g.:
[{"id":"FAIL","name":"just plain wrong","penalty":true,"solved":false}]I didn't do any optimization yet, this is just an PoC to see if this is where the Contest API should go.