Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 78892a7

Browse files
committed
Avoid /assessment/results calls when not logged in
1 parent 7feaa66 commit 78892a7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

runestone/common/js/runestonebase.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export default class RunestoneBase {
212212
this.checkServerComplete = new Promise(function (resolve, reject) {
213213
self.csresolver = resolve;
214214
});
215-
if (this.useRunestoneServices || this.graderactive) {
215+
if (eBookConfig.isLoggedIn && (this.useRunestoneServices || this.graderactive)) {
216216
let data = {};
217217
data.div_id = this.divid;
218218
data.course = eBookConfig.course;
@@ -225,6 +225,9 @@ export default class RunestoneBase {
225225
if (this.sid) {
226226
data.sid = this.sid;
227227
}
228+
if (! (data.div_id && data.course && data.event) ) {
229+
console.log(`A required field is missing data ${data.div_id}:${data.course}:${data.event}`)
230+
}
228231
// If we are NOT in practice mode and we are not in a peer exercise
229232
// and assessmentTaken is true
230233
if (

0 commit comments

Comments
 (0)