-
Notifications
You must be signed in to change notification settings - Fork 5
/
nokes-example-json.txt
executable file
·434 lines (334 loc) · 15.7 KB
/
nokes-example-json.txt
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
This is an example the client-server API for the Tim Nokes demo solution.
See http://www.andestutor.org/AAPT-2007 . The API is expressed in a form that
should be compatible with json-rpc-2.0.
Comments explain places where the Andes3 behavior is different than Andes2,
as well as some details of the user interface behavior. In particular,
all of the dialog boxes associated with defining quantities (variables,
bodies, axes and vectors) are replaced with plain text entry dialog boxes.
*******************************************************************************
0:02 Initial login
{"method": "open-problem", "params": {"time": 0.000, "problem": "s2e", "user": "joe", "section":"1234"}, "id": 1}
This request may also send the WebAssign session id. Width of a text box is
set explicitly by "width" in em units or implicitly by newlines in
the text.
[
{"action": "new-object", "id": "a0", "type": "statement", "mode": "locked",
"x": 3, "y": 5, "width": 80,
"text": "A spherical ball with a mass of 2.00 kg rests in the notch ..."},
{"action": "new-object", "id": "a1", "type": "graphics", "mode": "locked",
"x": 53, "y": 15, "dx": 150, "dy": "180",
"href": "http://www.andestutor.org/web-UI/s2e.gif"},
{"action": "new-object", "id": "a2", "type": "statement", "mode": "correct",
"x": 200, "y": 55,
"text": "g = 9.8 m/s^2 is the gravitational acceleration \nnear the surface of the earth."},
{"action": "new-object", "id": "a2.5", "type": "statement", "mode": "correct",
"x": 200, "y": 75,
"text": "T0 is the time."},
{"action": "log", "subscores": {"NSH_BO_Call_Count": [0,0],
"WWH_BO_Call_Count": [0,0],
"Correct_Entries_V_Entries": [0,0,0],
"Correct_Answer_Entries_V_Answer_Entries": [0,0,0]}},
{"action": "set-score", "score": 0}
]
If there was previous work, it would be included in the above response.
0:50 student draws ball. Since there is no "symbol", the statement
is attached to the object, and the x-statement and y-statement are optional.
{"method": "solution-step", "params": {"time": 50.000,
"action": "new-object", "id": "a3",
"type": "ellipse", "mode": "unknown",
"x": 66, "y": 188, "width": 25, "height": 30,
"text": "ball"}, "id": 2}
[
{"action": "log", "assoc": {"DRAW-BODY": "(BODY BALL)"}},
{"action": "set-score", "score": 15},
{"action": "modify-object", "id": "a3", "mode": "correct"}
]
1:09 Student draws axes. Unlike Andes2, the angle of the vector
is shown on the screen when the vector is being dragged out.
"angle" is angle in degrees; "radius" is length of axes;
"x-label", "y-label" are hard-coded into client.
{"method": "solution-step", "params": {"time": 69.000,
"action": "new-object", "id": "a4",
"type": "axes", "mode": "unknown",
"x": 277, "y": 188, "angle": 0, "radius": 120,
"x-label": "x", "y-label": "y"}, "id": 3}
[
{"action": "log", "assoc": {"DRAW-UNROTATED-AXES": "(DRAW-AXES 0)"}},
{"action": "set-score", "score": 25},
{"action": "modify-object", "id": "a4", "mode": "correct"}
]
1:14 student moves ball, client changes it to "unknown" Andes2 is
agnostic about object positions; Andes3 is not.
{"method": "solution-step", "params": {"time": 74.000,
"id": "a3", "action": "modify-object", "mode": "unknown",
"x": 88, "y": 99}, "id": 4}
[
{"action": "modify-object", "id": "a3", "mode": "correct"}
]
1:16 student moves axes, client changes it to "unknown"
{"method": "solution-step", "params": {"time": 76.000,
"action": "modify-object", "mode": "unknown",
"id": "a4", "x": 308, "y": 209}, "id": 5}
[
{"action": "modify-object", "id": "a4", "mode": "correct"}
]
1:57 define mass of ball. In Andes2, the given value is done
in the same step. In Andes3, it is separate.
{"method": "solution-step", "params": {"time": 117.001,
"action": "new-object", "id": "a5a",
"type": "statement", "mode": "unknown",
"x": 177, "y": 188, "width": 66, "symbol": "m",
"text": "m is the mass of the ball"}, "id": 6}
[
{"action": "log", "assoc": {"DEFINE-MASS": "(DEFINE-VAR (MASS BALL))"}},
{"action": "modify-object", "id": "a5a", "mode": "correct"}
]
{"method": "solution-step", "params": {"time": 118.001,
"action": "new-object", "id": "a5b",
"type": "equation", "mode": "unknown",
"x": 177, "y": 192, "width": 66,
"text": "m=2 kg"}, "id": 6.5}
[
{"action": "log", "parse": "(= m_BALL (DNUM 2.0 kg))"},
{"action": "set-score", "score": 40},
{"action": "modify-object", "id": "a5b", "mode": "correct"}
]
3:18 draw first force vector. Unlike Andes2, the angle of the vector
is shown on the screen when the vector is being dragged out.
{"method": "solution-step", "params": {"time": 198.001,
"action": "new-object", "id": "a6",
"type": "vector", "mode": "unknown",
"x": 240, "y": 222, "angle": 120, "radius": 60,
"symbol": "Fwall1", "x-statement": 300, "y-statement": 350,
"text": "Fwall1 is the normal force on the ball due to wall1"}, "id": 7}
[
{"action": "log", "assoc": {"DRAW-NORMAL": "(VECTOR (FORCE BALL WALL1 NORMAL :TIME 1) (DNUM 120 deg))"}},
{"action": "modify-object", "id": "a6", "mode": "correct"}
]
4:21 draw second force vector
{"method": "solution-step", "params": {"time": 261.001,
"action": "new-object", "id": "a7",
"type": "vector", "mode": "unknown",
"x": 241, "y": 224, "angle": 40, "radius": 88,
"symbol": "Fwall2", "x-statement": 300, "y-statement": 360,
"text": "Fwall2 is force due to wall2"}, "id": 8}
[
{"action": "log", "assoc": {"DRAW-NORMAL": "(VECTOR (FORCE BALL WALL3 NORMAL :TIME 1) (DNUM 40 deg))"}},
{"action": "modify-object", "id": "a7", "mode": "correct"}
]
5:09 draw third force vector
{"method": "solution-step", "params": {"time": 309.001,
"action": "new-object", "id": "a8",
"type": "vector", "mode": "unknown",
"x": 245, "y": 224, "angle": 270, "radius": 77,
"symbol": "Fearth", "x-statement": 300, "y-statement": 370,
"text": "Fearth is the weight force on the ball due to the earth"}, "id": 9}
[
{"action": "log", "assoc": {"DRAW-WEIGHT": "(VECTOR (FORCE BALL EARTH WEIGHT :TIME 1) (DNUM 270 deg))"}},
{"action": "modify-object", "id": "a8", "mode": "correct"}
]
6:25 First equation, client has to encode the backslash.
{"method": "solution-step", "params": {"time": 385.001,
"action": "new-object", "id": "a9",
"type": "equation", "mode": "unknown",
"x": 15, "y": 300,
"text": "Fwall1_x = Fwall1 * cos (\\thetaFwall1)"}, "id": 10}
[
{"action": "log", "parse": "(= Xc_Fn_BALL_WALL1_1_0 (* Fn_BALL_WALL1_1 (COS OFn_BALL_WALL1_1)))"},
{"action": "log", "assoc": {"COMPO-GENERAL-CASE": "(EQN (= Xc_Fn_BALL_WALL1_1_0 (* Fn_BALL_WALL1_1 (COS (- (DNUM 120 deg) (DNUM 0 deg))))))",
"WRITE-IMPLICIT-EQN": "(IMPLICIT-EQN (= OFn_BALL_WALL1_1 (DNUM 120 deg)))"}},
{"action": "modify-object", "id": "a9", "mode": "correct"}
]
7:01 Second equation
{"method": "solution-step", "params": {"time": 421.001,
"action": "new-object", "id": "a10",
"type": "equation", "mode": "unknown",
"x": 15, "y": 310,
"text": "Fwall1_y = Fwall1 * sin (\\thetaFwall1)"}, "id": 11}
[
{"action": "log", "parse": "(= Xc_Fn_BALL_WALL1_1_0 (* Fn_BALL_WALL1_1 (COS OFn_BALL_WALL1_1)))"},
{"action": "log", "assoc": {"COMPO-GENERAL-CASE": "(EQN (= Xc_Fn_BALL_WALL1_1_0 (* Fn_BALL_WALL1_1 (COS (- (DNUM 120 deg) (DNUM 0 deg))))))",
"(WRITE-IMPLICIT-EQN": "IMPLICIT-EQN (= OFn_BALL_WALL1_1 (DNUM 120 deg)))"}},
{"action": "modify-object", "id": "a10", "mode": "correct"}
]
7:39 Third equation
For the rest of this, I am going to skip the log stuff.
{"method": "solution-step", "params": {"time": 459.001,
"action": "new-object", "id": "a11",
"type": "equation", "mode": "unknown",
"x": 15, "y": 320,
"text": "Fwall2_x = Fwall2 * cos (\\thetaFwall2)"}, "id": 12}
[
{"action": "modify-object", "id": "a11", "mode": "correct"}
]
8:02 Fourth equation
{"method": "solution-step", "params": {"time": 482.001,
"action": "new-object", "id": "a12",
"type": "equation", "mode": "unknown",
"x": 15, "y": 330,
"text": "Fwall2_y = Fwall2 * sin(\\thetaFwall2)"}, "id": 13}
[
{"action": "modify-object", "id": "a12", "mode": "correct"}
]
8:37 Fifth equation
{"method": "solution-step", "params": {"time": 517.001,
"action": "new-object", "id": "a13",
"type": "equation", "mode": "unknown",
"x": 15, "y": 340,
"text": "Fearth_x = 0"}, "id": 14}
[
{"action": "modify-object", "id": "a13", "mode": "correct"}
]
9:31 Sixth equation (with error and fix)
{"method": "solution-step", "params": {"time": 571.001,
"action": "new-object", "id": "a14",
"type": "equation", "mode": "unknown",
"x": 15, "y": 350,
"text": "Fearth_y = Fearth_y * sin (\\thetaFearth)"}, "id": 15}
[
{"action": "modify-object", "id": "a14", "mode": "incorrect"}
]
{"method": "solution-step", "params": {"time": 590.001,
"action": "modify-object", "id": "a14",
"text": "Fearth_y = Fearth * sin (\\thetaFearth)"}, "id": 16}
[
{"action": "modify-object", "id": "a14", "mode": "correct"}
]
10:22 Ask for a hint. The student replies by typing in the help area.
{"method": "seek-help", "params": {"time": 571.001,
"action": "help-button"}, "id": 17}
Make the help text entry box come into focus.
[
{"action": "show-hint", "text": "Now that you have stated all of the given information, you should start on the major principles. What quantity is the problem seeking?"},
{"action": "focus-hint-text-box"}
]
{"method": "seek-help", "params": {"time": 657.001,
"action": "get-help", "text": "Fwall1"}, "id": 18}
Show hint with a link below it. On clicking, opens window with list of
principles. We may want to allow HTML in hint text, then the two actions can be
combined.
[
{"action": "show-hint", "text": "Right. What is the first principle application that you would like to work on? Hint: this principle application will usually be one that mentions the sought quantity explicitly. Therefore its equation may contain the sought quantity that the problem seeks."},
{"action" : "focus-major-principles", "text": "Choose a principle"}
]
{"method": "seek-help", "params": {"time": 671.001,
"action": "principles-menu", "value": "(nsl ((?axis . x)))"}, "id": 19}
[
{"action": "show-hint", "text": "Right indeed. Notice that the ball is at rest at T0."},
{"action": "show-hint-link", "text": "Explain more", "value": "explain-more"}
]
11:51 Draw acceleration vector
{"method": "solution-step", "params": {"time": 711.001,
"action": "new-object", "id": "a15",
"type": "vector", "mode": "unknown",
"x": 245, "y": 224, "angle": 270, "radius": 0,
"symbol": "a", "x-statement": 300, "y-statement": 370,
"text": "a is the acceleration of the ball"}, "id": 20}
[
{"action": "modify-object", "id": "a15", "mode": "correct"}
]
12:30 Seventh equation
{"method": "solution-step", "params": {"time": 750.001,
"action": "new-object", "id": "a16",
"type": "equation", "mode": "unknown",
"x": 15, "y": 360,
"text": "Fwall1_x + Fwall2_x + Fearth_x = m *a"}, "id": 21}
[
{"action": "set-score", "score": 57},
{"action": "modify-object", "id": "a16", "mode": "correct"}
]
13:01 Eighth equation
{"method": "solution-step", "params": {"time": 781.001,
"action": "new-object", "id": "a17",
"type": "equation", "mode": "unknown",
"x": 15, "y": 370,
"text": "Fwall1_y + Fwall2_y + Fearth_y = m*a"}, "id": 22}
[
{"action": "set-score", "score": 75},
{"action": "modify-object", "id": "a17", "mode": "correct"}
]
14:11 Ninth equation, turns red, ask for help.
{"method": "solution-step", "params": {"time": 851.001,
"action": "new-object", "id": "a18",
"type": "equation", "mode": "unknown",
"x": 15, "y": 380,
"text": "Fearth_y = m*g"}, "id": 23}
[
{"action": "set-score", "score": 74},
{"action": "modify-object", "id": "a18", "mode": "incorrect"}
]
Student asks for help by pressing the help button. They can also ask for
help by typing "help" or "?" in the Tutor pane text entry box.
14:20 Unlike Andes2, there is only one help button. Also, the Tutor pane is
non-blocking, thus there is no need for the "OK" button seen in Andes2.
{"method": "seek-help", "params": {"time": 860.001,
"action": "help-button"}, "id": 24}
[
{"action": "show-hint", "text": "Think about the direction of the weight force on the ball at T0 due to the earth."},
{"action": "show-hint-link", "text": "Explain more", "value": "explain-more"}
]
{"method": "seek-help", "params": {"time": 882.001,
"action": "get-help", "value": "explain-more"}, "id": 25}
[
{"action": "show-hint", "text": "Because the vector is parallel to the Y axis but in the negative direction, the projection equation is Fearth_y = - Fearth so Fearth_y stands for a negative value."},
{"action": "show-hint-link", "text": "Explain more", "value": "explain-more"}
]
14:58 Ninth equation, again.
{"method": "solution-step", "params": {"time": 898.001,
"action": "modify-object", "id": "a18", "mode": "unknown",
"text": "Fearth_y = -m*g"}, "id": 26}
[
{"action": "modify-object", "id": "a18", "mode": "correct"}
]
15:05 Ask for Fwall1. I would like to avoid another button on the interface.
The equation "Fwall1=?" in an equation box will start the calculator.
{"method": "solution-step", "params": {"time": 905.001,
"action": "new-object", "id": "a18.5", "type": "equation",
"mode": "unknown", "x": 200, "y": 380,
"text": "Fwall1=?"}, "id": 27}
The two returns could be combined:
[
{"action": "modify-object", "id": "a18.5", "mode": "correct"}
{"action": "modify-object", "id": "a18.5", "text": "Fwall1 = 15.24609350323404 N"}
]
15:13 Submit final answer. There are several methods for this: write an
equation of the form "var=expr" and draw a rectangle around it (modulo
the significant digits issue) or draw a rectangle and label it with an equation
of the form "var = expr", where var is the variable representing the sought
quantity. Alternatively, allow the student to write a text of the form
"answer: expr" using either the equation or the phrase tool. We could have a text
box included with the original problem statement with "text" set to
"answer: ??" and "mode" set as "unknown".
{"method": "solution-step", "params": {"time": 913.001,
"action": "new-object", "id": "a19",
"type": "statement", "mode": "unknown",
"x": 15, "y": 390,
"text": "answer: 15.2"}, "id": 28}
[
{"action": "show-hint", "text": "Forgot to put units on a number."},
{"action": "show-hint-link", "text": "Explain more", "value": "explain-more"},
{"action": "modify-object", "id": "a19", "mode": "incorrect"}
]
{"method": "seek-help", "params": {"time": 918.001,
"action": "get-help", "value": "explain-more"}, "id": 29}
[
{"action": "show-hint", "text": "This equation is dimensionally inconsistent. When numbers are used in equations, they must include the appropriate units. It looks like one of the numbers you've used is lacking the units."}
]
{"method": "solution-step", "params": {"time": 913.001,
"action": "modify-object", "id": "a19", "mode": "unknown",
"text": "answer: 15.2 N"}, "id": 30}
[
{"action": "set-score", "score": 97},
{"action": "modify-object", "id": "a19", "mode": "correct"}
]
16:24 Close problem. This is done by clicking on the browser back button,
the browsers reload button, the submit button, or the close window button.
{"method": "close-problem", "params": {"time": 984.200}, "id": 31}
[
{"action": "problem-closed", "url": "http://www.webassign.net/something"},
{"action": "log", "subscores": {"NSH_BO_Call_Count": [-0.05, 0],
"WWH_BO_Call_Count": [-0.05,0],
"Correct_Entries_V_Entries": [0.05,17,19],
"Correct_Answer_Entries_V_Answer_Entries": [0.05,1,2]}}
]
*******************************************************************************