sync: Implement vector flags

This commit is contained in:
nemunaire 2019-09-06 23:08:59 +02:00
parent 99fcc99e82
commit 6265f85149

View File

@ -193,16 +193,18 @@ func buildExerciceFlags(i Importer, exercice fic.Exercice) (flags map[int64]impo
flag.Type = "key"
case "key":
flag.Type = "key"
case "vector":
flag.Type = "vector"
case "ucq":
flag.Type = "ucq"
case "mcq":
flag.Type = "mcq"
default:
errs = append(errs, fmt.Sprintf("%q: flag #%d: invalid type of flag: should be 'key', 'mcq' or 'ucq'.", path.Base(exercice.Path), nline+1))
errs = append(errs, fmt.Sprintf("%q: flag #%d: invalid type of flag: should be 'key', 'mcq', 'ucq' or 'vector'.", path.Base(exercice.Path), nline+1))
continue
}
if flag.Type == "key" || flag.Type == "ucq" {
if flag.Type == "key" || flag.Type == "ucq" || flag.Type == "vector" {
addedFlag, choices, berrs := buildKeyFlag(exercice, flag, nline+1, "Flag")
if len(berrs) > 0 {
errs = append(errs, berrs...)