appendIsSolutionAccepted(job, acceptedSolution);
if (acceptedSolution) {
TempFile tmpsrc = null;
Task task = mediator.getContestManager().getTaskByName(job.getContestId(),
job.getTask());
if (task == null || job.getUserid() == null) {
LogSubmit.log(job.getUserid() + ", Exception - NOT OK");
} else {
updateAccumulatedResult(job.getContestId(), task, job.getUserid(), job
.getGradeResult());
}
try {
if (job.src instanceof TempFile) {
tmpsrc = (TempFile) job.src;
} else {
throw new java.io.IOException(
"!critical: OnMsgGmSubmitDone: job.src not type of TempFile-impossible");
}
String srcFilename = job.srcFilename;
if (srcFilename == null) {
throw new java.io.IOException(
"!critical: OnMsgGmSubmitDone: job.srcFilename is null-impossible");
}
mediator.submitSourceCode(job.getContestId(),
job.getUserid(),
job.getTask(),
tmpsrc,
job.getLanguage(),
srcFilename,
job.getGradeResult().getSampleOutput());
if (Task.PROBLEM_TYPE_OUTPUT != task.getType()) {
gradeAfterSubmit(job.getContestId(), job.getUserid(), job.getTask(), job
.getLanguage());
}
} catch (java.io.IOException e) {
Syslog.log("!OnMsgCaSubmitDone: " + Util.stackTrace(e));