settings: Add an option to show MCQ distance from good
This commit is contained in:
parent
4b82987bbb
commit
63d8ae4ecd
@ -66,6 +66,7 @@ func ApplySettings(config settings.FICSettings) {
|
|||||||
fic.PartialValidation = config.PartialValidation
|
fic.PartialValidation = config.PartialValidation
|
||||||
fic.UnlockedChallengeDepth = config.UnlockedChallengeDepth
|
fic.UnlockedChallengeDepth = config.UnlockedChallengeDepth
|
||||||
fic.DisplayAllFlags = config.DisplayAllFlags
|
fic.DisplayAllFlags = config.DisplayAllFlags
|
||||||
|
fic.DisplayMCQBadCount = config.DisplayMCQBadCount
|
||||||
fic.FirstBlood = config.FirstBlood
|
fic.FirstBlood = config.FirstBlood
|
||||||
fic.SubmissionCostBase = config.SubmissionCostBase
|
fic.SubmissionCostBase = config.SubmissionCostBase
|
||||||
fic.HintCoefficient = config.HintCurCoefficient
|
fic.HintCoefficient = config.HintCurCoefficient
|
||||||
@ -97,6 +98,7 @@ func ResetSettings() error {
|
|||||||
UnlockedChallengeDepth: 0,
|
UnlockedChallengeDepth: 0,
|
||||||
SubmissionUniqueness: false,
|
SubmissionUniqueness: false,
|
||||||
DisplayAllFlags: false,
|
DisplayAllFlags: false,
|
||||||
|
DisplayMCQBadCount: false,
|
||||||
EventKindness: false,
|
EventKindness: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -211,6 +211,13 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-check">
|
||||||
|
<label class="custom-control custom-checkbox">
|
||||||
|
<input class="custom-control-input" type="checkbox" ng-model="config.displayMCQBadCount">
|
||||||
|
<span class="custom-control-label">Afficher le décompte de mauvaises réponses des QCM</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<label class="custom-control custom-checkbox">
|
<label class="custom-control custom-checkbox">
|
||||||
<input class="custom-control-input" type="checkbox" ng-model="config.eventKindness">
|
<input class="custom-control-input" type="checkbox" ng-model="config.eventKindness">
|
||||||
|
@ -14,6 +14,9 @@ import (
|
|||||||
// DisplayAllFlags doesn't respect the predefined constraint existing between flags.
|
// DisplayAllFlags doesn't respect the predefined constraint existing between flags.
|
||||||
var DisplayAllFlags bool
|
var DisplayAllFlags bool
|
||||||
|
|
||||||
|
// DisplayMCQBadCount activates the report of MCQ bad responses counter.
|
||||||
|
var DisplayMCQBadCount bool
|
||||||
|
|
||||||
type myTeamFile struct {
|
type myTeamFile struct {
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
@ -140,9 +143,11 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
|
|||||||
exercice.Tries, stime = t.CountTries(e)
|
exercice.Tries, stime = t.CountTries(e)
|
||||||
exercice.SolvedTime = stime
|
exercice.SolvedTime = stime
|
||||||
if exercice.Tries > 0 {
|
if exercice.Tries > 0 {
|
||||||
|
if DisplayMCQBadCount {
|
||||||
exercice.SolveDist = t.LastTryDist(e)
|
exercice.SolveDist = t.LastTryDist(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if exercice.SolvedTime != nil && exercice.SolvedTime.Equal(time.Unix(0, 0)) {
|
if exercice.SolvedTime != nil && exercice.SolvedTime.Equal(time.Unix(0, 0)) {
|
||||||
exercice.SolvedTime = nil
|
exercice.SolvedTime = nil
|
||||||
|
@ -77,6 +77,8 @@ type FICSettings struct {
|
|||||||
CountOnlyNotGoodTries bool `json:"countOnlyNotGoodTries,omitempty"`
|
CountOnlyNotGoodTries bool `json:"countOnlyNotGoodTries,omitempty"`
|
||||||
// DisplayAllFlags doesn't respect the predefined constraint existing between flags.
|
// DisplayAllFlags doesn't respect the predefined constraint existing between flags.
|
||||||
DisplayAllFlags bool `json:"displayAllFlags,omitempty"`
|
DisplayAllFlags bool `json:"displayAllFlags,omitempty"`
|
||||||
|
// DisplayMCQBadCount activates the report of MCQ bad responses counter.
|
||||||
|
DisplayMCQBadCount bool `json:"displayMCQBadCount,omitempty"`
|
||||||
// EventKindness will ask browsers to delay notification interval.
|
// EventKindness will ask browsers to delay notification interval.
|
||||||
EventKindness bool `json:"eventKindness,omitempty"`
|
EventKindness bool `json:"eventKindness,omitempty"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user