Package kr.or.ioi2002.RMIServer

Examples of kr.or.ioi2002.RMIServer.LogGrade


            Contest contest = contestManager.getContest(request);
            if (contest == null) {
                response.sendRedirect("");
                return;
            }
            User user = contestManager.getUser(contest.getId(), userLogin);
            user.getGeneralState().setOutputNow("File not found");
            request.getSession().setAttribute("tab", "General");
            response.sendRedirect("main");
            return;
        }
        int length = fileAsBytes.length;
View Full Code Here


    protected void service(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        SessionUtil sessionUtil = SessionUtil.getInstance();
        String userLogin = sessionUtil.getLoginManager().getActiveUserLogin(request);
        String contestId = request.getParameter("contestId");
        User user = sessionUtil.getContestManager().getUser(contestId, userLogin);
        if (user != null) {
            request.getSession().setAttribute("contestId", contestId);
            response.sendRedirect("main");
        } else {
            response.sendRedirect("chooseContest");
View Full Code Here

        return contest.hasTaskNamed(taskName);
    }

    public boolean submitSourceCode(String contestId, String userid, String task, TempFile tmpsrc,
            String language, String srcFilename, String output) throws IOException {
        User user = contestManager.getUser(contestId, userid);
        if (user == null)
            return false;

        return user.submitSourceCode(task, tmpsrc, language, srcFilename, output);
    }
View Full Code Here

        return user.submitSourceCode(task, tmpsrc, language, srcFilename, output);
    }

    public boolean submitAttemptFailed(String contestId, String userid, String task, String output) {
        User user = contestManager.getUser(contestId, userid);
        if (user == null)
            return false;

        return user.submitAttemptFailed(task, output);
    }
View Full Code Here

        return user.submitAttemptFailed(task, output);
    }

    public boolean testFinish(String contestId, String userid, String task, String output) {
        User user = contestManager.getUser(contestId, userid);
        if (user == null)
            return false;

        return user.getTestState().finished(output);
    }
View Full Code Here

        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;
View Full Code Here

        return true;
    }

    public boolean submit(Contest contest, String userId, Task task, String language,
            String sourceFileName, byte[] sourceFileData, boolean alwaysAccept) {
        User user = getUser(contest, userId);
        if (user == null)
            return false;

        TempFile tmp = null;
        try {
            tmp = TempFile.createFromByteArray(sourceFileData);
        } catch (java.io.IOException e) {
            Syslog.log("ContestManager: submit: " + e.toString());
            return false;
        }

        if (contest == null || !contest.isRunning())
            return false;

        if (!user.getSubmitState(task.getName()).start())
            return false;

        mediator.submit(contest.getId(),
                userId,
                task,
View Full Code Here

        LogSubmit.log(userId + ",START");
        return true;
    }

    public File getSourceCode(Contest contest, String userid, String task) {
        User user = getUser(contest, userid);
        if (user == null)
            return null;

        return user.getSourceCode(task);
    }
View Full Code Here

        return user.getSourceCode(task);
    }

    public File getSourceCode(String contestId, String userid, String task) {
        User user = getUser(contestId, userid);
        if (user == null)
            return null;

        return user.getSourceCode(task);
    }
View Full Code Here

        return user.getSourceCode(task);
    }

    public String getSourceCodeLanguage(String contest, String userid, String task) {
        User user = getUser(contest, userid);
        if (user == null)
            return null;

        return user.getSourceCodeLanguage(task);
    }
View Full Code Here

TOP

Related Classes of kr.or.ioi2002.RMIServer.LogGrade

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.