libfic: new way to handle exercice dependancies
This commit is contained in:
parent
c5f8288f39
commit
8e6b8829ea
3 changed files with 33 additions and 8 deletions
|
@ -51,7 +51,11 @@ func saveSettings(_ httprouter.Params, body []byte) (interface{}, error) {
|
|||
|
||||
func ApplySettings(config settings.FICSettings) {
|
||||
fic.PartialValidation = config.PartialValidation
|
||||
fic.UnlockedChallenges = !config.EnableExerciceDepend
|
||||
if config.EnableExerciceDepend {
|
||||
fic.UnlockedChallengeDepth = 0
|
||||
} else {
|
||||
fic.UnlockedChallengeDepth = -1
|
||||
}
|
||||
fic.FirstBlood = config.FirstBlood
|
||||
fic.SubmissionCostBase = config.SubmissionCostBase
|
||||
fic.HintCoefficient = config.HintCurCoefficient
|
||||
|
|
Reference in a new issue