fix admin exam-user detail error + improve announce check ReAnnounce log

This commit is contained in:
xiaomlove
2022-07-31 23:01:28 +08:00
parent 60326b2bbd
commit a69319980b
2 changed files with 8 additions and 5 deletions

View File

@@ -51,6 +51,7 @@ class ExamUser extends NexusModel
}
$currentValue = $progress[$index['index']] ?? 0;
$requireValue = $index['require_value'];
$unit = Exam::$indexes[$index['index']]['unit'] ?? '';
switch ($index['index']) {
case Exam::INDEX_UPLOADED:
case Exam::INDEX_DOWNLOADED:
@@ -58,7 +59,7 @@ class ExamUser extends NexusModel
$requireValueAtomic = $requireValue * 1024 * 1024 * 1024;
break;
case Exam::INDEX_SEED_TIME_AVERAGE:
$currentValueFormatted = number_format($currentValue / 3600, 2) . " {$index['unit']}";
$currentValueFormatted = number_format($currentValue / 3600, 2) . " $unit";
$requireValueAtomic = $requireValue * 3600;
break;
default: