Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b381f832
authored
Jan 21, 2016
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://scm.ujaen.es/softuno/pictogram
parents
d81a0141
0ee98866
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
20 deletions
sails/conf/pictodb-data.sql
sails/conf/pictodb_init_keepsymbolstix.sql
sails/src/api/controllers/SupervisorController.js
sails/src/api/controllers/WorkingSessionController.js
sails/conf/pictodb-data.sql
View file @
b381f832
...
...
@@ -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
(
10
,
7265
,
NULL
,
1
,
5
,
'#008000'
),
-- Kinship
(
11
,
50388
,
NULL
,
1
,
6
,
'#008000'
),
-- Professions
(
125
,
376
,
NULL
,
2
,
2
,
NULL
),
-- Desiring
(
12
,
265
,
NULL
,
2
,
3
,
NULL
),
-- Possession
(
13
,
50391
,
NULL
,
2
,
4
,
NULL
),
-- Ingestion
(
125
,
376
,
NULL
,
2
,
2
,
'#FF0000'
),
-- Desiring
(
12
,
265
,
NULL
,
2
,
3
,
'#FF0000'
),
-- Possession
(
13
,
50391
,
NULL
,
2
,
4
,
'#FF0000'
),
-- Ingestion
(
14
,
4967
,
NULL
,
2
,
5
,
'#FF0000'
),
-- Senses
(
126
,
2640
,
NULL
,
2
,
6
,
'#FF0000'
),
-- Roles
(
127
,
54270
,
NULL
,
2
,
7
,
'#FF0000'
),
-- Change
(
15
,
50343
,
NULL
,
2
,
9
,
'#2E9AFE'
),
-- Prepositions
(
16
,
2049
,
NULL
,
3
,
4
,
'#FF00FF'
),
-- Colors
(
17
,
5866
,
NULL
,
3
,
3
,
NULL
),
-- Sizes
(
18
,
4814
,
NULL
,
3
,
5
,
NULL
),
-- Subjectives (feelings)
(
19
,
609
,
NULL
,
3
,
6
,
NULL
),
-- Tastes
(
185
,
56262
,
NULL
,
3
,
7
,
NULL
),
-- Aesthetics
(
17
,
5866
,
NULL
,
3
,
3
,
'#FF00FF'
),
-- Sizes
(
18
,
4814
,
NULL
,
3
,
5
,
'#FF00FF'
),
-- Subjectives (feelings)
(
19
,
609
,
NULL
,
3
,
6
,
'#FF00FF'
),
-- Tastes
(
185
,
56262
,
NULL
,
3
,
7
,
'#FF00FF'
),
-- Aesthetics
(
20
,
11216
,
NULL
,
4
,
3
,
'#F4FA58'
),
-- Toys
(
21
,
52736
,
NULL
,
4
,
4
,
'#F4FA58'
),
-- Drinks
(
22
,
10087
,
NULL
,
4
,
5
,
'#F4FA58'
),
-- Food
(
23
,
52758
,
NULL
,
4
,
6
,
'#F4FA58'
),
-- Sweets
(
128
,
253
,
NULL
,
2
,
8
,
'#F
4FA58
'
),
-- Motion
(
128
,
253
,
NULL
,
2
,
8
,
'#F
F0000
'
),
-- Motion
(
131
,
8148
,
NULL
,
1
,
2
,
'#FE9A2E'
),
-- Places
(
154
,
11523
,
NULL
,
1
,
1
,
'#FE9A2E'
),
-- Rooms
(
155
,
12303
,
NULL
,
4
,
1
,
'#F4FA58'
),
-- Clasroom items
(
156
,
5393
,
NULL
,
4
,
0
,
'#F4FA58'
),
-- Furniture
(
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
(
26
,
292
,
2640
,
2
,
7
,
NULL
),
-- Roles.be
(
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`
(
184
,
2929
,
2547
,
4
,
8
,
NULL
),
-- Articles and determinants.those
(
186
,
325
,
54270
,
2
,
6
,
NULL
),
-- Change.turn on
(
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
...
...
@@ -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-gb'
;
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
;
sails/conf/pictodb_init_keepsymbolstix.sql
View file @
b381f832
DROP
DATABASE
symbolstixdb
;
GRANT
USAGE
ON
*
.
*
TO
'pictodbuser'
@
'localhost'
;
DROP
USER
'pictodbuser'
@
'localhost'
;
CREATE
USER
'pictodbuser'
@
'localhost'
identified
by
'p1KT015'
;
CREATE
DATABASE
symbolstixdb
;
alter
table
pictodb
.
picto
rename
symbolstixdb
.
picto
;
alter
table
pictodb
.
pictocat
rename
symbolstixdb
.
pictocat
;
alter
table
pictodb
.
catexp
rename
symbolstixdb
.
catexp
;
alter
table
pictodb
.
picto_exp
rename
symbolstixdb
.
picto_exp
;
SET
foreign_key_checks
=
0
;
DROP
DATABASE
pictodb
;
SET
foreign_key_checks
=
1
;
CREATE
DATABASE
symbolstixdb
;
alter
table
pictodb
.
picto
rename
symbolstixdb
.
picto
;
alter
table
pictodb
.
pictocat
rename
symbolstixdb
.
pictocat
;
alter
table
pictodb
.
catexp
rename
symbolstixdb
.
catexp
;
alter
table
pictodb
.
picto_exp
rename
symbolstixdb
.
picto_exp
;
SET
foreign_key_checks
=
0
;
DROP
DATABASE
pictodb
;
SET
foreign_key_checks
=
1
;
CREATE
DATABASE
pictodb
;
alter
table
symbolstixdb
.
picto
rename
pictodb
.
picto
;
alter
table
symbolstixdb
.
pictocat
rename
pictodb
.
pictocat
;
...
...
sails/src/api/controllers/SupervisorController.js
View file @
b381f832
...
...
@@ -15,9 +15,11 @@ module.exports = {
var
email
=
req
.
body
.
email
;
var
password
=
req
.
body
.
password
;
// no credentials
if
(
!
email
||
!
password
)
return
res
.
json
(
401
,
{
error
:
'No credentials sent'
});
sails
.
log
.
debug
(
"Supervisor Login request:"
+
email
);
// search user by email
Supervisor
.
findOneByEmail
(
email
).
exec
(
function
(
err
,
sup
)
{
if
(
err
)
...
...
sails/src/api/controllers/WorkingSessionController.js
View file @
b381f832
...
...
@@ -169,7 +169,7 @@ module.exports = {
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)
if
(
err
)
{
sails
.
log
.
error
(
"Error Recovering from ws "
+
err
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment