Commit 0dc42f31 by Pablo Molina

Fixed #422, actualizado test de autismojaen

parent ec1b7e3f
Showing with 311 additions and 2 deletions
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";SET time_zone = "+00:00"; SET foreign_key_checks=0; -- -- Autismo Jaen -- INSERT INTO `office` (`name`, `address`, `country`, `contact_person`, `email`, `phone1`, `lang`) VALUES ('Asociación Provincial de Autismo de Jaén', 'Avd. de Andalucía, 92 - bajo, 23006 Jaén', 'ES', 'Belén Pérez Vílchez', 'belen.perez@autismojaen.es', '+34 953 236 158', 'es-es'); -- -- Terapeutas -- INSERT INTO `supervisor` (`name`, `surname`, `gender`, `address`, `email`, `phone`, `lang`, `password`, `active`, `id_off`) (SELECT 'Belén','Pérez Vílchez', 'F', NULL, 'belen.perez@autismojaen.es', NULL, 'es-es', '$2a$10$asX8K7IXtyuafDCMekElo.VpsoLVtL9ODhbrmrcr8yKamfrafNd0e', true, id from office where name='Asociación Provincial de Autismo de Jaén'); UPDATE supervisor SET pic='/upload/supervisors/belen.jpg' WHERE name='Belén' AND surname='Pérez Vílchez'; INSERT INTO `supervisor` (`name`, `surname`, `gender`, `address`, `email`, `phone`, `lang`, `password`, `active`, `id_off`) (SELECT 'Maria José','López LLavero', 'F', NULL, 'mariajose.lopez@autismojaen.es', NULL, 'es-es', '$2a$04$4q7oBkVSYBvk7ivBOyv47.plV7/HNlJGwq7Kbi4PQYr4Fac5ZHhP6', true, id from office where name='Asociación Provincial de Autismo de Jaén'); INSERT INTO `supervisor` (`name`, `surname`, `gender`, `address`, `email`, `phone`, `lang`, `password`, `active`, `id_off`) (SELECT 'Elvira','Delgado', 'F', NULL, 'elvira.delgado@autismojaen.es', NULL, 'es-es', '$2a$04$akHdB39le32.wAZtIgcUqOIXzUeW3dobieSD3GlMvHKoZ0U/l9XZy', true, id from office where name='Asociación Provincial de Autismo de Jaén'); INSERT INTO `supervisor` (`name`, `surname`, `gender`, `address`, `email`, `phone`, `lang`, `password`, `active`, `id_off`) (SELECT 'Juana','Martos', 'F', NULL, 'juana.martos@autismojaen.es', NULL, 'es-es', '$2a$04$tzPDIHXRaQZF16GsTy4sH.WH2BXcIvZGSaci/48yJmPYRI/WvUdXa', true, id from office where name='Asociación Provincial de Autismo de Jaén'); -- -- Tutores -- INSERT INTO `supervisor` (`name`, `surname`, `gender`, `address`, `email`, `phone`, `lang`, `password`, `active`) (SELECT 'Manuel','Colmenero', 'M', NULL, 'manuel.colmenero@autismojaen.es', NULL, 'es-es', '$2a$04$.yPeszNrugNdvpc4cQ.WJubMlfYxUIs1Xt3PU3W4STl5Lq.eWk.ay', true); INSERT INTO `supervisor` (`name`, `surname`, `gender`, `address`, `email`, `phone`, `lang`, `password`, `active`) (SELECT 'Yolanda','Oya', 'F', NULL, 'yolanda.oya@autismojaen.es', NULL, 'es-es', '$2a$04$EtbNfY5FVxdoGmOCj2FKF.JWhkCkeejPMJQvh/gw051Dwx87jFAIO', true); INSERT INTO `supervisor` (`name`, `surname`, `gender`, `address`, `email`, `phone`, `lang`, `password`, `active`) (SELECT 'Montserrat','Yera', 'F', NULL, 'motserrat.yera@autismojaen.es', NULL, 'es-es', '$2a$04$Bla8ZZdVDRJ70jWSgg6KFu/XDj9EEhgQiOFm/5t3N8wMXZWIUcOzy', true); -- -- Admin -- UPDATE office SET admin=(SELECT id FROM supervisor where name='Belén' and surname='Pérez Vílchez') WHERE name='Asociación Provincial de Autismo de Jaén'; -- -- Alumnos -- INSERT INTO `student` (`name`, `surname`, `birthdate`, `gender`, `country`, `pic`, `notes`, `lang`, `attributes`) VALUES ('Manuel', 'Colmenero Hernández','2015-01-01','M','ES',NULL,NULL,'es-es', '{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium"}]}'); INSERT INTO `student` (`name`, `surname`, `birthdate`, `gender`, `country`, `pic`, `notes`, `lang`, `attributes`) VALUES ('José', 'Guzmán Oya','2015-01-01','M','ES',NULL,NULL,'es-es', '{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium"}]}'); INSERT INTO `student` (`name`, `surname`, `birthdate`, `gender`, `country`, `pic`, `notes`, `lang`, `attributes`) VALUES ('Carmen', 'García Yera','2015-01-01','F','ES',NULL,NULL,'es-es', '{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium"}]}'); -- -- Alumnos y Supervisores -- insert into stu_sup(id_stu,id_sup) values ( (select id from student where name='Manuel' and surname='Colmenero Hernández'), (select id from supervisor where name='Maria José' and surname='López LLavero')); insert into stu_sup(id_stu,id_sup) values ( (select id from student where name='José' and surname='Guzmán Oya'), (select id from supervisor where name='Elvira' and surname='Delgado')); insert into stu_sup(id_stu,id_sup) values ( (select id from student where name='Carmen' and surname='García Yera'), (select id from supervisor where name='Juana' and surname='Martos')); insert into stu_sup(id_stu,id_sup) values ( (select id from student where name='Manuel' and surname='Colmenero Hernández'), (select id from supervisor where name='Manuel' and surname='Colmenero')); insert into stu_sup(id_stu,id_sup) values ( (select id from student where name='José' and surname='Guzmán Oya'), (select id from supervisor where name='Yolanda' and surname='Oya')); insert into stu_sup(id_stu,id_sup) values ( (select id from student where name='Carmen' and surname='García Yera'), (select id from supervisor where name='Montserrat' and surname='Yera')); -- -- Gabinete -- UPDATE student SET id_off=(SELECT id from office where name='Asociación Provincial de Autismo de Jaén') WHERE student.name='Manuel' and surname='Colmenero Hernández'; UPDATE student SET id_off=(SELECT id from office where name='Asociación Provincial de Autismo de Jaén') WHERE student.name='José' and surname='Guzmán Oya'; UPDATE student SET id_off=(SELECT id from office where name='Asociación Provincial de Autismo de Jaén') WHERE student.name='Carmen' and surname='García Yera'; INSERT INTO stu_picto(id_stu,id_pic,attributes) SELECT S.id,P.id_pic, concat('{"id_cat":', if (id_cat_pic is null, 'null',id_cat_pic), ',"coord_x":',coord_x, ',"coord_y":',coord_y, ',"status":"invisible"', ',"highlight":false', ',"color":', if (color is null, 'null',concat('"',color,'"')), '}') as attributes FROM student S, picto_core_cat P WHERE S.id_off = ('Asociación Provincial de Autismo de Jaén'); SET foreign_key_checks=1; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
\ No newline at end of file SET time_zone = "+00:00";
SET foreign_key_checks = 0;
--
-- Oficina Autismo Jaen
--
INSERT INTO `office` (
`name`,
`address`,
`country`,
`contact_person`,
`email`,
`phone1`,
`lang`
) VALUES (
'Asociación Provincial de Autismo de Jaén',
'Avd. de Andalucía, 92 - bajo, 23006 Jaén',
'ES',
'Belén Pérez Vílchez',
'belen.perez@autismojaen.es',
'+34 953 236 158',
'es-es'
);
--
-- Admin
-- La contraseña es la primera parte del email (ej: manuel.colmenero)
--
INSERT INTO `supervisor` (
`name`,
`surname`,
`gender`,
`address`,
`email`,
`phone`,
`lang`,
`password`,
`active`,
`id_off`,
`pic`
) VALUES (
'Belén',
'Pérez Vílchez',
'F',
NULL,
'belen.perez@autismojaen.es',
NULL,
'es-es',
'$2a$10$F/n1q5TLFMvebKIwE/MMNOEpTuGNK1p.Nc85on0ptvPPDR6QqGv4C',
true,
(SELECT id from office where email='belen.perez@autismojaen.es'),
'/upload/supervisors/belen.jpg'
);
UPDATE office
SET admin=(SELECT id FROM supervisor WHERE email='belen.perez@autismojaen.es')
WHERE email='belen.perez@autismojaen.es'
;
--
-- Terapeutas
-- La contraseña es la primera parte del email (ej: manuel.colmenero)
--
INSERT INTO `supervisor` (
`name`,
`surname`,
`gender`,
`address`,
`email`,
`phone`,
`lang`,
`password`,
`active`,
`id_off`
) VALUES (
'Maria José',
'López LLavero',
'F',
NULL,
'mariajose.lopez@autismojaen.es',
NULL,
'es-es',
'$2a$10$YzV5vKUKa0C61smQrn/s2eXxNiJIavpIKARk/bzcp6h8oaGAXdY2K',
true,
(SELECT id from office where email='belen.perez@autismojaen.es')
), (
'Elvira',
'Delgado',
'F',
NULL,
'elvira.delgado@autismojaen.es',
NULL,
'es-es',
'$2a$10$JFXz0ZWBBGkQfb5HX3ueSuQOcdgZWOQbPYrBbahLcG7tSYHtnMVJu',
true,
(SELECT id from office where email='belen.perez@autismojaen.es')
), (
'Juana',
'Martos',
'F',
NULL,
'juana.martos@autismojaen.es',
NULL,
'es-es',
'$2a$10$wYRQwDkmReOoDUuNbbJczu05e0AcuYd1h0yxME1ZyB.Hf7b61C5jq',
true,
(SELECT id from office where email='belen.perez@autismojaen.es')
);
--
-- Tutores
-- La contraseña es la primera parte del email (ej: manuel.colmenero)
--
INSERT INTO `supervisor` (
`name`,
`surname`,
`gender`,
`address`,
`email`,
`phone`,
`lang`,
`password`,
`active`
) VALUES (
'Manuel',
'Colmenero',
'M',
NULL,
'manuel.colmenero@autismojaen.es',
NULL,
'es-es',
'$2a$10$7I7Y94R0xE//q7W7F9hq3.a0oabLPmkKTIGiQiJAm9ckJeRH2R2c2',
true
), (
'Yolanda',
'Oya',
'F',
NULL,
'yolanda.oya@autismojaen.es',
NULL,
'es-es',
'$2a$10$EXVV43uMgm5aHzz2jplPGOP1yYE4LLEl.YMbl/r9o7l1BvQfG/Pm2',
true
), (
'Montserrat',
'Yera',
'F',
NULL,
'montserrat.yera@autismojaen.es',
NULL,
'es-es',
'$2a$10$1syFscGVKo4iCEo7dQb0x.uOLQGvTDBNN1NJK3aEDPBrOUmWHN1sa',
true
);
--
-- Alumnos
-- La contraseña es el nombre de usuario
--
INSERT INTO `student` (
`username`,
`password`,
`name`,
`surname`,
`birthdate`,
`gender`,
`country`,
`pic`,
`notes`,
`lang`,
`id_off`,
`attributes`
) VALUES (
'alumno1',
'$2a$10$wux/TGja3DN0LQUb4RhrHuV9UIGg0xzfyjorhIqOvhvqVz/qKP3Du',
'Alumno',
'Uno',
'2015-01-01',
'M',
'ES',
'/app/img/default.jpg',
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"}]}'
), (
'alumno2',
'$2a$10$RUv25u.C/waYE4xxbfTWTe/IBNQfIFFP5dKPTJsqYznbkS3QCvqq2',
'Alumno',
'Dos',
'2015-01-01',
'M',
'ES',
'/app/img/default.jpg',
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"}]}'
), (
'alumno3',
'$2a$10$Ei9E2Pz8sJ4aojbMPsdfZ.xz.LrWG4op1koC4LwCxHr.A0MgeP4m6',
'Alumno',
'Tres',
'2015-01-01',
'M',
'ES',
'/app/img/default.jpg',
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"}]}'
-- 'manuel',
-- '$2a$06$SaAswfsdqGpSo/bE.Cks8.CJnpqHGjixdRLGGpdOHWVFJR2w0fTaS',
-- 'Manuel',
-- 'Colmenero Hernández',
-- '2015-01-01',
-- 'M',
-- 'ES',
-- NULL,
-- 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"}]}'
-- ), (
-- 'jose',
-- '$2a$06$WtRXXLwFrEdDzB7r0r54RuY5A9wX3aysUIM8AHAGPpfVxhbNISBIa',
-- 'José',
-- 'Guzmán Oya',
-- '2015-01-01',
-- 'M',
-- 'ES',
-- NULL,
-- 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"}]}'
-- ), (
-- 'carmen',
-- '$2a$06$2c4zNE1Bkc24AXiXATbn8OfgkM/r9DJzUfnJ8qHrDUxBkMQd8rUIG',
-- 'Carmen',
-- 'García Yera',
-- '2015-01-01',
-- 'F',
-- 'ES',
-- NULL,
-- 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"}]}'
);
--
-- Alumnos y Supervisores
--
-- INSERT INTO stu_sup (
-- `id_stu`,
-- `id_sup`
-- ) VALUES (
-- (SELECT id FROM student where name='Manuel' and surname='Colmenero Hernández'),
-- (SELECT id FROM supervisor where name='Maria José' and surname='López LLavero')
-- ), (
-- (SELECT id FROM student where name='José' and surname='Guzmán Oya'),
-- (SELECT id FROM supervisor where name='Elvira' and surname='Delgado')
-- ), (
-- (SELECT id FROM student where name='Carmen' and surname='García Yera'),
-- (SELECT id FROM supervisor where name='Juana' and surname='Martos')
-- ), (
-- (SELECT id FROM student where name='Manuel' and surname='Colmenero Hernández'),
-- (SELECT id FROM supervisor where name='Manuel' and surname='Colmenero')
-- ), (
-- (SELECT id FROM student where name='José' and surname='Guzmán Oya'),
-- (SELECT id FROM supervisor where name='Yolanda' and surname='Oya')
-- ), (
-- (SELECT id FROM student where name='Carmen' and surname='García Yera'),
-- (SELECT id FROM supervisor where name='Montserrat' and surname='Yera')
-- );
--
-- Student pictos
--
INSERT INTO `stu_picto` (
`id_stu`,
`id_pic`,
`attributes`
)
SELECT S.id, P.id_pic, concat('{',
'"id_cat":', if (P.id_cat_pic is null, 'null', P.id_cat_pic),
',"coord_x":', P.coord_x,
',"coord_y":', P.coord_y,
',"status":"invisible"',
',"highlight":false',
',"color":', if (P.color is null, 'null', concat('"', P.color,'"')),
'}') as attributes
FROM student S, picto_core_cat P
WHERE
S.id_off=(SELECT id
FROM office
WHERE email='belen.perez@autismojaen.es'
)
;
SET foreign_key_checks = 1;
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