diff --git a/web/app/controllers/list.php b/web/app/controllers/list.php
index 16feceb..5728a43 100644
--- a/web/app/controllers/list.php
+++ b/web/app/controllers/list.php
@@ -54,9 +54,7 @@ function getProblemTR($info) {
)
);
}
- if (isset($_COOKIE['show_difficulty'])) {
- $html .= HTML::tag('td', [], $problem->getExtraConfig('difficulty'));
- }
+ $html .= HTML::tag('td', [], UOJProblem::getDifficultyHTML($problem->info['difficulty']));
$html .= HTML::tag('td', [], ClickZans::getCntBlock($problem->info['zan']));
$html .= HTML::tag_end('tr');
return $html;
@@ -68,9 +66,7 @@ $header .= '
' . UOJLocale::get('problems::problem') . ' | ';
if (isset($_COOKIE['show_submit_mode'])) {
$header .= '' . UOJLocale::get('problems::ac ratio') . ' | ';
}
-if (isset($_COOKIE['show_difficulty'])) {
- $header .= '' . UOJLocale::get('problems::difficulty') . ' | ';
-}
+$header .= '' . UOJLocale::get('problems::difficulty') . ' | ';
$header .= '' . UOJLocale::get('appraisal') . ' | ';
$header .= '';
@@ -84,6 +80,7 @@ $pag_config = [
'problems.submit_num as submit_num',
'problems.ac_num as ac_num',
'problems.zan as zan',
+ 'problems.difficulty as difficulty',
'problems.extra_config as extra_config',
'problems.uploader as uploader',
],
@@ -163,13 +160,6 @@ $pag = new Paginator($pag_config);
= UOJLocale::get('problems::show statistics') ?>
-
-
- />
-
-
@@ -200,19 +190,6 @@ $pag = new Paginator($pag_config);
}
location.reload();
});
- $('#input-show_difficulty').click(function() {
- if (this.checked) {
- $.cookie('show_difficulty', '', {
- path: '/list',
- expires: 365,
- });
- } else {
- $.removeCookie('show_difficulty', {
- path: '/list',
- });
- }
- location.reload();
- });
= $pag->pagination() ?>