sync: Allow using challenge.toml instead of challenge.txt

This commit is contained in:
nemunaire 2023-05-05 15:25:20 +02:00
parent 20c41ec573
commit 2140939364
4 changed files with 12 additions and 6 deletions

View file

@ -120,7 +120,7 @@ func buildExerciceHints(i Importer, exercice *fic.Exercice, exceptions *CheckExc
// CheckExerciceHints checks if all hints are corrects..
func CheckExerciceHints(i Importer, exercice *fic.Exercice, exceptions *CheckExceptions) ([]importHint, []error) {
exceptions = exceptions.GetFileExceptions("challenge.txt")
exceptions = exceptions.GetFileExceptions("challenge.txt", "challenge.toml")
return buildExerciceHints(i, exercice, exceptions)
}
@ -130,7 +130,7 @@ func SyncExerciceHints(i Importer, exercice *fic.Exercice, flagsBindings map[int
if _, err := exercice.WipeHints(); err != nil {
errs = append(errs, err)
} else {
exceptions = exceptions.GetFileExceptions("challenge.txt")
exceptions = exceptions.GetFileExceptions("challenge.txt", "challenge.toml")
hints, berrs := buildExerciceHints(i, exercice, exceptions)
errs = append(errs, berrs...)