Skip to content

Commit

Permalink
Cyberleague: [premieroctet#159] clarify comments in statistics.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien-Wappizy committed Oct 7, 2024
1 parent 153ca4a commit 316ffcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/web/server/plugins/cyberleague/statistic.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const computeBellwetherStatistics = async (filters) => {
//TODO return 'not enough scores to have relevant data'
}

// /!\ /!\ /!\ scores.answers.question in [question, undefined] -> undefined means answer is not bellwether
// /!\ /!\ /!\ scores.answers.question in [question, undefined] -> undefined means question is not bellwether
const cleanScores = scores.map((s)=> {
s.answers = lodash.filter(s.answers,(a) => {
return !a.question
Expand Down Expand Up @@ -187,7 +187,7 @@ const computeBellwetherStatistics = async (filters) => {
})
})

//Compute ratios for bellwether
//Compute ratios for bellwether / benchmark
res.forEach((_,k) => {
res[k] = Math.round(bellwetherData[k].value / bellwetherData[k].count * 100) /100
})
Expand Down

0 comments on commit 316ffcf

Please sign in to comment.