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
a8866dfc
authored
Apr 19, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
scene_adapt fixed, test-caja fixed
parent
7910eae4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
21 deletions
sails/roles/database/files/scene_adapt.sql
sails/roles/database/files/test-caja.sql
sails/roles/database/files/scene_adapt.sql
View file @
a8866dfc
/*
/*
SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE stu_picto DROP FOREIGN KEY stu_picto_scene_fk;
ALTER TABLE stu_picto DROP FOREIGN KEY stu_picto_scene_fk;
ALTER TABLE stu_picto DROP COLUMN id_scene;
ALTER TABLE stu_picto DROP id_scene;
ALTER TABLE stu_picto DROP id_scene;
DROP TABLE scene;
DROP TABLE scene;
SET FOREIGN_KEY_CHECKS = 1;
*/
*/
DELIMITER
$$
DELIMITER
$$
...
@@ -13,7 +14,8 @@ CREATE PROCEDURE scene_adapt()
...
@@ -13,7 +14,8 @@ CREATE PROCEDURE scene_adapt()
BEGIN
BEGIN
DECLARE
_id_stu
INT
;
DECLARE
_id_stu
INT
;
DECLARE
_id_sup
INT
;
DECLARE
_id_sup
INT
;
DECLARE
cat_active
BOOLEAN
;
DECLARE
_cat_status
CHAR
(
10
);
DECLARE
_cat_active
BOOLEAN
;
DECLARE
done
INT
DEFAULT
FALSE
;
DECLARE
done
INT
DEFAULT
FALSE
;
DECLARE
LID
INT
;
DECLARE
LID
INT
;
...
@@ -31,14 +33,19 @@ BEGIN
...
@@ -31,14 +33,19 @@ BEGIN
LEAVE
read_loop
;
LEAVE
read_loop
;
END
IF
;
END
IF
;
SELECT
attributes
->
"$.categories"
INTO
cat_active
FROM
student
WHERE
id
=
_id_stu
;
SELECT
CAST
(
attributes
->
"$.categories"
as
CHAR
(
10
))
INTO
_cat_status
FROM
student
WHERE
id
=
_id_stu
;
SET
cat_active
=
0
;
SELECT
CONCAT
(
'active: '
,
cat_active
);
IF
(
_cat_status
LIKE
'%on%'
)
THEN
SELECT
CONCAT
(
'active: '
,
NOT
cat_active
);
SET
_cat_active
=
1
;
/*SELECT CONCAT('active: ', _cat_active);*/
ELSE
SET
_cat_active
=
0
;
/*SELECT CONCAT('active: ', NOT _cat_active);*/
END
IF
;
/* FIRST SCENE, ACTIVE, WITH CATEGORIES
*/
/* FIRST SCENE, ACTIVE, WITH CATEGORIES*/
INSERT
INTO
`scene`
(
name
,
active
,
categories
,
id_stu
)
INSERT
INTO
`scene`
(
name
,
active
,
categories
,
id_stu
)
VALUES
(
'with_categories'
,
cat_active
,
1
,
_id_stu
);
VALUES
(
'with_categories'
,
_
cat_active
,
1
,
_id_stu
);
SET
LID
=
LAST_INSERT_ID
();
SET
LID
=
LAST_INSERT_ID
();
...
@@ -48,9 +55,9 @@ BEGIN
...
@@ -48,9 +55,9 @@ BEGIN
AND
attributes
->
"$.free_category_coord_x"
IS
NULL
AND
attributes
->
"$.free_category_coord_x"
IS
NULL
AND
attributes
->
"$.free_category_coord_y"
IS
NULL
;
AND
attributes
->
"$.free_category_coord_y"
IS
NULL
;
/* SECOND SCENE, NOT ACTIVE, NO CATEGORIES
*/
/* SECOND SCENE, NOT ACTIVE, NO CATEGORIES*/
INSERT
INTO
`scene`
(
name
,
active
,
categories
,
id_sup
,
id_stu
)
INSERT
INTO
`scene`
(
name
,
active
,
categories
,
id_sup
,
id_stu
)
VALUES
(
'no_categories'
,
NOT
cat_active
,
0
,
_id_sup
,
_id_stu
);
VALUES
(
'no_categories'
,
NOT
_
cat_active
,
0
,
_id_sup
,
_id_stu
);
SET
LID
=
LAST_INSERT_ID
();
SET
LID
=
LAST_INSERT_ID
();
...
...
sails/roles/database/files/test-caja.sql
View file @
a8866dfc
...
@@ -223,7 +223,7 @@ INSERT INTO `student` (
...
@@ -223,7 +223,7 @@ INSERT INTO `student` (
'test_caja_juan.jpg'
,
'test_caja_juan.jpg'
,
NULL
,
NULL
,
'es-es'
,
'es-es'
,
'{
"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "es" }]
}'
'{
"categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "es"
}'
),
(
),
(
'faf0002'
,
'faf0002'
,
'$2a$10$FOJ2fmJaHyI5sWe1tQojFuhoPpqHSTVPwvHPTpWEftFPI28VdyYNq'
,
'$2a$10$FOJ2fmJaHyI5sWe1tQojFuhoPpqHSTVPwvHPTpWEftFPI28VdyYNq'
,
...
@@ -235,7 +235,7 @@ INSERT INTO `student` (
...
@@ -235,7 +235,7 @@ INSERT INTO `student` (
'test_caja_kate.jpg'
,
'test_caja_kate.jpg'
,
NULL
,
NULL
,
'en-gb'
,
'en-gb'
,
'{
"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]
}'
'{
"categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en"
}'
),
(
),
(
'mam0001'
,
'mam0001'
,
'$2a$10$zygC/WviDviyZQsMsNqK8.tSUI4Qr/dLlLrw0i5kR1bbN4SeU5ACq'
,
'$2a$10$zygC/WviDviyZQsMsNqK8.tSUI4Qr/dLlLrw0i5kR1bbN4SeU5ACq'
,
...
@@ -247,7 +247,7 @@ INSERT INTO `student` (
...
@@ -247,7 +247,7 @@ INSERT INTO `student` (
'test_caja_carlos.jpg'
,
'test_caja_carlos.jpg'
,
NULL
,
NULL
,
'es-es'
,
'es-es'
,
'{
"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "es" }]
}'
'{
"categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "es"
}'
),
(
),
(
'mam0002'
,
'mam0002'
,
'$2a$10$xbyNUhf9rqhdXDBrvUSiOuJIzUVOyyz9ToQMCByFThiiiPwO0PWgK'
,
'$2a$10$xbyNUhf9rqhdXDBrvUSiOuJIzUVOyyz9ToQMCByFThiiiPwO0PWgK'
,
...
@@ -259,7 +259,7 @@ INSERT INTO `student` (
...
@@ -259,7 +259,7 @@ INSERT INTO `student` (
'test_caja_rocio.jpg'
,
'test_caja_rocio.jpg'
,
NULL
,
NULL
,
'es-es'
,
'es-es'
,
'{
"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]
}'
'{
"categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en"
}'
),
(
),
(
'aaa0001'
,
'aaa0001'
,
'$2a$10$koWKIn42UNSi1N67akxjpOuJNwpXJ/vOe6biD2xkjrUz6dr3g.Wa.'
,
'$2a$10$koWKIn42UNSi1N67akxjpOuJNwpXJ/vOe6biD2xkjrUz6dr3g.Wa.'
,
...
@@ -271,7 +271,7 @@ INSERT INTO `student` (
...
@@ -271,7 +271,7 @@ INSERT INTO `student` (
'test_caja_samuel.jpg'
,
'test_caja_samuel.jpg'
,
NULL
,
NULL
,
'es-es'
,
'es-es'
,
'{
"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "es" }]
}'
'{
"categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "es"
}'
),
(
),
(
'aaa0002'
,
'aaa0002'
,
'$2a$10$ffAjZjWN0UKja0JO7ko6qup4x2phbY3VpC66TmpMnGdWUutBFeWY2'
,
'$2a$10$ffAjZjWN0UKja0JO7ko6qup4x2phbY3VpC66TmpMnGdWUutBFeWY2'
,
...
@@ -283,7 +283,7 @@ INSERT INTO `student` (
...
@@ -283,7 +283,7 @@ INSERT INTO `student` (
'test_caja_adela.jpg'
,
'test_caja_adela.jpg'
,
NULL
,
NULL
,
'es-es'
,
'es-es'
,
'{
"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]
}'
'{
"categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en"
}'
),
(
),
(
'aaa0003'
,
'aaa0003'
,
'$2a$10$glc5A6vyPve5.4407Vdkau5CHF3GOpA0Uo6rxMDdIopIWTJK0nBse'
,
'$2a$10$glc5A6vyPve5.4407Vdkau5CHF3GOpA0Uo6rxMDdIopIWTJK0nBse'
,
...
@@ -295,7 +295,7 @@ INSERT INTO `student` (
...
@@ -295,7 +295,7 @@ INSERT INTO `student` (
'test_caja_adela.jpg'
,
'test_caja_adela.jpg'
,
NULL
,
NULL
,
'es-es'
,
'es-es'
,
'{
"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]
}'
'{
"categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en"
}'
),
(
),
(
'aaa0004'
,
'aaa0004'
,
'$2a$10$tezK07jq5ZMdQbCboubEBeHiXWJisZPAbgN301n5kRLXkq8xOlb4O'
,
'$2a$10$tezK07jq5ZMdQbCboubEBeHiXWJisZPAbgN301n5kRLXkq8xOlb4O'
,
...
@@ -307,7 +307,7 @@ INSERT INTO `student` (
...
@@ -307,7 +307,7 @@ INSERT INTO `student` (
'test_caja_juan.jpg'
,
'test_caja_juan.jpg'
,
NULL
,
NULL
,
'es-es'
,
'es-es'
,
'{
"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]
}'
'{
"categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en"
}'
),
(
),
(
'jaj0001'
,
'jaj0001'
,
'$2a$10$UQYGXOOE8mxxOjvgo8cjwOpsv5jCtRXpMTLpbD3TzMBiUIv3hXlnO'
,
'$2a$10$UQYGXOOE8mxxOjvgo8cjwOpsv5jCtRXpMTLpbD3TzMBiUIv3hXlnO'
,
...
@@ -319,7 +319,7 @@ INSERT INTO `student` (
...
@@ -319,7 +319,7 @@ INSERT INTO `student` (
'test_caja_adela.jpg'
,
'test_caja_adela.jpg'
,
NULL
,
NULL
,
'es-es'
,
'es-es'
,
'{
"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]
}'
'{
"categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en"
}'
),
(
),
(
'jaj0002'
,
'jaj0002'
,
'$2a$10$tVy3Wfu35l4B6bFpnjJCE.ckjncq6YCKMGW4B9abesbiFVeyGu2Dy'
,
'$2a$10$tVy3Wfu35l4B6bFpnjJCE.ckjncq6YCKMGW4B9abesbiFVeyGu2Dy'
,
...
@@ -331,7 +331,7 @@ INSERT INTO `student` (
...
@@ -331,7 +331,7 @@ INSERT INTO `student` (
'test_caja_samuel.jpg'
,
'test_caja_samuel.jpg'
,
NULL
,
NULL
,
'es-es'
,
'es-es'
,
'{
"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]
}'
'{
"categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en"
}'
);
);
--
--
...
...
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