Hi, an easy way to reduce code duplication would be to write common base classes for Submission-UserTest, File-UserTestFile, SubmissionResult-UserTestResult, Executable-UserTestExecutable. I've tried this out here: https://github.com/fagu/cms/tree/abstractsubmission It doesn't require any changes to the database and already reduced the code size by 178 lines :). A problem is that some fields with similar meaning have different names, e.g. submission_id vs. user_test_id, submission vs. user_test, submission_result vs. user_test_result. This seems to be quiet a nuisance in ES (some functions are almost identical apart from variable names). Maybe we could just call all of them submission_...? If we don't want to change the database column names, we should at least create "aliases" abstractsubmission_... pointing to submission_... or user_test_..., I think. Another thing we might consider is creating a counterpart to Evaluation for user tests (instead of putting the corresponding columns into UserTestResult). Best, Fabian > I'm obviously totally in favor of reducing code duplication. I don't > understand if you have concrete proposals to achieve this goal. If you do > please tell us about them: Giovanni will surely appreciate any suggestions > for his rewrite! > > As for the new AWS, I'll write soon about it on this ML. > > Luca > On Nov 11, 2013 9:48 AM, "Fabian Gundlach" <fabian.gundlach@xxxxxxxxx> > > wrote: > > Hi, > > > > currently, the CMS code contains some code duplication concerning > > submissions > > and user tests. See for example cms/db/submission.py, cms/db/usertest.py > > and > > EvaluationService. > > Furthermore, some features are only supported for submissions. E.g., the > > AWS > > doesn't show user tests, neither can they be regraded easily. > > It also seems a bit uncanonical to me that there is a separate > > "Submissions" > > menu item for each task in CWS but not a separate "Testing" item for each > > task, though that is certainly something one can argue about. > > > > What do you think about merging submissions and user test code where > > possible > > and extending features to user tests also? Is there maybe already any > > progress > > towards this? Concerning AWS, it would be wise to wait for Luca's > > rewritten > > AWS, I guess. > > > > Best, > > Fabian