Skip to content

Commit 0e902b7

Browse files
committed
paradata: add platform and language details to exported data
fixes #1395 It gets from the log event data the browser's data (in `response._browser` or `corrected_response._browser` in the `values_by_path` field) and the language data (from `response._language` or `corrected_response._language` or `language_change` events). This information stays valid for the user/participant/review context until the next change in the same context. The 4 fields: `os`, `platform`, `browser` and `language` are added to each exported paradata row. If the information is not available, the fields are left blank.
1 parent 5b0aed7 commit 0e902b7

File tree

5 files changed

+568
-15
lines changed

5 files changed

+568
-15
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2727
- In the root `package.json` add a resolution of `kdbush` to 3.0.0 to avoid compilation errors with some packages depending on a more recent version. This requirement comes from Transition, who does the same (see https://github.com/chairemobilite/transition/issues/921 to track issue to upgrade/remove `kdbush`).
2828

2929

30+
## [Unreleased (0.5.1)] - YYYY-MM-DD
31+
32+
### Added
33+
- Added `platform`, `os`, `browser` and `language` fields to each record of the exported paradata (#1395)
34+
35+
### Changed
36+
37+
### Deprecated
38+
39+
### Removed
40+
41+
### Fixed
42+
43+
### Security
44+
45+
### Dependency updates
46+
47+
3048
## [0.5.0] - 2026-01-30
3149

3250
### Added

packages/evolution-backend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"dependencies": {
2828
"@casl/ability": "^6.7.3",
2929
"@turf/turf": "^7.3.1",
30+
"bowser": "^2.11.0",
3031
"chaire-lib-backend": "^0.2.2",
3132
"chaire-lib-common": "^0.2.2",
3233
"connect-session-knex": "^4.0.2",

packages/evolution-backend/src/models/paradataEvents.db.queries.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ const log = async ({
5454
};
5555

5656
/**
57-
* Streams the paradata for a single or all interviews.
57+
* Streams the paradata for a single or all interviews. The paradata is sorted
58+
* by interview and timestamp.
5859
*
5960
* @param {Object} options Options object
60-
* @param {number|undefined} options.interviewId The id of the interview to get the logs
61-
* for. Leave undefined to get all the paradata
61+
* @param {number|undefined} options.interviewId The id of the interview to get
62+
* the logs for. Leave undefined to get all the paradata
6263
* @param {boolean|undefined} options.forCorrection If true, only get paradata
6364
* entries for corrected interviews. If false, only get paradata entries for
6465
* participant responses. If undefined, get all paradata entries.

0 commit comments

Comments
 (0)