Dependancy between flags

This commit is contained in:
nemunaire 2018-12-02 19:21:07 +01:00
commit f9abdd23c6
8 changed files with 111 additions and 1 deletions

View file

@ -27,12 +27,14 @@ type ExerciceUnlockFile struct {
// ExerciceFlag holds informations about a "classic" flag.
type ExerciceFlag struct {
Id int64
Label string `toml:",omitempty"`
Raw string
IgnoreCase bool `toml:",omitempty"`
ValidatorRe string `toml:"validator_regexp,omitempty"`
Help string `toml:",omitempty"`
LockedFile []ExerciceUnlockFile `toml:"unlock_file,omitempty"`
NeedFlag []ExerciceDependency `toml:"need_flag,omitempty"`
}
// ExerciceFlagMCQChoice holds a choice for an MCQ flag.
@ -57,6 +59,7 @@ type ExerciceFlagUCQChoice struct {
// ExerciceFlagUCQ holds information about a UCQ flag.
type ExerciceFlagUCQ struct {
Id int64
Label string `toml:",omitempty"`
Raw string
IgnoreCase bool `toml:",omitempty"`
@ -66,6 +69,7 @@ type ExerciceFlagUCQ struct {
Choices_Cost int64 `toml:",omitempty"`
Choice []ExerciceFlagUCQChoice
LockedFile []ExerciceUnlockFile `toml:"unlock_file,omitempty"`
NeedFlag []ExerciceDependency `toml:"need_flag,omitempty"`
NoShuffle bool
}