-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from ReproNim/test/conditional
Add a nested conditional test
- Loading branch information
Showing
4 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
activities/responsesReferenceActivity/activities/conditionalRefereeActivity_schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
] | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
activities/responsesReferenceActivity/activities/conditionalRefererActivity_schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
] | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
activities/responsesReferenceActivity/responsesReferenceActivity_schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
] | ||
} | ||
} |