';
+
+ echo $this->styler->getTestInfoIcon($test_info);
+ } else {
+ echo '
';
+ }
echo htmlspecialchars($test_info);
echo '
';
- echo '
';
+ echo '
';
if ($test_time >= 0) {
- echo 'time: ', $test_time, 'ms';
+ if (isset($REQUIRE_LIB['bootstrap5'])) {
+ echo ' ';
+ } else {
+ echo 'time: ';
+ }
+ echo $test_time, ' ms';
}
echo '
';
- echo '
';
+ echo '
';
if ($test_memory >= 0) {
- echo 'memory: ', $test_memory, 'kb';
+ if (isset($REQUIRE_LIB['bootstrap5'])) {
+ echo ' ';
+ } else {
+ echo 'memory: ';
+ }
+ echo $test_memory, ' kB';
}
echo '
';
@@ -1019,6 +1035,19 @@ class CustomTestSubmissionDetailsStyler {
return 'card-uoj-wrong';
}
}
+ public function getTestInfoIcon($test_info) {
+ if ($test_info == 'Success') {
+ 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;
}