From 67c1bfd6676c565e7b72aa7d7a768e9c87c75323 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Thu, 8 Aug 2024 21:55:58 -0400 Subject: [PATCH] refactor items to include demo elements --- DemoProtocol/DemoProtocol_schema | 1 + activities/Activity3/Activity3_schema | 8 ++++++ .../Activity3/items/float_with_units_item | 26 +++++++++++++++++++ activities/Activity3/items/text_item | 2 +- activities/selectActivity/items/select_item | 4 +++ .../items/select_item_multiple_choice | 4 +++ 6 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 activities/Activity3/items/float_with_units_item diff --git a/DemoProtocol/DemoProtocol_schema b/DemoProtocol/DemoProtocol_schema index 62d1c24..a617763 100644 --- a/DemoProtocol/DemoProtocol_schema +++ b/DemoProtocol/DemoProtocol_schema @@ -57,6 +57,7 @@ ], "shuffle": false, "allow": [ + "reproschema:AutoAdvance", "reproschema:AllowExport" ] } diff --git a/activities/Activity3/Activity3_schema b/activities/Activity3/Activity3_schema index 4cd405b..c37153f 100644 --- a/activities/Activity3/Activity3_schema +++ b/activities/Activity3/Activity3_schema @@ -57,9 +57,17 @@ "allow": [ "reproschema:Skipped" ] + }, + {"isAbout": "items/float_with_units_item", + "variableName": "float_unit_item", + "isVis": true, + "allow": [ + "reproschema:Skipped" + ] } ], "order": [ + "items/float_with_units_item", "items/integer_item", "items/float_item", "items/text_item", diff --git a/activities/Activity3/items/float_with_units_item b/activities/Activity3/items/float_with_units_item new file mode 100644 index 0000000..b825f80 --- /dev/null +++ b/activities/Activity3/items/float_with_units_item @@ -0,0 +1,26 @@ +{ + "@context": "https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema", + "@type": "reproschema:Field", + "@id": "float_with_units_item", + "prefLabel": "float unit item", + "description": "This is a float item with a unit.", + "schemaVersion": "1.0.0", + "version": "0.0.1", + "question": "This is an item where the user can input a float like 3.1415926... and a unit", + "ui": { + "inputType": "float" + }, + "responseOptions": { + "valueType": "xsd:float", + "unitOptions": [ + { + "prefLabel": {"en": "Celsius"}, + "value": "C" + }, + { + "prefLabel": {"en": "Fahrenheit"}, + "value": "F" + } + ] + } +} \ No newline at end of file diff --git a/activities/Activity3/items/text_item b/activities/Activity3/items/text_item index c3db23a..e336d71 100644 --- a/activities/Activity3/items/text_item +++ b/activities/Activity3/items/text_item @@ -6,7 +6,7 @@ "description": "This is a text item.", "schemaVersion": "1.0.0", "version": "0.0.1", - "question": "This is an item where the user can input some text with a max length of 300.", + "question": "This is an item where the user can input some text.", "ui": { "inputType": "text" }, diff --git a/activities/selectActivity/items/select_item b/activities/selectActivity/items/select_item index 93b9cfc..9acaa17 100644 --- a/activities/selectActivity/items/select_item +++ b/activities/selectActivity/items/select_item @@ -27,6 +27,10 @@ { "name": "Response option 3", "value": 2 + }, + { + "name": "Other", + "value": "Other" } ] } diff --git a/activities/selectActivity/items/select_item_multiple_choice b/activities/selectActivity/items/select_item_multiple_choice index 577ad54..5ce9f7e 100644 --- a/activities/selectActivity/items/select_item_multiple_choice +++ b/activities/selectActivity/items/select_item_multiple_choice @@ -27,6 +27,10 @@ { "name": "Response option 3", "value": 2 + }, + { + "name": "Other", + "value": "Other" } ] }