New setting: introduce a decote/discount to exercice's gain
This commit is contained in:
parent
838ce2fb3f
commit
4451e41285
11 changed files with 123 additions and 24 deletions
|
@ -307,6 +307,13 @@ func ApplySettings(config *settings.Settings) {
|
|||
fic.SubmissionCostBase = config.SubmissionCostBase
|
||||
fic.SubmissionUniqueness = config.SubmissionUniqueness
|
||||
fic.CountOnlyNotGoodTries = config.CountOnlyNotGoodTries
|
||||
|
||||
if config.DiscountedFactor != fic.DiscountedFactor {
|
||||
fic.DiscountedFactor = config.DiscountedFactor
|
||||
if err := fic.DBRecreateDiscountedView(); err != nil {
|
||||
log.Println("Unable to recreate exercices_discounted view:", err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func ResetSettings() error {
|
||||
|
@ -318,6 +325,7 @@ func ResetSettings() error {
|
|||
HintCurCoefficient: 1,
|
||||
WChoiceCurCoefficient: 1,
|
||||
GlobalScoreCoefficient: 1,
|
||||
DiscountedFactor: 0,
|
||||
AllowRegistration: false,
|
||||
CanJoinTeam: false,
|
||||
DenyTeamCreation: false,
|
||||
|
|
Reference in a new issue