You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 7, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: runestone/common/js/runestonebase.js
+17-4Lines changed: 17 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -61,11 +61,16 @@ export default class RunestoneBase {
61
61
});
62
62
}
63
63
64
+
// .. _logBookEvent:
65
+
//
66
+
// logBookEvent
67
+
// ------------
68
+
// This function sends the provided ``eventInfo`` to the `hsblog endpoint` of the server. Awaiting this function returns either ``undefined`` (if Runestone services are not available) or the data returned by the server as a JavaScript object (already JSON-decoded).
@@ -93,8 +99,14 @@ export default class RunestoneBase {
93
99
}
94
100
returnpost_return;
95
101
}
102
+
103
+
// .. _logRunEvent:
104
+
//
105
+
// logRunEvent
106
+
// -----------
107
+
// This function sends the provided ``eventInfo`` to the `runlog endpoint`. When awaited, this function returns the data (decoded from JSON) the server sent back.
96
108
asynclogRunEvent(eventInfo){
97
-
letpost_promise=Promise.resolve("done");
109
+
letpost_promise="done";
98
110
if(this.graderactive){
99
111
return;
100
112
}
@@ -114,6 +126,7 @@ export default class RunestoneBase {
Copy file name to clipboardExpand all lines: runestone/overview.rst
+22-24Lines changed: 22 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,27 +3,27 @@ Consistent Component API
3
3
4
4
A standardized API will make the Runestone Components easier to work on and more maintainable. For example in trying to find out how to JUST score a component in a timed exam (not render any feedback) I found the following methods:
5
5
6
-
* processXXXSubmissions - mchoice
7
-
* startEvaluation - fitb
8
-
* dragEval - dragndrop
9
-
* checkMe - parsons
10
-
* clickableEval - clickaablearea
11
-
* activecode - runProg
12
-
* submitJournal - short answer
6
+
* processXXXSubmissions - mchoice
7
+
* startEvaluation - fitb
8
+
* dragEval - dragndrop
9
+
* checkMe - parsons
10
+
* clickableEval - clickaablearea
11
+
* activecode - runProg
12
+
* submitJournal - short answer
13
13
14
14
All of the above mix the scoring of the component with rendering the feedback. I would like to separate those two things and standardize on some names for doing so.
15
15
16
16
Base Class Provides
17
17
-------------------
18
-
* shouldUseServer
19
-
* checkServer
20
-
* logRunEvent
21
-
* logBookEvent
22
-
* loadData
23
-
* repopulateFromStorage
24
-
* localStorageKey
25
-
* addCaption
26
-
* constructor that takes opts
18
+
* shouldUseServer
19
+
* checkServer
20
+
* `logRunEvent` - send the results of executing an ActiveCode exercise to the `runlog endpoint`.
21
+
* `logBookEvent` - send the results of answering a question to the `hsblog endpoint`.
22
+
* loadData
23
+
* repopulateFromStorage
24
+
* localStorageKey
25
+
* addCaption
26
+
* constructor that takes opts
27
27
28
28
All Components
29
29
--------------
@@ -33,14 +33,12 @@ All Components
33
33
* setLocalStorage
34
34
* checkLocalStorage
35
35
* hasUserActivity
36
-
*
37
-
Gradable
38
-
--------
39
36
37
+
Gradable
38
+
--------
40
39
Each Gradable should provide these three functions as an external API. We want to separate checking, from logging and providing feedback
41
-
* checkCurrentAnswer - async? so that for server side grading we can await
42
-
* logCurrentAnswer
43
-
* renderFeedback
44
-
* disableInteraction
45
-
46
40
41
+
* checkCurrentAnswer - async? so that for server side grading we can await
Copy file name to clipboardExpand all lines: runestone/unittest_base.py
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -228,6 +228,8 @@ def setUp(self):
228
228
# Use the shared module-wide driver.
229
229
self.driver=mf.driver
230
230
self.host=HOST_URL
231
+
# Add an `implicit wait <https://selenium-python.readthedocs.io/waits.html#implicit-waits>`_.
232
+
self.driver.implicitly_wait(5)
231
233
232
234
deftearDown(self):
233
235
# Clear as much as possible, to present an almost-fresh instance of a browser for the next test. (Shutting down then starting up a browswer is very slow.)
0 commit comments