Skip to content

Commit

Permalink
Merge pull request #677 from ubc/fix-attachment-removal
Browse files Browse the repository at this point in the history
Fix attachment removal issue
  • Loading branch information
andrew-gardener authored Feb 2, 2018
2 parents e2413ec + 4fbceb8 commit b5dcc11
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion compair/static/modules/answer/answer-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ module.controller(
}

$scope.uploader = answerAttachService.getUploader();
$scope.resetFileUploader = answerAttachService.reset();
$scope.resetFileUploader = answerAttachService.reset;

$scope.deleteFile = function(file) {
$scope.answer.file = null;
Expand Down
2 changes: 1 addition & 1 deletion compair/static/modules/assignment/assignment-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ module.controller("AssignmentWriteController",
$scope.editorOptions = EditorOptions.basic;
$scope.PairingAlgorithm = PairingAlgorithm;
$scope.uploader = attachService.getUploader();
$scope.resetFileUploader = attachService.reset();
$scope.resetFileUploader = attachService.reset;
$scope.recommended_comparisons = Math.floor(required_rounds / 2);

$scope.rankLimitOptions = [
Expand Down
8 changes: 2 additions & 6 deletions compair/static/modules/attachment/attachment-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,7 @@ module.service('attachService',
};

var reset = function() {
return function() {
file = null;
}
file = null;
};

var getFile = function() {
Expand Down Expand Up @@ -389,9 +387,7 @@ module.service('answerAttachService',
var uploadedCallback = function(fileItem) {};

var reset = function() {
return function() {
file = null;
};
file = null;
};

var getFile = function() {
Expand Down

0 comments on commit b5dcc11

Please sign in to comment.