Skip to content

Commit 3acf7fb

Browse files
committed
Added orderNumber to part
1 parent 31ff979 commit 3acf7fb

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ repos:
1010
- id: check-ast
1111
- id: trailing-whitespace
1212
- id: pretty-format-json
13+
args:
14+
- "--autofix"
1315

1416
- repo: https://github.com/myint/autoflake
1517
rev: v2.2.0
@@ -24,4 +26,4 @@ repos:
2426
- repo: https://github.com/psf/black
2527
rev: 23.7.0
2628
hooks:
27-
- id: black
29+
- id: black

in2lambda/figures/O2_potential.png

63.3 KB
Loading
260 KB
Loading

in2lambda/figures/rocket-momentum.png

388 KB
Loading

in2lambda/json_convert/json_convert.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def converter(
5454
for j in range(1, len(ListQuestions[i].parts)):
5555
output["parts"].append(deepcopy(template["parts"][0]))
5656
output["parts"][j]["content"] = ListQuestions[i].parts[j].text
57+
output["parts"][j]["orderNumber"] = j
5758
output["parts"][j]["workedSolution"]["content"] = (
5859
ListQuestions[i].parts[j].worked_solution
5960
)
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
{
2-
"title": "Question title here",
3-
"masterContent": "Top level question here",
4-
"publish": false,
52
"displayFinalAnswer": true,
63
"displayStructuredTutorial": true,
74
"displayWorkedSolution": true,
5+
"masterContent": "Top level question here",
86
"parts": [
97
{
108
"answer": "",
119
"content": "Part text here",
10+
"orderNumber": 0,
1211
"responseAreas": [],
1312
"tutorial": [],
1413
"universalPartId": "N/A",
1514
"workedSolution": {
16-
"content": "Part worked solution here",
17-
"id": "N/A",
18-
"title": ""
15+
"content": "Part worked solution here",
16+
"id": "N/A",
17+
"title": ""
1918
}
2019
}
21-
]
20+
],
21+
"publish": false,
22+
"title": "Question title here"
2223
}

0 commit comments

Comments
 (0)