Skip to content
Snippets Groups Projects
Commit f32d7a56 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

Merge branch 'master' of...

parents f198bacc a701fca4
No related branches found
No related tags found
No related merge requests found
Pipeline #9970 passed
......@@ -7,24 +7,26 @@ This section explain all the functionnalities in the challenge part
### Basic Question
All basics Questions are created in the quizEntity.json. We have to add :
- questionLabel => Label of the question
- Answers => An array of three answers (answerLabel, isTrue)
- description => Explain the question
- source => Source of the explanaition
All basics Questions are created in the quizEntity.json. We have to add :
- questionLabel => Label of the question
- Answers => An array of three answers (answerLabel, isTrue)
- description => Explain the question
- source => Source of the explanaition
In the question page the user have to select an answer and click validate.
Then, he sees the right answer and a modal with the explaination and the source. After this modal, he goes to the next question.
Then, he sees the right answer and a modal with the explanation and the source. After this modal, he goes to the next question.
Depends on the answer, the question result state is set either correct or incorrect.
### Custom Question
At the end of every quiz, we're creating a custom question. During the creation of the quiz, we have to add :
- type => data or calculation
- period => the period selected for the calcul
- timestep => the interval of the calcul (Day, Month, Year)
At the end of every quiz, we're creating a custom question. During the creation of the quiz, we have to add :
- type => data or calculation
- period => the period selected for the calcul
- timestep => the interval of the calcul (Day, Month, Year)
We get all this information to determine the custom question (All information are in the quizEntity.json). Depending of the question type, the system calcul a maximum or an average data.
Then, he generate two randoms answers following the right answer.
A user can stop during a quiz and picks up where he left off. To define where the user left off, we have to check if at least one of the question result status is unlocked.
## Mission
## Duel
......
......@@ -81,3 +81,21 @@ For more information about Datahub-Enedis API, checkout the [Datahub documentati
| buildDataFromKey | Format an entry for DB storage using key and value. For year doctype: key = "YYYY". For month doctype: key = "YYYY-MM" |
| isHistoryLoaded | Function checking if the history is loaded |
| resetInProgressAggregatedData | Function handling special case.The temporary aggregated data need to be remove in order for the most recent one te be saved. Ex for com.grandlyon.enedis.year : `{ load: 76.712, year: 2020, ... }` need to be replace by `{ load: 82.212, year: 2020, ... }` after enedis data reprocess |
## Troubleshooting when asking for refresh token
When a token expires, the konnector will encounter an error when fetching user data, leading to a refresh token request.
Since refresh token requests restart the Konnector, it was decided to add the ```usage_point_id``` into the start fields when asking for a refresh token (see line 97).
!!! info "restart to refresh token"
Line 85: ```await cozyClient.fetchJSON(
'POST',
`/accounts/enedisgrandlyon/${accountId}/refresh`
)```
Line 97: ```fields.usage_point_id = usage_point_id```
Line 98: ```return start(fields, cozyParameters, false)```
In fact the usage_point_id still remains in the account collection, but on restart, the konnector loses ```this._account``` context leading to an error when searching for usage_point_id in account.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment