sync: MCQ justifications are given in the choice tag directly
This commit is contained in:
parent
d7f0425d8a
commit
33f7d104e4
2 changed files with 9 additions and 10 deletions
|
|
@ -233,7 +233,7 @@ func buildExerciceFlags(i Importer, exercice fic.Exercice) (flags map[int64]impo
|
|||
for cid, choice := range flag.Choice {
|
||||
var val bool
|
||||
|
||||
if choice.Justification != nil {
|
||||
if choice.Raw != nil {
|
||||
if hasOne && !isJustified {
|
||||
errs = append(errs, fmt.Sprintf("%q: error MCQ #%d: all true items has to be justified in this MCQ.", path.Base(exercice.Path), nline+1))
|
||||
continue
|
||||
|
|
@ -259,8 +259,8 @@ func buildExerciceFlags(i Importer, exercice fic.Exercice) (flags map[int64]impo
|
|||
Response: val,
|
||||
})
|
||||
|
||||
if isJustified && choice.Justification != nil {
|
||||
addedFlag, choices, berrs := buildKeyFlag(exercice, *choice.Justification, nline+1, "Flag correspondant")
|
||||
if isJustified && choice.Raw != nil {
|
||||
addedFlag, choices, berrs := buildKeyFlag(exercice, choice.ExerciceFlag, nline+1, "Flag correspondant")
|
||||
if len(berrs) > 0 {
|
||||
errs = append(errs, berrs...)
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue