mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: allow admin view contest problem (#419)
This commit is contained in:
1 parent
e06c86e9dd
commit
efbc3c0162
6 files changed
+10
-6
No files matched your search
@@ -36,6 +36,8 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set isAdmin = handler.user.own(tdoc) or handler.user.hasPerm(perm.PERM_VIEW_HOMEWORK_HIDDEN_SCOREBOARD) %}
|
||||
{% set ntdoc = model.contest.isDone(tdoc) or (tsdoc.attend and not model.contest.isNotStarted(tdoc)) %}
|
||||
{%- for pid in tdoc.pids -%}
|
||||
<tr>
|
||||
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
||||
@@ -53,7 +55,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td class="col--problem col--problem-name">
|
||||
{% if model.contest.isNotStarted(tdoc) %}
|
||||
{% if isAdmin and not ntdoc %}
|
||||
{{ problem.render_problem_title(pdict[pid], show_invisible_flag=false, show_tags=false) }}
|
||||
{% else %}
|
||||
{{ problem.render_problem_title(pdict[pid], tdoc=tdoc, show_invisible_flag=false, show_tags=false) }}
|
||||
|
||||
Reference in new issue
Block a user