예제 #1
0
파일: controllers.py 프로젝트: tmkkk/oioioi
    def get_round_times(self, request, round):
        """Determines the times of the round for the user doing the request.

        The default implementation returns an instance of
        :class:`RoundTimes` cached by round_times() method.

        Round must belong to request.contest.
        Request is optional (round extensions won't be included if omitted).

        :returns: an instance of :class:`RoundTimes`
        """
        if request is not None:
            return rounds_times(request, self.contest)[round]
        else:
            return generic_rounds_times(None, self.contest)[round]
예제 #2
0
    def get_round_times(self, request, round):
        """Determines the times of the round for the user doing the request.

           The default implementation returns an instance of
           :class:`RoundTimes` cached by round_times() method.

           Round must belong to request.contest.
           Request is optional (round extensions won't be included if omitted).

           :returns: an instance of :class:`RoundTimes`
        """
        if request is not None:
            return rounds_times(request, self.contest)[round]
        else:
            return generic_rounds_times(None, self.contest)[round]