mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-24 21:38:41 +00:00
feat(submission): display contest
This commit is contained in:
parent
513cf6c290
commit
571d5cddc3
@ -265,7 +265,11 @@ if (isset($hack_form)) {
|
||||
|
||||
<div class="row mt-3 submission-layout d-md-grid">
|
||||
<div class="submission-right-col">
|
||||
<?php UOJSubmission::cur()->echoStatusCard(['show_actual_score' => $perm['score'], 'id_hidden' => true], Auth::user()) ?>
|
||||
<?php UOJSubmission::cur()->echoStatusCard([
|
||||
'show_actual_score' => $perm['score'],
|
||||
'contest_problem_letter' => true,
|
||||
'id_hidden' => true,
|
||||
], Auth::user()) ?>
|
||||
</div>
|
||||
|
||||
<div class="submission-left-col">
|
||||
|
@ -621,9 +621,10 @@ class UOJSubmission {
|
||||
}
|
||||
|
||||
$rows = [
|
||||
'id' => 'ID',
|
||||
'submitter' => UOJLocale::get('problems::submitter'),
|
||||
'id' => 'ID',
|
||||
'problem' => UOJLocale::get('problems::problem'),
|
||||
'contest' => UOJLocale::get('contests::contest'),
|
||||
'result' => UOJLocale::get('problems::result'),
|
||||
'used_time' => UOJLocale::get('problems::used time'),
|
||||
'used_memory' => UOJLocale::get('problems::used memory'),
|
||||
|
@ -256,6 +256,8 @@ trait UOJSubmissionLikeTrait {
|
||||
'time_format' => 'normal',
|
||||
'time_font_size' => 'small',
|
||||
'unknown_char' => '/',
|
||||
'contest_problem_letter' => false,
|
||||
'problem_title' => [],
|
||||
];
|
||||
|
||||
switch ($name) {
|
||||
@ -264,11 +266,21 @@ trait UOJSubmissionLikeTrait {
|
||||
break;
|
||||
case 'problem':
|
||||
if ($this->problem) {
|
||||
echo $this->problem->getLink(isset($cfg['problem_title']) ? $cfg['problem_title'] : []);
|
||||
if ($cfg['contest_problem_letter']) {
|
||||
echo $this->problem->getLink($cfg['problem_title'] + ['with' => 'letter', 'simplify' => true]);
|
||||
} else {
|
||||
echo $this->problem->getLink($cfg['problem_title']);
|
||||
}
|
||||
} else {
|
||||
echo '<span class="text-danger">?</span>';
|
||||
}
|
||||
break;
|
||||
case 'contest':
|
||||
if ($this->problem && $this->problem->contest) {
|
||||
echo $this->problem->contest->getLink();
|
||||
} else {
|
||||
echo '<span class="text-danger">?</span>';
|
||||
}
|
||||
case 'submitter':
|
||||
case 'owner':
|
||||
case 'hacker':
|
||||
|
Loading…
Reference in New Issue
Block a user