vj4 icon indicating copy to clipboard operation
vj4 copied to clipboard

Custom String PID

Open mqtang89 opened this issue 5 years ago • 10 comments

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

mqtang89 avatar May 04 '19 14:05 mqtang89

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.

twd2 avatar May 04 '19 17:05 twd2

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

undefined-moe avatar May 05 '19 16:05 undefined-moe

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

twd2 avatar May 06 '19 00:05 twd2

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

undefined-moe avatar May 06 '19 04:05 undefined-moe

GGed

twd2 avatar May 09 '19 02:05 twd2

I would try to support string PID.

undefined-moe avatar May 11 '19 03:05 undefined-moe

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

undefined-moe avatar May 11 '19 18:05 undefined-moe

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

twd2 avatar May 11 '19 19:05 twd2

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.

twd2 avatar May 14 '19 09:05 twd2

this feature is still developing.(#514)


From: Wende Tan [email protected] Sent: Tuesday, May 14, 2019 5:30:15 PM To: vijos/vj4 Cc: masnn; Comment Subject: Re: [vijos/vj4] Custom String PID (#510)

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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/vijos/vj4/issues/510?email_source=notifications&email_token=AHE2KDL7I3YX5T47EJEWNATPVKBCPA5CNFSM4HKY7FHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVK4XQY#issuecomment-492161987, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHE2KDPIRMZDNAJQP2QUM7DPVKBCPANCNFSM4HKY7FHA.

undefined-moe avatar May 14 '19 09:05 undefined-moe