Commit bd3b65b6 by Jose Antonio

Issue #232 injecting id_scene and WS

parent 17f37b1e
...@@ -582,6 +582,9 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -582,6 +582,9 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
}, },
stu: function () { stu: function () {
return $scope.studentData; return $scope.studentData;
},
viewingScene: function(){
return $scope.viewingScene;
} }
} }
}); });
...@@ -605,6 +608,9 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -605,6 +608,9 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
}, },
stu: function () { stu: function () {
return $scope.studentData; return $scope.studentData;
},
viewingScene: function(){
return $scope.viewingScene;
} }
} }
}); });
......
...@@ -3,7 +3,18 @@ ...@@ -3,7 +3,18 @@
// Please note that $modalInstance represents a modal window (instance) dependency. // Please note that $modalInstance represents a modal window (instance) dependency.
// It is not the same as the $modal service used above. // It is not the same as the $modal service used above.
dashboardControllers.controller('PictoConfigCtrl', function ($window, $scope, $translate, $modalInstance, $http, config, ngToast, studentPicto, sup, stu) { dashboardControllers.controller('PictoConfigCtrl', function (
$window,
$scope,
$translate,
$modalInstance,
$http,
config,
ngToast,
studentPicto,
sup,
stu,
viewingScene) {
// Picto // Picto
$scope.studentPicto = JSON.parse(JSON.stringify(studentPicto)); $scope.studentPicto = JSON.parse(JSON.stringify(studentPicto));
...@@ -73,6 +84,7 @@ dashboardControllers.controller('PictoConfigCtrl', function ($window, $scope, $t ...@@ -73,6 +84,7 @@ dashboardControllers.controller('PictoConfigCtrl', function ($window, $scope, $t
action: 'update', action: 'update',
attributes: { attributes: {
id_stu: stu.id, id_stu: stu.id,
id_scene: viewingScene.id,
stu_picto: result stu_picto: result
} }
}, },
......
...@@ -13,6 +13,7 @@ dashboardControllers.controller('TagsCtrl', function TagsCtrl( ...@@ -13,6 +13,7 @@ dashboardControllers.controller('TagsCtrl', function TagsCtrl(
studentPicto, studentPicto,
sup, sup,
stu, stu,
viewingScene,
$translate, $translate,
ngToast) { ngToast) {
...@@ -52,9 +53,9 @@ dashboardControllers.controller('TagsCtrl', function TagsCtrl( ...@@ -52,9 +53,9 @@ dashboardControllers.controller('TagsCtrl', function TagsCtrl(
io.socket.post('/stu/vocabulary', { io.socket.post('/stu/vocabulary', {
action: 'update', action: 'update',
attributes: { attributes: {
id_stu: $scope.stu, id_stu: stu.id,
stu_picto: studentPicto.id, id_scene: viewingScene.id,
id_scene: studentPicto.scene stu_picto: studentPicto
} }
}, function () {}); }, function () {});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment