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.
This commit is contained in:
MascoSkray 2017-04-25 12:49:46 +08:00
parent 290872a098
commit be94141d94
No known key found for this signature in database
GPG Key ID: 6ABABD8325167A2E

View File

@ -117,7 +117,9 @@ EOD;
}
$setfile = fopen($set_filename, "w");
fwrite($setfile, "use_builtin_judger on\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
<option value="ncmp">单行整数序列</option>
<option value="wcmp">单行字符串序列</option>
<option value="fcmp">多行数据(不忽略行末空格,但忽略文末回车)</option>
<option value="ownchk">自定义校验器</option>
</select>
<!--<input type="hidden" class="form-control" id="use_builtin_checker" name="use_builtin_checker" placeholder="比对函数">-->
</div>