Commit a763dfc5 by Jose Antonio

Merged branch develop into develop

parents 2a7a0ad9 8f3ae2c9
/*
SET FOREIGN_KEY_CHECKS = 0;
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;
DROP TABLE scene;
SET FOREIGN_KEY_CHECKS = 1;
*/
DELIMITER $$
......@@ -13,7 +14,8 @@ CREATE PROCEDURE scene_adapt()
BEGIN
DECLARE _id_stu INT;
DECLARE _id_sup INT;
DECLARE cat_active BOOLEAN;
DECLARE _cat_status CHAR(10);
DECLARE _cat_active BOOLEAN;
DECLARE done INT DEFAULT FALSE;
DECLARE LID INT;
......@@ -31,14 +33,19 @@ BEGIN
LEAVE read_loop;
END IF;
SELECT attributes->"$.categories" INTO cat_active FROM student WHERE id = _id_stu;
SET cat_active = 0;
SELECT CONCAT('active: ', cat_active);
SELECT CONCAT('active: ', NOT cat_active);
SELECT CAST(attributes->"$.categories" as CHAR(10)) INTO _cat_status FROM student WHERE id = _id_stu;
IF (_cat_status LIKE '%on%') THEN
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)
VALUES ('with_categories', cat_active, 1, _id_stu);
VALUES ('with_categories', _cat_active, 1, _id_stu);
SET LID = LAST_INSERT_ID();
......@@ -48,9 +55,9 @@ BEGIN
AND attributes->"$.free_category_coord_x" 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)
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();
......
......@@ -190,7 +190,7 @@ INSERT IGNORE INTO `student` (
NULL,
'es-es',
(SELECT id from office WHERE email='belen.perez@autismojaen.es'),
'{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}'
'{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
), (
'alumno2',
'$2a$10$RUv25u.C/waYE4xxbfTWTe/IBNQfIFFP5dKPTJsqYznbkS3QCvqq2',
......@@ -203,7 +203,7 @@ INSERT IGNORE INTO `student` (
NULL,
'es-es',
(SELECT id from office WHERE email='belen.perez@autismojaen.es'),
'{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}'
'{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
), (
'alumno3',
'$2a$10$Ei9E2Pz8sJ4aojbMPsdfZ.xz.LrWG4op1koC4LwCxHr.A0MgeP4m6',
......@@ -216,7 +216,7 @@ INSERT IGNORE INTO `student` (
NULL,
'es-es',
(SELECT id from office WHERE email='belen.perez@autismojaen.es'),
'{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}'
'{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
-- 'manuel',
-- '$2a$06$SaAswfsdqGpSo/bE.Cks8.CJnpqHGjixdRLGGpdOHWVFJR2w0fTaS',
......@@ -229,7 +229,7 @@ INSERT IGNORE INTO `student` (
-- NULL,
-- 'es-es',
-- (SELECT id from office WHERE email='belen.perez@autismojaen.es'),
-- '{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}'
-- '{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
-- ), (
-- 'jose',
-- '$2a$06$WtRXXLwFrEdDzB7r0r54RuY5A9wX3aysUIM8AHAGPpfVxhbNISBIa',
......@@ -242,7 +242,7 @@ INSERT IGNORE INTO `student` (
-- NULL,
-- 'es-es',
-- (SELECT id from office WHERE email='belen.perez@autismojaen.es'),
-- '{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}'
-- '{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
-- ), (
-- 'carmen',
-- '$2a$06$2c4zNE1Bkc24AXiXATbn8OfgkM/r9DJzUfnJ8qHrDUxBkMQd8rUIG',
......@@ -255,7 +255,7 @@ INSERT IGNORE INTO `student` (
-- NULL,
-- 'es-es',
-- (SELECT id from office WHERE email='belen.perez@autismojaen.es'),
-- '{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}'
-- '{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
);
--
......
......@@ -223,7 +223,7 @@ INSERT INTO `student` (
'test_caja_juan.jpg',
NULL,
'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',
'$2a$10$FOJ2fmJaHyI5sWe1tQojFuhoPpqHSTVPwvHPTpWEftFPI28VdyYNq',
......@@ -235,7 +235,7 @@ INSERT INTO `student` (
'test_caja_kate.jpg',
NULL,
'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',
'$2a$10$zygC/WviDviyZQsMsNqK8.tSUI4Qr/dLlLrw0i5kR1bbN4SeU5ACq',
......@@ -247,7 +247,7 @@ INSERT INTO `student` (
'test_caja_carlos.jpg',
NULL,
'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',
'$2a$10$xbyNUhf9rqhdXDBrvUSiOuJIzUVOyyz9ToQMCByFThiiiPwO0PWgK',
......@@ -259,7 +259,7 @@ INSERT INTO `student` (
'test_caja_rocio.jpg',
NULL,
'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',
'$2a$10$koWKIn42UNSi1N67akxjpOuJNwpXJ/vOe6biD2xkjrUz6dr3g.Wa.',
......@@ -271,7 +271,7 @@ INSERT INTO `student` (
'test_caja_samuel.jpg',
NULL,
'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',
'$2a$10$ffAjZjWN0UKja0JO7ko6qup4x2phbY3VpC66TmpMnGdWUutBFeWY2',
......@@ -283,7 +283,7 @@ INSERT INTO `student` (
'test_caja_adela.jpg',
NULL,
'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',
'$2a$10$glc5A6vyPve5.4407Vdkau5CHF3GOpA0Uo6rxMDdIopIWTJK0nBse',
......@@ -295,7 +295,7 @@ INSERT INTO `student` (
'test_caja_adela.jpg',
NULL,
'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',
'$2a$10$tezK07jq5ZMdQbCboubEBeHiXWJisZPAbgN301n5kRLXkq8xOlb4O',
......@@ -307,7 +307,7 @@ INSERT INTO `student` (
'test_caja_juan.jpg',
NULL,
'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',
'$2a$10$UQYGXOOE8mxxOjvgo8cjwOpsv5jCtRXpMTLpbD3TzMBiUIv3hXlnO',
......@@ -319,7 +319,7 @@ INSERT INTO `student` (
'test_caja_adela.jpg',
NULL,
'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',
'$2a$10$tVy3Wfu35l4B6bFpnjJCE.ckjncq6YCKMGW4B9abesbiFVeyGu2Dy',
......@@ -331,7 +331,7 @@ INSERT INTO `student` (
'test_caja_samuel.jpg',
NULL,
'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" }'
);
--
......
......@@ -74,7 +74,7 @@ INSERT IGNORE INTO `student` (
NULL,
'es-es',
(SELECT id from office WHERE email='centrodestrezas@gmail.com'),
'{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}'
'{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
);
INSERT IGNORE INTO `stu_picto` (
......
......@@ -58,6 +58,14 @@
target: "{{ server_path }}/{{ database_files_relative_path }}/test-{{ item }}.sql"
with_items: "{{ database_tests }}"
- name: Create scenes for existing stu_picto
mysql_db:
login_user: "{{ database_user }}"
login_password: "{{ database_user_passwd }}"
name: "{{ database_name }}"
state: import
target: "{{ server_path }}/{{ database_files_relative_path }}/scene_adapt.sql"
- name: Creates triggers
mysql_db:
login_user: "{{ database_user }}"
......
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