diff --git a/docs/ecolyo/functionalities/challenge.md b/docs/ecolyo/functionalities/challenge.md index 1c5fd1aef3bfe846cd1a4d54967f6707e0b368f0..6dfc995869b4322c889123cc942cc0c5569ed5a3 100644 --- a/docs/ecolyo/functionalities/challenge.md +++ b/docs/ecolyo/functionalities/challenge.md @@ -27,15 +27,16 @@ Here are the fields used to create a custom question | Field | Type | Description | | ---------- | ------------------ | ---------------------------------------------------------------- | -| type | CustomQuestionType | Type of custom qusetion: DATA or MAXLOAD or AVERAGE. | +| type | CustomQuestionType | Type of custom qusetion: DATE or MAXLOAD or AVERAGE. | | timeStep | TimeStep | Time step of the result value (DAY / WEEK / MONTH / YEAR). For MAXLOAD or AVERAGE type, it represents daily / weekly / monthly / yearly average. | | interval | TimeStep | Interval in which the data will be searched (DAY / WEEK / MONTH / YEAR) | | period | CustomPeriod | Case day / month / year:<br/>Use to define a specific period for the interval { day? / month? / year? }. <br/>Case weekday:<br/>Only usable with AVERAGE type and DAY timestep: Allow to specify a weekday on which average is made. If used with another type, period will not be taken into account.<br/>If not assigned the period will be the last interval (example: last week) | +| singleFluid | boolean | Indicate if all connected fluid should be taken into account.<br/>If set to true only the first connected fluid will be taken into account in this order: electricity, gas, water. #unit and #fluid in the question label will be replace by the unit and the name of the fluid | | result | UserQuizState | Indicate the state of the custom question (UNLOCKED, CORRECT, UNCORRECT) | Calculation of custom question is done by conbinaison of all parameters: -- Type DATA +- Type DATE - If *period* is empty. @@ -46,6 +47,16 @@ Calculation of custom question is done by conbinaison of all parameters: timeStep = TimeStep.DAY interval = TimeStep.WEEK period = {} + singleFluid = false + ``` + + ``` + example: What day did I consumme the most #fluid in #unit on the last week ? + type = CustomQuestionType.DATA + timeStep = TimeStep.DAY + interval = TimeStep.WEEK + period = {} + singleFluid = true ``` - If *period* is not empty @@ -57,6 +68,7 @@ Calculation of custom question is done by conbinaison of all parameters: timeStep = TimeStep.MONTH interval = TimeStep.YEAR period = { year: 2020 } + singleFluid = false ``` - Type MAXLOAD @@ -70,6 +82,7 @@ Calculation of custom question is done by conbinaison of all parameters: timeStep = TimeStep.DAY interval = TimeStep.WEEK period = {} + singleFluid = false ``` - If *period* is not empty @@ -81,6 +94,7 @@ Calculation of custom question is done by conbinaison of all parameters: timeStep = TimeStep.DAY interval = TimeStep.MONTH period = { month: 1, year: 2020 } + singleFluid = false ``` - Type AVERAGE @@ -94,6 +108,7 @@ Calculation of custom question is done by conbinaison of all parameters: timeStep = TimeStep.DAY interval = TimeStep.WEEK period = {} + singleFluid = false ``` - If *period* is not empty @@ -105,6 +120,7 @@ Calculation of custom question is done by conbinaison of all parameters: timeStep = TimeStep.DAY interval = TimeStep.MONTH period = { month: 1, year: 2020 } + singleFluid = false ``` - If *period* is weekday @@ -116,6 +132,7 @@ Calculation of custom question is done by conbinaison of all parameters: timeStep = TimeStep.DAY interval = TimeStep.MONTH period = { weekday: 3 } + singleFluid = false ``` Then, two randoms answers are generated after defining the right answer.