mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: homework: fix duration setting
This commit is contained in:
1 parent
00176ddb14
commit
e6d0bb51d4
3 files changed
+7
-3
No files matched your search
@@ -78,6 +78,10 @@ class HomeworkDetailHandler extends Handler {
|
||||
const psdict = {};
|
||||
let rdict = {};
|
||||
if (tsdoc) {
|
||||
if (tsdoc.attend && !tsdoc.startAt && contest.isOngoing(tdoc)) {
|
||||
await contest.setStatus(domainId, tid, this.user._id, { startAt: new Date() });
|
||||
tsdoc.startAt = new Date();
|
||||
}
|
||||
for (const pdetail of tsdoc.journal || []) {
|
||||
psdict[pdetail.pid] = pdetail;
|
||||
rdict[pdetail.rid] = { _id: pdetail.rid };
|
||||
|
||||
Reference in new issue
Block a user