New option to allow teams to self reset their progression

This commit is contained in:
nemunaire 2023-11-04 21:14:16 +01:00
parent a0c34018cf
commit d6ff46ca7f
9 changed files with 173 additions and 3 deletions

View file

@ -71,6 +71,7 @@ func reloadSettings(config *settings.Settings) {
allowRegistration = config.AllowRegistration
canJoinTeam = config.CanJoinTeam
denyTeamCreation = config.DenyTeamCreation
canResetProgression = config.WorkInProgress && config.CanResetProgression
fic.HintCoefficient = config.HintCurCoefficient
fic.WChoiceCoefficient = config.WChoiceCurCoefficient
fic.ExerciceCurrentCoefficient = config.ExerciceCurCoefficient
@ -211,6 +212,8 @@ func treat(raw_path string) {
treatOpeningHint(raw_path, team)
case "choices":
treatWantChoices(raw_path, team)
case "reset_progress":
treatResetProgress(raw_path, team)
case ".locked":
treatLocked(raw_path, team)
default: