From 7fc962436ea9ad48450cf5b60d97dcbced541ae5 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Thu, 19 Jan 2023 10:17:30 +0800 Subject: [PATCH] feat(problems/new_remote): difficulty --- web/app/controllers/new_remote_problem.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/controllers/new_remote_problem.php b/web/app/controllers/new_remote_problem.php index dd07aae..7347a64 100644 --- a/web/app/controllers/new_remote_problem.php +++ b/web/app/controllers/new_remote_problem.php @@ -68,8 +68,8 @@ $new_remote_problem_form->handle = function (&$vdata) { DB::insert([ "insert into problems", - "(title, uploader, is_hidden, submission_requirement, extra_config, type)", - "values", DB::tuple([$data['title'], Auth::id(), 1, $enc_submission_requirement, $enc_extra_config, "remote"]) + "(title, uploader, is_hidden, submission_requirement, extra_config, difficulty, type)", + "values", DB::tuple([$data['title'], Auth::id(), 1, $enc_submission_requirement, $enc_extra_config, $data['difficulty'] ?: -1, "remote"]) ]); $id = DB::insert_id();