cms-dev / cms

Contest Management System
http://cms-dev.github.io/
GNU Affero General Public License v3.0
886 stars 360 forks source link

Add required source code upload for OuputOnly tasks #1202

Open CristianCantoro opened 2 years ago

CristianCantoro commented 2 years ago

Is your feature request related to a problem? Please describe. We would like to organize a contest with the OutputOnly configuration. However, given the fact that the contest is supposed to run for a week and with multiple teams competing we would like to require every submission to be accompanied by its source code, so that we can check the code after the end of the contest for plagiarism and to make sure that the final submissions do produce the claimed output. As far as I know, this is also how Google Hashcode works.

To be fair, it seems that we could work with how CMS currently work, but this feature would make our life a little bit easier.

Describe the solution you'd like Add the possibility to upload a source code file for each submission of a OutputOnly type task and make it required for making a submission.

Describe alternatives you've considered I have tried changing the submission format adding taskname.%l, it works but the source code is not required. Also, for some reason, it eliminates the possibility to upload the solution as a zip file.

Original submission interface (no source code) Laboratoriodialgoritmi—MozillaFirefox_2022-02-20_15:49:49

Changing submission format (do not worry about the secret warning, this is a test instance and not connected to the internet): Admin:Laboratoriodialgoritmi—MozillaFirefox_2022-02-20_15:57:54

Example submission with and without source code, note that the possibility to upload a zip file has disappeared: Laboratoriodialgoritmi—MozillaFirefox_2022-02-20_15:55:55 Laboratoriodialgoritmi—MozillaFirefox_2022-02-20_15:56:12

wil93 commented 1 year ago

I think this could be an interesting feature. I see there's a constant ALLOW_PARTIAL_SUBMISSION = True defined by the OutputOnly tasktype, which maybe would need to be made more granular (specify that the source code must be provided in every submission) since now it's just a boolean. Not sure what's the best way to do it.

Anyway it seems that the reason why the zip upload gets disabled is because of this commit: 10cb40ffa6ffbcc58611af9e8c723357d12d7af3.