-
-
Notifications
You must be signed in to change notification settings - Fork 435
Enhance Problem Customization by Restructuring Tdoc Schema #1016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bhscer
wants to merge
28
commits into
hydro-dev:master
Choose a base branch
from
bhscer:better-contest
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 25 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
0ece60b
a tmp commit
bhscer c6d2002
small fix
bhscer 2355c1f
fix the problem of dnd
bhscer 74a181b
add a record column to optimize the speed
bhscer 9855dbd
remove some needless checks
bhscer 137c186
fix
bhscer 2a15f6b
fix
bhscer c5ab8cc
optimze
bhscer 2ff5a01
fix
bhscer 2dc6608
fix dep in ui-default
bhscer 6f455cf
fix some missing label
bhscer cce8108
label is no need when upgrade
bhscer 8d661b5
lagacy add/edit contest pids need no label
bhscer c9772e3
add deprecated flag && fix
bhscer 021e0b9
admin view homework problem need no tid param
bhscer 5262ee3
support restore problem when back from the ValidationError page
bhscer 956c4b8
fix recalcStatus missing && optimize the scoreboard with large data
bhscer 5d55662
fix the judgement of a scoreboard is large or not
bhscer 418b4be
fix a missing judge of tooltip
bhscer d63c2a9
fix some missing usage of pid2idx
bhscer 16cc94b
fix missing label
bhscer cc7b8b7
fix existed problems in review
bhscer 6bc4c51
Merge branch 'master' into better-contest
bhscer e55f1d3
fix
bhscer 9584fd8
strcuture optimize
bhscer ed21dcd
fix
bhscer 06f8a12
fix
bhscer c56b650
let problemConfig in data instead in param
bhscer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -247,6 +247,13 @@ export interface TrainingNode { | |
| pids: number[], | ||
| } | ||
|
|
||
| export interface ContestProblemConfig { | ||
| label?: string; | ||
| score?: number; | ||
| balloon?: { color: string, name: string }; | ||
| // [key: string]: any, | ||
| } | ||
|
|
||
| export interface Tdoc extends Document { | ||
| docId: ObjectId; | ||
| docType: document['TYPE_CONTEST']; | ||
|
|
@@ -257,6 +264,7 @@ export interface Tdoc extends Document { | |
| content: string; | ||
| rule: string; | ||
| pids: number[]; | ||
| problemConfig: Record<number, ContestProblemConfig>; | ||
| rated?: boolean; | ||
| _code?: string; | ||
| assign?: string[]; | ||
|
|
@@ -267,7 +275,9 @@ export interface Tdoc extends Document { | |
| lockAt?: Date; | ||
| unlocked?: boolean; | ||
| autoHide?: boolean; | ||
| /** @deprecated */ | ||
| balloon?: Record<number, string | { color: string, name: string }>; | ||
| /** @deprecated */ | ||
| score?: Record<number, number>; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove these types instead of marking as deprecate; deprecated means "do not use but it still works" |
||
| langs?: string[]; | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can lead to nosql injection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for my late reply.
So should we for example create a verify method in
ContestEditHandler, then plugin can usectx.withHandlerClassto modify the verify method?