-
Notifications
You must be signed in to change notification settings - Fork 220
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
Send Tango unambiguous filenames for user handins #1947
Conversation
Allow autogradeInputFiles to provide a remoteFile attribute that will be used for the filename on the tango server. If remoteFile is not provided, the value of localFile will be used.
When uploading handins to tango, send the long filename (with the student's email address) as the filename to use on the tango server
Unlike localFile, remoteFile can always be a basename, so remove all the excess calls to File.basename
7c151fc
to
553d770
Compare
Thanks for the PR! (I presume you meant to reference #1831 instead) |
Now tested on autolab-dev. Seems to work
|
Reference and testing status updated in summary |
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.
Reproduced submission error locally through autolab, and verified that fix works correctly:
Reproduction Strategy (on master):
-
Use this autograded assessment (takes in a python file, returns score based on number function you define spits out):
tangotestlab.zip, handin:
returnNum.py.txt -
Submit as different users different values, get a list of submissions like so:
-
Go to "Manage Submissions" and click "Regrade All"
-
See that when regrade finishes, all students have same score (seems to always be the last user's submission)
Checked out branch, restarted autolab, and regraded, saw that grades matched expected values for students:
Fix LGTM, thanks for the work you did to solve our issue!
* Export long handin filename * Allow autogradeInputFiles to provide remote name Allow autogradeInputFiles to provide a remoteFile attribute that will be used for the filename on the tango server. If remoteFile is not provided, the value of localFile will be used. * Use full filename for tango handin files. When uploading handins to tango, send the long filename (with the student's email address) as the filename to use on the tango server * sendJob remoteFile is always a basename Unlike localFile, remoteFile can always be a basename, so remove all the excess calls to File.basename (cherry picked from commit 557746a)
Summary
Summary generated by Reviewpad on 18 Jul 23 17:15 UTC
This pull request includes three patches:
The first patch exports a new method
handin_file_long_filename
in theSubmission
model, which generates a long filename for the handin file by including the student's email address.The second patch allows the
autogradeInputFiles
method in theassessment_autograde_core
helper to provide aremoteFile
attribute for autograding file uploads to the Tango server. IfremoteFile
is not provided, the value oflocalFile
will be used instead.The third patch updates the
autogradeInputFiles
method in theassessment_autograde_core
helper to use the full filename (including the student's email address) for handin file uploads to the Tango server.Please review these patches for implementation correctness and possible improvements.
Description
Tango handin filenames need to be unique per user/version (and also course/assessment) so that grading always applies to the student's work and not someone elses. This patch restores the upload filename to <email>_<version>_<handin>.<ext> from <version>_<handin>.<ext>
Motivation and Context
Since #1831 , autolab has been sending tango filenames of the form <version>_<handin>.<ext>. This means that if multiple students submit near-simultaneously, and they are at the the same version number, it is likely that the grade both receive will be based on only one of their handins.
How Has This Been Tested?
Deployed to autolab-dev.andrew.cmu.edu
Submitted new handin for https://autolab-dev.andrew.cmu.edu/courses/TestCourse-s23/assessments/hello
Verified that the files uploaded to tango had the email address in them for both new handins and regrades.
Types of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for lintingOther issues / help required
If someone is working on an alternative approach, feel free to reject this PR