settings: Add an option to show MCQ distance from good

This commit is contained in:
nemunaire 2022-01-20 16:06:27 +01:00
parent 4b82987bbb
commit 63d8ae4ecd
4 changed files with 17 additions and 1 deletions

View file

@ -14,6 +14,9 @@ import (
// DisplayAllFlags doesn't respect the predefined constraint existing between flags.
var DisplayAllFlags bool
// DisplayMCQBadCount activates the report of MCQ bad responses counter.
var DisplayMCQBadCount bool
type myTeamFile struct {
Path string `json:"path"`
Name string `json:"name"`
@ -140,7 +143,9 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
exercice.Tries, stime = t.CountTries(e)
exercice.SolvedTime = stime
if exercice.Tries > 0 {
exercice.SolveDist = t.LastTryDist(e)
if DisplayMCQBadCount {
exercice.SolveDist = t.LastTryDist(e)
}
}
}