Commit 7c95f258 authored by damianofalcioni's avatar damianofalcioni
Browse files

updated models and microservice to support file upload

parent 66b802a1
......@@ -33,9 +33,9 @@ CREATE TABLE IF NOT EXISTS `mappings` (
DELETE FROM `mappings`;
/*!40000 ALTER TABLE `mappings` DISABLE KEYS */;
INSERT INTO `mappings` (`model_name`, `model_instance_name`, `questionnaire_id`, `answer_json`) VALUES
('1.1 Supermarket - Fixed Binding', 'Pick Object 1 from Box 1', 'q1', '{"questions":{"q1":{"answer":"aaa"},"q2":{"answer":"aaa"},"q3":{"answer":"a2"},"q4":{"answer":"a1"},"q5":{"answer":["a2"]}}}'),
('1.1 Supermarket - Fixed Binding', 'Place Object 1 into Shopping Cart', 'q1', NULL),
('1.1 Supermarket - Fixed Binding', 'Rest Robot Arm', 'q1', '{"questions":{"q1":{"answer":"answer"},"q2":{"answer":"long answer"},"q3":{"answer":"a2"},"q4":{"answer":"a2"},"q5":{"answer":["a2"]}}}');
('1.1 Supermarket - Fixed Binding', 'Pick Object 1 from Box 1', 'Questionnaire 20200804', NULL),
('1.1 Supermarket - Fixed Binding', 'Rest Robot Arm', 'Questionnaire 20200804', '{"questions":{"243621":{"answer":"incorrect answer"},"243628":{"answer":"long answer"},"243635":{"answer":"a1"},"243646":{"answer":"a2"},"243657":{"answer":["a2"]},"243668":{"answer":{"fileName":"dummy.txt","fileContentB64":"data:text/plain;base64,ZHVtbXkgZmlsZQ=="}}}}'),
('1.1 Supermarket - Fixed Binding', 'Start', 'Questionnaire 20200804', '{"questions":{"243621":{"answer":"answer"},"243628":{"answer":"long answer"},"243635":{"answer":"a2"},"243646":{"answer":"a2"},"243657":{"answer":["a2"]},"243668":{"answer":{"fileName":"dummy.txt","fileContentB64":"data:text/plain;base64,ZHVtbXkgZmlsZQ=="}}}}');
/*!40000 ALTER TABLE `mappings` ENABLE KEYS */;
-- Dumping structure for table model_questionnaire.questionnaires
......@@ -46,12 +46,11 @@ CREATE TABLE IF NOT EXISTS `questionnaires` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping data for table model_questionnaire.questionnaires: ~2 rows (approximately)
-- Dumping data for table model_questionnaire.questionnaires: ~3 rows (approximately)
DELETE FROM `questionnaires`;
/*!40000 ALTER TABLE `questionnaires` DISABLE KEYS */;
INSERT INTO `questionnaires` (`id`, `json`) VALUES
('q1', '{"results":{"lev0":{"scoreThreshold":0,"scoreDescription":"fail","scoreColor":"red"},"lev1":{"scoreThreshold":6,"scoreDescription":"sufficient","scoreColor":"yellow"}},"questionsOrder":["q1","q2","q3","q4","q5"],"questions":{"q1":{"question":"question 1 ?","image":"https://www.adoxx.org/live/image/layout_set_logo?img_id=179909&t=1591596811747","answer":{"type":0,"facets":{"placeholder":"put your answer here.."},"required":true},"scores":{"answer":1,"answet":1}},"q2":{"question":"question 2 ?","answer":{"type":1,"facets":{"placeholder":"put your long answer here..","minlength":10,"maxlength":100},"required":true},"scores":{"long answer":1,"long answet":1}},"q3":{"question":"question 3 ?","answer":{"type":2,"facets":{"answersOrder":["a1","a2"],"answers":{"a1":{"text":"response 1","image":"https://www.adoxx.org/live/image/layout_set_logo?img_id=179909&t=1591596811747"},"a2":{"text":"response 2"}}},"required":true},"scores":{"a1":-1,"a2":2}},"q4":{"question":"question 4 ?","answer":{"type":3,"facets":{"answersOrder":["a1","a2"],"answers":{"a1":{"text":"response 1"},"a2":{"text":"response 2"}}},"required":true},"scores":{"a1":-1,"a2":2}},"q5":{"question":"question 5 ?","answer":{"type":4,"facets":{"answersOrder":["a1","a2"],"answers":{"a1":{"text":"response 1","image":"https://www.adoxx.org/live/image/layout_set_logo?img_id=179909&t=1591596811747"},"a2":{"text":"response 2"}}},"required":true},"scores":{"a1":-1,"a2":2}}}}'),
('q2', '{"results":{"lev0":{"scoreThreshold":0,"scoreDescription":"fail","scoreColor":"red"},"lev1":{"scoreThreshold":6,"scoreDescription":"sufficient","scoreColor":"yellow"}},"questionsOrder":["q1","q2","q3","q4","q5"],"questions":{"q1":{"question":"question 1 ?","image":"https://www.adoxx.org/live/image/layout_set_logo?img_id=179909&t=1591596811747","answer":{"type":0,"facets":{"placeholder":"put your answer here.."},"required":true},"scores":{"answer":1,"answet":1}},"q2":{"question":"question 2 ?","answer":{"type":1,"facets":{"placeholder":"put your long answer here..","minlength":10,"maxlength":100},"required":true},"scores":{"long answer":1,"long answet":1}},"q3":{"question":"question 3 ?","answer":{"type":2,"facets":{"answersOrder":["a1","a2"],"answers":{"a1":{"text":"response 1","image":"https://www.adoxx.org/live/image/layout_set_logo?img_id=179909&t=1591596811747"},"a2":{"text":"response 2"}}},"required":true},"scores":{"a1":-1,"a2":2}},"q4":{"question":"question 4 ?","answer":{"type":3,"facets":{"answersOrder":["a1","a2"],"answers":{"a1":{"text":"response 1"},"a2":{"text":"response 2"}}},"required":true},"scores":{"a1":-1,"a2":2}},"q5":{"question":"question 5 ?","answer":{"type":4,"facets":{"answersOrder":["a1","a2"],"answers":{"a1":{"text":"response 1","image":"https://www.adoxx.org/live/image/layout_set_logo?img_id=179909&t=1591596811747"},"a2":{"text":"response 2"}}},"required":true},"scores":{"a1":-1,"a2":2}}}}');
('Questionnaire 20200804', '{ "results": { "lev1": {"scoreThreshold": 0, "scoreDescription": "fail", "scoreColor": "red"}, "lev2": {"scoreThreshold": 6, "scoreDescription": "sufficient", "scoreColor": "yellow"}}, "questionsOrder": [ "243621", "243628", "243635", "243646", "243657", "243668"], "questions": { "243621": { "name": "Question-1", "question": "question 1", "image": "https://www.adoxx.org/live/image/layout_set_logo?img_id=179909&t=1591596811747", "answer": { "type": 0, "required": true, "facets": { "placeholder": "put your answer here.."}}, "scores": { "answer": 1, "answet": 1}}, "243628": { "name": "Question-2", "question": "Question 2?", "image": "", "answer": { "type": 1, "required": true, "facets": { "placeholder": "put your long answer here..", "minlength": 10, "maxlength": 200}}, "scores": { "long answer": 1, "long answet": 1}}, "243635": { "name": "Question-3", "question": "question 3 ?", "image": "", "answer": { "type": 2, "required": true, "facets": { "answersOrder": [ "a1", "a2"], "answers": { "a1": { "text": "response 1", "image": "https://www.adoxx.org/live/image/layout_set_logo?img_id=179909&t=1591596811747"}, "a2": { "text": "response 2"}}}}, "scores": { "a1": -1, "a2": 2}}, "243646": { "name": "Question-4", "question": "question 4 ?", "image": "", "answer": { "type": 3, "required": true, "facets": { "answersOrder": [ "a1", "a2"], "answers": { "a1": { "text": "response 1"}, "a2": { "text": "response 2"}}}}, "scores": { "a1": -1, "a2": 2}}, "243657": { "name": "Question-5", "question": "question 5 ?", "image": "", "answer": { "type": 4, "required": false, "facets": { "answersOrder": [ "a1", "a2"], "answers": { "a1": { "text": "response 1", "image": "https://www.adoxx.org/live/image/layout_set_logo?img_id=179909&t=1591596811747"}, "a2": { "text": "response 2"}}}}, "scores": { "a1": -1, "a2": 2}}, "243668": { "name": "Question-6", "question": "question 6?", "image": "", "answer": { "type": 5, "required": true, "facets": { }}, "scores": {}}}}');
/*!40000 ALTER TABLE `questionnaires` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
......
///////////////////////////////////////////////////////////////
//
// Date: 03.08.2020 17:36
// Date: 04.08.2020 11:32
//
// Generated by ADOxx - Model export -- V 2.0
//
......@@ -28,10 +28,10 @@ TYPE <Questionnaire model>
VALUE "14.07.2020, 12:15"
ATTRIBUTE <Date last changed>
VALUE "03.08.2020, 17:26:18"
VALUE "04.08.2020, 11:32:06"
ATTRIBUTE <Last user>
VALUE "questionnaire"
VALUE "quest"
ATTRIBUTE <Keywords>
VALUE ""
......@@ -65,7 +65,7 @@ TYPE <Questionnaire model>
ATTRIBUTE <Viewable area>
VALUE "VIEW representation:graphic
GRAPHIC x:2 y:24 w:893 h:830 scale:1
GRAPHIC x:-16 y:22 w:1533 h:907 scale:1
TABLE
"
......@@ -82,7 +82,7 @@ TABLE
VALUE ""
ATTRIBUTE <Change counter>
VALUE 208
VALUE 573
ATTRIBUTE <Font size>
VALUE 0
......@@ -140,6 +140,12 @@ INSTANCE <Questionnaire-1> : <Questionnaire>
"
END
RECORD
ATTRIBUTE <Question>
VALUE "REF mt:\"Questionnaire model\" m:\"Questionnaire model 1\" c:\"Question\" i:\"Question-6\"
"
END
ATTRIBUTE <Questionnaire Scores>
VALUE
......@@ -508,6 +514,45 @@ INSTANCE <Question-5> : <Question>
INSTANCE <Question-6> : <Question>
ATTRIBUTE <Position>
VALUE "NODE x:9.5cm y:16.5cm index:12"
ATTRIBUTE <External tool coupling>
VALUE ""
ATTRIBUTE <Question>
VALUE "question 6?"
ATTRIBUTE <Question Image>
VALUE ""
ATTRIBUTE <Answer Type>
VALUE "File request"
ATTRIBUTE <Required>
VALUE "Yes"
ATTRIBUTE <Short Answer Placeholder>
VALUE ""
ATTRIBUTE <Long Answer Placeholder>
VALUE ""
ATTRIBUTE <Long Answer Min Length>
VALUE 0
ATTRIBUTE <Long Answer Max Length>
VALUE 200
ATTRIBUTE <Multiple Choice Answers>
VALUE
ATTRIBUTE <Answers Scores>
VALUE
RELATION <Contains>
FROM <Questionnaire-1> : <Questionnaire>
TO <Question-1> : <Question>
......@@ -548,3 +593,11 @@ RELATION <Contains>
VALUE "EDGE 0 index:11"
RELATION <Contains>
FROM <Questionnaire-1> : <Questionnaire>
TO <Question-6> : <Question>
ATTRIBUTE <Positions>
VALUE "EDGE 0 index:13"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment