';
+
+ echo $this->styler->getTestInfoIcon($test_info);
+ } else {
+ echo '
';
+ }
echo htmlspecialchars($test_info);
echo '
';
}
@@ -994,6 +1016,19 @@ class HackDetailsStyler {
return 'card-uoj-wrong';
}
}
+ public function getTestInfoIcon($test_info) {
+ if ($test_info == 'Accepted' || $test_info == 'Extra Test Passed') {
+ return '
';
+ } elseif ($test_info == 'Time Limit Exceeded') {
+ return '
';
+ } elseif ($test_info == 'Acceptable Answer') {
+ return '
';
+ } elseif ($test_info == 'Wrong Answer') {
+ return '
';
+ } else {
+ return '
';
+ }
+ }
public function shouldFadeDetails($info) {
return $this->fade_all_details;
}
@@ -1008,6 +1043,8 @@ function echoCustomTestSubmissionDetails($submission_details, $name) {
echoJudgementDetails($submission_details, new CustomTestSubmissionDetailsStyler(), $name);
}
function echoHackDetails($hack_details, $name) {
+ global $REQUIRE_LIB;
+
echoJudgementDetails($hack_details, new HackDetailsStyler(), $name);
}
@@ -1015,10 +1052,22 @@ function echoHack($hack, $config, $user) {
$problem = queryProblemBrief($hack['problem_id']);
echo '
';
if (!isset($config['id_hidden'])) {
- echo '#', $hack['id'], ' | ';
+ echo '#', $hack['id'], ' | ';
}
if (!isset($config['submission_hidden'])) {
- echo '#', $hack['submission_id'], ' | ';
+ echo '#', $hack['submission_id'], ' | ';
}
if (!isset($config['problem_hidden'])) {
if ($hack['contest_id']) {
@@ -1035,13 +1084,37 @@ function echoHack($hack, $config, $user) {
}
if (!isset($config['result_hidden'])) {
if ($hack['judge_time'] == null) {
- echo 'Waiting | ';
+ echo 'Waiting | ';
} elseif ($hack['success'] == null) {
- echo 'Judging | ';
+ echo 'Judging | ';
} elseif ($hack['success']) {
- echo 'Success! | ';
+ echo 'Success! | ';
} else {
- echo 'Failed. | ';
+ echo 'Failed. | ';
}
} else {
echo 'Hidden | ';
@@ -1055,8 +1128,15 @@ function echoHack($hack, $config, $user) {
echo '
';
}
function echoHackListOnlyOne($hack, $config, $user) {
- echo '
';
- echo '
';
+ global $REQUIRE_LIB;
+
+ if (isset($REQUIRE_LIB['bootstrap5'])) {
+ echo '';
+ echo '
';
+ } else {
+ echo '';
+ echo '
';
+ }
echo '';
echo '';
if (!isset($config['id_hidden'])) {