添加功能:pretest discuss user dashboard statistics

This commit is contained in:
undefined committed 2020-04-27 12:18:36 +08:00
1 parent 61cba6f180
commit 15d43636c0
41 files changed
+920 -523

No files matched your search

+1
View File
@@ -96,6 +96,7 @@ class RecordConnectionHandler extends ConnectionHandler {
async onRecordChange(data) {
const rdoc = data.value;
if (rdoc.tid && rdoc.tid.toString() !== this.tid) return;
// eslint-disable-next-line prefer-const
let [udoc, pdoc] = await Promise.all([user.getById(rdoc.uid), problem.getById(rdoc.pid)]);
if (pdoc.hidden && !this.user.hasPerm(PERM_VIEW_PROBLEM_HIDDEN)) pdoc = null;
this.send({ html: await this.renderHTML('record_main_tr.html', { rdoc, udoc, pdoc }) });