-
Notifications
You must be signed in to change notification settings - Fork 11
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
Surveys info and surveys data for Configs #8
base: main
Are you sure you want to change the base?
Surveys info and surveys data for Configs #8
Conversation
Added the survey-resources folder from e-mission-phone and all the associated survey json/xml/xls files
Added the surveys.json folder which contains the info about each survey that may be used on e-mission-phone (formPath, version number, compatibleWith, and dataKey) These surveys will be used by the configs, under survey_info.buttons.[button name here].survey-name ( which = "UserProfileSurvey" for example)
We are doing these changes for now only on the Devapp study/program, for testing - dev-emulator-program will contain the TimeUseSurvey buttons for trip-notes and place-notes - dev-emulator-study will NOT contain any button info because we will not be using the trip-notes or place-notes buttons. This will be the "control" version without the changes for the TimeUseSurvey
…or-study Added variants to the original dev-emulator-program/study. Adding onto the concept that program is the trip-notes and place-notes button for TimeUseSurvey and the study is the "control". These new variants introduce the "trip-labels" button which **if filled in** (with "TripConfirmSurvey") will display a trip confirm survey button instead of the typical Multilabel format of Mode: ??? Purpose: ???
@shankari and @JGreenlee Adding you both for visibility |
So that we can join the newly added dev-emulator-program-tripconfirm and dev-emulator-study-tripconfirm, added them to index.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One fundamental change + some additional minor ones.
"trip-labels": { | ||
"survey-name": "TripConfirmSurvey", | ||
"not-filled-in-label": { | ||
"en": "Add trip details", | ||
"es": "Agregar detalles del viaje" | ||
}, | ||
"filled-in-label": { | ||
"en": "Submitted", | ||
"es": "Enviado" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be here, at least at this point. The trip confirm survey and the user profile survey are "special".
- trip confirm: there is only one per trip
- user profile: there is only one per user
This is also a regression wrt the TripConfirmSurvey because it is not using the more sophisticated filled-in-label
from LABEL_FUNCTIONS
.
That's why we decided to have different types of surveys in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I indicated in that really long meeting today morning, there are two separate versions of the trip label survey (MULTILABEL
and ENKETO
). The dynamic config should simply state which one we use. If we choose ENKETO, it will always be the TripConfirmSurvey
defined in surveys.json
docs/index.html
Outdated
@@ -61,6 +61,8 @@ <h3>Join your NREL OpenPATH-powered study!</h3> | |||
$scope.currStudies = [ | |||
{name: "Devapp Program", joinurl: "emission://join_study?label=dev-emulator-program&source=github" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change this to indicate that is uses TimeUse + Buttons
# xform-transformer | ||
|
||
Complementary xform transformer for e-mission-phone | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you make sure to get the commit history of these changes while moving them over? it makes it much easier to review in the future and understand the context of changes.
Removed the trip-labels button and replaced it with a global one-line config named "trip-labels" which will be either ENKETO for TripConfirmSurvey or MUTLILABEL for the typical Mode: ??? Purpose: ??? - dev-emulator-program - dev-emulator-study - dev-emulator-program-tripconfirm - dev-emulator-study-tripconfirm index.html - Changed the devapp study names to indicate which is using Tripconfirm/Multilabel and TimeUseSurvey
For the sake of having to load in an entirely new config file (and to save time on this change) we will move the surveys field back into the dynamic config files PER study/program This makes loading the "formPath" much easier from the implementation on e-mission-phone
@sebastianbarry wrt bacd4ff, did you and @JGreenlee decide to go with the simple but verbose version since it is already implemented? I am fine with that decision, and I'm glad to see that we are focusing on getting the code to work, but just want to understand the reasons. |
@shankari @sebastianbarry Yes, given our time constraints we are trying to just get it working, so we decided to roll back to the more verbose version at least for now. |
I used Jack's version of TripConfirmSurvey and made sure it matches! For UserProfileSurvey, I just added blank labelVars since we don't need any that I know of, and I included labelTemplate to say "Answered" For TimeUseSurvey I made it print out the result from every category that it can (so if the user chose Sleeping as Personal Care Activities then it would print out only "Sleeping")
remove extraneous fields when not in use - filled-in-label no longer needed - datakey not needed for timeuse survey - labelVars not needed on demographic survey - 'buttons' not needed if not present
Employment_related_and_educati was getting cut off and needed to be Employment_related_a_Education_activities Voluntary_work_and_care_activi was getting cut off and needed to be Voluntary_work_and_care_activities Confirmed that the other fields work properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spec changes look fine and consistent with the current implementation.
Please make sure to include commit history of the survey-resources
, or make the case for why the history is not important.
The new version of the survey replaces the old one at the same filepath, `time-use-survey-form-v9`. The previous version has been renamed to `time-use-survey-form-v9-old`.
ONLY WORKS FOR DEV_PROGRAM AND DEV_STUDY, to incorporate this into the existing studies/programs we will need to add the
survey_info.buttons
fields for all the others as wellThis is the new refactored format for the dynamic configs that contains:
configs/surveys/surveys.json
survey_info
field in the configs json for dev-emulator-program and dev-emulator-studyBecause this is a new PR, let's close the original dynamic surveys pr #7 because it is old, not exactly what we want, and has some problems in terms of incorrect commits and confusion