mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core&ui: allow admin view contest when its not started
This commit is contained in:
1 parent
b7f0e59e5d
commit
ba0beee9a8
6 files changed
+29
-15
No files matched your search
@@ -16,9 +16,7 @@
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Problem') }}</h1>
|
||||
</div>
|
||||
{% if model.contest.isNotStarted(tdoc) %}
|
||||
{{ nothing.render('This homework is not open and you cannot view problems.') }}
|
||||
{% elif tsdoc.attend or model.contest.isDone(tdoc) %}
|
||||
{% if pdict %}
|
||||
<div class="section__body no-padding">
|
||||
<table class="data-table">
|
||||
<colgroup>
|
||||
@@ -55,13 +53,19 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td class="col--problem col--problem-name">
|
||||
{{ problem.render_problem_title(pdict[pid], tdoc=tdoc, show_invisible_flag=false, show_tags=false) }}
|
||||
{% if model.contest.isNotStarted(tdoc) %}
|
||||
{{ 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) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{%- endfor -%}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% elif tsdoc.attend %}
|
||||
{{ nothing.render('This homework is not open and you cannot view problems.') }}
|
||||
{% else %}
|
||||
{{ nothing.render('Please claim the assignment to see the problems.') }}
|
||||
{% endif %}
|
||||
|
||||
Reference in new issue
Block a user