From be94141d94436a88da87719dc92ccf38d948dc5c Mon Sep 17 00:00:00 2001 From: MascoSkray Date: Tue, 25 Apr 2017 12:49:46 +0800 Subject: [PATCH] feat: add own checker option to the online problem.conf editor If you upload the data by zip file, you can now set your own checker to problem.conf online. NOTE: If you want to use advanced options, you'd better modify problem.conf yourself. The online problem.conf editor is only for the common situation. --- uoj/1/app/controllers/problem_data_manage.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uoj/1/app/controllers/problem_data_manage.php b/uoj/1/app/controllers/problem_data_manage.php index 1316284..a714f64 100644 --- a/uoj/1/app/controllers/problem_data_manage.php +++ b/uoj/1/app/controllers/problem_data_manage.php @@ -117,7 +117,9 @@ EOD; } $setfile = fopen($set_filename, "w"); fwrite($setfile, "use_builtin_judger on\n"); - fwrite($setfile, "use_builtin_checker ".$_POST['use_builtin_checker']."\n"); + if($_POST['use_builtin_checker'] != 'ownchk'){ + fwrite($setfile, "use_builtin_checker ".$_POST['use_builtin_checker']."\n"); + } fwrite($setfile, "n_tests ".$_POST['n_tests']."\n"); if($_POST['n_ex_tests']){ fwrite($setfile, "n_ex_tests ".$_POST['n_ex_tests']."\n"); @@ -801,6 +803,7 @@ EOD +