settings: change param to enable/disable depends by the depth

This commit is contained in:
nemunaire 2019-01-18 20:30:47 +01:00
parent 5d432cdcfc
commit 4ee70a8781
6 changed files with 12 additions and 15 deletions

View file

@ -51,11 +51,7 @@ func saveSettings(_ httprouter.Params, body []byte) (interface{}, error) {
func ApplySettings(config settings.FICSettings) {
fic.PartialValidation = config.PartialValidation
if config.EnableExerciceDepend {
fic.UnlockedChallengeDepth = 0
} else {
fic.UnlockedChallengeDepth = -1
}
fic.UnlockedChallengeDepth = config.UnlockedChallengeDepth
fic.FirstBlood = config.FirstBlood
fic.SubmissionCostBase = config.SubmissionCostBase
fic.HintCoefficient = config.HintCurCoefficient