mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: export user_info for homework (#776)
This commit is contained in:
1 parent
6454e2ed96
commit
f33be05cd9
1 file changed
+14
-5
@@ -632,8 +632,14 @@ const homework = buildContestRule({
|
||||
const columns: ScoreboardNode[] = [
|
||||
{ type: 'rank', value: _('Rank') },
|
||||
{ type: 'user', value: _('User') },
|
||||
{ type: 'total_score', value: _('Score') },
|
||||
];
|
||||
if (config.isExport) {
|
||||
columns.push({ type: 'email', value: _('Email') });
|
||||
columns.push({ type: 'string', value: _('School') });
|
||||
columns.push({ type: 'string', value: _('Name') });
|
||||
columns.push({ type: 'string', value: _('Student ID') });
|
||||
}
|
||||
columns.push({ type: 'total_score', value: _('Score') });
|
||||
if (config.isExport) {
|
||||
columns.push({ type: 'string', value: _('Original Score') });
|
||||
}
|
||||
@@ -675,11 +681,14 @@ const homework = buildContestRule({
|
||||
value: udoc.uname,
|
||||
raw: tsdoc.uid,
|
||||
},
|
||||
{
|
||||
type: 'string',
|
||||
value: tsdoc.penaltyScore || 0,
|
||||
},
|
||||
];
|
||||
if (config.isExport) {
|
||||
row.push({ type: 'email', value: udoc.mail });
|
||||
row.push({ type: 'string', value: udoc.school || '' });
|
||||
row.push({ type: 'string', value: udoc.displayName || '' });
|
||||
row.push({ type: 'string', value: udoc.studentId || '' });
|
||||
}
|
||||
row.push({ type: 'string', value: tsdoc.penaltyScore || 0 });
|
||||
if (config.isExport) {
|
||||
row.push({ type: 'string', value: tsdoc.score || 0 });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user