Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show list of submissions on public and team scoreboards when clicking on a cell #2918

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

nickygerritsen
Copy link
Member

Fixes #2427

image

Copy link

sentry-io bot commented Feb 28, 2025

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: webapp/src/Controller/PublicController.php

Function Unhandled Issue
App\Controller\PublicController::getBinaryFile Symfony\Component\HttpKernel\Exception\NotFoundHttpException: Problem p5 not found or not available /src/Service/DOMJudgeService.php in App\Ser...
Event Count: 1

Did you find this useful? React with a 👍 or 👎

Copy link

github-actions bot commented Feb 28, 2025

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 35d8904. ± Comparison against base commit b42218d.

♻️ This comment has been updated with latest results.

@cubercsl
Copy link
Contributor

cubercsl commented Mar 1, 2025

Is it reasonable to see the specific judging results (during the contest) (rather than AC and RJ) on the public list? The current API cannot obtain the specific results without admin/jury role. This seems to provide additional information to the team.

@meisterT
Copy link
Member

meisterT commented Mar 1, 2025

Through which API endpoint can a team (or the public) see the exact verdicts (e.g. TLE) through the API for submissions of other teams?

@nickygerritsen
Copy link
Member Author

The judgement API is public info for all submissions pre-freeze, which shows this information.
So we are not showing more than the API provides, right?

@meisterT
Copy link
Member

meisterT commented Mar 1, 2025

@nickygerritsen I think @cubercsl 's comment is that we show more in the API than here, so we should also include that info. I would rather consider it a bug in the API if we would show more, than to expose it here.

Regardless, I don't actually think we expose more since you only have access to the judgements endpoint when authenticated and as a team you get only info about your own submissions.

Try running something like this:

$ http https://www.domjudge.org/demoweb/api/contests/nwerc18/judgements       
HTTP/1.1 401 Unauthorized
Cache-Control: max-age=0, must-revalidate, private
Connection: Upgrade, Keep-Alive
Content-Length: 0
Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; img-src 'self' data: secure.gravatar.com
Content-Type: application/json
Date: Sat, 01 Mar 2025 07:59:51 GMT
Expires: Sat, 01 Mar 2025 07:59:51 GMT
Keep-Alive: timeout=5, max=100
Referrer-Policy: strict-origin-when-cross-origin, same-origin
Server: Apache/2.4.61 (Debian)
Strict-Transport-Security: max-age=31556952
Upgrade: h2,h2c
WWW-Authenticate: Basic realm="Secured Area"
X-Content-Type-Options: nosniff, nosniff
X-Current-Contest: 
X-Frame-Options: DENY, DENY
X-Xss-Protection: 1; mode=block, 1; mode=block




$ http -a team:team https://www.domjudge.org/demoweb/api/contests/nwerc18/judgements
HTTP/1.1 200 OK
Cache-Control: max-age=0, must-revalidate, private
Connection: Upgrade, Keep-Alive
Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; img-src 'self' data: secure.gravatar.com
Content-Type: application/json
Date: Sat, 01 Mar 2025 07:59:59 GMT
Expires: Sat, 01 Mar 2025 07:59:59 GMT
Keep-Alive: timeout=5, max=100
Referrer-Policy: strict-origin-when-cross-origin, same-origin
Server: Apache/2.4.61 (Debian)
Strict-Transport-Security: max-age=31556952
Transfer-Encoding: chunked
Upgrade: h2,h2c
X-Content-Type-Options: nosniff, nosniff
X-Current-Contest: 
X-Frame-Options: DENY, DENY
X-Xss-Protection: 1; mode=block, 1; mode=block

[
    {
        "end_contest_time": "0:12:20.531",
        "end_time": "2018-11-25T09:12:20.531+00:00",
        "id": "10048",
        "judgement_type_id": "AC",
        "max_run_time": null,
        "start_contest_time": "0:12:13.759",
        "start_time": "2018-11-25T09:12:13.759+00:00",
        "submission_id": "8106",
        "valid": true
    },
    {
        "end_contest_time": "0:16:41.921",
        "end_time": "2018-11-25T09:16:41.921+00:00",
        "id": "10101",
        "judgement_type_id": "AC",
        "max_run_time": null,
        "start_contest_time": "0:16:28.120",
        "start_time": "2018-11-25T09:16:28.120+00:00",
        "submission_id": "8159",
        "valid": true
    },
    {
        "end_contest_time": "0:23:46.518",
        "end_time": "2018-11-25T09:23:46.518+00:00",
        "id": "10169",
        "judgement_type_id": "AC",
        "max_run_time": null,
        "start_contest_time": "0:23:31.335",
        "start_time": "2018-11-25T09:23:31.335+00:00",
        "submission_id": "8227",
        "valid": true
    },
    {
        "end_contest_time": "0:50:10.925",
        "end_time": "2018-11-25T09:50:10.925+00:00",
        "id": "10355",
        "judgement_type_id": "AC",
        "max_run_time": null,
        "start_contest_time": "0:49:11.149",
        "start_time": "2018-11-25T09:49:11.149+00:00",
        "submission_id": "8413",
        "valid": true
    },
    {
        "end_contest_time": "1:06:55.042",
        "end_time": "2018-11-25T10:06:55.042+00:00",
        "id": "10458",
        "judgement_type_id": "WA",
        "max_run_time": null,
        "start_contest_time": "1:06:32.444",
        "start_time": "2018-11-25T10:06:32.444+00:00",
        "submission_id": "8514",
        "valid": true
    },
    {
        "end_contest_time": "1:15:12.866",
        "end_time": "2018-11-25T10:15:12.866+00:00",
        "id": "10499",
        "judgement_type_id": "AC",
        "max_run_time": null,
        "start_contest_time": "1:14:49.777",
        "start_time": "2018-11-25T10:14:49.777+00:00",
        "submission_id": "8555",
        "valid": true
    },
    {
        "end_contest_time": "2:05:48.557",
        "end_time": "2018-11-25T11:05:48.557+00:00",
        "id": "10697",
        "judgement_type_id": "AC",
        "max_run_time": null,
        "start_contest_time": "2:05:34.377",
        "start_time": "2018-11-25T11:05:34.377+00:00",
        "submission_id": "8753",
        "valid": true
    },
    {
        "end_contest_time": "2:11:27.533",
        "end_time": "2018-11-25T11:11:27.533+00:00",
        "id": "10725",
        "judgement_type_id": "WA",
        "max_run_time": null,
        "start_contest_time": "2:11:13.814",
        "start_time": "2018-11-25T11:11:13.814+00:00",
        "submission_id": "8781",
        "valid": true
    },
    {
        "end_contest_time": "2:27:40.768",
        "end_time": "2018-11-25T11:27:40.768+00:00",
        "id": "10786",
        "judgement_type_id": "AC",
        "max_run_time": null,
        "start_contest_time": "2:27:29.329",
        "start_time": "2018-11-25T11:27:29.329+00:00",
        "submission_id": "8842",
        "valid": true
    },
    {
        "end_contest_time": "2:42:00.152",
        "end_time": "2018-11-25T11:42:00.152+00:00",
        "id": "10836",
        "judgement_type_id": "AC",
        "max_run_time": null,
        "start_contest_time": "2:41:23.089",
        "start_time": "2018-11-25T11:41:23.089+00:00",
        "submission_id": "8892",
        "valid": true
    },
    {
        "end_contest_time": "3:08:35.539",
        "end_time": "2018-11-25T12:08:35.539+00:00",
        "id": "10935",
        "judgement_type_id": "AC",
        "max_run_time": null,
        "start_contest_time": "3:08:21.160",
        "start_time": "2018-11-25T12:08:21.160+00:00",
        "submission_id": "8991",
        "valid": true
    },
    {
        "end_contest_time": "3:43:47.400",
        "end_time": "2018-11-25T12:43:47.400+00:00",
        "id": "11076",
        "judgement_type_id": "WA",
        "max_run_time": null,
        "start_contest_time": "3:43:16.557",
        "start_time": "2018-11-25T12:43:16.557+00:00",
        "submission_id": "9132",
        "valid": true
    },
    {
        "end_contest_time": "4:11:34.845",
        "end_time": "2018-11-25T13:11:34.846+00:00",
        "id": "11202",
        "judgement_type_id": "WA",
        "max_run_time": null,
        "start_contest_time": "4:11:10.824",
        "start_time": "2018-11-25T13:11:10.824+00:00",
        "submission_id": "9259",
        "valid": true
    },
    {
        "end_contest_time": "4:25:36.705",
        "end_time": "2018-11-25T13:25:36.705+00:00",
        "id": "11281",
        "judgement_type_id": "WA",
        "max_run_time": null,
        "start_contest_time": "4:25:13.300",
        "start_time": "2018-11-25T13:25:13.300+00:00",
        "submission_id": "9337",
        "valid": true
    },
    {
        "end_contest_time": "4:39:07.196",
        "end_time": "2018-11-25T13:39:07.196+00:00",
        "id": "11361",
        "judgement_type_id": "WA",
        "max_run_time": null,
        "start_contest_time": "4:38:43.327",
        "start_time": "2018-11-25T13:38:43.327+00:00",
        "submission_id": "9417",
        "valid": true
    },
    {
        "end_contest_time": "5:00:03.193",
        "end_time": "2018-11-25T14:00:03.193+00:00",
        "id": "11605",
        "judgement_type_id": "WA",
        "max_run_time": null,
        "start_contest_time": "4:59:58.685",
        "start_time": "2018-11-25T13:59:58.685+00:00",
        "submission_id": "9661",
        "valid": true
    }
]

@cubercsl let me know if you are thinking of a different endpoint since this one is behaving like it should.

@nickygerritsen
Copy link
Member Author

Wait but then we do show more in the UI now, since you can see TLE for other teams in the pop-up. Should we change it to show only accepted / rejected / pending?

@meisterT
Copy link
Member

meisterT commented Mar 1, 2025

Argh, and rereading the comment above, this was exactly what @cubercsl mentioned. So ignore my previous comments and we should change this to Accepted and Rejected or similar.

@nickygerritsen
Copy link
Member Author

Note that the API not being publicly accessible is not in line with the ICPC contest access policy, but I do agree we should be in sync between API and UI. Will fix

@nickygerritsen nickygerritsen requested a review from vmcj March 1, 2025 10:09
$submissions = $this->submissionService->getSubmissionList(
[$contest->getCid() => $contest],
new SubmissionRestriction(valid: true),
paginated: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For long running contests we would still get a long list?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For one team? We would if the team submits a lot. We can add this behind an option if this becomes a problem.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the modal scrollable?

@vmcj
Copy link
Member

vmcj commented Mar 3, 2025

@nickygerritsen can I squash it or will you force push yourself?

@nickygerritsen
Copy link
Member Author

@nickygerritsen can I squash it or will you force push yourself?

You do it, that's fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

During the freeze display a list of submission times of the different tries
5 participants