def registration_notice_fragment(request): rc = request.contest.controller.registration_controller() if (isinstance(rc, OIRegistrationController) and request.user.is_authenticated and not is_contest_admin(request) and not is_participant(request)): return render_to_string('oi/registration_notice.html', request=request) else: return None
def can_submit(self, request, problem_instance, check_round_times=True): if request.user.is_anonymous(): return False if request.user.has_perm("contests.contest_admin", self.contest): return True if not is_participant(request): return False return super(OIContestController, self).can_submit(request, problem_instance, check_round_times)
def can_submit(self, request, problem_instance, check_round_times=True): if request.user.is_anonymous(): return False if request.user.has_perm('contests.contest_admin', self.contest): return True if not is_participant(request): return False return super(PAContestController, self) \ .can_submit(request, problem_instance, check_round_times)
def registration_notice_fragment(request): rc = request.contest.controller.registration_controller() if isinstance(rc, PARegistrationController) \ and request.user.is_authenticated \ and not is_contest_admin(request) \ and not is_participant(request) \ and rc.can_register(request): return render_to_string('pa/registration-notice.html', request=request) else: return None
def registration_notice_fragment(request): rc = request.contest.controller.registration_controller() if ( isinstance(rc, OIRegistrationController) and request.user.is_authenticated() and not is_contest_admin(request) and not is_participant(request) ): return render_to_string("oi/registration_notice.html", context_instance=RequestContext(request)) else: return None