Skip to content

Instantly share code, notes, and snippets.

@byronferguson
Created September 2, 2015 20:24
Show Gist options
  • Save byronferguson/69823f931f90c560cfc1 to your computer and use it in GitHub Desktop.
Save byronferguson/69823f931f90c560cfc1 to your computer and use it in GitHub Desktop.
submitResponses: function() {
$.ajax({
url : postResponseURL(this.studentID),
method : 'POST',
dataType : 'json',
data : JSON.stringify(this.responseObject),
contentType : "application/json; charset=utf-8",
success : function(data, status) {
this.resetResponsePackage();
},
error : this.ajaxErrorOutput
});
return this;
},
replaceResponses: function(questionID) {
$.ajax({
url : deleteQuestionURL(this.studentID, questionID),
method : 'DELETE',
dataType : 'text',
success : function(data, status) {
submitResponses();
},
error : this.ajaxErrorOutput
});
return this;
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment