训练(题单)功能

This commit is contained in:
masnn committed 2020-04-16 22:19:31 +08:00
1 parent e06283c0cc
commit 97b0d782b9
24 files changed
+466 -105

No files matched your search

+7 -6
View File
@@ -118,6 +118,12 @@ class ContestScoreboardHiddenError extends ForbiddenError {
this.params = [tid];
}
}
class TrainingAlreadyEnrollError extends ForbiddenError {
constructor(tid, uid) {
super("You've already enrolled this training.");
this.params = [tid, uid];
}
}
class ProblemNotFoundError extends NotFoundError {
constructor(pid) {
super('ProblemNotFoundError');
@@ -180,6 +186,7 @@ module.exports = {
ContestAlreadyAttendedError,
UserFacingError,
SystemError,
TrainingAlreadyEnrollError,
};
/*
@@ -337,12 +344,6 @@ class TrainingRequirementNotSatisfiedError(ForbiddenError):
return 'Training requirement is not satisfied.'
class TrainingAlreadyEnrollError(ForbiddenError):
@property
def message(self):
return "You've already enrolled this training."
class UsageExceededError(ForbiddenError):
@property
def message(self):