sync: randomize imports: themes order, MCQ and UCQ choices
This commit is contained in:
parent
614003a7cd
commit
abd7fc6bef
3 changed files with 24 additions and 2 deletions
|
@ -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
|
||||
|
|
Reference in a new issue