Skip to content

Fix #4351 : Reset Submission Type and Visibility on Challenge Submission #4473

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

PrasadCodesML
Copy link
Contributor

This PR ensures that all submission-related fields are reset after a successful submission, preventing unintended carryover of values as mentioned in the issue #4351

Changes Introduced :

  1. Reset submission-related values after submission in challengeCtrl.js:
    phaseId, submissionType, submissionVisibility, and related flags (isSubmissionUsingCli, isSubmissionUsingFile, etc.) are now reset to default values.

  2. Fixed submission type and visibility selection logic in submission.html:
    Ensured radio buttons properly update the submissionType and submissionVisibility values.
    Adjusted ng-click events to explicitly reset other submission options when one is selected.

Untitled.video.-.Made.with.Clipchamp.mp4

Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.35%. Comparing base (96968d6) to head (6c29f29).
Report is 1120 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4473      +/-   ##
==========================================
- Coverage   72.93%   69.35%   -3.58%     
==========================================
  Files          83       20      -63     
  Lines        5368     3580    -1788     
==========================================
- Hits         3915     2483    -1432     
+ Misses       1453     1097     -356     
Files with missing lines Coverage Δ
frontend/src/js/controllers/challengeCtrl.js 61.36% <100.00%> (-12.33%) ⬇️

... and 63 files with indirect coverage changes

Files with missing lines Coverage Δ
frontend/src/js/controllers/challengeCtrl.js 61.36% <100.00%> (-12.33%) ⬇️

... and 63 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88b8a4a...6c29f29. Read the comment docs.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@RishabhJain2018 RishabhJain2018 left a comment

Choose a reason for hiding this comment

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

Hey @PrasadCodesML , Can you please make sure that you are not changing any other lines in the codebase that are not required? Thanks!

@@ -191,8 +191,7 @@ <h5 class="w-300">Make Submission</h5>
<p class="fs-18 w-400">Select phase:</p>
<ul>
<li ng-repeat="item in challenge.phases.results">
<input
ng-disabled="challenge.currentDate < item.start_date || challenge.currentDate >= item.end_date"
<input ng-disabled="challenge.currentDate < item.start_date || challenge.currentDate >= item.end_date"
Copy link
Member

Choose a reason for hiding this comment

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

What is the change in this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@RishabhJain2018 made the changes you suggested

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