Theme can be optional: exercices can be standalone

This commit is contained in:
nemunaire 2024-03-12 10:12:40 +01:00
commit a0bc832910
8 changed files with 81 additions and 39 deletions

View file

@ -393,7 +393,9 @@ func (t *Team) MyIssueFile() (ret []teamIssueFile, err error) {
if exo, err := claim.GetExercice(); err == nil && exo != nil {
exercice = &exo.Title
if theme, err := GetTheme(exo.IdTheme); err == nil {
if exo.IdTheme == nil {
url = path.Join("_", exo.URLId)
} else if theme, err := GetTheme(*exo.IdTheme); err == nil {
url = path.Join(theme.URLId, exo.URLId)
}
}