Commit bd3b65b6 by Jose Antonio

Issue #232 injecting id_scene and WS

parent 17f37b1e
......@@ -582,6 +582,9 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
},
stu: function () {
return $scope.studentData;
},
viewingScene: function(){
return $scope.viewingScene;
}
}
});
......@@ -605,6 +608,9 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
},
stu: function () {
return $scope.studentData;
},
viewingScene: function(){
return $scope.viewingScene;
}
}
});
......
......@@ -3,7 +3,18 @@
// Please note that $modalInstance represents a modal window (instance) dependency.
// 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
$scope.studentPicto = JSON.parse(JSON.stringify(studentPicto));
......@@ -73,6 +84,7 @@ dashboardControllers.controller('PictoConfigCtrl', function ($window, $scope, $t
action: 'update',
attributes: {
id_stu: stu.id,
id_scene: viewingScene.id,
stu_picto: result
}
},
......
......@@ -13,6 +13,7 @@ dashboardControllers.controller('TagsCtrl', function TagsCtrl(
studentPicto,
sup,
stu,
viewingScene,
$translate,
ngToast) {
......@@ -52,9 +53,9 @@ dashboardControllers.controller('TagsCtrl', function TagsCtrl(
io.socket.post('/stu/vocabulary', {
action: 'update',
attributes: {
id_stu: $scope.stu,
stu_picto: studentPicto.id,
id_scene: studentPicto.scene
id_stu: stu.id,
id_scene: viewingScene.id,
stu_picto: studentPicto
}
}, 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