From 18f03587c3e9477b1fbb4d9fa9cd48c3898ef050 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Mon, 29 Jul 2019 17:32:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E6=AF=94?= =?UTF-8?q?=E8=B5=9B=E5=BE=97=E5=88=86=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/judger.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/judger.js b/libs/judger.js index 99c3ba5..e77f836 100644 --- a/libs/judger.js +++ b/libs/judger.js @@ -172,7 +172,11 @@ async function connect() { progressPusher.cleanupProgress(result.taskId); if (!judge_state) return; - judge_state.score = convertedResult.score; + if ( convertedResult.time < 900) { + judge_state.score = convertedResult.score + (convertedResult.time / 1000).toFixed(2)*convertedResult.score; + } else { + judge_state.score = convertedResult.score; + } judge_state.pending = false; judge_state.status = convertedResult.statusString; judge_state.total_time = convertedResult.time; From f2564a1459696e8190965637cdb2920a31f90f79 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Mon, 29 Jul 2019 17:38:48 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=AF=94?= =?UTF-8?q?=E8=B5=9B=E6=8F=90=E4=BA=A4=E9=A1=B5=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/judger.js | 1 + views/submission_contest.ejs | 442 +++++++++++++++++++++++++++++++++++ 2 files changed, 443 insertions(+) create mode 100644 views/submission_contest.ejs diff --git a/libs/judger.js b/libs/judger.js index e77f836..08d5ee9 100644 --- a/libs/judger.js +++ b/libs/judger.js @@ -158,6 +158,7 @@ async function connect() { } const result = msgPack.decode(payload); + console.log(result); winston.verbose('Received report for task ' + result.taskId); const judge_state = await JudgeState.findOne({ diff --git a/views/submission_contest.ejs b/views/submission_contest.ejs new file mode 100644 index 0000000..79fcf77 --- /dev/null +++ b/views/submission_contest.ejs @@ -0,0 +1,442 @@ +<% this.title = '提交记录 #' + info.submissionId %> +<% include util %> +<% include header %> + + + +
+ + + + + + + + + + + + + + + + + + + + +
编号题目状态分数总时间单项时间内存代码 / 答案文件提交者提交时间重新评测分享
+
<%= cid %>
+
<%= pid %>
+
<%= sid %>
+ + <% if (formattedCode !== null) { %> + + + + + <% } %> + + + + +
+ +
+
+ + + + +<% include submissions_item %> + + + + + +
+<% include footer %> From f420c02291ac20bff5a8bd752c3be21ce79b04c4 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Wed, 31 Jul 2019 10:44:55 +0800 Subject: [PATCH 3/3] =?UTF-8?q?bugfix:=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=AF=94=E8=B5=9B=E6=9F=90=E4=BA=9B=E9=A2=98=E7=9B=AE=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=B1=95=E7=A4=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/judger.js | 8 ++------ views/contest_edit.ejs | 2 +- views/submission.ejs | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/libs/judger.js b/libs/judger.js index 08d5ee9..cb52392 100644 --- a/libs/judger.js +++ b/libs/judger.js @@ -171,13 +171,9 @@ async function connect() { const convertedResult = judgeResult.convertResult(result.taskId, result.progress); winston.verbose('Reporting report finished: ' + result.taskId); progressPusher.cleanupProgress(result.taskId); - + console.log(convertedResult); if (!judge_state) return; - if ( convertedResult.time < 900) { - judge_state.score = convertedResult.score + (convertedResult.time / 1000).toFixed(2)*convertedResult.score; - } else { - judge_state.score = convertedResult.score; - } + judge_state.score = convertedResult.score; judge_state.pending = false; judge_state.status = convertedResult.statusString; judge_state.total_time = convertedResult.time; diff --git a/views/contest_edit.ejs b/views/contest_edit.ejs index 130a23a..2fa4e82 100644 --- a/views/contest_edit.ejs +++ b/views/contest_edit.ejs @@ -151,7 +151,7 @@ new window.Vue({ } }); const userselectarrayId = originUserselectarray.map(item=>item.id); - const userSelectArray = this.datas.filter((item) => { + const userSelectArray = this.allproblemList.filter((item) => { return userselectarrayId.includes(item.id); }) this.toggleSelection(userSelectArray); diff --git a/views/submission.ejs b/views/submission.ejs index 71b9c5e..fef0e89 100644 --- a/views/submission.ejs +++ b/views/submission.ejs @@ -34,6 +34,7 @@ +
已分享 编号 题目 状态