diff --git a/docs/ecolyo/functionalities/challenge.md b/docs/ecolyo/functionalities/challenge.md index 76200b21f6d600297c056ee08ea0635501d81fa0..3e3069ee4ef646a320323b94aaf4fa8c7d1375e3 100644 --- a/docs/ecolyo/functionalities/challenge.md +++ b/docs/ecolyo/functionalities/challenge.md @@ -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 diff --git a/docs/ecolyo/konnectors/enedis.md b/docs/ecolyo/konnectors/enedis.md index 4c238e1d1727dce030972e03a1048097be3216da..34669c2102edad427059faadd7e44a7ab416928e 100644 --- a/docs/ecolyo/konnectors/enedis.md +++ b/docs/ecolyo/konnectors/enedis.md @@ -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