-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathMasteryCriteria.js
71 lines (69 loc) · 1.6 KB
/
MasteryCriteria.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// -*- coding: utf-8 -*-
// Generated by scripts/generate_from_specs.py
// MasteryCriteria
export default {
DO_ALL: "do_all",
M_OF_N: "m_of_n",
NUM_CORRECT_IN_A_ROW_10: "num_correct_in_a_row_10",
NUM_CORRECT_IN_A_ROW_2: "num_correct_in_a_row_2",
NUM_CORRECT_IN_A_ROW_3: "num_correct_in_a_row_3",
NUM_CORRECT_IN_A_ROW_5: "num_correct_in_a_row_5",
};
export const SCHEMA = {
"$id": "/schemas/mastery_criteria",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Schema for mastery criteria of exercise content types",
"additionalProperties": false,
"required": ["mastery_model"],
"definitions": {
"mastery_model": {
"type": "string",
"$exportConstants": "mastery_criteria",
"enum": [
"do_all",
"m_of_n",
"num_correct_in_a_row_2",
"num_correct_in_a_row_3",
"num_correct_in_a_row_5",
"num_correct_in_a_row_10"
]
}
},
"properties": {
"m": true,
"n": true,
"mastery_model": {
"$ref": "#/definitions/mastery_model"
}
},
"anyOf": [
{
"properties": {
"mastery_model": {
"const": "m_of_n"
}
},
"required": ["m", "n"]
},
{
"properties": {
"mastery_model": {
"enum": [
"do_all",
"num_correct_in_a_row_2",
"num_correct_in_a_row_3",
"num_correct_in_a_row_5",
"num_correct_in_a_row_10"
]
},
"m": {
"type": "null"
},
"n": {
"type": "null"
}
}
}
]
};