feat(problems/new_remote): difficulty

This commit is contained in:
Baoshuo Ren 2023-01-19 10:17:30 +08:00
parent 0918605c2b
commit 7fc962436e
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -68,8 +68,8 @@ $new_remote_problem_form->handle = function (&$vdata) {
DB::insert([ DB::insert([
"insert into problems", "insert into problems",
"(title, uploader, is_hidden, submission_requirement, extra_config, type)", "(title, uploader, is_hidden, submission_requirement, extra_config, difficulty, type)",
"values", DB::tuple([$data['title'], Auth::id(), 1, $enc_submission_requirement, $enc_extra_config, "remote"]) "values", DB::tuple([$data['title'], Auth::id(), 1, $enc_submission_requirement, $enc_extra_config, $data['difficulty'] ?: -1, "remote"])
]); ]);
$id = DB::insert_id(); $id = DB::insert_id();