Open avaidyam opened 3 years ago
@dcurrey88 Patching you in from issue #518 - it looks like this is what you want:
Support
null
question type If the type for a question isnull
, then NO user entry should be permitted; this effectively converts the question into a block of text. The text should be displayed with no use entry fields. Theduration
timer should still run to track how long the text was read by the user for.
A Survey activity's settings are currently an array of questions to be displayed. Each entry contains question text, type, options, etc.
Support
warnings
popupsIn addition to these, a new field
warnings
should be added. This field will contain a dictionary mapping of values to text, as shown below:If the
warnings
field is not defined as part of a question's settings, it is ignored, to ensure backwards compatibility. If the response specified by the user exists in thiswarnings
dictionary, then the corresponding text will be shown to the user in a simple alert dialog with an "OK" button. If the user's response is NOT found in this dictionary OR there is nowarnings
dictionary, it is ignored and no dialog is shown. This applies to ANY question type, includingtext
,rating
, orlist
, etc.Support
null
question typeIf the
type
for a question isnull
, then NO user entry should be permitted; this effectively converts the question into a block of text. The text should be displayed with no use entry fields. Theduration
timer should still run to track how long the text was read by the user for.Support
required
question fieldsA new
required
field should indicate that the survey cannot be completed without the completion of this particular question on whichrequired = true
. If this field does not exist, it should be considered optional for backwards compatibility.The current implementation of
slider
andrating
questions defaults to the first value in theoptions
list; this behavior must be changed such that no value is selected by default. Ifrequired
is not true or undefined for the question, the activity event temporal slicevalue
field must benull
to indicate no user response.Support
randomizationGroup
fieldThe new
randomizationGroup
field requires astring
value that indicates whether this question is to be randomized. If this field is undefined/not found for a question, it is presented in the question index order (current implementation/behavior).randomizationGroup
string (example:phq9
), the order of these questions shall be randomized.[2, 4, 8]
shall be used to randomize the order of these 3 questions only; one such outcome would be question 4 appears first, then question 2, and finally question 8.level
field, which will contain the randomized index of the question (i.e. the order in which this question ACTUALLY appeared to the user).level
field containing their proper order.The Activity settings/configuration UI may ONLY be modified through updating the JSON Schema for the Survey activity; no other custom UI elements should be changed.