diff --git a/DemoProtocol/DemoProtocol_schema b/DemoProtocol/DemoProtocol_schema index a617763..debb25d 100644 --- a/DemoProtocol/DemoProtocol_schema +++ b/DemoProtocol/DemoProtocol_schema @@ -45,6 +45,10 @@ {"isAbout": "../activities/voiceActivity/voiceActivity_schema", "variableName": "voiceActivity_schema", "prefLabel": {"en": "Voice Activity" } + }, + {"isAbout": "../activities/responsesReferenceActivity/responsesReferenceActivity_schema", + "variableName": "responsesReferenceActivity_schema", + "prefLabel": {"en": "Global Responses Reference Activity" } } ], "order": [ @@ -53,7 +57,8 @@ "../activities/Activity3/Activity3_schema", "../activities/selectActivity/selectActivity_schema", "../activities/voiceActivity/voiceActivity_schema", - "../activities/Activity4/Activity4_schema" + "../activities/Activity4/Activity4_schema", + "../activities/responsesReferenceActivity/responsesReferenceActivity_schema" ], "shuffle": false, "allow": [ diff --git a/activities/responsesReferenceActivity/activities/conditionalRefereeActivity_schema b/activities/responsesReferenceActivity/activities/conditionalRefereeActivity_schema new file mode 100644 index 0000000..4c341c1 --- /dev/null +++ b/activities/responsesReferenceActivity/activities/conditionalRefereeActivity_schema @@ -0,0 +1,26 @@ +{ + "@context": "https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema", + "@type": "reproschema:Activity", + "@id": "conditionalRefereeActivity_schema", + "prefLabel": "Single Radio Button Activity", + "description": "Contains a single radio button item.", + "preamble": "Respond to this activity so that the conditional referer activity has a non-null value to reference.", + "schemaVersion": "1.0.0", + "version": "0.0.1", + "ui": { + "addProperties": [ + {"isAbout": "../../selectActivity/items/radio_item", + "variableName": "radio_item", + "isVis": true + } + ], + "order": [ + "../../selectActivity/items/radio_item" + ], + "shuffle": false, + "allow": [ + "reproschema:AutoAdvance", + "reproschema:AllowExport" + ] + } +} \ No newline at end of file diff --git a/activities/responsesReferenceActivity/activities/conditionalRefererActivity_schema b/activities/responsesReferenceActivity/activities/conditionalRefererActivity_schema new file mode 100644 index 0000000..114a60c --- /dev/null +++ b/activities/responsesReferenceActivity/activities/conditionalRefererActivity_schema @@ -0,0 +1,37 @@ +{ + "@context": "https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema", + "@type": "reproschema:Activity", + "@id": "conditionalRefererActivity_schema", + "prefLabel": "Sibling Reference Activity", + "description": "Demos conditional visibility by referring to the global responses variable that stores all responses.", + "preamble": "If you selected Response option 1 in the first question, you should see an email question. Otherwise, you should see a text entry question. If you see both or neither, something is broken.", + "schemaVersion": "1.0.0", + "version": "0.0.1", + "ui": { + "addProperties": [ + {"isAbout": "../../Activity3/items/email_item", + "variableName": "email_item", + "isVis": "[0].includes(referee.radio_item)", + "allow": [ + "reproschema:Skipped" + ] + }, + {"isAbout": "../../Activity3/items/text_item", + "variableName": "text_item", + "isVis": "[1, 2].includes(referee.radio_item)", + "allow": [ + "reproschema:Skipped" + ] + } + ], + "order": [ + "../../Activity3/items/email_item", + "../../Activity3/items/text_item" + ], + "shuffle": false, + "allow": [ + "reproschema:AutoAdvance", + "reproschema:AllowExport" + ] + } +} \ No newline at end of file diff --git a/activities/responsesReferenceActivity/responsesReferenceActivity_schema b/activities/responsesReferenceActivity/responsesReferenceActivity_schema new file mode 100644 index 0000000..afd4631 --- /dev/null +++ b/activities/responsesReferenceActivity/responsesReferenceActivity_schema @@ -0,0 +1,31 @@ +{ + "@context": "https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema", + "@type": "reproschema:Activity", + "@id": "responseReferenceActivity_schema", + "prefLabel": "Global Responses Reference Activity", + "description": "Demonstrates conditional visibility by referring to the global responses variable that stores all responses.", + "preamble": "Demonstrates conditional visibility by referring to the global responses variable that stores all responses. After answering the first question, the second question will be determined by referring to your first answer in the global responses object.", + "schemaVersion": "1.0.0", + "version": "0.0.1", + "ui": { + "addProperties": [ + {"isAbout": "activities/conditionalRefereeActivity_schema", + "variableName": "referee", + "isVis": true + }, + {"isAbout": "activities/conditionalRefererActivity_schema", + "variableName": "referer", + "isVis": true + } + ], + "order": [ + "activities/conditionalRefereeActivity_schema", + "activities/conditionalRefererActivity_schema" + ], + "shuffle": false, + "allow": [ + "reproschema:AutoAdvance", + "reproschema:AllowExport" + ] + } +} \ No newline at end of file