-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apetty/chal 1742 allow cm to set required submission uploads v4 (#1220)
* Add new fields to Challenge schema via migrations Include submission_collection_method in challenges to specify how submissions are collected. Add file_upload_required boolean field to determine if file uploads are necessary. Insert upload_instruction_note field to provide file upload guidance to users. * Enhance Content Manager experience for submission links - Allow Content Managers to require file uploads for internal submissions. - Enable Content Managers to add instructions for Solvers on file uploads. - Ensure the how-to-enter flow correctly handles internal submissions by setting 'how_to_enter_link' to nil. - Update how-to-enter flow for external submission types to clear 'upload_instruction_note' and 'file_upload_required' to avoid saving outdated information. Note: Solver interface implementation for this feature is pending at the time of this commit. * Implement file upload requirement validation for submissions - Enabled successful submission postings without a required file upload (). - Introduced server-side validation for mandatory file uploads (), failing submissions without attached files with . - Verified server behavior for successful submissions with required file uploads when a document is attached, indicated by responses in logs. - Implemented conditional validation logic, now accurately recognizes and enforces the flag: - Established robust logging to confirm functionality of the upload requirement feature. - Ensured remains correctly associated with during file attachments, for both flag states. - Note: Care taken not to disrupt existing submission-document association process. * Refactor submission handling and form validation - Fixed compiler warnings related to undefined or unused variables. - Adjusted the solver submission form to conditionally enforce file uploads based on challenge manager configurations. - Applied intended style updates to enhance the form's user interface. * Fix submission process issues - Add missing assigns to render calls in submission_controller - Refactor update action to use helper functions for clarity - Correct naming conflict with render function - Ensure file upload validation is enforced during submission * Format code with mix format * Refactor code based on credo feedback * Apply Elixir formatter to submissions.ex * Refactor submissions tests and update migrations to handle file uploads - Updated migrations to ensure required columns only added if not exist - Adjusted submissions tests to pass correct arity to function calls - Refactored unit test code to account for new file upload requirements in challenges * minor tuning * Fix incorrect arity in Submissions.update_review calls within tests * Fix syntax error in migration file * Worked around Ecto schema preload issue in submission tests
- Loading branch information
1 parent
31d38b8
commit bc5259f
Showing
17 changed files
with
1,615 additions
and
1,291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
elixir 1.12.3 | ||
erlang 23.3.2 | ||
#nodejs 16.13.0 | ||
nodejs 18.17.1 | ||
yarn 1.22.5 | ||
#erlang 24.2 | ||
nodejs 16.13.0 | ||
yarn 1.22.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.