feat(problem/remote): keep local difficulty when no remote difficulty is given

This commit is contained in:
Baoshuo Ren 2023-01-24 11:52:10 +08:00
parent af80a6831b
commit e768c0ea05
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -109,6 +109,10 @@ if (UOJProblem::info('type') == 'remote') {
UOJResponse::page500('题目抓取失败,可能是题目不存在或者没有题面!如果题目没有问题,请稍后再试。<a href="">返回</a>'); UOJResponse::page500('题目抓取失败,可能是题目不存在或者没有题面!如果题目没有问题,请稍后再试。<a href="">返回</a>');
} }
if ($data['difficulty'] == -1) {
$data['difficulty'] = UOJProblem::info('difficulty');
}
$submission_requirement = [ $submission_requirement = [
[ [
"name" => "answer", "name" => "answer",