sync: add dependency on flag to download file

This commit is contained in:
nemunaire 2018-09-07 20:53:08 +02:00 committed by Pierre-Olivier Mercier
commit 1e2a74f3ca
9 changed files with 112 additions and 16 deletions

View file

@ -20,18 +20,18 @@ type ExerciceDependency struct {
Theme string `toml:",omitempty"`
}
// ExerciceUnlockFile holds parameters related to a locked file.
type ExerciceUnlockFile struct {
Filename string `toml:",omitempty"`
}
// ExerciceFlag holds informations about a "classic" flag.
type ExerciceFlag struct {
Label string `toml:",omitempty"`
Raw string
IgnoreCase bool `toml:",omitempty"`
Help string `toml:",omitempty"`
LockedFile []ExerciceFlag `toml:unlock_file",omitempty"`
}
// ExerciceUnlockFile holds parameters related to a locked file.
type ExerciceFlag struct {
Filename string `toml:",omitempty"`
IgnoreCase bool `toml:",omitempty"`
Help string `toml:",omitempty"`
LockedFile []ExerciceUnlockFile `toml:"unlock_file,omitempty"`
}
// ExerciceFlagMCQChoice holds a choice for an MCQ flag.
@ -60,7 +60,7 @@ type ExerciceFlagUCQ struct {
DisplayAs string `toml:",omitempty"`
Choices_Cost int64 `toml:",omitempty"`
Choice []ExerciceFlagUCQChoice
LockedFile []ExerciceFlag `toml:unlock_file",omitempty"`
LockedFile []ExerciceUnlockFile `toml:"unlock_file,omitempty"`
}
// ExerciceParams contains values parsed from defines.txt.