admin: Check all theme/exercice attribute are in sync with repo

This commit is contained in:
nemunaire 2025-03-28 13:09:13 +01:00
parent 5e262b75a3
commit 74f388a2b9
18 changed files with 818 additions and 142 deletions

View file

@ -75,8 +75,8 @@ func SpeedySyncDeep(i Importer) (errs SyncReport) {
if themes, err := fic.GetThemes(); err == nil {
DeepSyncProgress = 2
if i.Exists(StandaloneExercicesDirectory) {
themes = append(themes, &fic.Theme{Path: StandaloneExercicesDirectory})
if i.Exists(fic.StandaloneExercicesDirectory) {
themes = append(themes, &fic.StandaloneExercicesTheme)
}
var themeStep uint8 = uint8(250) / uint8(len(themes))
@ -147,8 +147,8 @@ func SyncDeep(i Importer) (errs SyncReport) {
DeepSyncProgress = 2
// Also synchronize standalone exercices
if i.Exists(StandaloneExercicesDirectory) {
themes = append(themes, &fic.Theme{Path: StandaloneExercicesDirectory})
if i.Exists(fic.StandaloneExercicesDirectory) {
themes = append(themes, &fic.StandaloneExercicesTheme)
}
var themeStep uint8 = uint8(250) / uint8(len(themes))