working on issue #297

parent 418be65a
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
*.o *.o
*.so *.so
# Temporal files
################
\#.*\#
# BCrypt build # # BCrypt build #
################ ################
sails/src/node_modules/bcrypt/build/ sails/src/node_modules/bcrypt/build/
...@@ -15,6 +19,8 @@ sails/src/node_modules/bcrypt/build/ ...@@ -15,6 +19,8 @@ sails/src/node_modules/bcrypt/build/
########## ##########
sails/upload sails/upload
sails/symbolstx sails/symbolstx
sails/src/assets/symbolstx
sails/src/assets/upload
# Other # # Other #
######### #########
......
...@@ -11,7 +11,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -11,7 +11,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
// Reload student pictos (back from addpicto) // Reload student pictos (back from addpicto)
$scope.reload_pictos = function(){ $scope.reload_pictos = function(){
$http $http
.get(config.backend+'/stu/'+ $scope.studentUser.id +'/pictos') .get(config.backend+'/stu/'+ $scope.studentData.id +'/pictos')
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
// Add to list // Add to list
$scope.studentPictos = data; $scope.studentPictos = data;
...@@ -69,7 +69,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -69,7 +69,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
var deleteStuPicto = $window.confirm('Are you absolutely sure you want to delete?'); var deleteStuPicto = $window.confirm('Are you absolutely sure you want to delete?');
if(deleteStuPicto){ if(deleteStuPicto){
$http $http
.delete(config.backend+'/stu/'+ $scope.studentUser.id + '/picto/' + stuPicto.id) .delete(config.backend+'/stu/'+ $scope.studentData.id + '/picto/' + stuPicto.id)
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
// Eliminar de la vista: Se recorre el array de objetos json para buscarlo // Eliminar de la vista: Se recorre el array de objetos json para buscarlo
...@@ -91,7 +91,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -91,7 +91,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
io.socket.post('/stu/vocabulary', { io.socket.post('/stu/vocabulary', {
action: 'delete', action: 'delete',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
picto: data picto: data
} }
}, },
...@@ -117,7 +117,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -117,7 +117,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
else stuPicto.attributes.status = "enabled"; else stuPicto.attributes.status = "enabled";
$http $http
.put(config.backend+'/stu/'+ $scope.studentUser.id + '/picto/' + stuPicto.id, { 'attributes': stuPicto.attributes }) .put(config.backend+'/stu/'+ $scope.studentData.id + '/picto/' + stuPicto.id, { 'attributes': stuPicto.attributes })
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
// Actualizar la vista: Se recorre el array de objetos json para buscarlo // Actualizar la vista: Se recorre el array de objetos json para buscarlo
...@@ -128,7 +128,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -128,7 +128,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
io.socket.post('/stu/vocabulary', { io.socket.post('/stu/vocabulary', {
action: 'update', action: 'update',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
picto: data picto: data
} }
}, },
...@@ -159,7 +159,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -159,7 +159,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
// Update the ORIGIN picto coords in server (if the picto is not empty) // Update the ORIGIN picto coords in server (if the picto is not empty)
if($scope.pcb[c_ori[0]][c_ori[1]].id){ if($scope.pcb[c_ori[0]][c_ori[1]].id){
$http $http
.put(config.backend+'/stu/'+ $scope.studentUser.id + '/picto/' + .put(config.backend+'/stu/'+ $scope.studentData.id + '/picto/' +
$scope.pcb[c_ori[0]][c_ori[1]].id, { 'attributes': $scope.pcb[c_ori[0]][c_ori[1]].attributes }) $scope.pcb[c_ori[0]][c_ori[1]].id, { 'attributes': $scope.pcb[c_ori[0]][c_ori[1]].attributes })
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
console.log("Coords for picto origin updated"); console.log("Coords for picto origin updated");
...@@ -169,7 +169,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -169,7 +169,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
io.socket.post('/stu/vocabulary', { io.socket.post('/stu/vocabulary', {
action: 'update', action: 'update',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
picto: data picto: data
} }
}, },
...@@ -187,7 +187,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -187,7 +187,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
// Update the DESTINATION picto coords in server (if the picto is not empty) // Update the DESTINATION picto coords in server (if the picto is not empty)
if($scope.pcb[c_des[0]][c_des[1]].id){ if($scope.pcb[c_des[0]][c_des[1]].id){
$http $http
.put(config.backend+'/stu/'+ $scope.studentUser.id + '/picto/' + .put(config.backend+'/stu/'+ $scope.studentData.id + '/picto/' +
$scope.pcb[c_des[0]][c_des[1]].id, { 'attributes': $scope.pcb[c_des[0]][c_des[1]].attributes }) $scope.pcb[c_des[0]][c_des[1]].id, { 'attributes': $scope.pcb[c_des[0]][c_des[1]].attributes })
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
console.log("Coords for picto destination updated"); console.log("Coords for picto destination updated");
...@@ -197,7 +197,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -197,7 +197,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
io.socket.post('/stu/vocabulary', { io.socket.post('/stu/vocabulary', {
action: 'update', action: 'update',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
picto: data picto: data
} }
}, },
...@@ -234,7 +234,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -234,7 +234,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
size: size, size: size,
resolve: { // Passing data to the controller of the window resolve: { // Passing data to the controller of the window
stu_id: function(){ stu_id: function(){
return $scope.studentUser.id; return $scope.studentData.id;
}, },
sup: function(){ sup: function(){
return $scope.user; return $scope.user;
...@@ -308,7 +308,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -308,7 +308,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
return $scope.user; return $scope.user;
}, },
stu: function(){ stu: function(){
return $scope.studentUser return $scope.studentData
} }
} }
}); });
...@@ -327,6 +327,11 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec ...@@ -327,6 +327,11 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// websockets events handling // websockets events handling
// Remove all listeners to this event
io.socket.off('vocabulary');
// Add new listener to the event
io.socket.on('vocabulary', function(data) { io.socket.on('vocabulary', function(data) {
console.log('Vocabulary '+ data.action +' event received with the following data:'); console.log('Vocabulary '+ data.action +' event received with the following data:');
console.log(JSON.stringify(data.attributes)); console.log(JSON.stringify(data.attributes));
......
...@@ -14,16 +14,16 @@ dashboardControllers.controller('StudentInstructionsCtrl', function StudentInstr ...@@ -14,16 +14,16 @@ dashboardControllers.controller('StudentInstructionsCtrl', function StudentInstr
// Get last method/instruction for this student // Get last method/instruction for this student
// //
/* $http /* $http
.get(config.backend+'/stu/'+ $scope.studentUser.id +'/last_instruction') .get(config.backend+'/stu/'+ $scope.studentData.id +'/last_instruction')
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
$scope.studentUser.current_method = data.met_name; $scope.studentData.current_method = data.met_name;
$scope.studentUser.current_instruction = data.ins_name; $scope.studentData.current_instruction = data.ins_name;
console.log('Last method/instruction:' + JSON.stringify(data)); console.log('Last method/instruction:' + JSON.stringify(data));
}) })
.error(function(data, status, headers, config) { .error(function(data, status, headers, config) {
console.log('Last method/instruction error:' + JSON.stringify(data)); console.log('Last method/instruction error:' + JSON.stringify(data));
$scope.studentUser.current_method = 'undefined'; $scope.studentData.current_method = 'undefined';
$scope.studentUser.current_instruction = 'undefined'; $scope.studentData.current_instruction = 'undefined';
});*/ });*/
// Add method selected to the student // Add method selected to the student
......
...@@ -78,7 +78,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -78,7 +78,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
$http $http
.put(config.backend+'/try/' + t.id, update_data) .put(config.backend+'/try/' + t.id, update_data)
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
console.log("Try - updated: " + $scope.studentUser.id+" try:"+t.id); console.log("Try - updated: " + $scope.studentData.id+" try:"+t.id);
}) })
.error(function(data, status, headers, config) { .error(function(data, status, headers, config) {
console.log("Error from API: " + data.error); console.log("Error from API: " + data.error);
...@@ -91,7 +91,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -91,7 +91,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
.put(config.backend+'/try/' + $rootScope.actual_try.id, { result: $rootScope.actual_try.result, end: new Date() }) .put(config.backend+'/try/' + $rootScope.actual_try.id, { result: $rootScope.actual_try.result, end: new Date() })
.then( .then(
function(data, status, headers, config) { function(data, status, headers, config) {
console.log("Current try - updated. Student: " + $scope.studentUser.id+" try:"+$rootScope.actual_try.id); console.log("Current try - updated. Student: " + $scope.studentData.id+" try:"+$rootScope.actual_try.id);
} }
, function(data, status, headers, config) { , function(data, status, headers, config) {
console.log("Error from API: " + data.error+ "when updating try "+$rootScope.actual_try); console.log("Error from API: " + data.error+ "when updating try "+$rootScope.actual_try);
...@@ -99,10 +99,10 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -99,10 +99,10 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
); );
}; };
$scope.send_show_action = function(){ $scope.send_show_action = function(){
console.log("ACTION!" + $scope.studentUser.id+" try:"+$rootScope.actual_try.id); console.log("ACTION!" + $scope.studentData.id+" try:"+$rootScope.actual_try.id);
$http $http
.post(config.backend+'/action', { .post(config.backend+'/action', {
student: $scope.studentUser.id, student: $scope.studentData.id,
type: 'Show', type: 'Show',
timestamp: new Date(), timestamp: new Date(),
_try: $rootScope.actual_try.id _try: $rootScope.actual_try.id
...@@ -159,7 +159,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -159,7 +159,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
$http $http
.post(config.backend+'/workingsession', { .post(config.backend+'/workingsession', {
"id_sup": $scope.user.id, "id_sup": $scope.user.id,
"id_stu": $scope.studentUser.id, "id_stu": $scope.studentData.id,
"id_ins": $scope.selectedIns "id_ins": $scope.selectedIns
}) })
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
...@@ -182,8 +182,8 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -182,8 +182,8 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
// Adding initial action to the list of actions // Adding initial action to the list of actions
$rootScope.actual_try.actions.push({ action: 'tryinit' }); $rootScope.actual_try.actions.push({ action: 'tryinit' });
console.log("WS created for method "+$scope.selectedMethod.name+" Ins:"+$scope.selectedIns.name+": "+JSON.stringify(data)); console.log("WS created for method "+$scope.selectedMethod.name+" Ins:"+$scope.selectedIns.name+": "+JSON.stringify(data));
$scope.studentUser.current_method=$scope.selectedMethod.name; $scope.studentData.current_method=$scope.selectedMethod.name;
$scope.studentUser.current_instruction=$scope.selectedIns.name; $scope.studentData.current_instruction=$scope.selectedIns.name;
}) })
.error(function(data, status, headers, config) { .error(function(data, status, headers, config) {
console.log("Error from API: " + data.error); console.log("Error from API: " + data.error);
...@@ -217,7 +217,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -217,7 +217,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
$http $http
.put(config.backend+'/workingsession/' + $rootScope.ws.id, { "end": $rootScope.ws.end, .put(config.backend+'/workingsession/' + $rootScope.ws.id, { "end": $rootScope.ws.end,
"id_stu": $scope.studentUser.id "id_stu": $scope.studentData.id
}) })
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
console.log("WS stopped - updated: " + JSON.stringify(data)); console.log("WS stopped - updated: " + JSON.stringify(data));
...@@ -244,7 +244,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -244,7 +244,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
var data = { var data = {
action: 'pausesession', action: 'pausesession',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
id_ws: $rootScope.ws.id id_ws: $rootScope.ws.id
} }
}; };
...@@ -255,10 +255,10 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -255,10 +255,10 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
*/ */
$http $http
.post(config.backend+'/action', { .post(config.backend+'/action', {
"type": "pausesession", "type": "pausesession",
"student": $scope.studentUser.id, "student": $scope.studentData.id,
"supervisor": $scope.user.id "supervisor": $scope.user.id
}) })
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
...@@ -283,7 +283,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -283,7 +283,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
var data = { var data = {
action: 'resumesession', action: 'resumesession',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
id_ws: $rootScope.ws.id id_ws: $rootScope.ws.id
} }
}; };
...@@ -297,7 +297,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -297,7 +297,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
$http $http
.post(config.backend+'/action', { .post(config.backend+'/action', {
"type": "resumesession", "type": "resumesession",
"student": $scope.studentUser.id, "student": $scope.studentData.id,
"supervisor": $scope.user.id "supervisor": $scope.user.id
}) })
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
...@@ -397,7 +397,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -397,7 +397,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
var data = { var data = {
action: 'tryinit', action: 'tryinit',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
timestamp: new Date() timestamp: new Date()
} }
}; };
...@@ -414,7 +414,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -414,7 +414,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
var data = { var data = {
action: 'add', action: 'add',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
picto: $scope.pic, picto: $scope.pic,
timestamp: new Date() timestamp: new Date()
} }
...@@ -439,7 +439,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -439,7 +439,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
var data = { var data = {
action: 'delete', action: 'delete',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
picto: $scope.pic, picto: $scope.pic,
timestamp: new Date() timestamp: new Date()
} }
...@@ -464,7 +464,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -464,7 +464,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
var data = { var data = {
action: 'select', action: 'select',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
picto: $scope.pic, picto: $scope.pic,
timestamp: new Date() timestamp: new Date()
} }
...@@ -491,7 +491,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -491,7 +491,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
var datashow = { var datashow = {
action: 'show', action: 'show',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
pictos: [ $scope.pic, $scope.pic, $scope.pic ], // The actual state of the phrase stripe pictos: [ $scope.pic, $scope.pic, $scope.pic ], // The actual state of the phrase stripe
timestamp: endDate timestamp: endDate
} }
...@@ -503,7 +503,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -503,7 +503,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
var data = { var data = {
action: 'tryend', action: 'tryend',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
timestamp: endDate timestamp: endDate
} }
}; };
...@@ -528,7 +528,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -528,7 +528,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
"begin": $scope.pcb_try.begin, "begin": $scope.pcb_try.begin,
"end": $scope.pcb_try.end, "end": $scope.pcb_try.end,
"actions": $scope.pcb_actions, "actions": $scope.pcb_actions,
"student": $scope.studentUser.id, "student": $scope.studentData.id,
"supervisor": $scope.user.id, "supervisor": $scope.user.id,
"device": 58 "device": 58
}) })
...@@ -552,7 +552,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -552,7 +552,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
$http $http
.post(config.backend+'/actions', { .post(config.backend+'/actions', {
"actions": $scope.pcb_actions, "actions": $scope.pcb_actions,
"student": $scope.studentUser.id, "student": $scope.studentData.id,
"supervisor": $scope.user.id, "supervisor": $scope.user.id,
"device": 58 "device": 58
}) })
...@@ -585,7 +585,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -585,7 +585,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
var data = { var data = {
action: 'unshow', action: 'unshow',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
timestamp: new Date() timestamp: new Date()
} }
}; };
...@@ -596,7 +596,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -596,7 +596,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
data = { data = {
action: 'tryinit', action: 'tryinit',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
timestamp: new Date() timestamp: new Date()
} }
}; };
...@@ -609,7 +609,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -609,7 +609,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
io.socket.post('/stu/action', { io.socket.post('/stu/action', {
action: 'unshow', action: 'unshow',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
timestamp: new Date() timestamp: new Date()
} }
}, },
...@@ -636,7 +636,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -636,7 +636,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
io.socket.post('/stu/action', { io.socket.post('/stu/action', {
action: 'show_device', action: 'show_device',
attributes: { attributes: {
id_stu: $scope.studentUser.id, id_stu: $scope.studentData.id,
id_dev: 58, id_dev: 58,
timestamp: new Date() timestamp: new Date()
} }
...@@ -681,6 +681,11 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -681,6 +681,11 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
// //
// websockets events handling (Dashboard) // websockets events handling (Dashboard)
// //
// Remove all listeners to this event
io.socket.off('action');
// Add new listener to the event
io.socket.on('action', function(data) { io.socket.on('action', function(data) {
// Socket.io does not live inside the angular lifecycle, and thus Angular // Socket.io does not live inside the angular lifecycle, and thus Angular
......
...@@ -16,30 +16,30 @@ ...@@ -16,30 +16,30 @@
<div class="collapse navbar-collapse navbar-ex16-collapse"> <div class="collapse navbar-collapse navbar-ex16-collapse">
<div class="nav navbar-nav navbar-left thumbnail img_profile"> <div class="nav navbar-nav navbar-left thumbnail img_profile">
<img ng-src="{{studentUser.pic}}" alt="" title="" /> <img ng-src="{{studentData.pic}}" alt="" title="" />
</div> </div>
<div class="nav navbar-nav navbar-left navbar-text"> <div class="nav navbar-nav navbar-left navbar-text">
<h4>{{studentUser.name}} {{studentUser.surname}}</h4> <h4>{{studentData.name}} {{studentData.surname}}</h4>
<p>{{studentUser.current_method | translate}} | {{studentUser.current_instruction | translate}}</p> <p>{{studentData.current_method | translate}} | {{studentData.current_instruction | translate}}</p>
</div> </div>
<div class="nav navbar-nav navbar-right tabs_student"> <div class="nav navbar-nav navbar-right tabs_student">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li role="presentation" ng-class="{'active' : nav.tab == 'collections'}"> <li role="presentation" ng-class="{'active' : nav.tab == 'collections'}">
<a href="/app/#/student/{{studentUser.id}}/collections" ng-click="nav.tab = ''"><span class="glyphicon glyphicon-th" aria-hidden="true"></span> {{ 'collections' | translate }}</a> <a href="/app/#/student/{{studentData.id}}/collections" ng-click="nav.tab = ''"><span class="glyphicon glyphicon-th" aria-hidden="true"></span> {{ 'collections' | translate }}</a>
</li> </li>
<li role="presentation" ng-class="{'active' : nav.tab == 'instructions'}"> <li role="presentation" ng-class="{'active' : nav.tab == 'instructions'}">
<a href="/app/#/student/{{studentUser.id}}/instructions" ng-click="nav.tab = 'instructions'"><span class="glyphicon glyphicon-tasks" aria-hidden="true"></span> {{ 'instructions' | translate }}</a> <a href="/app/#/student/{{studentData.id}}/instructions" ng-click="nav.tab = 'instructions'"><span class="glyphicon glyphicon-tasks" aria-hidden="true"></span> {{ 'instructions' | translate }}</a>
</li> </li>
<li role="presentation" ng-class="{'active' : nav.tab == 'session'}"> <li role="presentation" ng-class="{'active' : nav.tab == 'session'}">
<a href="/app/#/student/{{studentUser.id}}/session" ng-click="nav.tab = 'session'"><span class="glyphicon glyphicon-transfer" aria-hidden="true"></span> {{ 'session' | translate }}</a> <a href="/app/#/student/{{studentData.id}}/session" ng-click="nav.tab = 'session'"><span class="glyphicon glyphicon-transfer" aria-hidden="true"></span> {{ 'session' | translate }}</a>
</li> </li>
<li role="presentation" ng-class="{'active' : nav.tab == 'reports'}"> <li role="presentation" ng-class="{'active' : nav.tab == 'reports'}">
<a href="/app/#/student/{{studentUser.id}}/reports" ng-click="nav.tab = 'reports'"><span class="glyphicon glyphicon-file" aria-hidden="true"></span> {{ 'reports' | translate }}</a> <a href="/app/#/student/{{studentData.id}}/reports" ng-click="nav.tab = 'reports'"><span class="glyphicon glyphicon-file" aria-hidden="true"></span> {{ 'reports' | translate }}</a>
</li> </li>
<li role="presentation" ng-class="{'active' : nav.tab == 'setup'}"> <li role="presentation" ng-class="{'active' : nav.tab == 'setup'}">
<a href="/app/#/student/{{studentUser.id}}/setup" ng-click="nav.tab = 'setup'" <a href="/app/#/student/{{studentData.id}}/setup" ng-click="nav.tab = 'setup'"
><span class="glyphicon glyphicon-cog" aria-hidden="true"></span> {{ 'setup' | translate }}</a> ><span class="glyphicon glyphicon-cog" aria-hidden="true"></span> {{ 'setup' | translate }}</a>
</li> </li>
</ul> </ul>
......
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
<!-- <span class="badge">{{ s.tries.length }}</span> --> <!-- <span class="badge">{{ s.tries.length }}</span> -->
<div ng-show="showLastTry && wsessions.length > 0"> <div ng-show="showLastTry && wsessions.length > 0">
<h3> <h3>
{{ 'last_session' | translate}}: {{ studentUser.current_method }}, {{ studentUser.current_instruction }} ({{s.begin | date:'dd-MM-yyyy'}} ) {{ 'last_session' | translate}}: {{ studentData.current_method }}, {{ studentData.current_instruction }} ({{s.begin | date:'dd-MM-yyyy'}} )
</h3> </h3>
<div ng-show="ws_recover" > <div ng-show="ws_recover" >
<table style="border: 1px solid #666666; padding:5px; background-color:#f5f5f5;" width="100%"> <table style="border: 1px solid #666666; padding:5px; background-color:#f5f5f5;" width="100%">
......
/home/dofer/pictogram/sails/symbolstx
\ No newline at end of file
/home/dofer/pictogram/sails/upload
\ No newline at end of file
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