From c0484d55a541285897a478f1d54a4bbacccbb39c Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Mon, 5 Dec 2022 17:46:40 +0800 Subject: [PATCH] chore(web/problem): show `?` when difficulty not set --- web/app/models/UOJProblem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/models/UOJProblem.php b/web/app/models/UOJProblem.php index b101f32..f78575b 100644 --- a/web/app/models/UOJProblem.php +++ b/web/app/models/UOJProblem.php @@ -142,7 +142,7 @@ class UOJProblem { public function getDifficultyHTML() { $difficulty = (int)$this->info['difficulty']; - $difficulty_text = in_array($difficulty, static::$difficulty) ? $difficulty : '-'; + $difficulty_text = in_array($difficulty, static::$difficulty) ? $difficulty : '?'; $difficulty_color = in_array($difficulty, static::$difficulty) ? static::$difficulty_color[$difficulty] : '#7e7e7e'; return HTML::tag('span', ['class' => 'uoj-difficulty', 'style' => "color: $difficulty_color"], $difficulty_text);