-
Notifications
You must be signed in to change notification settings - Fork 226
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
Add user interface to upload config files, revamp file input fields #1883
Merged
Conversation
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
20wildmanj
requested changes
Apr 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Ran through testing strategy, checked that rb updating for course and assessments work
- Checked that forms still work
- Checked that deletions don't break anything
Overall, looks good, and lots of nice fixes. Just would like adding support for a label to the file_field before getting this merged.
20wildmanj
approved these changes
Apr 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
6 tasks
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
New
assessment#update
to handle assessment config updatescourse#update
to handle course config updatesfile_field
method forFormBuilderWithDateTimeInput
, update existing code that uses the FormBuilder's fieldDeletions
_upload_form.html.erb
filebulkGrade.css
assessments/new.html.erb
Changes
assessment.rb#source_config_file_path
public, since it's necessary for the controllerhandin_filename
course.rb
file to reflect the ability to upload files nowMotivation and Context
Currently, instructors have to manually modify course and assessment config files locally before reloading the files via the web interface. This PR makes it possible to upload the files directly through a UI, which will be especially convenient when it comes to Autolab on AWS.
How Has This Been Tested?
Part 1: Assessment config upload functionality
Navigate to: Edit Assessment > Basic
![Screenshot 2023-04-23 at 13 49 11](https://user-images.githubusercontent.com/9074856/233856208-268070bd-b5f2-4d91-9669-24f67b1654e0.png)
Upload a functional config file (i.e. the one that already exists in the Autolab directory)
Upload an incorrect config file (e.g. add a
1+1=2
insideassessmentInitialize
)Part 2: Course config upload functionality
Navigate to: Manage Course > Course settings
![Screenshot 2023-04-23 at 17 31 52](https://user-images.githubusercontent.com/9074856/233867336-af26f938-5d11-4673-8f94-89b6f65cae06.png)
Upload a functional config file (i.e. the one that already exists in the Autolab directory)
Upload an incorrect config file (e.g. add a
1+1=2
insidefooAverage
)Part 3: Improved file upload fields
Test functionality of all forms that used the FormBuilder AND
file_field
.This is a list of occurrences of
![Screenshot 2023-04-19 at 23 59 17](https://user-images.githubusercontent.com/9074856/233254721-db29f9f9-4469-4055-b7e3-f90895625649.png)
file_field
, but note that not every form uses the FormBuilder.Embedded file upload
![Screenshot 2023-04-20 at 00 00 55](https://user-images.githubusercontent.com/9074856/233254922-9f7f6cef-ba28-47e4-a37a-baab9daeeba6.png)
![Screenshot 2023-04-23 at 13 49 49](https://user-images.githubusercontent.com/9074856/233856249-7108a2e8-bec1-45db-a642-7aff3dea9a51.png)
Before
After
Test that the upload still works
bulkgrade
![Screenshot 2023-04-20 at 00 03 12](https://user-images.githubusercontent.com/9074856/233255204-90457e55-9336-4745-aca8-f3fe18e31a6d.png)
![Screenshot 2023-04-23 at 13 50 24](https://user-images.githubusercontent.com/9074856/233856274-fd84be9e-9d41-4d88-81c0-462e4f00ef1a.png)
Before
After
Test that the upload still works
Attachments
![Screenshot 2023-04-20 at 00 04 00](https://user-images.githubusercontent.com/9074856/233255292-4e43f047-00c9-44fd-87a5-c10fc8688cdd.png)
![Screenshot 2023-04-23 at 13 50 45](https://user-images.githubusercontent.com/9074856/233856300-5074c50f-d025-4cca-8554-bcb31b69b649.png)
Before
After
Test that the upload still works
Autograder Tar and MakeFile
![Screenshot 2023-04-20 at 00 04 54](https://user-images.githubusercontent.com/9074856/233255418-10f57cff-0bec-44b5-aee2-a9eab08411aa.png)
![Screenshot 2023-04-23 at 13 51 16](https://user-images.githubusercontent.com/9074856/233856329-864aadea-3fa9-4f43-a6d3-a659412b133f.png)
(Need to add an Autograder first, then go to its settings)
Before
After
Test that the upload still works
Types of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for linting