diff --git a/slaeforms/app.py b/slaeforms/app.py index fdcfb0b..da66d7c 100644 --- a/slaeforms/app.py +++ b/slaeforms/app.py @@ -248,6 +248,7 @@ def jsonform(): stimulus_type=current_block["stimuli"]["type"] stimulus_configuration = current_block["stimuli"]["configuration"] # dict with the config + if current_block["type"] == "TaskTemplate": print("case: TaskTemplate") @@ -260,7 +261,8 @@ def jsonform(): stimuli=current_block_stimuli, stimulus_type=stimulus_type, current_stimulus=current_stimulus, - stimulus_configuration=stimulus_configuration + stimulus_configuration=stimulus_configuration, + questions=current_block["questions"] ) diff --git a/slaeforms/default.json b/slaeforms/default.json index cbbb9f4..076f055 100644 --- a/slaeforms/default.json +++ b/slaeforms/default.json @@ -14,6 +14,43 @@ "configuration":{ "embed":"yt" } + }, + "questions":{ + "question1":{ + "type": "likert", + "name": "likertscale", + "points":{ + "p1":{ + "value":"1", + "text":"I dont like it at all" + }, + "p2":{ + "value":"2", + "text":"I dont like it at all" + }, + "p3":{ + "value":"3", + "text":"I dont like it at all" + }, + "p4":{ + "value":"4", + "text":"I dont like it at all" + }, + "p5":{ + "value":"5", + "text":"I dont like it at all" + } + } + } + }, + "database_table" :{ + "table_name": "default_block3_test", + "fields": { + "likertscale":{ + "type": "integer", + "nullable": "false" + } + } } }, "Block_1":{ diff --git a/slaeforms/templates/standard_template.html b/slaeforms/templates/standard_template.html index 29cea06..07deb5e 100644 --- a/slaeforms/templates/standard_template.html +++ b/slaeforms/templates/standard_template.html @@ -41,11 +41,15 @@