chairemobilite / evolution Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
The quick&easy solution is to add a field in responses with an array of user ids who edited the interview. But this exposes the IDs of users with higher privileges than participants. That is not good. It should be handled only server side and never make it to the client.
For now, passwordless supports email, but we could also support SMS, with some public service API for sending
Independent of where the users vs participants are stored, a separate "user" login page can be configured the same way as the main application's login (see the auth configuration options).
auth
options to use for the various login pagesTo avoid somebody spamming an email account with the forgot password or passwordless email, we should provide some mechanism to stop sending such emails after a while.
Now if a user with proper privileges sets dev mode to see all questions, then logs out, the dev mode is still active when the person comes back in.
This includes migrating a few components from the src/components/survey
section:
Example: Occupation: age is 40, you select partTimeWorker, then you change age for 4, and partTimeWorker is hidden now, but it stasy as the value, so the occupation field is still valid, but should not. It should be set to null whenever the conditional selected choice is made hidden.
Participants can call a call center by phone and a telephoniste will fill the questionnaire. The token can be entered by the participant on the phone and the survey will open in front of the telephoniste.
We'll need to get the specification of the call center API. This issue is pending this information.
Create custom template for the segments (modes) section:
That would be a big piece, but from https://webaim.org/techniques/formvalidation/ it says
The form must also submit to the server if client-side scripting is unavailable. Forms that rely solely on script functions or event handlers should be avoided. Instead, use a true URL action value for the form. Client-side validation can still be invoked, and it would be processed first if scripting is enabled.
When the validators clicks on the reset interview button, there should be a confirmation message, as this will remove all validations done so far.
Also, should resetting the interview also reset the is_valid and is_completed and is_validated flags?
Participants receive a token by email or written mail and can enter it to start a survey.
Make sure it works and the participants can come back to their survey
It is a pain to have to login again every day when administrating a survey.
Now, each field change is saved in a field in the database. We want to be able to analyze the flow of interviews, the time taken in each field, etc, without necessarily saving the data itself. How is that best done? To be determined and investigated...
When a interview summary is selected and being viewed, the corresponding interview should be highlighted in the list, for easier identification.
Exact requirements are to be discussed before implementing, but as I understand today
In general, an admin ro super-validator should be able to filter/search surveys, select them and assign them to individual validators. An interview can be assigned to more than one validator.
For any button adding a validation status, it should be possible to click again on the button to remove the validation status
The backend routes are now well typed. Since the redux actions are used to set and maintain the application's state, used throughout the survey components, it would be good if it is also typed and safe, even if the components themselves are not yet typed. It will document the state at the same time.
Now, the InputMapFindPlacePhoton is a different widget. We just need to have a proper geocoding API and support the photon geocoding functions in the new InputMap* widgets.
The package is 5 years old and it is not possible to empty the queue. It is used for survey updates.
Test all survey helper functions
Add a project config to enable/disabled ornament on the top of every survey pages and remove old comments
Those validators don't need to have access to personal information of the participant. This information should be removed from the interviews sent to the browser, without impacting the copy of the data, so the client should typically assume it does not have the entirety of the responses (meaning the backend should be responsible to copy the responses field to the validated_data and frontend actions should never sent whole arrays for these fields).
While easy to somewhat-ish implement this, testing it to make sure no code path does this will be hard...
To help with screen readers et le grossissement d'écran, the inputs should always be below the labels, like in the mobile version.
But given the current look & feel of the forms, we should review our design? It would be a thin form because texts shouldn't be too wide...
If someone logged in anonymously, there is no way to go back to the survey once the session expires. But what if the user realizes the survey is longer than she thought and wants to do something else and come back? It should be possible for an anonymous user to click on a link to add an email address, which will be associated with the current account. Then, next time, she can use the passwordless authentication.
so the user can understand from which app it comes
The new custom widgets of od_mtl_2023 added a monitoring cache, where for each interview a few attributes are saved to build various widgets. This cache should have a base in the main evolution code, with projects specifying the fields to use to group by. And the interview by household size should use this data instead.
The refresh button to save this cache should also be in the main evolution code base.
We want to prohibit brut forcing the access code (received via a letter), so if someone try to enter several access code, it should be blocked or get a Recaptcha
for example https://<site>//interviews/byCode/<someCode>
should be equivalent to https://<site>/interviews/byCode/<someCode>
, but the first leads to a blank page, while the second is the expected page.
Example: accept phone number with our without spaces and/or dashes or access codes with or without dashes
In many places right now, we need to send both validated_data and responses fields, sometimes called responses and _responses respectively. This can be confusing as responses have different meaning and we need to absolutely make sure the right set of responses is sent to the right parameter.
The main reason for this is... the language of the interview! That is set somehow, but it needs to remain the language the interviewee selected and not be updated by a validator who might have another language choice. If the language is correctly managed between roles, it will be easy to update all parsers and calls to use only a single set of responses sent in parameter
The widget config of the find place should have a geocoder field to indicate which geocoder to use. That field should be an array of geocoder. If there are multiple geocoders, queries will be done in order (position 0 has precedence) and results from the later geocoders will be added to the initial ones according to certain criteria.
The use case for this is that the openstreetmap data is not complete for some regions, so returned choices may not be complete. In those cases, using a google query will be more accurate, but we still want to have an idea of how often an openstreetmap choice was clicked.
It will help for accessibility and will add clearer labels.
If a value sent as an argument to parseString does not contain the key for the actual locale, it should fallback to a default value or trigger an error.
When refactoring the interview update, thought should be put on how to streamline server and client validations. Now, the server validations come back from the updateInterview server call and are stored in the survey state, while client validations are... in the Question widget I think?
It should be easy and straightforward to add validations server-side and client-side and should not require too much custom code like the ones to fix chairemobilite/transition-legacy#1183 and chairemobilite/transition-legacy#1244
And their labels should rather be the legend of the fieldset. See https://www.w3.org/WAI/tutorials/forms/grouping/
Given what the Question.js file looks like now, it's not trivial at all to change. But oh joy! The Question.js class is ready to be moved to typescript!
Example: if randomProbability = 0.25 and randomObjectPath = "household.persons.{_activePersonId}", for this person, the widget should appear 25% of the time, but the decision to make it appear or not should be set only once for the person object.
Another example: if randomProbability = 0.33 and randomObjectPath = "household" but the widget path is for a person, the widget should appear for 33% of the households, but if it appear, it should for every household members.
interviewers/admin/validator/super-validator interviews should not count in stats and therefore must be set invalid
It should be possible, in the interview summary window to easily show what was changed by the validator. We could use a diff-like syntax. Some package can diff json objects. We have the original responses, as well as the validated ones, so it would be easy to display any change.
There should be a filter on whether an accessCode is null or not, that differenciates household survey from person survey
Replace by radio buttons or drop-down menu with labels values and maybe add more precise half values.
In the validation code client side, often, both the responses and validated_data are sent to the client, as _responses and responses. That means the respondent's original response are there, unanonymized on the client, and there's even a console.log displaying them!
To avoid code duplication and avoid sending all this data to the client, resetting the interview should be done server-side only, and only one set of responses sent to the client, the cleaned one.
Not trivial to implement though, as it may have many side-effects. Let's continue refactoring the code before tackling this.
there is an ambiguity between audits (count per error) and validation results (acutel error for each validation). We call them audits everywhere, but they should not be called the same.
Create a completed section:
The is_started, start_at and end_at are unused. The data that is used is in the responses field.
We should decide whether to use those fields and drop the corresponding responses objects, or drop those fields altogether
In the database, there are the following boolean fields that need precision:
is_valid/is_validated
: it's like 2 different levels of validity. is_valid is the first level of validation, like "there's no error, I checked", is_validated is the ultimate state the interview can be in: it's done over with, this interview is good to go! In between is the is_completed
flag, which here means "ok, I'm an authority on validation and I checked that the validation was done correctly, but the interview still needs to be checked, it's not completely validated yet". It does not mean that the interview is completed by the participant! Confused? I sure am!2 possibilities to fix:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.