add time estimates to challenge blocks on map

This commit is contained in:
Quincy Larson 2015-10-12 22:56:10 -07:00
parent 51012bd121
commit f30239fb6c
25 changed files with 61 additions and 33 deletions

View File

@ -1,6 +1,7 @@
{
"name": "Advanced Algorithm Scripting",
"order": 15,
"time": "50h",
"challenges": [
{
"id": "aff0395860f5d3034dc0bfc9",

View File

@ -1,6 +1,7 @@
{
"name": "AngularJS",
"order": 16,
"time": "5h",
"challenges": [
{
"id": "bd7154d8c441eddfaeb5bdef",

View File

@ -1,6 +1,7 @@
{
"name": "Automated Testing and Debugging",
"order": 14,
"time": "15m",
"challenges": [
{
"id":"cf1111c1c16feddfaeb6bdef",

View File

@ -1,6 +1,7 @@
{
"name": "Full Stack JavaScript Projects",
"order": 20,
"time": "300h",
"challenges": [
{
"id": "bd7158d8c443eddfaeb5bcef",

View File

@ -1,6 +1,7 @@
{
"name": "Basic Algorithm Scripting",
"order": 8,
"time": "50h",
"challenges": [
{
"id": "ad7123c8c441eddfaeb5bdef",

View File

@ -1,6 +1,7 @@
{
"name": "Basic JavaScript",
"order": 6,
"time": "3h",
"challenges": [
{
"id":"bd7123c9c441eddfaeb4bdef",

View File

@ -1,6 +1,7 @@
{
"name": "Basic Front End Development Projects",
"order": 9,
"time": "100h",
"challenges": [
{
"id": "bd7158d8c442eddfbeb5bd1f",

View File

@ -1,6 +1,7 @@
{
"name": "Responsive Design with Bootstrap",
"order": 3,
"time": "2h",
"challenges": [
{
"id": "bad87fee1348bd9acde08712",

View File

@ -1,6 +1,7 @@
{
"name": "Claim Your Front End Development Certificate",
"order": 12,
"time": "5m",
"challenges": [
{
"id": "561add10cb82ac38a17513be",

View File

@ -1,6 +1,7 @@
{
"name": "Claim Your Full Stack Development Certificate",
"order": 21,
"time": "5m",
"challenges": [
{
"id": "660add10cb82ac38a17513be",

View File

@ -1,6 +1,7 @@
{
"name": "Gear up for Success",
"order": 4,
"time": "10m",
"challenges": [
{
"id": "560add65cb82ac38a17513c2",

View File

@ -1,6 +1,7 @@
{
"name": "Get Started with Free Code Camp",
"order": 1,
"time": "10m",
"challenges": [
{
"id": "560add10cb82ac38a17513be",

View File

@ -1,6 +1,7 @@
{
"name": "Git",
"order" : 17,
"time": "3h",
"challenges": [
{
"id": "bd7353d8c341eddeaeb5bd0f",

View File

@ -1,6 +1,7 @@
{
"name": "Hikes",
"order": 0.050,
"time": "3h",
"challenges": [
{
"id": "bd7128d8c441eddfbeb5bddf",

View File

@ -1,6 +1,7 @@
{
"name": "HTML5 and CSS",
"order": 2,
"time": "3h",
"challenges": [
{
"id": "bd7123c8c441eddfaeb5bdef",

View File

@ -1,6 +1,7 @@
{
"name": "Intermediate Algorithm Scripting",
"order": 10,
"time": "50h",
"challenges": [
{
"id": "a3566b1109230028080c9345",

View File

@ -1,6 +1,7 @@
{
"name": "Intermediate Front End Development Projects",
"order": 11,
"time": "200h",
"challenges": [
{
"id": "bd7158d8c442eddfaeb5bd10",

View File

@ -1,6 +1,7 @@
{
"name": "jQuery",
"order": 5,
"time": "2h",
"challenges": [
{
"id": "bad87fee1348bd9acdd08826",

View File

@ -1,6 +1,7 @@
{
"name": "MongoDB",
"order" : 19,
"time": "3h",
"challenges": [
{
"id": "bd7243d8c341eddeaeb5bd0f",

View File

@ -1,6 +1,7 @@
{
"name": "Node.js and Express.js",
"order" : 18,
"time": "20h",
"challenges": [
{
"id": "bd7153d8c441eddfaeb5bd0f",

View File

@ -1,6 +1,7 @@
{
"name": "Object Oriented and Functional Programming",
"order": 7,
"time": "1h",
"note": [
"Methods",
"Closures",

View File

@ -1,6 +1,7 @@
{
"name": "Upper Intermediate Algorithm Scripting",
"order": 13,
"time": "50h",
"challenges": [
{
"id": "a2f1d72d9b908d0bd72bb9f6",

View File

@ -68,6 +68,7 @@ Challenge.destroyAll(function(err, info) {
challenge.suborder = index + 1;
challenge.block = block;
challenge.isBeta = challenge.isBeta || isBeta;
challenge.time = challengeSpec.time;
return challenge;
});

View File

@ -555,7 +555,8 @@ module.exports = function(app) {
name: blockArray[0].block,
dashedName: dasherize(blockArray[0].block),
challenges: blockArray,
completed: completedCount / blockArray.length * 100
completed: completedCount / blockArray.length * 100,
time: blockArray[0] && blockArray[0].time || "???"
};
})
.filter(({ name }) => name !== 'Hikes')

View File

@ -85,40 +85,44 @@ block content
.spacer.negative-55
.row
.col-xs-12.col-sm-8.col-sm-offset-2
h3 #{challengeBlock.name}
.hidden-xs.col-sm-3.col-md-2
h3.text-primary.text-right
i.fa.fa-clock-o #{challengeBlock.time}
.col-xs-12.col-sm-9.col-md-10
h3 #{challengeBlock.name}  
.row
.col-xs-12
ol
for challenge in challengeBlock.challenges
if challenge.completed
.row
.hidden-xs.col-sm-3.col-md-2.text-primary.ion-checkmark-circled.padded-ionic-icon.text-center.map-p.negative-10
.col-xs-12.col-sm-9.col-md-10
li.faded.map-p.negative-10
a(href="/challenges/#{challenge.dashedName}")
span.capitalize= challenge.type + ': '
span= challenge.title
span.sr-only= " Complete"
else
.row
.hidden-xs.col-sm-3.col-md-2
span.negative-10
.col-xs-12.col-sm-9.col-md-10
li.map-p.negative-10
a(href="/challenges/#{challenge.dashedName}")
span.capitalize= challenge.type + ': '
span= challenge.title
span.sr-only= " Incomplete"
if (challengeBlock.completed === 100)
.button-spacer
ol
for challenge in challengeBlock.challenges
if challenge.completed
.row
.col-xs-12.col-sm-8.col-md-6.col-sm-offset-3.col-md-offset-2.hidden
a.btn.btn-lg.btn-block.signup-btn.map-challenge-block-share Section complete. Share your Portfolio with your friends.
.hidden(id="#{challengeBlock.name}")
.hidden-xs.col-sm-3.col-md-2.text-primary.ion-checkmark-circled.padded-ionic-icon.text-center.map-p.negative-10
.col-xs-12.col-sm-9.col-md-10
li.faded.map-p.negative-10
a(href="/challenges/#{challenge.dashedName}")
span.capitalize= challenge.type + ': '
span= challenge.title
span.sr-only= " Complete"
else
.row
.hidden-xs.col-sm-3.col-md-2
span.negative-10
.col-xs-12.col-sm-9.col-md-10
li.map-p.negative-10
a(href="/challenges/#{challenge.dashedName}")
span.capitalize= challenge.type + ': '
span= challenge.title
span.sr-only= " Incomplete"
if (challengeBlock.completed === 100)
.button-spacer
.row
.col-xs-12.col-sm-8.col-md-6.col-sm-offset-3.col-md-offset-2.hidden
a.btn.btn-lg.btn-block.signup-btn.map-challenge-block-share Section complete. Share your Portfolio with your friends.
.hidden(id="#{challengeBlock.name}")
script.
var username = !{JSON.stringify(user && user.username || '')};
var lastCompleted = !{JSON.stringify(lastCompleted || false)}