settings: change param to enable/disable depends by the depth
This commit is contained in:
parent
5d432cdcfc
commit
4ee70a8781
6 changed files with 12 additions and 15 deletions
|
@ -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
|
||||
|
|
Reference in a new issue