Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Making Links to The Test Data to Allow Cloning Problems #287

Open
ksyx opened this issue Aug 15, 2017 · 12 comments
Open

Support Making Links to The Test Data to Allow Cloning Problems #287

ksyx opened this issue Aug 15, 2017 · 12 comments

Comments

@ksyx
Copy link
Contributor

ksyx commented Aug 15, 2017

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
@breezewish breezewish changed the title Solution of adding main-site problems to domains Support Making Links to The Test Data to Allow Cloning Problems Aug 15, 2017
@breezewish
Copy link
Member

@iceb0y

@q234rty
Copy link
Contributor

q234rty commented Aug 15, 2017

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?

@ksyx
Copy link
Contributor Author

ksyx commented Aug 15, 2017

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

@q234rty
Copy link
Contributor

q234rty commented Aug 15, 2017

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.

@twd2
Copy link
Member

twd2 commented Aug 15, 2017

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

@breezewish
Copy link
Member

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
Copy link
Member

breezewish commented Aug 15, 2017

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.

@q234rty
Copy link
Contributor

q234rty commented Aug 15, 2017

It is also possible to do this at web level.

@breezewish
Copy link
Member

@q234rty The important point is:

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

@q234rty
Copy link
Contributor

q234rty commented Aug 15, 2017

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

@ksyx
Copy link
Contributor Author

ksyx commented Aug 15, 2017

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

@iceboy233
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants