core: update contest_export fields

This commit is contained in:
undefined committed 2022-05-19 20:34:49 +08:00
1 parent ffb1e65d2f
commit bcf0938f90
3 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.13.8",
"version": "3.13.9",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+1 -1
View File
@@ -307,7 +307,7 @@ export interface RecordDoc {
}
export interface ScoreboardNode {
type: 'string' | 'rank' | 'user' | 'record' | 'records' | 'problem' | 'solved' | 'time' | 'total_score';
type: 'string' | 'rank' | 'user' | 'email' | 'record' | 'records' | 'problem' | 'solved' | 'time' | 'total_score';
value: string;
raw?: any;
score?: number;
+4 -4
View File
@@ -88,7 +88,7 @@ const acm = buildContestRule({
{ type: 'rank', value: '#' },
{ type: 'user', value: _('User') },
];
if (isExport) columns.push({ type: 'string', value: _('Email') });
if (isExport) columns.push({ type: 'email', value: _('Email') });
columns.push({ type: 'solved', value: `${_('Solved')}\n${_('Total Time')}` });
for (let i = 1; i <= tdoc.pids.length; i++) {
const pid = tdoc.pids[i - 1];
@@ -139,7 +139,7 @@ const acm = buildContestRule({
{ type: 'rank', value: rank.toString() },
{ type: 'user', value: udict[tsdoc.uid].uname, raw: tsdoc.uid },
];
if (isExport) row.push({ type: 'string', value: udict[tsdoc.uid].mail });
if (isExport) row.push({ type: 'email', value: udict[tsdoc.uid].mail });
row.push({
type: 'time',
value: `${tsdoc.accept || 0}\n${misc.formatSeconds(tsdoc.time || 0.0, false)}`,
@@ -206,7 +206,7 @@ const oi = buildContestRule({
{ type: 'rank', value: '#' },
{ type: 'user', value: _('User') },
];
if (isExport) columns.push({ type: 'string', value: _('Email') });
if (isExport) columns.push({ type: 'email', value: _('Email') });
columns.push({ type: 'total_score', value: _('Total Score') });
for (let i = 1; i <= tdoc.pids.length; i++) {
if (isExport) {
@@ -254,7 +254,7 @@ const oi = buildContestRule({
{ type: 'string', value: rank.toString() },
{ type: 'user', value: udict[tsdoc.uid].uname, raw: tsdoc.uid },
];
if (isExport) row.push({ type: 'string', value: udict[tsdoc.uid].mail });
if (isExport) row.push({ type: 'email', value: udict[tsdoc.uid].mail });
row.push({ type: 'total_score', value: tsdoc.score || 0 });
for (const pid of tdoc.pids) {
const index = `${tsdoc.uid}/${tdoc.domainId}/${pid}`;