mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-25 21:58:41 +00:00
chore(web/problem): show ?
when difficulty not set
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3f2a6feea2
commit
c0484d55a5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user