Remove legacy CodePilot integration
This commit is contained in:
@@ -10,7 +10,6 @@ $(document).on('turbolinks:load', function(event) {
|
||||
CodeOceanEditorTurtle,
|
||||
CodeOceanEditorWebsocket,
|
||||
CodeOceanEditorPrompt,
|
||||
CodeOceanEditorCodePilot,
|
||||
CodeOceanEditorRequestForComments
|
||||
);
|
||||
|
||||
|
@@ -281,12 +281,6 @@ var CodeOceanEditor = {
|
||||
|
||||
var editor = ace.edit(element);
|
||||
|
||||
if (this.qa_api) {
|
||||
editor.getSession().on("change", function (deltaObject) {
|
||||
this.qa_api.executeCommand('syncEditor', [this.active_file, deltaObject]);
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
var document = editor.getSession().getDocument();
|
||||
// insert pre-existing code into editor. we have to use insertLines, otherwise the deltas are not properly added
|
||||
var file_id = $(element).data('file-id');
|
||||
@@ -1013,7 +1007,6 @@ var CodeOceanEditor = {
|
||||
initializeEverything: function () {
|
||||
CodeOceanEditor.editors = [];
|
||||
this.initializeRegexes();
|
||||
this.initializeCodePilot();
|
||||
this.configureEditors();
|
||||
this.initializeEditors();
|
||||
this.initializeEventHandlers();
|
||||
|
@@ -114,10 +114,6 @@ CodeOceanEditorEvaluation = {
|
||||
})) {
|
||||
this.showContainerDepletedMessage();
|
||||
}
|
||||
if (this.qa_api) {
|
||||
// send test response to QA
|
||||
this.qa_api.executeCommand('syncOutput', [response]);
|
||||
}
|
||||
},
|
||||
|
||||
renderScore: function () {
|
||||
@@ -138,9 +134,6 @@ CodeOceanEditorEvaluation = {
|
||||
handleTestResponse: function (result) {
|
||||
this.clearOutput();
|
||||
this.printOutput(result, false, 0);
|
||||
if (this.qa_api) {
|
||||
this.qa_api.executeCommand('syncOutput', [result]);
|
||||
}
|
||||
this.showStatus(result);
|
||||
this.showOutputBar();
|
||||
},
|
||||
|
@@ -107,31 +107,6 @@ CodeOceanEditorFlowr = {
|
||||
}
|
||||
};
|
||||
|
||||
CodeOceanEditorCodePilot = {
|
||||
qa_api: undefined,
|
||||
QaApiOutputBuffer: {'stdout': '', 'stderr': ''},
|
||||
|
||||
initializeCodePilot: function () {
|
||||
if ($('#questions-column').isPresent() && (typeof QaApi != 'undefined')) {
|
||||
$('#editor-column').addClass('col-md-10').removeClass('col-md-12');
|
||||
$('#questions-column').addClass('col-md-2');
|
||||
|
||||
var node = document.getElementById('questions-holder');
|
||||
var url = $('#questions-holder').data('url');
|
||||
|
||||
this.qa_api = new QaApi(node, url);
|
||||
}
|
||||
},
|
||||
|
||||
handleQaApiOutput: function () {
|
||||
if (this.qa_api) {
|
||||
this.qa_api.executeCommand('syncOutput', [[this.QaApiOutputBuffer]]);
|
||||
// reset the object
|
||||
}
|
||||
this.QaApiOutputBuffer = {'stdout': '', 'stderr': ''};
|
||||
}
|
||||
};
|
||||
|
||||
CodeOceanEditorRequestForComments = {
|
||||
requestComments: function () {
|
||||
const cause = $('#requestComments');
|
||||
|
Reference in New Issue
Block a user