mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: use canShowSelfRecord
This commit is contained in:
1 parent
d7afcab59d
commit
4dd428ba35
7 files changed
+9
-9
No files matched your search
@@ -45,7 +45,7 @@
|
||||
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
||||
{% if psdict[pid] and psdict[pid].rid %}
|
||||
{% set rdoc = rdict[psdict[pid].rid] %}
|
||||
{% if model.contest.canShowRecord.call(handler, tdoc) %}
|
||||
{% if model.contest.canShowSelfRecord.call(handler, tdoc) %}
|
||||
{{ record.render_status_td(rdoc) }}
|
||||
{% else %}
|
||||
<td class="col--status record-status--border"><a href="{{ url('record_detail', rid=rdoc._id) }}">{{ _('Submitted') }}</a></td>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
||||
{% if psdict[pid] and psdict[pid].rid %}
|
||||
{% set rdoc = rdict[psdict[pid].rid] %}
|
||||
{% if model.contest.canShowRecord.call(handler, tdoc) %}
|
||||
{% if model.contest.canShowSelfRecord.call(handler, tdoc) %}
|
||||
{{ record.render_status_td(rdoc) }}
|
||||
{% else %}
|
||||
<td class="col--status record-status--border"><a href="{{ url('record_detail', rid=rdoc._id) }}">{{ _('Submitted') }}</a></td>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
pdoc: pdoc
|
||||
}) }}
|
||||
{% if tdoc %}
|
||||
{{ set(UiContext, 'canViewRecord', model.contest.canShowRecord.call(handler, tdoc)) }}
|
||||
{{ set(UiContext, 'canViewRecord', model.contest.canShowSelfRecord.call(handler, tdoc)) }}
|
||||
{{ set(UiContext, 'postSubmitUrl', url('contest_detail_problem_submit' if tdoc.docType == model.document.TYPE_CONTEST else 'homework_detail_problem_submit', pid=pdoc.pid, tid=tdoc.docId)) }}
|
||||
{{ set(UiContext, 'getSubmissionsUrl', url('record_main', query={fullStatus:'true', pid:pdoc.pid, tid:tdoc.docId})) }}
|
||||
{{ set(UiContext, 'getRecordDetailUrl', url('record_detail', rid='{rid}', query={tid:tdoc.docId})) }}
|
||||
|
||||
Reference in new issue
Block a user