vj4 icon indicating copy to clipboard operation
vj4 copied to clipboard

Support Making Links to The Test Data to Allow Cloning Problems

Open ksyx opened this issue 7 years ago • 12 comments

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

ksyx avatar Aug 15 '17 10:08 ksyx

@iceb0y

breezewish avatar Aug 15 '17 10:08 breezewish

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 avatar Aug 15 '17 11:08 q234rty

@q234rty Yes, espescially hid problems in main-site.

ksyx avatar Aug 15 '17 11:08 ksyx

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.

q234rty avatar Aug 15 '17 11:08 q234rty

??? 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.

twd2 avatar Aug 15 '17 11:08 twd2

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.

breezewish avatar Aug 15 '17 11:08 breezewish

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.

breezewish avatar Aug 15 '17 11:08 breezewish

It is also possible to do this at web level.

q234rty avatar Aug 15 '17 11:08 q234rty

@q234rty The important point is:

Otherwise the web need to implement data parser to recognize links in the data.

breezewish avatar Aug 15 '17 11:08 breezewish

Maybe cloned problems don't need data files. We can simply store the source problem id at web side.

q234rty avatar Aug 15 '17 11:08 q234rty

Well, using data can make changes easily and avoid no data warnings without any changes.

ksyx avatar Aug 15 '17 12:08 ksyx

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.

iceboy233 avatar Aug 15 '17 17:08 iceboy233