Skip to content

Commit 1668762

Browse files
authored
Merge branch 'main' into use_chroot_ci_tests
2 parents 62c4cc0 + 2357c0c commit 1668762

File tree

8 files changed

+17
-9
lines changed

8 files changed

+17
-9
lines changed

submit/submit_standalone.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ setup() {
1818
@test "baseurl set in environment" {
1919
run ./submit
2020
assert_failure 1
21-
assert_regex "$SUBMITBASEHOST.*/api(/.*)?/contests.*\[Errno -2\] Name or service not known"
21+
assert_regex "$SUBMITBASEHOST"
2222
}
2323

2424
@test "baseurl via parameter overrides environment" {

webapp/src/DataTransferObject/Shadowing/ContestEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public function __construct(
99
public readonly string $name,
1010
public readonly string $duration,
1111
public readonly ?string $scoreboardType,
12-
public readonly int $penaltyTime,
12+
public readonly ?int $penaltyTime,
1313
public readonly ?string $formalName,
1414
public readonly ?string $startTime,
1515
public readonly ?string $countdownPauseTime,

webapp/src/Service/BalloonService.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ public function collectBalloonTable(Contest $contest, bool $todo = false): array
125125
continue;
126126
}
127127

128+
$stime = $balloonsData['submittime'];
129+
130+
if (isset($freezetime) && $stime >= $freezetime) {
131+
continue;
132+
}
133+
128134
$TOTAL_BALLOONS[$balloonsData['teamid']][$balloonsData['probshortname']] = $balloonsData[0]->getSubmission()->getContestProblem();
129135
}
130136

webapp/src/Service/ExternalContestSourceService.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ protected function validateAndUpdateContest(Event $event, EventData $data): void
766766

767767
// Also compare the penalty time
768768
$penaltyTime = $data->penaltyTime;
769-
if ($this->config->get('penalty_time') != $penaltyTime) {
769+
if ($penaltyTime !== null && $this->config->get('penalty_time') != $penaltyTime) {
770770
$this->logger->warning(
771771
'Penalty time does not match between feed (%d) and local (%d)',
772772
[$penaltyTime, $this->config->get('penalty_time')]
@@ -863,9 +863,11 @@ protected function validateLanguage(Event $event, EventData $data): void
863863
} else {
864864
$this->removeWarning($event->type, $data->id, ExternalSourceWarning::TYPE_DATA_MISMATCH);
865865

866-
$toCheck = ['extensions' => $data->extensions];
866+
if ($data->extensions !== null) {
867+
$toCheck = ['extensions' => $data->extensions];
867868

868-
$this->compareOrCreateValues($event, $data->id, $language, $toCheck);
869+
$this->compareOrCreateValues($event, $data->id, $language, $toCheck);
870+
}
869871
}
870872
}
871873

webapp/src/Service/ScoreboardService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function getScoreboard(
6767
if (!$freezeData->started() && !$jury && !$forceUnfrozen) {
6868
return null;
6969
}
70-
$restricted = ($jury || $freezeData->showFinal(false));
70+
$restricted = ($jury || $freezeData->showFinal(false) || $forceUnfrozen);
7171

7272
$teams = $this->getTeamsInOrder($contest, $jury && !$visibleOnly, $filter, $restricted);
7373
$problems = $this->getProblems($contest);

webapp/templates/jury/submission_source.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{% if submission.resubmissions is not empty %}
2424
(resubmitted as
2525
{%- for resubmission in submission.resubmissions %}
26-
<a href="{{ path('jury_submission', {submitId: resubmission.originalSubmission.submitid}) }}">s{{ resubmission.submitid }}</a>
26+
<a href="{{ path('jury_submission', {submitId: resubmission.submitid}) }}">s{{ resubmission.submitid }}</a>
2727
{%- if not loop.last -%},{%- endif -%}
2828
{%- endfor -%}
2929
)

webapp/templates/public/team_submissions.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
data-problem-id="{{ problem.externalId }}"
1515
data-submissions-url="{{ path('public_submissions_data_cell', {teamId: team.externalid, problemId: problem.externalId}) }}">
1616
<div class="spinner-border" role="status">
17-
<span class="sr-only">Loading...</span>
17+
<span class="visually-hidden">Loading...</span>
1818
</div>
1919
{% include 'public/partials/submission_list_template.html.twig' %}
2020
</div>

webapp/templates/public/team_submissions_modal.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
{% block content %}
1212
<div class="spinner-border" role="status">
13-
<span class="sr-only">Loading...</span>
13+
<span class="visually-hidden">Loading...</span>
1414
</div>
1515
{% endblock %}

0 commit comments

Comments
 (0)