Handle optionnal flags
This commit is contained in:
parent
e581630d5e
commit
a414cd22c8
18 changed files with 68 additions and 22 deletions
|
|
@ -314,6 +314,11 @@ func (c *MCQ_entry) GetJustifiedFlag(e *Exercice) (*FlagKey, error) {
|
|||
return e.GetFlagKeyByLabel(fmt.Sprintf("\\%%%d\\%%%%", c.Id))
|
||||
}
|
||||
|
||||
// IsOptionnal to know if the flag can be omitted when validating the step.
|
||||
func (m *MCQ) IsOptionnal() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Check if the given vals are the expected ones to validate this flag.
|
||||
func (m *MCQ) Check(v interface{}) int {
|
||||
var vals map[int]bool
|
||||
|
|
|
|||
Reference in a new issue