Merge branch 'dev' into virusdefender-dev
* dev: (38 commits) with open() as 语句添加try&except,返回上传错误 添加缓存用redis的配置 [后台-前端]修改添加比赛,编辑比赛页面,添加封榜功能(在页面中被称作实时排名)若设置比赛非实时排名那么前端rank页面缓存将停止刷新,从而实现封榜功能[CI SKIP] migrate:contest.models字段改名----show_rank => real_time_rank 添加控制比赛排名更新的字段 统一创建比赛,编辑比赛的时候小组可见的交互逻辑和界面[CI SKIP] 修正server_setting中typo和urls里别扭的拼写 修改.gitignore,忽略富文本编辑器上传的图片,删掉刚刚不小心commit的图片[CI SKIP] 新建存放富文本编辑器上传的图片的文件夹[CI SKIP] 添加了富文本编辑器上传图片的功能,上传路径在setting_loacl和server里暂时在static/src/upload_image/ 修复冲突,忘记去掉冲突标志了。。。 [后台-前端]主要修改了添加比赛和修改比赛的部分,去掉比赛结束前开放排名这一选项,添加封榜时间字段[CI SKIP] [后台-前端]去掉了比赛中的是否开放排名选 项,天加封榜时间字段[CI SKIP] 添加前台比赛提交列表中管理员可见比赛提交详情 刚刚不小心把两个文件粘一起了,原来的忘清了。。。 修复超级管理员比赛提交页面的样式“ 合并dev,添加管理员在前台可见比赛所有提交详情,修改措辞,修改提示形式,以便于提交列表筛选功能的使用 修复题目,比赛题目列表里描述和提示的内容没有包裹在 problem-detail里的问题,实际上源代码里他们被包裹在<p clas s='problem-detail'>里但是实际显示的却是在标签外部,不理解.把p改成div就好了~ 其实没有更改,跟origin dev-sxw保持一致,因为刚刚git pull的时候出错了 修改了宽松判题模式中对超时的处理,否则超时将被判为runTimeError[CI SKIP] ... Conflicts: judge/judger/loose_client.py
This commit is contained in:
@@ -48,12 +48,13 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if request.user.is_authenticated %}
|
||||
<div class="form-group">
|
||||
<label>仅显示当前可参加的比赛
|
||||
<input id="join" type="checkbox" {% if join %}checked{% endif %} onchange="if(this.checked){location.href='/contests/?join=True'}else{location.href='/contests/'}">
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
{% if previous_page %}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class="problem-section">
|
||||
<label class="problem-label">描述</label>
|
||||
|
||||
<p class="problem-detail">{{ contest_problem.description|safe }}</p>
|
||||
<div class="problem-detail">{{ contest_problem.description|safe }}</div>
|
||||
</div>
|
||||
<div class="problem-section">
|
||||
<label class="problem-label">输入</label>
|
||||
@@ -60,7 +60,7 @@
|
||||
<div class="problem-section hide">
|
||||
<label class="problem-label">提示</label>
|
||||
|
||||
<p class="problem-detail">{{ contest_problem.hint|safe }}</p>
|
||||
<div class="problem-detail">{{ contest_problem.hint|safe }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% if submissions %}
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr class="" success>
|
||||
@@ -64,6 +63,7 @@
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% if submissions %}
|
||||
<tbody>
|
||||
{% for item in submissions %}
|
||||
<tr>
|
||||
@@ -94,10 +94,11 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% else %}
|
||||
<p>本场比赛还没有提交记录</p>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% else %}
|
||||
<p>你还没有提交记录!</p>
|
||||
{% endif %}
|
||||
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
{% if previous_page %}
|
||||
@@ -113,4 +114,4 @@
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
114
template/src/oj/contest/submissions_list_admin.html
Normal file
114
template/src/oj/contest/submissions_list_admin.html
Normal file
@@ -0,0 +1,114 @@
|
||||
{% extends 'oj_base.html' %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% load submission %}
|
||||
{% load user %}
|
||||
<div class="container main">
|
||||
<div class="contest-tab">
|
||||
<ul class="nav nav-tabs nav-tabs-google">
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/">比赛详情</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/problems/">题目</a>
|
||||
</li>
|
||||
<li role="presentation" class="active">
|
||||
<a href="/contest/{{ contest.id }}/submissions/">提交</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/rank/">排名</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr class="" success>
|
||||
<th>#</th>
|
||||
<th>题目名称</th>
|
||||
<th>用户</th>
|
||||
<th>提交时间</th>
|
||||
<th>
|
||||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" id="languageFilter" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="true">
|
||||
语言<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="languageFilter">
|
||||
<li><a href="/contest/{{ contest.id }}/submissions/?language=1">C</a></li>
|
||||
<li><a href="/contest/{{ contest.id }}/submissions/?language=2">C++</a></li>
|
||||
<li><a href="/contest/{{ contest.id }}/submissions/?language=3">Java</a></li>
|
||||
<li><a href="/contest/{{ contest.id }}/submissions/">取消筛选</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</th>
|
||||
<th>运行时间</th>
|
||||
<th>
|
||||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" id="resultFilter" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="true">
|
||||
结果<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="resultFilter">
|
||||
<li><a href="/contest/{{ contest.id }}/submissions/?result=0">Accepted</a></li>
|
||||
<li><a href="/contest/{{ contest.id }}/submissions/?result=6">Wrong Answer</a></li>
|
||||
<li><a href="/contest/{{ contest.id }}/submissions/?result=1">Runtime Error</a></li>
|
||||
<li><a href="/contest/{{ contest.id }}/submissions/?result=2">Time Limit Exceeded</a></li>
|
||||
<li><a href="/contest/{{ contest.id }}/submissions/?result=3">Memory Limit Exceeded</a></li>
|
||||
<li><a href="/contest/{{ contest.id }}/submissions/?result=4">Compile Error</a></li>
|
||||
<li><a href="/contest/{{ contest.id }}/submissions/?result=5">Format Error</a></li>
|
||||
<li><a href="/contest/{{ contest.id }}/submissions/">取消筛选</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% if submissions %}
|
||||
<tbody>
|
||||
|
||||
{% for item in submissions %}
|
||||
<tr>
|
||||
<th scope="row"><a href="/submission/{{ item.id }}/">
|
||||
{{ forloop.counter |add:start_id }}</a></th>
|
||||
<th scope="row">
|
||||
<a href="/contest/{{ item.contest_id }}/problem/{{ item.problem_id }}/">{{ item.title }}</a>
|
||||
</th>
|
||||
<td>{{ item.user_id|get_username }}</td>
|
||||
<td>{{ item.create_time }}</td>
|
||||
<td>
|
||||
{{ item.language|translate_language }}
|
||||
</td>
|
||||
<td>
|
||||
{% if item.accepted_answer_time %}
|
||||
{{ item.accepted_answer_time }}ms
|
||||
{% else %}
|
||||
--
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="alert-{{ item.result|translate_result_class }}">
|
||||
<strong>{{ item.result|translate_result }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% else %}
|
||||
<p>本场比赛还没有提交记录</p>
|
||||
{% endif %}
|
||||
</table>
|
||||
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
{% if previous_page %}
|
||||
<li class="previous"><a
|
||||
href="/contest/{{ contest.id }}/submissions/{{ previous_page }}/{% if filter %}?{{ filter.name }}={{ filter.content }}{% endif %}">
|
||||
<span aria-hidden="true">←</span> 上一页</a></li>
|
||||
{% endif %}
|
||||
{% if next_page %}
|
||||
<li class="next">
|
||||
<a href="/contest/{{ contest.id }}/submissions/{{ next_page }}/{% if filter %}?{{ filter.name }}={{ filter.content }}{% endif %}">
|
||||
下一页 <span aria-hidden="true">→</span></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="problem-section">
|
||||
<label class="problem-label">描述</label>
|
||||
|
||||
<p class="problem-detail">{{ problem.description|safe }}</p>
|
||||
<div class="problem-detail">{{ problem.description|safe }}</div>
|
||||
</div>
|
||||
<div class="problem-section">
|
||||
<label class="problem-label">输入</label>
|
||||
@@ -48,7 +48,7 @@
|
||||
{% if problem.hint %}
|
||||
<div class="problem-section hide">
|
||||
<label class="problem-label">提示</label>
|
||||
<p class="problem-detail">{{ problem.hint|safe }}</p>
|
||||
<div class="problem-detail">{{ problem.hint|safe }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="problem-section hide">
|
||||
|
||||
Reference in New Issue
Block a user