Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brunosmartin committed Mar 14, 2014
1 parent 088196c commit b7de25f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions activities/static/js/activities/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
$scope.refresh = function() {
$scope.cm_refresh += 1;
console.log($scope.cm_refresh);
}
};

$scope.answer.$promise.finally(function() {
if (!$scope.answer.id) {
$scope.answer.given = $scope.currentActivity.data;
}
$scope.answer.given[0].active = true;
$scope.refresh()
$scope.refresh();
});

$scope.sendPhpAnswer = function() {
Expand Down
4 changes: 2 additions & 2 deletions activities/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ def post_save(self, obj, created):
tgz = open("/tmp/%s.tgz" % dirname)
# TODO colocar no settings.py
host = 'http://php.timtec.com.br'
_ = requests.get("%s/%d/start/" % (host, obj.user.id))
_ = requests.post("%s/%d/documents/" % (host, obj.user.id), files={"tgz": tgz})
requests.get("%s/%d/start/" % (host, obj.user.id))
requests.post("%s/%d/documents/" % (host, obj.user.id), files={"tgz": tgz})
2 changes: 1 addition & 1 deletion core/static/js/lesson/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
return $resource('/api/answer/:activityId', {}, {
update: {method: 'PUT'}
});
})
});

app.factory('Progress', ['$resource', '$q', function($resource, $q){
var Progress = $resource('/api/student_progress/:id');
Expand Down

0 comments on commit b7de25f

Please sign in to comment.