fix: 571d5cddc3
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2023-02-23 22:06:04 +08:00
parent 34270c328a
commit 9ad23faefc
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
2 changed files with 6 additions and 2 deletions

View File

@ -634,6 +634,10 @@ class UOJSubmission {
'judge_time' => UOJLocale::get('problems::judge time'), 'judge_time' => UOJLocale::get('problems::judge time'),
]; ];
if (!$this->problem || !($this->problem instanceof UOJContestProblem)) {
$cfg['contest_hidden'] = true;
}
echo '<div class="card mb-3">'; echo '<div class="card mb-3">';
echo '<div class="card-body vstack gap-2">'; echo '<div class="card-body vstack gap-2">';

View File

@ -266,7 +266,7 @@ trait UOJSubmissionLikeTrait {
break; break;
case 'problem': case 'problem':
if ($this->problem) { if ($this->problem) {
if ($cfg['contest_problem_letter']) { if ($cfg['contest_problem_letter'] && $this->problem instanceof UOJContestProblem) {
echo $this->problem->getLink($cfg['problem_title'] + ['with' => 'letter', 'simplify' => true]); echo $this->problem->getLink($cfg['problem_title'] + ['with' => 'letter', 'simplify' => true]);
} else { } else {
echo $this->problem->getLink($cfg['problem_title']); echo $this->problem->getLink($cfg['problem_title']);
@ -276,7 +276,7 @@ trait UOJSubmissionLikeTrait {
} }
break; break;
case 'contest': case 'contest':
if ($this->problem && $this->problem->contest) { if ($this->problem && $this->problem instanceof UOJContestProblem) {
echo $this->problem->contest->getLink(); echo $this->problem->contest->getLink();
} else { } else {
echo '<span class="text-danger">?</span>'; echo '<span class="text-danger">?</span>';