--- UOJ-System/web/app/controllers/problem_statement_manage.php 2023-03-19 21:20:30.679254485 +0800 +++ UOJ-Luogu-RemoteJudge/web/app/controllers/problem_statement_manage.php 2023-03-20 15:02:04.084987421 +0800 @@ -1,5 +1,7 @@ runAtServer(); + + if ($problem['type'] == 'luogu') { + $refetch_problem_form = new UOJForm('refetch_luogu'); + $refetch_problem_form->submit_button_config['align'] = 'left'; + $refetch_problem_form->submit_button_config['class_str'] = 'btn btn-danger'; + $refetch_problem_form->submit_button_config['text'] = '重新拉取题目'; + $refetch_problem_form->handle = function() use ($problem) { + try { + refetchLuoguProblemInfo($problem['id']); + } catch (Exception $e) { + becomeMsgPage('
' . $e->getMessage() . ''); + } + }; + $refetch_problem_form->runAtServer(); + } ?>