Commit 89225832 by Jose Antonio

Fix create scene and showing pictos

parent 1754391f
......@@ -23,12 +23,12 @@ module.exports = {
student: params.id_stu
}).then(scene=>{
if(scene.categories){
Model.query('CALL scene_create_core('+scene.id+','+scene.student+') ', function(err, result) {
if (err) {
return res.serverError("Could not call stored procedure create scene picto core "+err);
} else {
return res.ok(scene);
}
Scene.query('CALL scene_create_core(?,?) ',[scene.id, scene.student], function(err, result) {
// if (err) {
// return res.serverError("Could not call stored procedure create scene picto core "+err);
// } else {
// return res.ok(scene);
// }
});
}
return res.ok(scene);
......
......@@ -123,7 +123,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
}
};
// get active scene
// get and show active scene
$scope.showActiveScene = function (scene) {
$scope.loadingPictos = true;
$scope.freeCategoryPictos = $scope.freeCategoryPictos || generateGrid();
......@@ -145,12 +145,14 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
});
};
// get active scene
// Get a scene and show it
$scope.showScene = function (idScene) {
$scope.loadingPictos = true;
$scope.freeCategoryPictos = $scope.freeCategoryPictos || generateGrid();
$scope.studentPictos[$scope.getCategoryId($scope.selectedCategory)] =
$scope.studentPictos[$scope.getCategoryId($scope.selectedCategory)] || generateGrid();
//$scope.freeCategoryPictos = $scope.freeCategoryPictos || generateGrid();
// $scope.studentPictos[$scope.getCategoryId($scope.selectedCategory)] =
// $scope.studentPictos[$scope.getCategoryId($scope.selectedCategory)] || generateGrid();
$scope.freeCategoryPictos = generateGrid();
$scope.studentPictos[$scope.getCategoryId($scope.selectedCategory)] = generateGrid();
$http.get(config.backend + '/scene/' + idScene)
.success(function (scene) {
......@@ -167,7 +169,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
});
};
// get active scene
// Load the scene list
$scope.loadScenesList = function () {
$http.get(config.backend + '/stu/' + $scope.studentData.id +'/scenes')
......
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