Optimize rendering testcases status
This commit is contained in:
parent
3ca7be189a
commit
72ff021a33
1 changed files with 8 additions and 1 deletions
|
@ -190,7 +190,14 @@ class SubmissionStatus(SubmissionDetailBase):
|
||||||
context['last_msg'] = event.last()
|
context['last_msg'] = event.last()
|
||||||
context['batches'] = group_test_cases(submission.test_cases.all())
|
context['batches'] = group_test_cases(submission.test_cases.all())
|
||||||
context['time_limit'] = submission.problem.time_limit
|
context['time_limit'] = submission.problem.time_limit
|
||||||
context['cases_data'] = get_problem_data(submission)
|
|
||||||
|
contest = submission.contest_or_none
|
||||||
|
prefix_length = 0
|
||||||
|
if (contest is not None):
|
||||||
|
prefix_length = contest.problem.output_prefix_override
|
||||||
|
if ((contest is None or prefix_length > 0) or self.request.user.is_superuser):
|
||||||
|
context['cases_data'] = get_problem_data(submission)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
lang_limit = submission.problem.language_limits.get(
|
lang_limit = submission.problem.language_limits.get(
|
||||||
language=submission.language)
|
language=submission.language)
|
||||||
|
|
Loading…
Reference in a new issue