-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Online Survey with Auth and Case components; Case and Online Survey APIs; "Locked" Online Surveys with Links from Case Event Forms #3710
Open
esurface
wants to merge
42
commits into
release/v3.31.0
Choose a base branch
from
online-surey-with-event-form-and-throttled-save
base: release/v3.31.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…inks and metadata
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a major update to Tangerine Online Surveys.
Online Survey Authorization
With this update, the survey manager will be able to deploy "locked" surveys that require the respondent to enter an access code to, well, access the form. The authorization protects sensitive form content, like proprietary assessments. Login access is provided to users by creating 'Device Users' and assigning the 6-digit short code for the user as the access code. Users will be logged out when the authentication token expires. They will be warned 15 minutes before expiry.
The online survey supports 'Custom Login Markup'. To override the default login, create a file in the content set called
custom-login-markup.html
. Valid html will be loaded and displayed by the online survey login page.Online Survey "Help Link"
Provide link to instructions or help by adding a URL to the
app-config.json
. For example:"helpLink":"/releases/prod/online-survey-apps/group-id/help_form/#/form/help_form"
will link to another published Tangerine form. Any external URL can be used as well (put the whole link starting withhttp://
).Online Survey Publish
Online Surveys that require authorization vs those that do not are differentiated in the Tangerine web interface by the 'lock' symbol.
__ Online Survey API__
Use
getOnlineSurveys
to get the list of published and unpublished surveys. Provide an optionalformId
to filter the online surveys byformId
.online-surveys.json
Case in Online Surveys
If the Case module is enable, the content manager can choose (not in the UI yet) which forms are accessible through Online Surveys. An example use case is a longitudinal study that collects lab samples. The lab techs can enter the lab results directly in an online survey connected to the case event form which saves the requirement to install a Tangerine APK or PWA on a tablet or laptop in the lab.
Case event forms filled out as online surveys will be saved to the server each time the user clicks 'Next' or 'Back' allowing the respondent to return to the survey with progress saved. Once they submit the form, they will be able to review the form response in 'locked' mode.
Case APIs
This version introduces new Tangerine server APIs for the creation of Case, Event, Form, Participant instances, plus a few helper APIs for working with case. The user must be authorized through the '/login' API.
case-definitions.json
<case>-definition.json
<caseId>
<case-doc.json>
<case-event-id>
<event-form-id>
<participant-id>
<event-links-json>
getCaseEventFormSurveyLinks
getCaseEventFormSurveyLinks
is helpful when using Tangerine and the Case module as a backend server for online survey forms. After publishing online surveys and creating cases, you can call this API to get the full list of links to the incomplete, online-enabled event forms in the case. A typical order of API calls might be:Example link returned from
getCaseEventFormSurveyLinks
: