mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: fix homework scoreboard display
This commit is contained in:
1 parent
c2ad7df336
commit
bbbb3cc84a
3 files changed
+10
-6
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "4.2.7",
|
||||
"version": "4.2.8",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/plugin-api",
|
||||
"module": "src/plugin-api",
|
||||
|
||||
@@ -375,11 +375,9 @@ const homework = buildContestRule({
|
||||
}
|
||||
const detail = [];
|
||||
for (const j in effective) {
|
||||
detail.push({
|
||||
...effective[j],
|
||||
penaltyScore: penaltyScore(effective[j]),
|
||||
time: time(effective[j]),
|
||||
});
|
||||
effective[j].penaltyScore = penaltyScore(effective[j]);
|
||||
effective[j].time = time(effective[j]);
|
||||
detail.push(effective[j]);
|
||||
}
|
||||
return {
|
||||
score: sumBy(detail, 'score'),
|
||||
|
||||
@@ -579,6 +579,12 @@ const scripts: UpgradeScript[] = [
|
||||
});
|
||||
return true;
|
||||
},
|
||||
async function _71_72() {
|
||||
await iterateAllContest(async (tdoc) => {
|
||||
if (tdoc.rule === 'homework') await contest.recalcStatus(tdoc.domainId, tdoc.docId);
|
||||
});
|
||||
return true;
|
||||
},
|
||||
];
|
||||
|
||||
export default scripts;
|
||||
Reference in new issue
Block a user