Files can now depends on MCQ
This commit is contained in:
parent
823328ead2
commit
e937073588
8 changed files with 90 additions and 28 deletions
|
|
@ -69,6 +69,13 @@ func genFileList(in []fic.EFile, e error) (out []APIFile, err error) {
|
|||
}
|
||||
|
||||
g.Depends = append(g.Depends, k)
|
||||
} else if m, ok := d.(fic.MCQ); ok {
|
||||
m, err = fic.GetMCQ(m.Id)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
g.Depends = append(g.Depends, m)
|
||||
} else {
|
||||
err = errors.New(fmt.Sprintf("Unknown type %T to handle file dependancy", k))
|
||||
return
|
||||
|
|
|
|||
Reference in a new issue