cms
cms copied to clipboard
Cloning a contest
Is there a way how to clone a contest? In older versions of CMS, I was used to exporting a contest and importing it again. With CMS 1.3, the import fails because it violates a uniqueness constraint on contest name and if I fix this, then it fails on creating the same users again.
[I'll assume you're interested in cloning submissions and other data from a contest already held.]
We don't have an easy way I think. To adapt the contest.json, the easiest way is to add a suffix to Contest.name, Task.name, User.username, and that should be enough to import.
This will create new users, which I don't think it's what you want, but the format of the dump does not allow to refer to users already in the db.
[I'll assume you're interested in cloning submissions and other data from a contest already held.]
My use case was this: When our contest was over, I wanted to give the participants an opportunity to inspect full test results and submit corrected solutions, while keeping the official state of the contest intact.
I will try to write a command-line tool for cloning contests.
If you're using master there is an analysis mode now that solves exactly that problem. During analysis mode contestants can submit, but their submissions are "unofficial" and don't count towards the score.
One pitfall: after you enable analysis mode and make all test cases public, you need to re-run scoring on submissions, otherwise users won't see full results.
Ah, i didn't realize. Sure we can add an option to see full results of the submissions during analysis (I would guess in some situations you might not want to show full results).
That would be useful indeed. It would allow to show results during analysis without altering contest or task state.
However, I think (correct me if I'm wrong) the public/not public part of the outcome is stored in the database after scoring, so changing that might not be trivial.
I think it should be simple if the switch tells CWS to display the full results instead of the public, instead of changing what was public/private.
The following line was intended to make sure the full results are displayed in analysis mode.
https://github.com/cms-dev/cms/blob/91366d87c0c728d22e1ec30e26b09f45dfb120a8/cms/server/contest/templates/submission_row.html#L35
However it fails if you make all the testcases public because then the max public score will be equal to max score and CMS will think there is no need to separate total score and public score.
Oh, sorry, what I wrote probably applies more to group score types. This template is used for detailed results: https://github.com/cms-dev/cms/blob/master/cms/grading/ScoreType.py#L200
Closing as it looks like the original issue is not applicable anymore.