mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +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",
|
"name": "hydrooj",
|
||||||
"version": "4.2.7",
|
"version": "4.2.8",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/plugin-api",
|
"main": "src/plugin-api",
|
||||||
"module": "src/plugin-api",
|
"module": "src/plugin-api",
|
||||||
|
|||||||
@@ -375,11 +375,9 @@ const homework = buildContestRule({
|
|||||||
}
|
}
|
||||||
const detail = [];
|
const detail = [];
|
||||||
for (const j in effective) {
|
for (const j in effective) {
|
||||||
detail.push({
|
effective[j].penaltyScore = penaltyScore(effective[j]);
|
||||||
...effective[j],
|
effective[j].time = time(effective[j]);
|
||||||
penaltyScore: penaltyScore(effective[j]),
|
detail.push(effective[j]);
|
||||||
time: time(effective[j]),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
score: sumBy(detail, 'score'),
|
score: sumBy(detail, 'score'),
|
||||||
|
|||||||
@@ -579,6 +579,12 @@ const scripts: UpgradeScript[] = [
|
|||||||
});
|
});
|
||||||
return true;
|
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;
|
export default scripts;
|
||||||
Reference in new issue
Block a user