Commit df59edfa by Fernando Martínez Santiago

Merge branch 'master' of http://scm.ujaen.es/softuno/pictogram into fernando_branch

parents d81a0141 0ee98866
...@@ -95,29 +95,32 @@ INSERT INTO `picto_core_cat` (`id`, `id_pic`, `id_cat_pic`, `coord_x`, `coord_y` ...@@ -95,29 +95,32 @@ INSERT INTO `picto_core_cat` (`id`, `id_pic`, `id_cat_pic`, `coord_x`, `coord_y`
(9, 7515, NULL, 1, 4, '#008000'), -- People (9, 7515, NULL, 1, 4, '#008000'), -- People
(10, 7265, NULL, 1, 5, '#008000'), -- Kinship (10, 7265, NULL, 1, 5, '#008000'), -- Kinship
(11, 50388, NULL, 1, 6, '#008000'), -- Professions (11, 50388, NULL, 1, 6, '#008000'), -- Professions
(125, 376, NULL, 2, 2, NULL), -- Desiring (125, 376, NULL, 2, 2, '#FF0000'), -- Desiring
(12, 265, NULL, 2, 3, NULL), -- Possession (12, 265, NULL, 2, 3, '#FF0000'), -- Possession
(13, 50391, NULL, 2, 4, NULL), -- Ingestion (13, 50391, NULL, 2, 4, '#FF0000'), -- Ingestion
(14, 4967, NULL, 2, 5, '#FF0000'), -- Senses (14, 4967, NULL, 2, 5, '#FF0000'), -- Senses
(126, 2640, NULL, 2, 6, '#FF0000'), -- Roles (126, 2640, NULL, 2, 6, '#FF0000'), -- Roles
(127, 54270, NULL, 2, 7, '#FF0000'), -- Change (127, 54270, NULL, 2, 7, '#FF0000'), -- Change
(15, 50343, NULL, 2, 9, '#2E9AFE'), -- Prepositions (15, 50343, NULL, 2, 9, '#2E9AFE'), -- Prepositions
(16, 2049, NULL, 3, 4, '#FF00FF'), -- Colors (16, 2049, NULL, 3, 4, '#FF00FF'), -- Colors
(17, 5866, NULL, 3, 3, NULL), -- Sizes (17, 5866, NULL, 3, 3, '#FF00FF'), -- Sizes
(18, 4814, NULL, 3, 5, NULL), -- Subjectives (feelings) (18, 4814, NULL, 3, 5, '#FF00FF'), -- Subjectives (feelings)
(19, 609, NULL, 3, 6, NULL), -- Tastes (19, 609, NULL, 3, 6, '#FF00FF'), -- Tastes
(185, 56262, NULL, 3, 7, NULL), -- Aesthetics (185, 56262, NULL, 3, 7, '#FF00FF'), -- Aesthetics
(20, 11216, NULL, 4, 3, '#F4FA58'), -- Toys (20, 11216, NULL, 4, 3, '#F4FA58'), -- Toys
(21, 52736, NULL, 4, 4, '#F4FA58'), -- Drinks (21, 52736, NULL, 4, 4, '#F4FA58'), -- Drinks
(22, 10087, NULL, 4, 5, '#F4FA58'), -- Food (22, 10087, NULL, 4, 5, '#F4FA58'), -- Food
(23, 52758, NULL, 4, 6, '#F4FA58'), -- Sweets (23, 52758, NULL, 4, 6, '#F4FA58'), -- Sweets
(128, 253, NULL, 2, 8, '#F4FA58'), -- Motion (128, 253, NULL, 2, 8, '#FF0000'), -- Motion
(131, 8148,NULL, 1, 2, '#FE9A2E'), -- Places (131, 8148,NULL, 1, 2, '#FE9A2E'), -- Places
(154, 11523,NULL, 1, 1, '#FE9A2E'), -- Rooms (154, 11523,NULL, 1, 1, '#FE9A2E'), -- Rooms
(155, 12303,NULL, 4, 1, '#F4FA58'), -- Clasroom items (155, 12303,NULL, 4, 1, '#F4FA58'), -- Clasroom items
(156, 5393, NULL, 4, 0, '#F4FA58'), -- Furniture (156, 5393, NULL, 4, 0, '#F4FA58'), -- Furniture
(157, 11368,NULL, 4, 1, '#F4FA58'), -- Kitchen items (157, 11368,NULL, 4, 1, '#F4FA58'), -- Kitchen items
(159, 2547,NULL, 4, 7, '#2E9AFE'), -- Articles and determinants (159, 2547,NULL, 4, 9, '#2E9AFE'), -- Articles and determinants
(190, 4687,NULL, 4, 7, '#F4FA58'), -- Body parts
(191, 50956,NULL, 4, 8, '#F4FA58'), -- Stuff
(192, 51336,NULL, 1, 7, '#008000'), -- Animals_and_plants
(25, 676, 376, 2, 2, NULL), -- Desiring.want (25, 676, 376, 2, 2, NULL), -- Desiring.want
(26, 292, 2640, 2, 7, NULL), -- Roles.be (26, 292, 2640, 2, 7, NULL), -- Roles.be
(27, 265, 265, 2, 3, NULL), -- Possession.have (27, 265, 265, 2, 3, NULL), -- Possession.have
...@@ -268,7 +271,41 @@ INSERT INTO `picto_core_cat` (`id`, `id_pic`, `id_cat_pic`, `coord_x`, `coord_y` ...@@ -268,7 +271,41 @@ INSERT INTO `picto_core_cat` (`id`, `id_pic`, `id_cat_pic`, `coord_x`, `coord_y`
(184, 2929, 2547, 4,8, NULL), -- Articles and determinants.those (184, 2929, 2547, 4,8, NULL), -- Articles and determinants.those
(186, 325, 54270, 2, 6, NULL), -- Change.turn on (186, 325, 54270, 2, 6, NULL), -- Change.turn on
(187, 328, 54270, 2, 7, NULL), -- Change.turn off (187, 328, 54270, 2, 7, NULL), -- Change.turn off
(188, 52670, 52736, 4, 5, NULL); -- Drinks.milk (188, 52670, 52736, 4, 5, NULL), -- Drinks.milk
(194, 4848,4687, 1, 2, NULL), -- Body parts.hair
(195, 4872,4687, 1, 3, NULL), -- Body parts.head
(196, 50694,4687, 1, 4, NULL), -- Body parts.eye
(197, 4787 ,4687, 1, 5, NULL), -- Body parts.ear
(198, 4933,4687, 1, 6, NULL), -- Body parts.nose
(199, 4921,4687, 1, 7, NULL), -- Body parts.mouth
(200, 5009,4687, 1, 8, NULL), -- Body parts.tooth
(201, 4752,4687, 1, 9, NULL), -- Body parts.cheek
(202, 4756,4687, 2, 1, NULL), -- Body parts.chin
(203, 4929,4687, 2, 2, NULL), -- Body parts.neck
(204, 4974,4687, 2, 3, NULL), -- Body parts.shoulder
(205, 4754,4687, 2, 4, NULL), -- Body parts.chest
(206, 4997 ,4687, 2, 5, NULL), -- Body parts.stomatch
(207, 4699,4687, 2, 6, NULL), -- Body parts.back
(208, 4739 ,4687, 2, 7, NULL), -- Body parts.bottom
(209, 4689,4687, 2, 8, NULL), -- Body parts.arm
(210, 4795,4687, 2, 9, NULL), -- Body parts.elbow
(211, 5053,4687, 3, 2, NULL), -- Body parts.wrist
(212, 4868,4687, 3, 3, NULL), -- Body parts.hand
(213, 4820,4687, 3, 4, NULL), -- Body parts.finger
(214, 4821,4687, 3, 5, NULL), -- Body parts.nail
(215, 4903,4687, 3, 6, NULL), -- Body parts.leg
(216, 4898,4687, 3, 7, NULL), -- Body parts.knee
(217, 4687,4687, 3, 8, NULL), -- Body parts.ankle
(218, 4829,4687, 3, 9, NULL), -- Body parts.foot
(219, 992,51336, 1, 7, NULL), -- Animals_and_plants.dog
(220, 1206,51336, 1, 8, NULL), -- Animals_and_plants.cat
(221, 853,51336, 1, 9, NULL), -- Animals_and_plants.bird
(222, 57236,51336, 1, 5, NULL), -- Animals_and_plants.tree
(223, 57384,51336, 1, 6, NULL); -- Animals_and_plants.plant
-- --
-- Update wrong translations -- Update wrong translations
...@@ -831,5 +868,22 @@ UPDATE picto_exp SET text='encender' WHERE id_pic=325 and lang='es-es'; ...@@ -831,5 +868,22 @@ UPDATE picto_exp SET text='encender' WHERE id_pic=325 and lang='es-es';
UPDATE picto_exp SET text='turn off' WHERE id_pic=328 and lang='en-us'; UPDATE picto_exp SET text='turn off' WHERE id_pic=328 and lang='en-us';
UPDATE picto_exp SET text='turn off' WHERE id_pic=328 and lang='en-gb'; UPDATE picto_exp SET text='turn off' WHERE id_pic=328 and lang='en-gb';
UPDATE picto_exp SET text='apagar' WHERE id_pic=328 and lang='es-es'; UPDATE picto_exp SET text='apagar' WHERE id_pic=328 and lang='es-es';
UPDATE picto_exp SET text='Body' WHERE id_pic=4687 and lang='en-us';
UPDATE picto_exp SET text='Body' WHERE id_pic=4687 and lang='en-gb';
UPDATE picto_exp SET text='Cuerpo' WHERE id_pic=4687 and lang='es-es';
UPDATE picto_exp SET text='Stuff' WHERE id_pic=50956 and lang='en-us';
UPDATE picto_exp SET text='Stuff' WHERE id_pic=50956 and lang='en-gb';
UPDATE picto_exp SET text='Cosas' WHERE id_pic=50956 and lang='es-es';
UPDATE picto_exp SET text='Animals and plants' WHERE id_pic=51336 and lang='en-us';
UPDATE picto_exp SET text='Animals and plants' WHERE id_pic=51336 and lang='en-gb';
UPDATE picto_exp SET text='Animales y plantas' WHERE id_pic=51336 and lang='es-es';
UPDATE picto_exp SET text='cat' WHERE id_pic=1206 and lang='en-us';
UPDATE picto_exp SET text='cat' WHERE id_pic=1206 and lang='en-gb';
UPDATE picto_exp SET text='gato' WHERE id_pic=1206 and lang='es-es';
UPDATE picto_exp SET text='bird' WHERE id_pic=853 and lang='en-us';
UPDATE picto_exp SET text='bird' WHERE id_pic=853 and lang='en-gb';
UPDATE picto_exp SET text='pájaro' WHERE id_pic=853 and lang='es-es';
SET foreign_key_checks=1; SET foreign_key_checks=1;
DROP DATABASE symbolstixdb;
GRANT USAGE ON *.* TO 'pictodbuser'@'localhost'; GRANT USAGE ON *.* TO 'pictodbuser'@'localhost';
DROP USER 'pictodbuser'@'localhost'; DROP USER 'pictodbuser'@'localhost';
CREATE USER 'pictodbuser'@'localhost' identified by 'p1KT015'; CREATE USER 'pictodbuser'@'localhost' identified by 'p1KT015';
CREATE DATABASE symbolstixdb; CREATE DATABASE symbolstixdb;
alter table pictodb.picto rename symbolstixdb.picto; alter table pictodb.picto rename symbolstixdb.picto;
alter table pictodb.pictocat rename symbolstixdb.pictocat; alter table pictodb.pictocat rename symbolstixdb.pictocat;
alter table pictodb.catexp rename symbolstixdb.catexp; alter table pictodb.catexp rename symbolstixdb.catexp;
alter table pictodb.picto_exp rename symbolstixdb.picto_exp; alter table pictodb.picto_exp rename symbolstixdb.picto_exp;
SET foreign_key_checks=0; SET foreign_key_checks=0;
DROP DATABASE pictodb; DROP DATABASE pictodb;
SET foreign_key_checks=1; SET foreign_key_checks=1;
CREATE DATABASE pictodb; CREATE DATABASE pictodb;
alter table symbolstixdb.picto rename pictodb.picto; alter table symbolstixdb.picto rename pictodb.picto;
alter table symbolstixdb.pictocat rename pictodb.pictocat; alter table symbolstixdb.pictocat rename pictodb.pictocat;
......
...@@ -15,9 +15,11 @@ module.exports = { ...@@ -15,9 +15,11 @@ module.exports = {
var email = req.body.email; var email = req.body.email;
var password = req.body.password; var password = req.body.password;
// no credentials // no credentials
if (!email || !password) if (!email || !password)
return res.json(401, {error: 'No credentials sent'}); return res.json(401, {error: 'No credentials sent'});
sails.log.debug("Supervisor Login request:"+email);
// search user by email // search user by email
Supervisor.findOneByEmail(email).exec(function (err, sup) { Supervisor.findOneByEmail(email).exec(function (err, sup) {
if (err) if (err)
......
...@@ -169,7 +169,7 @@ module.exports = { ...@@ -169,7 +169,7 @@ module.exports = {
return res.json(500, {error: 'Working Session not updated'}); return res.json(500, {error: 'Working Session not updated'});
} }
}); });
// Implementation of Integrity rule #8 for sessions management
Try.findOne( { id_ws : params.id } ).exec(function(err, t) { //Deleting empty WS (no tries) Try.findOne( { id_ws : params.id } ).exec(function(err, t) { //Deleting empty WS (no tries)
if (err) { if (err) {
sails.log.error("Error Recovering from ws "+err); sails.log.error("Error Recovering from ws "+err);
......
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