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

Commit 4c5b2e6

Browse files
committed
remove loadCode function - obsolete for years
1 parent d02be47 commit 4c5b2e6

1 file changed

Lines changed: 6 additions & 54 deletions

File tree

runestone/activecode/js/activecode.js

Lines changed: 6 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ export class ActiveCode extends RunestoneBase {
111111
this.caption = "ActiveCode";
112112
}
113113
this.addCaption("runestone");
114+
setTimeout(
115+
function () {
116+
this.editor.refresh();
117+
}.bind(this),
118+
1000
119+
);
114120
if (this.autorun) {
115121
$(document).ready(this.runProg.bind(this));
116122
}
@@ -735,60 +741,6 @@ export class ActiveCode extends RunestoneBase {
735741
}
736742
}
737743

738-
async loadEditor() {
739-
var data = {
740-
acid: this.divid,
741-
};
742-
if (this.sid !== undefined) {
743-
data["sid"] = this.sid;
744-
}
745-
746-
let request = new Request(eBookConfig.ajaxURL + "getprog", {
747-
method: "POST",
748-
headers: this.jsonHeaders,
749-
body: JSON.stringify(data),
750-
});
751-
let response = await fetch(request);
752-
let res = await response.json();
753-
754-
if (res.source) {
755-
this.editor.setValue(res.source);
756-
setTimeout(
757-
function () {
758-
this.editor.refresh();
759-
}.bind(this),
760-
500
761-
);
762-
$(this.loadButton).tooltip({
763-
placement: "bottom",
764-
title: $.i18n("msg_activecode_loaded_code"),
765-
trigger: "manual",
766-
});
767-
} else {
768-
$(this.loadButton).tooltip({
769-
placement: "bottom",
770-
title: $.i18n("msg_activecode_no_saved_code"),
771-
trigger: "manual",
772-
});
773-
}
774-
775-
this.logBookEvent({
776-
event: "activecode",
777-
act: "load",
778-
div_id: this.divid,
779-
}); // Log the run event
780-
781-
$(this.loadButton).tooltip("show");
782-
setTimeout(
783-
function () {
784-
$(this.loadButton).tooltip("destroy");
785-
}.bind(this),
786-
4000
787-
);
788-
789-
return response;
790-
}
791-
792744
async createGradeSummary() {
793745
// get grade and comments for this assignment
794746
// get summary of all grades for this student

0 commit comments

Comments
 (0)