return contestants.get(userLogin);
}
public boolean test(Contest contest, String userId, String task, String language,
String sourceFileName, byte[] sourceFileData, String stdinFileName, byte[] stdinFileData) {
User user = getUser(contest, userId);
if (user == null)
return false;
TempFile tmp = null;
TempFile tmp2 = null;
try {
tmp = TempFile.createFromByteArray(sourceFileData);
if (stdinFileName != null && stdinFileData != null) {
tmp2 = TempFile.createFromByteArray(stdinFileData);
}
} catch (java.io.IOException e) {
Syslog.log("IOIGraderImpl: submit: " + e.toString());
return false;
}
if (contest == null || !contest.isTestingOn())
return false;
if (!user.getTestState().start())
return false;
mediator.test(contest.getId(), userId, task, language, tmp, tmp2, user);
LogTest.log(userId + ",START");
return true;