vj4
vj4 copied to clipboard
Support Making Links to The Test Data to Allow Cloning Problems
Just change the Config.ini, set the first line to a non-positive number such as -1, and the second line is the problem id in main-site. When judging the problem, treat it as submitted a solution in main site. So, this solution has these advantages:
- Users can't get the data
- Users can change the problem descriptions
- Users can use more resources
-
New feature
@iceb0y
When a user views a cloned problem,he/she should have permission to view problems in both domains.
When a user submits a cloned problem,he/she should have permission to submit in both domains.
Or should he/she?
@q234rty Yes, espescially hid problems in main-site.
Or: When a user does something to a cloned problem: He should have permission to do it in this domain. The one that clones the problem should have permission to do it in the other domain. However editing sth. should be fine if the one that clones the problem have permission to read that.
??? When clone a problem: Permissions checked in source problem domain: VIEW_PROBLEM, CLONE_PROBLEM Permission checked in destination domain: CREATE_PROBLEM
When (other users) view or submit the cloned problem, regard the cloned problem the same as normal problems.
Since the link is at the data level, it has no relation with the permission system in Vijos. For simplicity, I'd suggest cloned problems not inherit permissions. Otherwise the web need to implement data parser to recognize links in the data.
Another aspect to consider is, whether cloned data should keep sync with the source data. Semantically cloned data should keep a "snapshot" of the source data. We need to have a careful design for this feature.
It is also possible to do this at web level.
@q234rty The important point is:
Otherwise the web need to implement data parser to recognize links in the data.
Maybe cloned problems don't need data files. We can simply store the source problem id at web side.
Well, using data can make changes easily and avoid no data warnings without any changes.
The current data file is a legacy format. We don't want to add new features to it. We have proposed a new data format but don't have enough motivation to do it.