sync: randomize imports: themes order, MCQ and UCQ choices

This commit is contained in:
nemunaire 2018-12-02 05:05:59 +01:00
parent 614003a7cd
commit abd7fc6bef
3 changed files with 24 additions and 2 deletions

View file

@ -2,6 +2,7 @@ package sync
import (
"fmt"
"math/rand"
"path"
"regexp"
"strings"
@ -54,6 +55,10 @@ func SyncThemes(i Importer) []string {
if themes, err := getThemes(i); err != nil {
errs = append(errs, err.Error())
} else {
rand.Shuffle(len(themes), func(i, j int) {
themes[i], themes[j] = themes[j], themes[i]
})
for _, tdir := range themes {
var authors []string
var intro string