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: index.rst
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,8 @@ Runestone Components
3
3
********************
4
4
This site documents the working of the Runestone Components. See the `Runestone Interactive Overview <https://runestone.academy/runestone/books/published/overview/overview.html>`_ or the `Runestone instructor's guide <https://runestone.academy/runestone/static/instructorguide/index.html>`_.
5
5
6
+
Demo linking to the Runestone Server docs: :ref:`assignments/grades_report endpoint`.
@@ -57,7 +59,7 @@ export default class RunestoneBase {
57
59
// is to look for doAssignment in the URL and then grab
58
60
// the assignment name from the heading.
59
61
if(location.href.indexOf("doAssignment")>=0){
60
-
this.timedWrapper=$("h1#assignment_name").text()
62
+
this.timedWrapper=$("h1#assignment_name").text();
61
63
}else{
62
64
this.timedWrapper=null;
63
65
}
@@ -72,10 +74,8 @@ export default class RunestoneBase {
72
74
});
73
75
}
74
76
75
-
// .. _logBookEvent:
76
-
//
77
-
// logBookEvent
78
-
// ------------
77
+
// _`logBookEvent`
78
+
//----------------
79
79
// 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).
80
80
asynclogBookEvent(eventInfo){
81
81
if(this.graderactive){
@@ -97,12 +97,17 @@ export default class RunestoneBase {
97
97
try{
98
98
letresponse=awaitfetch(request);
99
99
if(!response.ok){
100
-
thrownewError("Failed to save the log entry");
100
+
letdetail=awaitresponse.json();
101
+
console.error(detail);
102
+
thrownewError(`Failed to save the log entry ${detail}`);
103
+
}else{
104
+
post_return=response.json();
101
105
}
102
-
post_return=response.json();
103
106
}catch(e){
104
107
if(this.isTimed){
105
-
alert(`Error: Your action was not saved! The error was ${e}`);
108
+
alert(
109
+
`Error: Your action was not saved! The error was ${e}`
110
+
);
106
111
}
107
112
console.log(`Error: ${e}`);
108
113
}
@@ -120,10 +125,8 @@ export default class RunestoneBase {
120
125
returnpost_return;
121
126
}
122
127
123
-
// .. _logRunEvent:
124
-
//
125
-
// logRunEvent
126
-
// -----------
128
+
// -`logRunEvent`
129
+
//---------------
127
130
// This function sends the provided ``eventInfo`` to the `runlog endpoint`. When awaited, this function returns the data (decoded from JSON) the server sent back.
128
131
asynclogRunEvent(eventInfo){
129
132
letpost_promise="done";
@@ -192,19 +195,23 @@ export default class RunestoneBase {
0 commit comments