start refactoring challenge map

This commit is contained in:
Quincy Larson
2015-05-31 11:27:16 -07:00
parent 5380a9ea74
commit d1c4567790
2 changed files with 38 additions and 36 deletions

View File

@@ -76,8 +76,13 @@ module.exports = {
if (!challengeMapForDisplay) {
challengeMapForDisplay = {};
Object.keys(challengeMap).forEach(function(key) {
//TODO get ratio of completed to uncompleted for each section
//challengeMap[key].challenges.forEach(function(challenge){
//
//}
challengeMapForDisplay[key] = {
name: challengeMap[key].name,
dashedName: challengeMap[key].name.replace(/\s/g, '-'),
challenges: challengeMap[key].challenges,
completedCount: challengeMap[key].challenges //ToDo count number of uncompleted challenges
}