-
Notifications
You must be signed in to change notification settings - Fork 24
Reject.ini
A reject.ini file is a text file used to define the judgement messages which can be returned to a team when a submission is rejected by the judges. The reject.ini file is loaded when a server is first started.
The reject.ini file normally does not contain the "Correct" ("Yes", "Accepted") judgement message; that judgement is added automatically by the PC2 server upon startup (however, see below for an update starting with PC2 Version 9.6).
If the reject.ini file is not present in the working directory on server startup then a set of default judgements are loaded; see below for details.
The contents of the reject.ini file are loaded at the first startup of the Primary server. After judgements have been loaded into the configuration database, the judgements are not re-loaded (however, a user can use the PC2 Admin's Edit Judgement function to add judgements).
reject.ini is a text file that contains a list of "No" Judgements, one judgement per line. Blank lines are ignored, as are lines starting with a hash (#). All lines are trimmed using the Java String.trim() method.
The PC2 distribution comes with a reject.ini file which contains the following:
Compilation Error
Run-time Error
Time-limit Exceeded
Wrong Answer
Excessive Output
Output Format Error
Other - Contact Staff
If this file is present in the server's startup folder it results the following judgements being defined:
Yes
No - Compilation Error
No - Run-time Error
No - Time-limit Exceeded
No - Wrong Answer
No - Excessive Output
No - Output Format Error
No - Other - Contact Staff
To support judgement acronyms, starting with PC2 Version 9.6 there
is support for an optional judgement acronym on each reject.ini file line.
The alternate line form is: Judgement text|acronym
For example, the following lines could appear in a reject.ini file to define judgement messages identical to those shown above, but which also have the specified acronym associated with the respective judgement:
Compilation Error|CE
Run-time Error|RTE
Time-limit Exceeded|TLE
Wrong Answer|WA
Excessive Output|EO
Output Format Error|OFE
Other - Contact Staff|CS
In addition to supporting specification of judgement acronyms, an additional new feature starting with Version 9.6 is that the "Correct" ("Yes", "accepted") judgement text may also be specified. This is done by adding a line to the reject.ini file containing the judgement acronym "AC". An AC line can appear anywhere in the reject.ini file. The text on the AC line (preceding the vertical bar) specifies the message associated with the "correct" judgement.
As an example, the following line can appear anywhere in the reject.ini file and defines that the text for submissions which are correct is to be "Accepted":
Accepted|AC
If no reject.ini file is present in the server's startup folder, then the following default judgements are automatically configured into PC2:
Yes
No - compilation error
No - run-time error
No - time-limit exceeded
No - wrong answer
No - presentation error