diff --git a/web/app/controllers/contest_manage.php b/web/app/controllers/contest_manage.php index 61ab834..2af6cbc 100644 --- a/web/app/controllers/contest_manage.php +++ b/web/app/controllers/contest_manage.php @@ -223,6 +223,12 @@ EOD); $contest['extra_config']["problem_{$vdata['problem_id']}"] = $judge_type; } + if ($_POST['bonus']) { + $contest['extra_config']['bonus']["problem_{$vdata['problem_id']}"] = true; + } else { + unset($contest['extra_config']['bonus']["problem_{$vdata['problem_id']}"]); + } + $esc_extra_config = json_encode($contest['extra_config']); DB::update([ "update contests",