Support cohorting students via a CSV File.

TNL-735
This commit is contained in:
Daniel Friedman
2014-11-06 17:21:29 -05:00
committed by cahrens
parent 69fd063d95
commit 3d91f43030
42 changed files with 2139 additions and 251 deletions

View File

@@ -77,13 +77,20 @@ define(['sinon', 'underscore'], function(sinon, _) {
JSON.stringify(jsonResponse));
};
respondWithError = function(requests, requestIndex) {
respondWithError = function(requests, statusCode, jsonResponse, requestIndex) {
if (_.isUndefined(requestIndex)) {
requestIndex = requests.length - 1;
}
requests[requestIndex].respond(500,
if (_.isUndefined(statusCode)) {
statusCode = 500;
}
if (_.isUndefined(jsonResponse)) {
jsonResponse = {};
}
requests[requestIndex].respond(statusCode,
{ 'Content-Type': 'application/json' },
JSON.stringify({ }));
JSON.stringify(jsonResponse)
);
};
respondToDelete = function(requests, requestIndex) {