Harvest: Difference between revisions

Line 91: Line 91:


'''''Observation:''' All the metadata names, matches the original names of the journal metadata.''
'''''Observation:''' All the metadata names, matches the original names of the journal metadata.''
=== Custom Groups ===
In the About Me section of the Sugar control panel (and in the Sugar intro) it is possible set the age of the user.
However, not every deployment may want to group users by age, e.g., in Australia, they group students by grade.
Using a configuration file (/usr/share/sugar/data/group-stats.defaults), it is possible to configure the selection into groups
specific to the needs of a deployment. The configuration file is a JSON-encoded Python dictionary that maps ages to labels and icons associated with those labels.
The file that configures the default Sugar behavior is shown here (with added CRs for readability in the wiki):
{"group-label": "Select age:",
"group-items": [
{"female-icon": "female-0", "male-icon": "male-0", "label": "0-3", "age": 3},
{"female-icon": "female-1", "male-icon": "male-1", "label": "4-5", "age": 5},
{"female-icon": "female-2", "male-icon": "male-2", "label": "6-7", "age": 7},
{"female-icon": "female-3", "male-icon": "male-3", "label": "8-9", "age": 9},
{"female-icon": "female-4", "male-icon": "male-4", "label": "10-11", "age": 11},
{"female-icon": "female-5", "male-icon": "male-5", "label": "12", "age": 12},
{"female-icon": "female-6", "male-icon": "male-6", "label": "13-17", "age": 15},
{"female-icon": "female-7", "male-icon": "male-7", "label": "Adult", "age": 25}
]}
:The group-label is the prompt that appears in the UI
:Each group-item is represented by a different icon and label in the interface and is mapped to a specific age used to calculate birthdate reported by Harvest. The icons are gender-specific. If no gender is specified, the female icon is used.
A file that configures grades instead of ages is shown here (with added CRs for readability in the wiki):
{"group-label": "Select grade:",
"group-items": [
{"female-icon": "female-1", "male-icon": "male-1", "label": "Preschool", "age":  4},
{"female-icon": "female-1", "male-icon": "male-1", "label": "Kindergarten", "age": 5},
{"female-icon": "female-2", "male-icon": "male-2", "label": "1st Grade", "age": 6},
{"female-icon": "female-3", "male-icon": "male-3", "label": "2nd Grade", "age": 7},
{"female-icon": "female-4", "male-icon": "male-4", "label": "3rd Grade", "age": 8},
{"female-icon": "female-5", "male-icon": "male-5", "label": "4th Grade", "age": 9},
{"female-icon": "female-5", "male-icon": "male-5", "label": "5th Grade", "age": 10},
{"female-icon": "female-6", "male-icon": "male-6", "label": "6th Grade", "age": 11},
{"female-icon": "female-6", "male-icon": "male-6", "label": "7th Grade", "age": 12},
{"female-icon": "female-7", "male-icon": "male-7", "label": "High School", "age": 13},
{"female-icon": "female-7", "male-icon": "male-7", "label": "Adult", "age": 25}
]}


== How does it work? ==
== How does it work? ==