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

Custom String PID #510

Open
mqtang89 opened this issue May 4, 2019 · 10 comments
Open

Custom String PID #510

mqtang89 opened this issue May 4, 2019 · 10 comments

Comments

@mqtang89
Copy link

mqtang89 commented May 4, 2019

希望能支持字符串 PID,本人传题时想使用 CF 式的题目编号(42C 864F 这样的)。
另外,数字 ID 无法修改并且只能按顺序排下来,这是设计成这样的?如果能做成 SYZOJ 那样可以自由修改编号就好了
顺便吐槽一下,自己的域中不能删除题目(或许我应该开另一个 Issue)(这是 Feature?)

@twd2
Copy link
Member

twd2 commented May 4, 2019

For custom PIDs, we have a plan to support custom text PIDs, but all of us do not have time to implement it. Feel free to open a PR :)
For deleting problems, this is a known issue, which is under discussion.

@undefined-moe
Copy link
Member

You can change/delete what you want by directly accessing the database.
你可以直接访问数据库来更改/删除内容。

@twd2
Copy link
Member

twd2 commented May 6, 2019

I just remember that you may try the following commands to add a problem with arbitrary PID if you can access the shell:

alias pm="python3 -m"
pm vj4.model.adaptor.problem add system "Dummy Problem" "# It *works*" -1 1000

where 1000 is the PID. The arguments are the same as https://github.com/vijos/vj4/blob/master/vj4/model/adaptor/problem.py#L37

@undefined-moe
Copy link
Member

undefined-moe commented May 6, 2019

A 404 error will occur if you are trying to access string PID problem.
Although it can be created through the command line.

@twd2
Copy link
Member

twd2 commented May 9, 2019

GGed

@twd2 twd2 changed the title 自定义 PID Custom String PID May 9, 2019
@undefined-moe
Copy link
Member

I would try to support string PID.

@undefined-moe
Copy link
Member

Supported now.
Repo: masnn/vj4
Docker Image : masnn/vj4
Test site: https://oj.masnn.ml/

@twd2
Copy link
Member

twd2 commented May 11, 2019

Please notice that masnn's version is not the official version and it is no warranty.

@twd2
Copy link
Member

twd2 commented May 14, 2019

We come up with a new proposal: allow users to set an alias/name/string PID (as we call it doc_name in the code) for each problem through the problem settings page.

@undefined-moe
Copy link
Member

undefined-moe commented May 14, 2019 via email

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

No branches or pull requests

3 participants