Skip to content

Add two features: the ability to view the first failed test case and to copy and paste code directly. #2696

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

Closed
wants to merge 17 commits into from

Conversation

as6325400
Copy link
Contributor

Motivation:

  1. I have served as a teaching assistant for several courses, such as Data Structures and Programming, where DOMjudge was used in class. For beginners, it's often the case that a simple mistake or a small oversight of edge cases can lead to many "wrong answer" results. I believe this can be quite frustrating for those just learning to program. On platforms like Codeforces, you can see which test case your solution failed on, and on LeetCode, when a solution is not accepted (non-AC), the incorrect test case is often provided. Therefore, I believe these two features would be very useful for educational purposes.

  2. As for the process of uploading code as files, I often find it a bit inconvenient. In online judges like Codeforces and Luogu, there are features allowing users to paste code directly. I believe this is a very convenient feature to have.

Implementation:

These features can all be toggled on or off in the configuration settings.

Most of them are adapted from the jury interface.

  1. Teams can view the status of each test case from their interface.
    截圖 2024-09-19 凌晨12 19 31

  2. For non-correct and non-compile error submissions, the first failed test case will be displayed.截圖 2024-09-19 凌晨12 18 26

  3. A navigation tab is provided for users to choose between uploading a file or pasting code.

  1. Configuration setting
    截圖 2024-09-19 凌晨12 28 07

Copy link

gitguardian bot commented Sep 18, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- - Generic Password 88e7d2a docker-compose.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@meisterT
Copy link
Member

General comment: this PR contains a lot of unrelated code changes including passwords that you probably should change.

As for the additional features: I don't think we should incorporate sharing results with contestants in main and it's probably ok to keep this functionality in your fork. Also note that with parallel judging you are exposing more to contestants than you likely want to expose.

The source code editor behind a toggle sounds like a reasonable feature. We might switch at a later point from Ace editor to Monaco (#2689) but this shouldn't make it more complex. Can you please try to extract your changes to add this functionality in a separate PR?

@as6325400
Copy link
Contributor Author

General comment: this PR contains a lot of unrelated code changes including passwords that you probably should change.

As for the additional features: I don't think we should incorporate sharing results with contestants in main and it's probably ok to keep this functionality in your fork. Also note that with parallel judging you are exposing more to contestants than you likely want to expose.

The source code editor behind a toggle sounds like a reasonable feature. We might switch at a later point from Ace editor to Monaco (#2689) but this shouldn't make it more complex. Can you please try to extract your changes to add this functionality in a separate PR?

Alright, I will submit a separate PR for the source code editor later. Thank you!

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.

2 participants