From c4c90689505de61cdd0f7d971f177f9c968e295b Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Tue, 8 Sep 2015 22:52:32 -0700 Subject: [PATCH 01/90] start refactoring account view into show view --- server/boot/user.js | 22 +-------- server/views/account/account.jade | 70 ----------------------------- server/views/account/show.jade | 74 ++++++++++++++++++++++++++++++- server/views/partials/navbar.jade | 7 --- 4 files changed, 74 insertions(+), 99 deletions(-) diff --git a/server/boot/user.js b/server/boot/user.js index 33a80c5c62..f521404ced 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -68,7 +68,6 @@ module.exports = function(app) { router.post('/reset-password', postReset); router.get('/email-signup', getEmailSignup); router.get('/email-signin', getEmailSignin); - router.get('/account/api', getAccountAngular); router.post( '/account/delete', ifNoUser401, @@ -114,18 +113,7 @@ module.exports = function(app) { } function getAccount(req, res) { - if (!req.user) { - return res.redirect('/'); - } - res.render('account/account', { - title: 'Manage your Free Code Camp Account' - }); - } - - function getAccountAngular(req, res) { - res.json({ - user: req.user || {} - }); + return res.redirect('/' + user.username); } function returnUser(req, res, next) { @@ -143,14 +131,6 @@ module.exports = function(app) { }); return res.redirect('/'); } - if (!user.isGithubCool && !user.isMigrationGrandfathered) { - req.flash('errors', { - msg: ` - user ${ username } has not completed account signup - ` - }); - return res.redirect('/'); - } var cals = user .progressTimestamps diff --git a/server/views/account/account.jade b/server/views/account/account.jade index d4d00c46ce..0259b504f7 100644 --- a/server/views/account/account.jade +++ b/server/views/account/account.jade @@ -2,74 +2,4 @@ extends ../layout block content script. var challengeName = 'Account View' - .panel.panel-info - .panel-heading.text-center Manage your account here - .panel-body - .row - .col-xs-12 - if (!user.isGithubCool) - a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github') - i.fa.fa-github - | Link my GitHub to unlock this profile - else - a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github') - i.fa.fa-github - | Update my profile from GitHub - if (!user.twitter) - .col-xs-12 - a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/link/twitter') - i.fa.fa-twitter - | Add my Twitter to my profile - if (!user.facebook) - .col-xs-12 - a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/link/facebook') - i.fa.fa-facebook - | Add my Facebook to my profile - if (!user.linkedin) - .col-xs-12 - a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/link/linkedin') - i.fa.fa-linkedin - | Add my LinkedIn to my profile - if (!user.google) - .col-xs-12 - a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/link/google') - i.fa.fa-google-plus - | Add my Google+ to my profile - .big-spacer - .col-xs-12 - a.btn.btn-lg.btn-block.btn-warning.btn-link-social(href='/logout') - span.ion-android-exit - | Sign me out of Free Code Camp - .col-xs-12 - a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='mailto:team@freecodecamp.com') - span.ion-email - | Email us at team@freecodecamp.com - .col-xs-12 - a.btn.btn-lg.btn-block.btn-danger.btn-link-social.confirm-deletion - span.ion-trash-b - | Delete my Free Code Camp account - script. - $('.confirm-deletion').on("click", function() { - $('#modal-dialog').modal('show'); - }); - #modal-dialog.modal.animated.wobble - .modal-dialog - .modal-content - .modal-header - a.close(href='#', data-dismiss='modal', aria-hidden='true') × - h3 Are you really leaving us? - .modal-body - p Pro Tip: If you tweet feedback to  - a(href="https://twitter.com/intent/tweet?text=Hey%20@freecodecamp") @FreeCodeCamp - | , we'll act quickly on it! - .modal-footer - a.btn.btn-success.btn-block(href='#', data-dismiss='modal', aria-hidden='true') - span.ion-happy - | Nevermind, I'll stick around - br - form(action='/account/delete', method='POST') - input(type='hidden', name='_csrf', value=_csrf) - button.btn.btn-danger.btn-block(type='submit') - span.ion-trash-b - | Yes, delete my account diff --git a/server/views/account/show.jade b/server/views/account/show.jade index c559f84aa3..2b80bba9f2 100644 --- a/server/views/account/show.jade +++ b/server/views/account/show.jade @@ -3,11 +3,83 @@ block content script(src="/bower_components/cal-heatmap/cal-heatmap.min.js") script. var challengeName = 'Profile View'; + if (user && user.username === username) + .panel.panel-info + .panel-heading.text-center Manage your account + .panel-body + .row + .col-xs-12 + if (!user.isGithubCool) + a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github') + i.fa.fa-github + | Link my GitHub to unlock this profile + else + a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github') + i.fa.fa-github + | Update my profile from GitHub + if (!user.twitter) + .col-xs-12 + a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/link/twitter') + i.fa.fa-twitter + | Add my Twitter to my profile + if (!user.facebook) + .col-xs-12 + a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/link/facebook') + i.fa.fa-facebook + | Add my Facebook to my profile + if (!user.linkedin) + .col-xs-12 + a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/link/linkedin') + i.fa.fa-linkedin + | Add my LinkedIn to my profile + if (!user.google) + .col-xs-12 + a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/link/google') + i.fa.fa-google-plus + | Add my Google+ to my profile + .big-spacer + .col-xs-12 + a.btn.btn-lg.btn-block.btn-warning.btn-link-social(href='/logout') + span.ion-android-exit + | Sign me out of Free Code Camp + .col-xs-12 + a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='mailto:team@freecodecamp.com') + span.ion-email + | Email us at team@freecodecamp.com + .col-xs-12 + a.btn.btn-lg.btn-block.btn-danger.btn-link-social.confirm-deletion + span.ion-trash-b + | Delete my Free Code Camp account + script. + $('.confirm-deletion').on("click", function () { + $('#modal-dialog').modal('show'); + }); + #modal-dialog.modal.animated.wobble + .modal-dialog + .modal-content + .modal-header + a.close(href='#', data-dismiss='modal', aria-hidden='true') × + h3 You don't really want to delete your account, do you? + .modal-body + p This will really delete all your data, including all your progress, news stories and brownie points. + p We won't be able to recover any of it for you later, even if you change your mind. + p If there's something we could do better, send us an email instead and we'll do our best:   + a(href="mailto:team@freecodecamp.com") team@freecodecamp.com + | . + .modal-footer + a.btn.btn-success.btn-block(href='#', data-dismiss='modal', aria-hidden='true') + span.ion-happy + | Nevermind, I don't want to delete all my progress + .btn-spacer + form(action='/account/delete', method='POST') + input(type='hidden', name='_csrf', value=_csrf) + button.btn.btn-danger.btn-block(type='submit') + span.ion-trash-b + | I am 100% sure I want to delete all my progress .panel.panel-info .panel-heading.text-center h1 #{username}'s portfolio .panel-body - if (user && user.username === username) .row.text-center .col-xs-12.col-sm-10.col-sm-offset-1 a.btn.btn-big.btn-primary.btn-block(href="/account") Manage my account diff --git a/server/views/partials/navbar.jade b/server/views/partials/navbar.jade index d7861a224d..123f96391f 100644 --- a/server/views/partials/navbar.jade +++ b/server/views/partials/navbar.jade @@ -20,15 +20,8 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height li a.btn.signup-btn.signup-btn-nav(href='/login') Sign in else - if user.isGithubCool li a(href='/' + user.username) [ #{user.progressTimestamps.length} ] .hidden-xs.hidden-sm a(href='/' + user.username) img.profile-picture.float-right(src='#{user.picture}') - else - li - a(href='/account') [ #{user.progressTimestamps.length} ] - .hidden-xs.hidden-sm - a(href='/account') - img.profile-picture.float-right(src='#{user.picture}') From 93029f4e35fb53c749c67633ec7f45d88766a794 Mon Sep 17 00:00:00 2001 From: Aniruddh Agarwal Date: Fri, 18 Sep 2015 10:37:32 +0800 Subject: [PATCH 02/90] Refactored intermediate bonfires expect to assert --- seed/challenges/intermediate-bonfires.json | 98 +++++++++++----------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json index 88c331fd7c..fb1173440e 100644 --- a/seed/challenges/intermediate-bonfires.json +++ b/seed/challenges/intermediate-bonfires.json @@ -19,11 +19,11 @@ "sumAll([1, 4]);" ], "tests": [ - "expect(sumAll([1, 4])).to.be.a('Number');", - "expect(sumAll([1, 4])).to.equal(10);", - "expect(sumAll([4, 1])).to.equal(10);", - "expect(sumAll([5, 10])).to.equal(45);", - "expect(sumAll([10, 5])).to.equal(45);" + "assert(typeof(sumAll([1, 4])) === \"number\", 'The result should be a number');", + "assert.deepEqual(sumAll([1, 4]), 10, 'sumAll([1, 4]) should return 10');", + "assert.deepEqual(sumAll([4, 1]), 10, 'sumAll([4, 1]) should return 10');", + "assert.deepEqual(sumAll([5, 10]), 45, 'sumAll([5, 10]) should return 45');", + "assert.deepEqual(sumAll([10, 5]), 45, 'sumAll([10, 5]) should return 45');" ], "MDNlinks": [ "Math.max()", @@ -61,7 +61,7 @@ "diff([1, 2, 3, 5], [1, 2, 3, 4, 5]);" ], "tests": [ - "expect(diff([1, 2, 3, 5], [1, 2, 3, 4, 5])).to.be.a('array');", + "assert(typeof(diff([1, 2, 3, 5], [1, 2, 3, 4, 5])) === \"object\", 'The result should be an array.');", "assert.deepEqual(diff(['diorite', 'andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['pink wool'], 'arrays with only one difference');", "assert.includeMembers(diff(['andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['diorite', 'pink wool'], 'arrays with more than one difference');", "assert.deepEqual(diff(['andesite', 'grass', 'dirt', 'dead shrub'], ['andesite', 'grass', 'dirt', 'dead shrub']), [], 'arrays with no difference');", @@ -93,11 +93,11 @@ "id": "a7f4d8f2483413a6ce226cac", "title": "Roman Numeral Converter", "tests": [ - "expect(convert(12)).to.equal(\"XII\");", - "expect(convert(5)).to.equal(\"V\");", - "expect(convert(9)).to.equal(\"IX\");", - "expect(convert(29)).to.equal(\"XXIX\");", - "expect(convert(16)).to.equal(\"XVI\");" + "assert.deepEqual(convert(12), \"XII\", 'convert(12) should return \"XII\"');", + "assert.deepEqual(convert(5), \"V\", 'convert(5) should return \"V\"');", + "assert.deepEqual(convert(9), \"IX\", 'convert(9) should return \"IX\"');", + "assert.deepEqual(convert(29), \"XXIX\", 'convert(29) should return \"XXIX\"');", + "assert.deepEqual(convert(16), \"XVI\", 'convert(16) should return \"XVI\"');" ], "difficulty": "2.02", "description": [ @@ -177,11 +177,11 @@ "id": "a0b5010f579e69b815e7c5d6", "title": "Search and Replace", "tests": [ - "expect(replace(\"Let us go to the store\", \"store\", \"mall\")).to.equal(\"Let us go to the mall\");", - "expect(replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")).to.equal(\"He is Sitting on the couch\");", - "expect(replace(\"This has a spellngi error\", \"spellngi\", \"spelling\")).to.equal(\"This has a spelling error\");", - "expect(replace(\"His name is Tom\", \"Tom\", \"john\")).to.equal(\"His name is John\");", - "expect(replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\")).to.equal(\"Let us get back to more Bonfires\");" + "assert.deepEqual(replace(\"Let us go to the store\", \"store\", \"mall\"), \"Let us go to the mall\", 'replace(\"Let us go to the store\", \"store\", \"mall\") should return \"Let us go to the mall\"');", + "assert.deepEqual(replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\"), \"He is Sitting on the couch\", 'replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\") should return \"He is Sitting on the couch\"');", + "assert.deepEqual(replace(\"This has a spellngi error\", \"spellngi\", \"spelling\"), \"This has a spelling error\", 'replace(\"This has a spellngi error\", \"spellingi\", \"spelling\") should return \"This has a spelling error\"');", + "assert.deepEqual(replace(\"His name is Tom\", \"Tom\", \"john\"), \"His name is John\", 'replace(\"His name is Tom\", \"Tom\", \"john\") should return \"His name is John\"');", + "assert.deepEqual(replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\"), \"Let us get back to more Bonfires\", 'replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\") should return \"Let us get back to more Bonfires\"');" ], "difficulty": "2.035", "description": [ @@ -221,11 +221,11 @@ "id": "aa7697ea2477d1316795783b", "title": "Pig Latin", "tests": [ - "expect(translate(\"california\")).to.equal(\"aliforniacay\");", - "expect(translate(\"paragraphs\")).to.equal(\"aragraphspay\");", - "expect(translate(\"glove\")).to.equal(\"oveglay\");", - "expect(translate(\"algorithm\")).to.equal(\"algorithmway\");", - "expect(translate(\"eight\")).to.equal(\"eightway\");" + "assert.deepEqual(translate(\"california\"), \"aliforniacay\", 'translate(\"california\") should return \"aliforniacay\"');", + "assert.deepEqual(translate(\"paragraphs\"), \"aragraphspay\", 'translate(\"paragraphs\") should return \"aragraphspay\"');", + "assert.deepEqual(translate(\"glove\"), \"oveglay\", 'translate(\"glove\") should return \"oveglay\"');", + "assert.deepEqual(translate(\"algorithm\"), \"algorithmway\", 'translate(\"algorithm\") should return \"algorithmway\"');", + "assert.deepEqual(translate(\"eight\"), \"eightway\", 'translate(\"eight\") should return \"eightway\"');" ], "difficulty": "2.04", "description": [ @@ -319,10 +319,10 @@ "fearNotLetter('abce');" ], "tests": [ - "expect(fearNotLetter('abce')).to.equal('d');", - "expect(fearNotLetter('bcd')).to.be.undefined;", - "expect(fearNotLetter('abcdefghjklmno')).to.equal('i');", - "expect(fearNotLetter('yz')).to.be.undefined;" + "assert.deepEqual(fearNotLetter(\"abce\"), \"d\", 'fearNotLetter(\"abce\") should return d');", + "assert.deepEqual(fearNotLetter(\"abcdefghjklmno\"), \"i\", 'fearNotLetter(\"abcdefghjklmno\") should return i');", + "assert.isUndefined(fearNotLetter(\"bcd\"), 'fearNotLetter(\"bcd\") should return undefined');", + "assert.isUndefined(fearNotLetter(\"yz\"), 'fearNotLetter(\"yz\") should return undefined');" ], "MDNlinks": [ "String.charCodeAt()", @@ -525,12 +525,12 @@ "sumFibs(4);" ], "tests": [ - "expect(sumFibs(1)).to.be.a('number');", - "expect(sumFibs(1000)).to.equal(1785);", - "expect(sumFibs(4000000)).to.equal(4613732);", - "expect(sumFibs(4)).to.equal(5);", - "expect(sumFibs(75024)).to.equal(60696);", - "expect(sumFibs(75025)).to.equal(135721);" + "assert.deepEqual(typeof(sumFibs(1)), \"number\", \"The result should be a number\");", + "assert.deepEqual(sumFibs(1000), 1785, 'sumFibs(1000) should return 1785');", + "assert.deepEqual(sumFibs(4000000), 4613732, 'sumFibs(4000000) should return 4613732');", + "assert.deepEqual(sumFibs(4), 5, 'sumFibs(4) should return 5');", + "assert.deepEqual(sumFibs(75024), 60696, 'sumFibs(75024) should return 60696');", + "assert.deepEqual(sumFibs(75025), 135721, 'sumFibs(75025) should return 135721');" ], "MDNlinks": [ "Remainder" @@ -566,9 +566,9 @@ "sumPrimes(10);" ], "tests": [ - "expect(sumPrimes(10)).to.be.a('number');", - "expect(sumPrimes(10)).to.equal(17);", - "expect(sumPrimes(977)).to.equal(73156);" + "assert.deepEqual(typeof(sumPrimes(10)), \"number\", \"The result should be a number\");", + "assert.deepEqual(sumPrimes(10), 17, 'sumPrimes(10) should return 17');", + "assert.deepEqual(sumPrimes(977), 73156, 'sumPrimes(977) should return 73156');" ], "MDNlinks": [ "For Loops", @@ -606,10 +606,10 @@ "smallestCommons([1,5]);" ], "tests": [ - "expect(smallestCommons([1,5])).to.be.a('number');", - "expect(smallestCommons([1,5])).to.equal(60);", - "expect(smallestCommons([5,1])).to.equal(60);", - "expect(smallestCommons([1,13])).to.equal(360360);" + "assert.deepEqual(typeof(smallestCommons([1, 5])), \"number\", \"The result should be a number\");", + "assert.deepEqual(smallestCommons([1, 5]), 60, 'smallestCommons([1, 5]) should return 60');", + "assert.deepEqual(smallestCommons([5, 1]), 60, 'smallestCommons([5, 1]) should return 60');", + "assert.deepEqual(smallestCommons([1, 13]), 360360, 'smallestCommons([1, 13]) should return 360360');" ], "MDNlinks": [ "Smallest Common Multiple" @@ -680,10 +680,10 @@ "drop([1, 2, 3], function(n) {return n < 3; });" ], "tests": [ - "expect(drop([1, 2, 3, 4], function(n) {return n >= 3; })).to.eqls([3, 4]);", - "expect(drop([1, 2, 3], function(n) {return n > 0; })).to.eqls([1, 2, 3]);", - "expect(drop([1, 2, 3, 4], function(n) {return n > 5; })).to.eqls([]);", - "expect(drop([1, 2, 3, 7, 4], function(n) { return n > 5; })).to.eqls([7, 4]);" + "assert.deepEqual(drop([1, 2, 3, 4], function(n) {return n>= 3;}), [3, 4], 'drop([1, 2, 3, 4], function(n) {return n>= 3;}) should return [3, 4]');", + "assert.deepEqual(drop([1, 2, 3], function(n) {return n > 0; }), [1, 2, 3], 'drop([1, 2, 3], function(n) {return n > 0; }) should return [1, 2, 3]');", + "assert.deepEqual(drop([1, 2, 3, 4], function(n) {return n > 5;}), [], 'drop([1, 2, 3, 4], function(n) {return n > 5;}) should return []');", + "assert.deepEqual(drop([1, 2, 3, 7, 4], function(n) {return n > 3}), [7, 4], 'drop([1, 2, 3, 7, 4], function(n) {return n>= 3}) should return [7, 4]');" ], "MDNlinks": [ "Arguments object", @@ -757,8 +757,8 @@ "binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111');" ], "tests": [ - "expect(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111')).to.equal(\"Aren't bonfires fun!?\");", - "expect(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001')).to.equal(\"I love FreeCodeCamp!\");" + "assert.deepEqual(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111'), \"Aren't bonfires fun!?\", \"binaryAgent() should return Aren't bonfires fun!?\");", + "assert.deepEqual(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001'), \"I love FreeCodeCamp!\", 'binaryAgent() should return \"I love FreeCodeCamp!\"');" ], "MDNlinks": [ "String.charCodeAt()", @@ -838,11 +838,11 @@ "add(2,3);" ], "tests": [ - "expect(add(2, 3)).to.equal(5);", - "expect(add(2)(3)).to.equal(5);", - "expect(add('http://bit.ly/IqT6zt')).to.be.undefined;", - "expect(add(2, '3')).to.be.undefined;", - "expect(add(2)([3])).to.be.undefined;" + "assert.deepEqual(add(2, 3), 5, 'add(2, 3) should return 5');", + "assert.deepEqual(add(2)(3), 5, 'add(2)(3) should return 5');", + "assert.isUndefined(add(\"http://bit.ly/IqT6zt\"), 'add(\"http://bit.ly/IqT6zt\") should return undefined');", + "assert.isUndefined(add(2, \"3\"), 'add(2, \"3\") should return undefined');", + "assert.isUndefined(add(2)([3]), 'add(2)([3]) should return undefined');" ], "MDNlinks": [ "Global Function Object", From a682009025b3fa207189c26f2b7b82b2399bf78c Mon Sep 17 00:00:00 2001 From: Leon Feng Date: Sat, 19 Sep 2015 08:55:04 +0800 Subject: [PATCH 03/90] Replace Google-hosted scripts with cdnjs equivalents --- server/views/partials/scripts.jade | 6 +++--- server/views/partials/small-head.jade | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/views/partials/scripts.jade b/server/views/partials/scripts.jade index 26ecf3e6bf..17c2d178bd 100644 --- a/server/views/partials/scripts.jade +++ b/server/views/partials/scripts.jade @@ -1,7 +1,7 @@ -script(src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js") +script(src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js") script. window.jQuery || document.write('" + "" + "" + @@ -294,7 +384,8 @@ function scopejQuery(str) { } function safeHTMLRun(test) { - if (challengeType === '0') { + var codeStorage = common.codeStorage; + if (common.challengeType === '0') { var previewFrame = document.getElementById('preview'); var preview = previewFrame.contentDocument || previewFrame.contentWindow.document; if (editor.getValue().match(/\/gi) !== null) { @@ -304,7 +395,7 @@ function safeHTMLRun(test) { .split(/\<\s?\/\s?script\s?\>/gi)[0]; // add feuxQuery - s = "var document = \"\"; var $ = function() {return(new function() {this.add=function() {return(this);};this.addBack=function() {return(this);};this.addClass=function() {return(this);};this.after=function() {return(this);};this.ajaxComplete=function() {return(this);};this.ajaxError=function() {return(this);};this.ajaxSend=function() {return(this);};this.ajaxStart=function() {return(this);};this.ajaxStop=function() {return(this);};this.ajaxSuccess=function() {return(this);};this.andSelf=function() {return(this);};this.animate=function() {return(this);};this.append=function() {return(this);};this.appendTo=function() {return(this);};this.attr=function() {return(this);};this.before=function() {return(this);};this.bind=function() {return(this);};this.blur=function() {return(this);};this.callbacksadd=function() {return(this);};this.callbacksdisable=function() {return(this);};this.callbacksdisabled=function() {return(this);};this.callbacksempty=function() {return(this);};this.callbacksfire=function() {return(this);};this.callbacksfired=function() {return(this);};this.callbacksfireWith=function() {return(this);};this.callbackshas=function() {return(this);};this.callbackslock=function() {return(this);};this.callbackslocked=function() {return(this);};this.callbacksremove=function() {return(this);};this.change=function() {return(this);};this.children=function() {return(this);};this.clearQueue=function() {return(this);};this.click=function() {return(this);};this.clone=function() {return(this);};this.closest=function() {return(this);};this.contents=function() {return(this);};this.context=function() {return(this);};this.css=function() {return(this);};this.data=function() {return(this);};this.dblclick=function() {return(this);};this.delay=function() {return(this);};this.delegate=function() {return(this);};this.dequeue=function() {return(this);};this.detach=function() {return(this);};this.die=function() {return(this);};this.each=function() {return(this);};this.empty=function() {return(this);};this.end=function() {return(this);};this.eq=function() {return(this);};this.error=function() {return(this);};this.fadeIn=function() {return(this);};this.fadeOut=function() {return(this);};this.fadeTo=function() {return(this);};this.fadeToggle=function() {return(this);};this.filter=function() {return(this);};this.find=function() {return(this);};this.finish=function() {return(this);};this.first=function() {return(this);};this.focus=function() {return(this);};this.focusin=function() {return(this);};this.focusout=function() {return(this);};this.get=function() {return(this);};this.has=function() {return(this);};this.hasClass=function() {return(this);};this.height=function() {return(this);};this.hide=function() {return(this);};this.hover=function() {return(this);};this.html=function() {return(this);};this.index=function() {return(this);};this.innerHeight=function() {return(this);};this.innerWidth=function() {return(this);};this.insertAfter=function() {return(this);};this.insertBefore=function() {return(this);};this.is=function() {return(this);};this.jQuery=function() {return(this);};this.jquery=function() {return(this);};this.keydown=function() {return(this);};this.keypress=function() {return(this);};this.keyup=function() {return(this);};this.last=function() {return(this);};this.length=function() {return(this);};this.live=function() {return(this);};this.load=function() {return(this);};this.load=function() {return(this);};this.map=function() {return(this);};this.mousedown=function() {return(this);};this.mouseenter=function() {return(this);};this.mouseleave=function() {return(this);};this.mousemove=function() {return(this);};this.mouseout=function() {return(this);};this.mouseover=function() {return(this);};this.mouseup=function() {return(this);};this.next=function() {return(this);};this.nextAll=function() {return(this);};this.nextUntil=function() {return(this);};this.not=function() {return(this);};this.off=function() {return(this);};this.offset=function() {return(this);};this.offsetParent=function() {return(this);};this.on=function() {return(this);};this.one=function() {return(this);};this.outerHeight=function() {return(this);};this.outerWidth=function() {return(this);};this.parent=function() {return(this);};this.parents=function() {return(this);};this.parentsUntil=function() {return(this);};this.position=function() {return(this);};this.prepend=function() {return(this);};this.prependTo=function() {return(this);};this.prev=function() {return(this);};this.prevAll=function() {return(this);};this.prevUntil=function() {return(this);};this.promise=function() {return(this);};this.prop=function() {return(this);};this.pushStack=function() {return(this);};this.queue=function() {return(this);};this.ready=function() {return(this);};this.remove=function() {return(this);};this.removeAttr=function() {return(this);};this.removeClass=function() {return(this);};this.removeData=function() {return(this);};this.removeProp=function() {return(this);};this.replaceAll=function() {return(this);};this.replaceWith=function() {return(this);};this.resize=function() {return(this);};this.scroll=function() {return(this);};this.scrollLeft=function() {return(this);};this.scrollTop=function() {return(this);};this.select=function() {return(this);};this.selector=function() {return(this);};this.serialize=function() {return(this);};this.serializeArray=function() {return(this);};this.show=function() {return(this);};this.siblings=function() {return(this);};this.size=function() {return(this);};this.slice=function() {return(this);};this.slideDown=function() {return(this);};this.slideToggle=function() {return(this);};this.slideUp=function() {return(this);};this.stop=function() {return(this);};this.submit=function() {return(this);};this.text=function() {return(this);};this.toArray=function() {return(this);};this.toggle=function() {return(this);};this.toggle=function() {return(this);};this.toggleClass=function() {return(this);};this.trigger=function() {return(this);};this.triggerHandler=function() {return(this);};this.unbind=function() {return(this);};this.undelegate=function() {return(this);};this.unload=function() {return(this);};this.unwrap=function() {return(this);};this.val=function() {return(this);};this.width=function() {return(this);};this.wrap=function() {return(this);};this.wrapAll=function() {return(this);};this.wrapInner=function() {return(this);}});};$.ajax=function() {return($);};$.ajaxPrefilter=function() {return($);};$.ajaxSetup=function() {return($);};$.ajaxTransport=function() {return($);};$.boxModel=function() {return($);};$.browser=function() {return($);};$.Callbacks=function() {return($);};$.contains=function() {return($);};$.cssHooks=function() {return($);};$.cssNumber=function() {return($);};$.data=function() {return($);};$.Deferred=function() {return($);};$.dequeue=function() {return($);};$.each=function() {return($);};$.error=function() {return($);};$.extend=function() {return($);};$.fnextend=function() {return($);};$.fxinterval=function() {return($);};$.fxoff=function() {return($);};$.get=function() {return($);};$.getJSON=function() {return($);};$.getScript=function() {return($);};$.globalEval=function() {return($);};$.grep=function() {return($);};$.hasData=function() {return($);};$.holdReady=function() {return($);};$.inArray=function() {return($);};$.isArray=function() {return($);};$.isEmptyObject=function() {return($);};$.isFunction=function() {return($);};$.isNumeric=function() {return($);};$.isPlainObject=function() {return($);};$.isWindow=function() {return($);};$.isXMLDoc=function() {return($);};$.makeArray=function() {return($);};$.map=function() {return($);};$.merge=function() {return($);};$.noConflict=function() {return($);};$.noop=function() {return($);};$.now=function() {return($);};$.param=function() {return($);};$.parseHTML=function() {return($);};$.parseJSON=function() {return($);};$.parseXML=function() {return($);};$.post=function() {return($);};$.proxy=function() {return($);};$.queue=function() {return($);};$.removeData=function() {return($);};$.sub=function() {return($);};$.support=function() {return($);};$.trim=function() {return($);};$.type=function() {return($);};$.unique=function() {return($);};$.when=function() {return($);};$.always=function() {return($);};$.done=function() {return($);};$.fail=function() {return($);};$.isRejected=function() {return($);};$.isResolved=function() {return($);};$.notify=function() {return($);};$.notifyWith=function() {return($);};$.pipe=function() {return($);};$.progress=function() {return($);};$.promise=function() {return($);};$.reject=function() {return($);};$.rejectWith=function() {return($);};$.resolve=function() {return($);};$.resolveWith=function() {return($);};$.state=function() {return($);};$.then=function() {return($);};$.currentTarget=function() {return($);};$.data=function() {return($);};$.delegateTarget=function() {return($);};$.isDefaultPrevented=function() {return($);};$.isImmediatePropagationStopped=function() {return($);};$.isPropagationStopped=function() {return($);};$.metaKey=function() {return($);};$.namespace=function() {return($);};$.pageX=function() {return($);};$.pageY=function() {return($);};$.preventDefault=function() {return($);};$.relatedTarget=function() {return($);};$.result=function() {return($);};$.stopImmediatePropagation=function() {return($);};$.stopPropagation=function() {return($);};$.target=function() {return($);};$.timeStamp=function() {return($);};$.type=function() {return($);};$.which=function() {return($);};" + s; + s = 'var document = \"\"; var $ = function() {return(new function() {this.add=function() {return(this);};this.addBack=function() {return(this);};this.addClass=function() {return(this);};this.after=function() {return(this);};this.ajaxComplete=function() {return(this);};this.ajaxError=function() {return(this);};this.ajaxSend=function() {return(this);};this.ajaxStart=function() {return(this);};this.ajaxStop=function() {return(this);};this.ajaxSuccess=function() {return(this);};this.andSelf=function() {return(this);};this.animate=function() {return(this);};this.append=function() {return(this);};this.appendTo=function() {return(this);};this.attr=function() {return(this);};this.before=function() {return(this);};this.bind=function() {return(this);};this.blur=function() {return(this);};this.callbacksadd=function() {return(this);};this.callbacksdisable=function() {return(this);};this.callbacksdisabled=function() {return(this);};this.callbacksempty=function() {return(this);};this.callbacksfire=function() {return(this);};this.callbacksfired=function() {return(this);};this.callbacksfireWith=function() {return(this);};this.callbackshas=function() {return(this);};this.callbackslock=function() {return(this);};this.callbackslocked=function() {return(this);};this.callbacksremove=function() {return(this);};this.change=function() {return(this);};this.children=function() {return(this);};this.clearQueue=function() {return(this);};this.click=function() {return(this);};this.clone=function() {return(this);};this.closest=function() {return(this);};this.contents=function() {return(this);};this.context=function() {return(this);};this.css=function() {return(this);};this.data=function() {return(this);};this.dblclick=function() {return(this);};this.delay=function() {return(this);};this.delegate=function() {return(this);};this.dequeue=function() {return(this);};this.detach=function() {return(this);};this.die=function() {return(this);};this.each=function() {return(this);};this.empty=function() {return(this);};this.end=function() {return(this);};this.eq=function() {return(this);};this.error=function() {return(this);};this.fadeIn=function() {return(this);};this.fadeOut=function() {return(this);};this.fadeTo=function() {return(this);};this.fadeToggle=function() {return(this);};this.filter=function() {return(this);};this.find=function() {return(this);};this.finish=function() {return(this);};this.first=function() {return(this);};this.focus=function() {return(this);};this.focusin=function() {return(this);};this.focusout=function() {return(this);};this.get=function() {return(this);};this.has=function() {return(this);};this.hasClass=function() {return(this);};this.height=function() {return(this);};this.hide=function() {return(this);};this.hover=function() {return(this);};this.html=function() {return(this);};this.index=function() {return(this);};this.innerHeight=function() {return(this);};this.innerWidth=function() {return(this);};this.insertAfter=function() {return(this);};this.insertBefore=function() {return(this);};this.is=function() {return(this);};this.jQuery=function() {return(this);};this.jquery=function() {return(this);};this.keydown=function() {return(this);};this.keypress=function() {return(this);};this.keyup=function() {return(this);};this.last=function() {return(this);};this.length=function() {return(this);};this.live=function() {return(this);};this.load=function() {return(this);};this.load=function() {return(this);};this.map=function() {return(this);};this.mousedown=function() {return(this);};this.mouseenter=function() {return(this);};this.mouseleave=function() {return(this);};this.mousemove=function() {return(this);};this.mouseout=function() {return(this);};this.mouseover=function() {return(this);};this.mouseup=function() {return(this);};this.next=function() {return(this);};this.nextAll=function() {return(this);};this.nextUntil=function() {return(this);};this.not=function() {return(this);};this.off=function() {return(this);};this.offset=function() {return(this);};this.offsetParent=function() {return(this);};this.on=function() {return(this);};this.one=function() {return(this);};this.outerHeight=function() {return(this);};this.outerWidth=function() {return(this);};this.parent=function() {return(this);};this.parents=function() {return(this);};this.parentsUntil=function() {return(this);};this.position=function() {return(this);};this.prepend=function() {return(this);};this.prependTo=function() {return(this);};this.prev=function() {return(this);};this.prevAll=function() {return(this);};this.prevUntil=function() {return(this);};this.promise=function() {return(this);};this.prop=function() {return(this);};this.pushStack=function() {return(this);};this.queue=function() {return(this);};this.ready=function() {return(this);};this.remove=function() {return(this);};this.removeAttr=function() {return(this);};this.removeClass=function() {return(this);};this.removeData=function() {return(this);};this.removeProp=function() {return(this);};this.replaceAll=function() {return(this);};this.replaceWith=function() {return(this);};this.resize=function() {return(this);};this.scroll=function() {return(this);};this.scrollLeft=function() {return(this);};this.scrollTop=function() {return(this);};this.select=function() {return(this);};this.selector=function() {return(this);};this.serialize=function() {return(this);};this.serializeArray=function() {return(this);};this.show=function() {return(this);};this.siblings=function() {return(this);};this.size=function() {return(this);};this.slice=function() {return(this);};this.slideDown=function() {return(this);};this.slideToggle=function() {return(this);};this.slideUp=function() {return(this);};this.stop=function() {return(this);};this.submit=function() {return(this);};this.text=function() {return(this);};this.toArray=function() {return(this);};this.toggle=function() {return(this);};this.toggle=function() {return(this);};this.toggleClass=function() {return(this);};this.trigger=function() {return(this);};this.triggerHandler=function() {return(this);};this.unbind=function() {return(this);};this.undelegate=function() {return(this);};this.unload=function() {return(this);};this.unwrap=function() {return(this);};this.val=function() {return(this);};this.width=function() {return(this);};this.wrap=function() {return(this);};this.wrapAll=function() {return(this);};this.wrapInner=function() {return(this);}});};$.ajax=function() {return($);};$.ajaxPrefilter=function() {return($);};$.ajaxSetup=function() {return($);};$.ajaxTransport=function() {return($);};$.boxModel=function() {return($);};$.browser=function() {return($);};$.Callbacks=function() {return($);};$.contains=function() {return($);};$.cssHooks=function() {return($);};$.cssNumber=function() {return($);};$.data=function() {return($);};$.Deferred=function() {return($);};$.dequeue=function() {return($);};$.each=function() {return($);};$.error=function() {return($);};$.extend=function() {return($);};$.fnextend=function() {return($);};$.fxinterval=function() {return($);};$.fxoff=function() {return($);};$.get=function() {return($);};$.getJSON=function() {return($);};$.getScript=function() {return($);};$.globalEval=function() {return($);};$.grep=function() {return($);};$.hasData=function() {return($);};$.holdReady=function() {return($);};$.inArray=function() {return($);};$.isArray=function() {return($);};$.isEmptyObject=function() {return($);};$.isFunction=function() {return($);};$.isNumeric=function() {return($);};$.isPlainObject=function() {return($);};$.isWindow=function() {return($);};$.isXMLDoc=function() {return($);};$.makeArray=function() {return($);};$.map=function() {return($);};$.merge=function() {return($);};$.noConflict=function() {return($);};$.noop=function() {return($);};$.now=function() {return($);};$.param=function() {return($);};$.parseHTML=function() {return($);};$.parseJSON=function() {return($);};$.parseXML=function() {return($);};$.post=function() {return($);};$.proxy=function() {return($);};$.queue=function() {return($);};$.removeData=function() {return($);};$.sub=function() {return($);};$.support=function() {return($);};$.trim=function() {return($);};$.type=function() {return($);};$.unique=function() {return($);};$.when=function() {return($);};$.always=function() {return($);};$.done=function() {return($);};$.fail=function() {return($);};$.isRejected=function() {return($);};$.isResolved=function() {return($);};$.notify=function() {return($);};$.notifyWith=function() {return($);};$.pipe=function() {return($);};$.progress=function() {return($);};$.promise=function() {return($);};$.reject=function() {return($);};$.rejectWith=function() {return($);};$.resolve=function() {return($);};$.resolveWith=function() {return($);};$.state=function() {return($);};$.then=function() {return($);};$.currentTarget=function() {return($);};$.data=function() {return($);};$.delegateTarget=function() {return($);};$.isDefaultPrevented=function() {return($);};$.isImmediatePropagationStopped=function() {return($);};$.isPropagationStopped=function() {return($);};$.metaKey=function() {return($);};$.namespace=function() {return($);};$.pageX=function() {return($);};$.pageY=function() {return($);};$.preventDefault=function() {return($);};$.relatedTarget=function() {return($);};$.result=function() {return($);};$.stopImmediatePropagation=function() {return($);};$.stopPropagation=function() {return($);};$.target=function() {return($);};$.timeStamp=function() {return($);};$.type=function() {return($);};$.which=function() {return($);};' + s; sandBox.submit(scopejQuery(s), function(cls, message) { if (cls) { @@ -369,17 +460,11 @@ if (typeof prodOrDev !== 'undefined') { 'http://www.freecodecamp.com' : 'http://localhost:3001'; - if (challengeType === '0') { + if (common.challengeType === '0') { setTimeout(updatePreview, 300); } } -// Initialize CodeMirror editor with a nice html5 canvas demo. -editor.on('keyup', function() { - clearTimeout(delay); - delay = setTimeout(updatePreview, 300); -}); - /** * "post" methods */ @@ -437,9 +522,9 @@ function showCompletion() { 'event', 'Challenge', 'solved', - challenge_Name + ', Time: ' + time + ', Attempts: ' + attempts + common.challengeName + ', Time: ' + time + ', Attempts: ' + attempts ); - var bonfireSolution = myCodeMirror.getValue(); + var bonfireSolution = editor.getValue(); var didCompleteWith = $('#completed-with').val() || null; $('#complete-courseware-dialog').modal('show'); @@ -470,16 +555,17 @@ function showCompletion() { $.post( '/completed-bonfire/', { challengeInfo: { - challengeId: challenge_Id, - challengeName: challenge_Name, + challengeId: common.challengeId, + challengeName: common.challengeName, completedWith: didCompleteWith, - challengeType: challengeType, + challengeType: common.challengeType, solution: bonfireSolution } }, function(res) { if (res) { - window.location = '/challenges/next-challenge?id=' + challenge_Id; + window.location = + '/challenges/next-challenge?id=' + common.challengeId; } } ); @@ -490,7 +576,7 @@ var resetEditor = function resetEditor() { editor.setValue(replaceSafeTags(allSeeds)); $('#testSuite').empty(); bonfireExecute(true); - codeStorage.updateStorage(); + common.codeStorage.updateStorage(); }; var attempts = 0; @@ -498,35 +584,6 @@ if (attempts) { attempts = 0; } -if (challengeType !== '0') { - var codeOutput = CodeMirror.fromTextArea( - document.getElementById('codeOutput'), - { - lineNumbers: false, - mode: 'text', - theme: 'monokai', - readOnly: 'nocursor', - lineWrapping: true - } - ); - - codeOutput.setValue('/**\n' + - ' * Your output will go here.\n' + ' * Console.log() -type statements\n' + - ' * will appear in your browser\'s\n' + ' * DevTools JavaScript console.\n' + - ' */'); - codeOutput.setSize('100%', '100%'); -} - -var info = editor.getScrollInfo(); - -var after = editor.charCoords({ - line: editor.getCursor().line + 1, - ch: 0 -}, 'local').top; - -if (info.top + info.clientHeight < after) { - editor.scrollTo(null, after - info.clientHeight + 3); -} var userTests; var testSalt = Math.random(); @@ -605,9 +662,15 @@ var createTestDisplay = function() { } }; -var expect = chai.expect; -var assert = chai.assert; -var should = chai.should(); +(function(win, chai) { + if (!chai) { + return; + } + win.expect = chai.expect; + win.assert = chai.assert; + win.should = chai.should(); + +}(window, window.chai)); var reassembleTest = function(test, data) { @@ -646,9 +709,9 @@ var runTests = function(err, data) { ) { try { if (chaiTestFromJSON) { - /* eslint-disable no-eval */ + /* eslint-disable no-eval, no-unused-vars */ var output = eval(reassembleTest(chaiTestFromJSON, data)); - /* eslint-enable no-eval */ + /* eslint-enable no-eval, no-unused-vars */ } } catch (error) { allTestsPassed = false; @@ -669,19 +732,133 @@ var runTests = function(err, data) { } }; +// step challenge +common.init.push((function() { + var stepClass = '.challenge-step'; + var nextBtnClass = '.challenge-step-btn-next'; + var actionBtnClass = '.challenge-step-btn-action'; + var finishBtnClass = '.challenge-step-btn-finish'; + var submitBtnId = '#challenge-step-btn-submit'; + var submitModalId = '#challenge-step-modal'; + + function getNextStep($challengeSteps) { + var length = $challengeSteps.length; + var $nextStep = false; + var nextStepIndex = 0; + $challengeSteps.each(function(index) { + var $step = $(this); + if ( + !$step.hasClass('hidden') && + index + 1 !== length + ) { + nextStepIndex = index + 1; + } + }); + + $nextStep = $challengeSteps[nextStepIndex]; + + return $nextStep; + } + + function handleNextStepClick(e) { + e.preventDefault(); + var nextStep = getNextStep($(stepClass)); + $(this) + .parent() + .addClass('animated fadeOutLeft') + .delay(700) + .queue(function(next) { + $(this).addClass('hidden'); + if (nextStep) { + $(nextStep) + .removeClass('hidden') + .addClass('animated slideInRight') + .delay(1000) + .queue(function(next) { + $(this).removeClass('slideInRight'); + next(); + }); + } + next(); + }); + + } + + function handleActionClick() { + $(this) + .parent() + .find('.disabled') + .removeClass('disabled'); + } + + function handleFinishClick(e) { + e.preventDefault(); + $(submitModalId).modal('show'); + $(submitModalId + '.modal-header').click(); + $(submitBtnId).click(handleSubmitClick); + } + + function handleSubmitClick(e) { + e.preventDefault(); + + $('#submit-challenge') + .attr('disabled', 'true') + .removeClass('btn-primary') + .addClass('btn-warning disabled'); + + var $checkmarkContainer = $('#checkmark-container'); + $checkmarkContainer.css({ height: $checkmarkContainer.innerHeight() }); + + $('#challenge-checkmark') + .addClass('zoomOutUp') + .delay(1000) + .queue(function(next) { + $(this).replaceWith( + '
' + + 'submitting...
' + ); + next(); + }); + + $.post( + '/completed-bonfire/', { + challengeInfo: { + challengeId: common.challengeId, + challengeName: common.challengeName, + challengeType: common.challengeType + } + }, + function(res) { + if (res) { + window.location = + '/challenges/next-challenge?id=' + common.challengeId; + } + } + ); + } + + return function($) { + $(nextBtnClass).click(handleNextStepClick); + $(actionBtnClass).click(handleActionClick); + $(finishBtnClass).click(handleFinishClick); + }; +}(window.$))); + function bonfireExecute(shouldTest) { + var codeOutput = common.codeOutput; initPreview = false; goodTests = 0; attempts++; - ga('send', 'event', 'Challenge', 'ran-code', challenge_Name); + ga('send', 'event', 'Challenge', 'ran-code', common.challengeName); userTests = null; $('#testSuite').empty(); if ( - challengeType !== '0' && + common.challengeType !== '0' && !editor.getValue().match(/\$\s*?\(\s*?\$\s*?\)/gi) ) { - var userJavaScript = myCodeMirror.getValue(); + var userJavaScript = editor.getValue(); var failedCommentTest = false; // checks if the number of opening comments(/*) matches the number of @@ -701,7 +878,7 @@ function bonfireExecute(shouldTest) { if (userJavaScript.match(/function\s*?\(|function\s+\w+\s*?\(/gi)) { sandBox.submit(userJavaScript, function(cls, message) { if (failedCommentTest) { - myCodeMirror.setValue(myCodeMirror.getValue() + '*/'); + editor.setValue(editor.getValue() + '*/'); console.log('Caught Unfinished Comment'); codeOutput.setValue('Unfinished multi-line comment'); failedCommentTest = false; @@ -726,7 +903,7 @@ function bonfireExecute(shouldTest) { sandBox.submit(userJavaScript, function(cls, message) { if (failedCommentTest) { - myCodeMirror.setValue(myCodeMirror.getValue() + '*/'); + editor.setValue(editor.getValue() + '*/'); console.log('Caught Unfinished Comment'); codeOutput.setValue('Unfinished mulit-line comment'); failedCommentTest = false; @@ -756,7 +933,7 @@ function bonfireExecute(shouldTest) { } if ( !editor.getValue().match(/\$\s*?\(\s*?\$\s*?\)/gi) && - challengeType === '0' + common.challengeType === '0' ) { safeHTMLRun(shouldTest); } else { @@ -776,6 +953,10 @@ $('#submitButton').on('click', function() { $(document).ready(function() { + common.init.forEach(function(init) { + init($); + }); + // init modal keybindings on open $('#complete-courseware-dialog').on('shown.bs.modal', function() { $('#complete-courseware-dialog').keydown(ctrlEnterClickHandler); @@ -789,20 +970,14 @@ $(document).ready(function() { var $preview = $('#preview'); isInitRun = true; - editorValue = codeStorage.isAlive() ? - codeStorage.getStoredValue() : - allSeeds; - - myCodeMirror.setValue(replaceSafeTags(editorValue)); - myCodeMirror.refresh(); - if (typeof $preview.html() !== 'undefined') { $preview.load(function() { if (initPreview) { bonfireExecute(true); } }); - } else { + } else if (common.challengeType !== 7) { bonfireExecute(true); } + }); diff --git a/seed/challenges/basejumps.json b/seed/challenges/basejumps.json index 26f091cbcb..2235eefc58 100644 --- a/seed/challenges/basejumps.json +++ b/seed/challenges/basejumps.json @@ -86,7 +86,7 @@ "Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your GitHub repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.", "If you'd like immediate feedback on your project from fellow campers, click this button and paste in a link to your CodePen project.

Click here then add your link to your tweet's text" ], - "type": "basejumps", + "type": "basejump", "challengeType": 4, "tests": [], "nameCn": "", diff --git a/seed/challenges/getting-started.json b/seed/challenges/getting-started.json new file mode 100644 index 0000000000..5ac330c4e3 --- /dev/null +++ b/seed/challenges/getting-started.json @@ -0,0 +1,321 @@ +{ + "name": "Get Started with Free Code Camp", + "order": 0.000, + "challenges": [ + { + "id": "560add10cb82ac38a17513be", + "title": "Learn how Free Code Camp Works", + "difficulty": 0.00, + "challengeSeed": [], + "description": [ + [ + "http://i.imgur.com/RlEk2IF.jpg", + "a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", + "Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", + "" + ], + [ + "http://i.imgur.com/pYsTbjI.jpg", + "a screenshot of our curriculum alongside a screenshot of our chat room.", + "Learning to code is hard. To succeed, you'll need lots of practice and support. That's why we've created a rigorous curriculum and supportive community.", + "" + ], + [ + "http://i.imgur.com/D7Y5luw.jpg", + "A graph of the rate of job growth against growth in computer science degree graduates. There are 1.4 million jobs and only 400 million people to fill them.", + "There are thousands of coding jobs currently going unfilled, and the demand for coders grows every year. If you want a coding job, we can help prepare you to get one.", + "" + ], + [ + "http://i.imgur.com/dLx8nrg.jpg", + "An illustration showing that you will learn HTML5, CSS3, JavaScript, Databases, Git, Node.js, Angular.js and Agile.", + "First you'll work through our rigorous 800-hour curriculum learn technologies like HTML5, Node.js and databases. It's self-paced and 100% free.", + "" + ], + [ + "http://i.imgur.com/q4IjuCL.jpg", + "a screenshot of our Front End Development Certificate", + "About half way through our curriculum, you'll earn a verified Front End Development Certificate. If you can finish our entire curriculum, you'll earn a verified Full Stack Development Certificate.", + "" + ], + [ + "http://i.imgur.com/yXyxbDd.jpg", + "a screen shot of our nonprofit project directory.", + "Then you'll build several real-life projects for nonprofits. By the time you finish, you'll have a portfolio of real apps that people use every day.", + "" + ] + ], + "type": "Waypoint", + "challengeType": 7, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "560add37cb82ac38a17513bf", + "title": "Create a GitHub Account and Join our Chat Rooms", + "difficulty": 0.01, + "challengeSeed": [], + "description": [ + [ + "http://i.imgur.com/EAR7Lvh.jpg", + "a screenshot of our one of our Gitter chat rooms.", + "Now let's join Free Code Camp's chat rooms. You can come here any time of day to hang out, ask questions, or find another camper to pair program with. First you'll need a GitHub account.", + "" + ], + [ + "http://i.imgur.com/FEImaEN.gif", + "A gif showing you to click the link below to go to GitHub. Fill in the necessary fields and click submit.", + "Create an account with GitHub. Be sure to use your real email address - GitHub will keep this private.", + "https://github.com/join" + ], + [ + "http://i.imgur.com/ALN6zPK.gif", + "A gif showing you how to click the profile image in the upper right hand corner of GitHub. Upload a photo of yourself or you will continue to use the automatically generated pixel art. Then fill in the remaining form fields and click submit.", + "Click the pixel art in the upper right hand corner of GitHub, then choose settings. Upload a picture of yourself. A picture of your face works best. This is how your fellow campers will see you in our chat rooms, so put your best foot forward. You can add your city and your name if you want.", + "https://github.com/settings/profile" + ], + [ + "http://i.imgur.com/OXL3G3n.gif", + "Click the link below to navigate to Free Code Camp's open-source repository. In the upper right hand corner, you can click the \"star\" button to star this repository.", + "Go to Free Code Camp's open-source repository and \"star\" it. \"Starring\" is the GitHub equivalent of \"liking\" something.", + "https://github.com/freecodecamp/freecodecamp" + ], + [ + "http://i.imgur.com/EZHzKCV.gif", + "A gif showing you how to click the link below to go to our chat room and click the \"sign in with GitHub\" button. Then you can click into the text input field and type a message to your fellow campers.", + " Now that you have a GitHub account, you can join our main chat room by logging in with GitHub. Introduce yourself by saying \"Hello world!\". Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.", + "https://gitter.im/FreeCodeCamp/FreeCodeCamp" + ], + [ + "http://i.imgur.com/Ecs5XAd.gif", + "A gif showing you how you can click the settings button in the upper right hand corner and modify your notification settings.", + "Our chat rooms are extremely active. You should change your settings so you're only notified if someone mentions you.", + "" + ], + [ + "http://i.imgur.com/T0bGJPe.gif", + "A gif showing how you can click on a user profile image to initiate a private message with that user.", + "Please note that all of our chat rooms are visible to the public. If you need to share sensitive information, such as an email address or phone number, do it in a private message.", + "" + ], + [ + "http://i.imgur.com/vDTMJSh.gif", + "A gif showing that you can tab back and forth between challenges and our chat rooms.", + "Keep our chat room open while you work through our challenges. That way, you can ask for help if you get stuck. You can also socialize with other campers when you feel like taking a break.", + "" + ], + [ + "http://i.imgur.com/SLQ27Gr.gif", + "A gif showing how you can click the link below to download a native chat room app for your computer.", + "You can also download the chat room app to your computer or phone.", + "https://gitter.im/apps" + ] + ], + "type": "Waypoint", + "challengeType": 7, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "560add56cb82ac38a17513c0", + "title": "Configure your Public Profile", + "difficulty": 0.02, + "challengeSeed": [], + "description": [ + [ + "http://i.imgur.com/FkEzbto.gif", + "A gif showing how you can click your profile image in your upper right hand corner to access the account page and connect GitHub.", + "Check out your portfolio page. Click your picture your upper right hand corner. To activate your portfolio page, you'll need to link your GitHub account with Free Code Camp.", + "" + ], + [ + "http://i.imgur.com/WKzEr1q.gif", + "A gif showing how you can access your profile page and hover over different days to see how many brownie points you got on those days.", + "Your portfolio page shows your progress and how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms. If you get Brownie Points on several days in a row, you'll get a streak.", + "" + ] + ], + "type": "Waypoint", + "challengeType": 7, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "560add65cb82ac38a17513c1", + "title": "Try our Wiki and Camper News", + "difficulty": 0.03, + "challengeSeed": [], + "description": [ + [ + "http://i.imgur.com/DoOqkNW.gif", + "A gif showing how you can click the \"Wiki\" button in your upper-right corner to access the wiki.", + "Try this: Click the \"Wiki\" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.", + "" + ], + [ + "http://i.imgur.com/nmSiMy1.gif", + "A gif showing how you can access our Camper News page and click the \"upvote\" button to upvote a story.", + "Click the \"News\" button in your upper right hand corner. You can browse links on Camper News and upvote ones that you enjoy.", + "" + ] + ], + "type": "Waypoint", + "challengeType": 7, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "560add71cb82ac38a17513c2", + "title": "Join a Campsite in Your City", + "difficulty": 0.04, + "challengeSeed": [], + "description": [ + [ + "http://i.imgur.com/Elb3dfj.jpg", + "A picture of some of our campers meeting in a local cafe. 3 men and 3 women are sitting around a table with laptops out, and are smiling and coding.", + "Our Campsites help you code with campers in your city. You can coordinate study groups or attend local coding events together.", + "" + ], + [ + "http://i.imgur.com/EZHzKCV.gif", + "A gif showing how you can click the link below, find your city on the list of Campsites, then click on the Facebook link for your city and join your city's Facebook group.", + "Find your city on this list, click the \"Facebook\" link, then click the \"Join group\" button to apply to join your city's Facebook group (someone from the campsite should approve you shortly). If your city isn't on this list, scroll to the bottom of the wiki article for instructions for how you can create your city's Campsite.", + "https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites" + ] + ], + "type": "Waypoint", + "challengeType": 7, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "560add8ccb82ac38a17513c3", + "title": "Join our Alumni Network and Commit to Your Goal", + "difficulty": 0.05, + "challengeSeed": [], + "description": [ + [ + "http://i.imgur.com/P7qfJXt.gif", + "A gif showing how you can click the link below and fill in the necessary fields to add your Free Code Camp studies to your LinkedIn profile.", + "You can add Free Code Camp to your LinkedIn education background. Set your graduation date as next year. For \"Degree\", type \"Full Stack Web Development\". For \"Field of study\", type \"Computer Software Engineering\". Then click \"Save Changes\".", + "https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp" + ], + [ + "", + "", + "Free Code Camp will always be free. If you want to feel more motivated to earn our certificates faster, we encourage you to instead donate each month to a nonprofit.", + "" + ] + ], + "type": "Waypoint", + "challengeType": 7, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "560add8ccb82ac38a17513c4", + "title": "Learn What to Do If You Get Stuck", + "difficulty": 0.06, + "challengeSeed": [], + "description": [ + [ + "http://i.imgur.com/EWWZBag.jpg", + "An image with the text \"1. Read the error 2. Search Google 3. Ask for help.", + "Let's cover one last thing before you start working through our challenges: how to get help. Any time you get stuck or don't know what to do next: Read-Search-Ask.", + "" + ], + [ + "http://i.imgur.com/99BfAcK.jpg", + "An image showing jQuery documentation", + "First, read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions.", + "" + ], + [ + "http://i.imgur.com/GxvrsFb.gif", + "A gif showing you how to do an advanced Google search. First, we enter the query \"jquery doesn't run when my page loads\". Then we click search tools button and change the \"Any time\" select box to \"within the last year\". Then we click on a result and read through the article and find our answer.", + "If that didn't help, search Google. Good Google queries take a lot of practice. When you search Google, you usually want to include the language or framework you're using. You also want to limit the results to a recent period.", + "" + ], + [ + "http://i.imgur.com/LZYU7p2.gif", + "A gif showing us following the link below to go to the help chat room and ask \"jquery doesn't run when my page loads\".", + "If that didn't help, ask your friends. If you have trouble, you can ask your fellow campers in our help chat room.", + "https://gitter.im/FreeCodeCamp/Help" + ], + [ + "http://i.imgur.com/WsfzvVo.gif", + "A gif showing us clicking the \"map\" button in our upper right hand corner and browsing our challenge map.", + "Now you're ready to start coding! The \"Map\" button in your upper right hand corner will show you our challenge map. This map shows all our coding challenges. We recommend that you complete these from top to bottom, at a sustainable pace. You can also return to your next challenge by clicking the \"Learn\" button.", + "" + ] + ], + "type": "Waypoint", + "challengeType": 7, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + } + ] +} diff --git a/server/boot/challenge.js b/server/boot/challenge.js index 4ce4937e67..3846498915 100644 --- a/server/boot/challenge.js +++ b/server/boot/challenge.js @@ -26,7 +26,8 @@ const challengeView = { 2: 'coursewares/showVideo', 3: 'coursewares/showZiplineOrBasejump', 4: 'coursewares/showZiplineOrBasejump', - 5: 'coursewares/showBonfire' + 5: 'coursewares/showBonfire', + 7: 'coursewares/showStep' }; const dasherize = utils.dasherize; @@ -247,6 +248,7 @@ module.exports = function(app) { dashedName: origChallengeName, name: challenge.name, details: challenge.description, + description: challenge.description, tests: challenge.tests, challengeSeed: challenge.challengeSeed, verb: utils.randomVerb(), diff --git a/server/boot/home.js b/server/boot/home.js index d6855a9914..511c9aedf4 100644 --- a/server/boot/home.js +++ b/server/boot/home.js @@ -22,7 +22,7 @@ module.exports = function(app) { function index(req, res) { if (req.user) { - return res.render('resources/get-started', { title: message }); + return res.redirect('/map'); } res.render('home', { title: message }); } diff --git a/server/views/coursewares/getstuff.jade b/server/views/coursewares/getstuff.jade deleted file mode 100644 index 6645059ee2..0000000000 --- a/server/views/coursewares/getstuff.jade +++ /dev/null @@ -1,9 +0,0 @@ -// - Created by nathanleniz on 5/19/15. - -extends ../layout-wide -block content - script. - var stuff = !{JSON.stringify(stuff)}; - var challengeMapWithIds = !{JSON.stringify(stuffWithIds)}; - diff --git a/server/views/coursewares/showStep.jade b/server/views/coursewares/showStep.jade new file mode 100644 index 0000000000..f89d65eda2 --- /dev/null +++ b/server/views/coursewares/showStep.jade @@ -0,0 +1,39 @@ +extends ../layout-wide +block content + .row + .col-md-8.col-md-offset-2 + .jumbotron + for step, index in description + .thumbnail.challenge-step(class=index !== 0 ? 'hidden': '') + img.gif-block.img-center.img-responsive.thumbnail(src='#{step[0]}' alt='#{step[1]}') + .caption + p.large-p= step[2] + if step[3] + a.btn.btn-block.btn-primary.challenge-step-btn-action(href='#{step[3]}' target='_blank') Go To Link + if index + 1 === description.length + .btn.btn-block.btn-primary.challenge-step-btn-finish(id='last' class=step[3] ? 'disabled' : '') Finish challenge + else + .btn.btn-block.btn-primary.challenge-step-btn-next(id='#{index}' class=step[3] ? 'disabled' : '') Go to my next step + #challenge-step-modal.modal(tabindex='-1') + .modal-dialog.animated.fadeIn.fast-animation + .modal-content + .modal-header.challenge-list-header= compliment + a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') × + .modal-body + .text-center + #checkmark-container.row + #challenge-checkmark.animated.zoomInDown.delay-half + span.completion-icon.ion-checkmark-circled.text-primary + .spacer + .row + if (user) + #challenge-step-btn-submit.animated.fadeIn.btn.btn-lg.btn-primary.btn-block Submit and go to my next challenge (ctrl + enter) + else + a.btn.btn-lg.btn-primary.btn-block(href='/challenges/next-challenge?id=' + challengeId) Go to my next challenge + script(src=rev('/js', 'commonFramework.js')) + script. + var common = common || { init: [] }; + common.challengeId = !{JSON.stringify(challengeId)}; + common.challengeName = !{JSON.stringify(name)}; + common.challengeType = 7; + common.dashedName = !{JSON.stringify(dashedName || '')}; diff --git a/server/views/partials/challenge-modals.jade b/server/views/partials/challenge-modals.jade index 746c1a6929..85165c357b 100644 --- a/server/views/partials/challenge-modals.jade +++ b/server/views/partials/challenge-modals.jade @@ -35,5 +35,5 @@ a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Cancel script. if (typeof localStorage !== 'undefined') { - localStorage.setItem('currentDashedName', dashedName); + localStorage.setItem('currentDashedName', common.dashedName || dashedName || ''); } diff --git a/server/views/resources/get-started.jade b/server/views/resources/get-started.jade deleted file mode 100644 index 8767841a66..0000000000 --- a/server/views/resources/get-started.jade +++ /dev/null @@ -1,173 +0,0 @@ -extends ../layout -block content - .jumbotron - h2.text-center Scroll down and follow along with this 8-minute guide. - br - | It will help you get the most out of Free Code Camp. - - .thumbnail - img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/RlEk2IF.jpg' alt="a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits") - .caption - p.large-p Welcome to Free Code Camp. We're an open source community of busy people who learn to code and build projects for nonprofits. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/pYsTbjI.jpg' alt='a screenshot of our curriculum alongside a screenshot of our chat room.') - .caption - p.large-p Learning to code is hard. To succeed, you'll need lots of practice and support. That's why we've created a rigorous curriculum and supportive community. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/D7Y5luw.jpg' alt='A graph of the rate of job growth against growth in computer science degree graduates. There are 1.4 million jobs and only 400 million people to fill them.') - .caption - p.large-p There are thousands of coding jobs currently going unfilled, and the demand for coders grows every year. If you want a coding job, we can help prepare you to get one. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/dLx8nrg.jpg' alt='An illustration showing that you will learn HTML5, CSS3, JavaScript, Databases, Git, Node.js, Angular.js and Agile.') - .caption - p.large-p During the first 800 hours of Free Code Camp, you'll learn technologies like HTML5, Node.js and databases. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/yXyxbDd.jpg' alt='a screen shot of our nonprofit project directory.') - .caption - p.large-p During the last 800 hours, you'll build several real-life projects for nonprofits. By the time you finish, you'll have a portfolio of real apps that people use every day. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/EAR7Lvh.jpg' alt='a screenshot of our one of our Gitter chat rooms.') - .caption - p.large-p Now let's join Free Code Camp's chat rooms. You can come here any time of day to hang out, ask questions, or find another camper to pair program with. First you'll need a GitHub account. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/FEImaEN.gif' alt='A gif showing you to click the link below to go to GitHub. Fill in the necessary fields and click submit.') - .caption - p.large-p Try this:  - a(href='https://github.com/join' target='_blank') Create an account with GitHub - | . Be sure to use your real email address - GitHub will keep this private. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/ALN6zPK.gif' alt='A gif showing you how to click the profile image in the upper right hand corner of GitHub. Upload a photo of yourself or you will continue to use the automatically generated pixel art. Then fill in the remaining form fields and click submit.') - .caption - p.large-p Try this:  - | Click the pixel art in the upper right hand corner of GitHub, then choose settings. Upload a picture of yourself. A picture of your face works best. This is how your fellow campers will see you in our chat rooms, so put your best foot forward. You can add your city and your name if you want. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/OXL3G3n.gif' alt="Click the link below to navigate to Free Code Camp's open-source repository. In the upper right hand corner, you can click the \"star\" button to star this repository.") - .caption - p.large-p Try this:  - a(href='//github.com/freecodecamp/freecodecamp' target='_blank') Go to Free Code Camp's open-source repository - |  and "star" it. "Starring" is the GitHub equivalent of "liking" something. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/Uuc2Ked.gif' alt='A gif showing you how to click the link below to go to our chat room and click the \"sign in with GitHub\" button. Then you can click into the text input field and type a message to your fellow campers.') - .caption - p.large-p Try this:  - | Now that you have a GitHub account, you can  - a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp' target='_blank') join our main chat room by logging in with GitHub - | . Introduce yourself by saying "Hello world!". Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/Ecs5XAd.gif' alt='A gif showing you how you can click the settings button in the upper right hand corner and modify your notification settings.') - .caption - p.large-p Try this:  - | Our chat rooms are extremely active. You should change your settings so you're only notified if someone mentions you. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/T0bGJPe.gif' alt='A gif showing how you can click on a user profile image to initiate a private message with that user.') - .caption - p.large-p Please note that all of our chat rooms are visible to the public. If you need to share sensitive information, such as an email address or phone number, do it in a private message. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/vDTMJSh.gif' alt='A gif showing that you can tab back and forth between challenges and our chat rooms.') - .caption - p.large-p Keep our chat room open while you work through our challenges. That way, you can ask for help if you get stuck. You can also socialize with other campers when you feel like taking a break. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/SLQ27Gr.gif' alt='A gif showing how you can click the link below to download a native chat room app for your computer.') - .caption - p.large-p You can also  - a(href='https://gitter.im/apps' target='_blank') download the chat room app - |  to your computer or phone. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/FkEzbto.gif' alt='A gif showing how you can click your profile image in your upper right hand corner to access the account page and connect GitHub.') - .caption - p.large-p Try this: Check out your portfolio page. Click your picture your upper right hand corner. To activate your portfolio page, you'll need to link your GitHub account with Free Code Camp. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/WKzEr1q.gif' alt='A gif showing how you can access your profile page and hover over different days to see how many brownie points you got on those days.') - .caption - p.large-p Your portfolio page shows your progress and how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms. If you get Brownie Points on several days in a row, you'll get a streak. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/nmSiMy1.gif' alt='A gif showing how you can access our Camper News page and click the "upvote" button to upvote a story.') - .caption - p.large-p Try this:  - | Click the "News" button in your upper right hand corner. You can browse links on Camper News and upvote ones that you enjoy. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/Elb3dfj.jpg' alt='A picture of some of our campers meeting in a local cafe. 3 men and 3 women are sitting around a table with laptops out, and are smiling and coding.') - .caption - p.large-p Our Campsites help you code with campers in your city. You can discuss coding and attend local Coffee-n-Code events. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/tYf8jrI.gif' alt="A gif showing how you can click the link below, find your city on the list of Campsites, then click on the Facebook link for your city and join your city's Facebook group.") - .caption - p.large-p Try this:  - a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Find your city on this list - | , then click it. Click the "Join group" button to join your city's Campsite. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/P7qfJXt.gif' alt='A gif showing how you can click the link below and fill in the necessary fields to add your Free Code Camp studies to your LinkedIn profile.') - .caption - p.large-p You can  - a(href='https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp' target='_blank') add Free Code Camp to your LinkedIn education background - | . Set your graduation date as next year. For "Degree", type "Full Stack Web Development". For "Field of study", type "Computer Software Engineering". Then click "Save Changes". - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/EWWZBag.jpg' alt='An image with the text \"1. Read the error 2. Search Google 3. Ask for help.') - .caption - p.large-p Let's cover one last thing before you start working through our challenges: how to get help. Any time you get stuck or don't know what to do next: Read-Search-Ask. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/99BfAcK.jpg' alt='An image showing jQuery documentation') - .caption - p.large-p First, read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/GxvrsFb.gif' alt="A gif showing you how to do an advanced Google search. First, we enter the query \"jquery doesn't run when my page loads\". Then we click search tools button and change the \"Any time\" select box to \"within the last year\". Then we click on a result and read through the article and find our answer.") - .caption - p.large-p If that didn't help, search Google. Good Google queries take a lot of practice. When you search Google, you usually want to include the language or framework you're using. You also want to limit the results to a recent period. - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/LZYU7p2.gif' alt="A gif showing us following the link below to go to the help chat room and ask \"jquery doesn't run when my page loads\".") - .caption - p.large-p If that didn't help, ask your friends. If you have trouble, you can ask your fellow campers in our  - a(href='https://gitter.im/FreeCodeCamp/Help' target='_blank') help chat room - | . - - .big-spacer - .thumbnail - img.gif-block.img-center.img-responsive(src='http://i.imgur.com/WsfzvVo.gif' alt='A gif showing us clicking the \"map\" button in our upper right hand corner and browsing our challenge map.') - .caption - p.large-p Now you're ready to start coding! Click the "Map" button in your upper right hand corner. Our map shows all our coding challenges. We recommend that you complete these from top to bottom, at a sustainable pace. diff --git a/server/views/resources/jobs-form.jade b/server/views/resources/jobs-form.jade deleted file mode 100644 index f7a693ca17..0000000000 --- a/server/views/resources/jobs-form.jade +++ /dev/null @@ -1,3 +0,0 @@ -extends ../layout -block content - iframe(src="https://docs.google.com/forms/d/1b8JYvQ5ibdwwC0owQ9e9EMRlg22O2wbJgqMvPjiILqs/viewform?embedded=true", frameborder="0", marginheight="0", marginwidth="0", width='102%', height=2100, scrolling="no") Loading... From 1994e340d33c840e1d23f880165a73d7382cab70 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Wed, 30 Sep 2015 14:57:58 -0700 Subject: [PATCH 64/90] all but 4 bonfires work --- seed/challenges/upper-intermediate-bonfires.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seed/challenges/upper-intermediate-bonfires.json b/seed/challenges/upper-intermediate-bonfires.json index bdaeefc084..83e3584e5b 100644 --- a/seed/challenges/upper-intermediate-bonfires.json +++ b/seed/challenges/upper-intermediate-bonfires.json @@ -25,9 +25,9 @@ "assert.deepEqual(Object.keys(bob).length, 6, 'message: Object.keys(bob).length should return 6.');", "assert.deepEqual(bob instanceof Person, true, 'message: bob instanceof Person should return true.');", "assert.deepEqual(bob.firstName, undefined, 'message: bob.firstName should return undefined.');", - "assert.deepEqual(bob.lastName, undefined, 'message: bob.lastName should return undefined.';", + "assert.deepEqual(bob.lastName, undefined, 'message: bob.lastName should return undefined.');", "assert.deepEqual(bob.getFirstName(), 'Bob', 'message: bob.getFirstName() should return \"Bob\".');", - "assert.deepEqual(bob.getLastName(), 'Ross', 'message: bob.getLastName() should return \"Ross\".';", + "assert.deepEqual(bob.getLastName(), 'Ross', 'message: bob.getLastName() should return \"Ross\".');", "assert.deepEqual(bob.getFullName(), 'Bob Ross', 'message: bob.getFullName() should return \"Bob Ross\".');" ], "MDNlinks": [ From 4fffabfe8f8544fe1b1b806832d18f6a49cde964 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Wed, 30 Sep 2015 18:33:32 -0700 Subject: [PATCH 65/90] fix exact change and QA all JS challenges --- seed/challenges/advanced-bonfires.json | 34 ++-- .../automated-testing-and-debugging.json | 10 +- seed/challenges/basic-javascript.json | 150 +++++++++--------- ...t-oriented-and-functional-programming.json | 68 ++++---- 4 files changed, 131 insertions(+), 131 deletions(-) diff --git a/seed/challenges/advanced-bonfires.json b/seed/challenges/advanced-bonfires.json index dd4b9d3778..48bc294b7b 100644 --- a/seed/challenges/advanced-bonfires.json +++ b/seed/challenges/advanced-bonfires.json @@ -126,26 +126,26 @@ "}", "", "// Example cash-in-drawer array:", - "// [['PENNY', 1.01],", - "// ['NICKEL', 2.05],", - "// ['DIME', 3.10],", - "// ['QUARTER', 4.25],", - "// ['ONE', 90.00],", - "// ['FIVE', 55.00],", - "// ['TEN', 20.00],", - "// ['TWENTY', 60.00],", - "// ['ONE HUNDRED', 100.00]]", + "// [[\"PENNY\", 1.01],", + "// [\"NICKEL\", 2.05],", + "// [\"DIME\", 3.10],", + "// [\"QUARTER\", 4.25],", + "// [\"ONE\", 90.00],", + "// [\"FIVE\", 55.00],", + "// [\"TEN\", 20.00],", + "// [\"TWENTY\", 60.00],", + "// [\"ONE HUNDRED\", 100.00]]", "", - "drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]);" + "drawer(19.50, 20.00, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.10], [\"QUARTER\", 4.25], [\"ONE\", 90.00], [\"FIVE\", 55.00], [\"TEN\", 20.00], [\"TWENTY\", 60.00], [\"ONE HUNDRED\", 100.00]]);" ], "tests": [ - "assert.isArray(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), 'message: drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]) should return an array.');", - "assert.isString(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'message: drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]) should return a string.');", - "assert.isString(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'message: drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]) should return a string.');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'message: drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]) should return [['QUARTER', 0.50]].');", - "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04]], 'message: drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]) should return [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04]].');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'message: drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]) should return \"Insufficient Funds\".');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'message: drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]) should return \"Closed\".');" + "assert.isArray(drawer(19.50, 20.00, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.10], [\"QUARTER\", 4.25], [\"ONE\", 90.00], [\"FIVE\", 55.00], [\"TEN\", 20.00], [\"TWENTY\", 60.00], [\"ONE HUNDRED\", 100.00]]), 'message: drawer(19.50, 20.00, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.10], [\"QUARTER\", 4.25], [\"ONE\", 90.00], [\"FIVE\", 55.00], [\"TEN\", 20.00], [\"TWENTY\", 60.00], [\"ONE HUNDRED\", 100.00]]) should return an array.');", + "assert.isString(drawer(19.50, 20.00, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]), 'message: drawer(19.50, 20.00, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]) should return a string.');", + "assert.isString(drawer(19.50, 20.00, [[\"PENNY\", 0.50], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]), 'message: drawer(19.50, 20.00, [[\"PENNY\", 0.50], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]) should return a string.');", + "assert.deepEqual(drawer(19.50, 20.00, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.10], [\"QUARTER\", 4.25], [\"ONE\", 90.00], [\"FIVE\", 55.00], [\"TEN\", 20.00], [\"TWENTY\", 60.00], [\"ONE HUNDRED\", 100.00]]), [[\"QUARTER\", 0.50]], 'message: drawer(19.50, 20.00, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.10], [\"QUARTER\", 4.25], [\"ONE\", 90.00], [\"FIVE\", 55.00], [\"TEN\", 20.00], [\"TWENTY\", 60.00], [\"ONE HUNDRED\", 100.00]]) should return [[\"QUARTER\", 0.50]].');", + "assert.deepEqual(drawer(3.26, 100.00, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.10], [\"QUARTER\", 4.25], [\"ONE\", 90.00], [\"FIVE\", 55.00], [\"TEN\", 20.00], [\"TWENTY\", 60.00], [\"ONE HUNDRED\", 100.00]]), [[\"TWENTY\", 60.00], [\"TEN\", 20.00], [\"FIVE\", 15], [\"ONE\", 1], [\"QUARTER\", 0.50], [\"DIME\", 0.20], [\"PENNY\", 0.04]], 'message: drawer(3.26, 100.00, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.10], [\"QUARTER\", 4.25], [\"ONE\", 90.00], [\"FIVE\", 55.00], [\"TEN\", 20.00], [\"TWENTY\", 60.00], [\"ONE HUNDRED\", 100.00]]) should return [[\"TWENTY\", 60.00], [\"TEN\", 20.00], [\"FIVE\", 15], [\"ONE\", 1], [\"QUARTER\", 0.50], [\"DIME\", 0.20], [\"PENNY\", 0.04]].');", + "assert.deepEqual(drawer(19.50, 20.00, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]), \"Insufficient Funds\", 'message: drawer(19.50, 20.00, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]) should return \"Insufficient Funds\".');", + "assert.deepEqual(drawer(19.50, 20.00, [[\"PENNY\", 0.50], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]), \"Closed\", 'message: drawer(19.50, 20.00, [[\"PENNY\", 0.50], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]) should return \"Closed\".');" ], "MDNlinks": [ "Global Object" diff --git a/seed/challenges/automated-testing-and-debugging.json b/seed/challenges/automated-testing-and-debugging.json index 2fbb5352d7..294739a6ca 100644 --- a/seed/challenges/automated-testing-and-debugging.json +++ b/seed/challenges/automated-testing-and-debugging.json @@ -13,7 +13,7 @@ "console.log('Hello world!')" ], "tests":[ - "assert(editor.getValue().match(/console\\.log\\(/gi), 'You should use the console.log method to log \"Hello world!\" to your JavaScript console.');" + "assert(editor.getValue().match(/console\\.log\\(/gi), 'message: You should use the console.log method to log \"Hello world!\" to your JavaScript console.');" ], "challengeSeed":[ "", @@ -37,10 +37,10 @@ "console.log(typeof({}));" ], "tests":[ - "assert(editor.getValue().match(/console\\.log\\(typeof\\(\"\"\\)\\);/gi), 'You should console.log the typeof a string.');", - "assert(editor.getValue().match(/console\\.log\\(typeof\\(0\\)\\);/gi), 'You should console.log the typeof a number.');", - "assert(editor.getValue().match(/console\\.log\\(typeof\\(\\[\\]\\)\\);/gi), 'You should console.log the typeof an array.');", - "assert(editor.getValue().match(/console\\.log\\(typeof\\(\\{\\}\\)\\);/gi), 'You should console.log the typeof a object.');" + "assert(editor.getValue().match(/console\\.log\\(typeof\\(\"\"\\)\\);/gi), 'message: You should console.log the typeof a string.');", + "assert(editor.getValue().match(/console\\.log\\(typeof\\(0\\)\\);/gi), 'message: You should console.log the typeof a number.');", + "assert(editor.getValue().match(/console\\.log\\(typeof\\(\\[\\]\\)\\);/gi), 'message: You should console.log the typeof an array.');", + "assert(editor.getValue().match(/console\\.log\\(typeof\\(\\{\\}\\)\\);/gi), 'message: You should console.log the typeof a object.');" ], "challengeSeed":[ "", diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index e3542ee41d..95d0884101 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -17,9 +17,9 @@ "And one more thing you need to notice. Starting at this waypoint in JavaScript related challenges (except AngularJS, all Ziplines, Git, Node.js and Express.js, MongoDB and Full Stack JavaScript Projects) you can see contents of assert() functions (in some challenges except(), assert.equal() and so on) which are used to test your code. It's part of these challenges that you are able to see the tests that are running against your code." ], "tests":[ - "assert(editor.getValue().match(/(\\/\\/)...../g), 'Create a // style comment that contains at least five letters');", - "assert(editor.getValue().match(/(\\/\\*)[\\w\\W]{5,}(?=\\*\\/)/gm), 'Create a /* */ style comment that contains at least five letters.');", - "assert(editor.getValue().match(/(\\*\\/)/g), 'Make sure that you close the comment with a */');" + "assert(editor.getValue().match(/(\\/\\/)...../g), 'message: Create a // style comment that contains at least five letters');", + "assert(editor.getValue().match(/(\\/\\*)[\\w\\W]{5,}(?=\\*\\/)/gm), 'message: Create a /* */ style comment that contains at least five letters.');", + "assert(editor.getValue().match(/(\\*\\/)/g), 'message: Make sure that you close the comment with a */');" ], "challengeSeed":[ ], @@ -36,8 +36,8 @@ "Let's modify our welcomeToBooleansfunction so that it will return trueinstead of falsewhen the run button is clicked." ], "tests": [ - "assert(typeof(welcomeToBooleans()) === 'boolean', 'The welcomeToBooleans() function should return a boolean (true/false) value.');", - "assert(welcomeToBooleans() === true, 'welcomeToBooleans() should return true.');" + "assert(typeof(welcomeToBooleans()) === 'boolean', 'message: The welcomeToBooleans() function should return a boolean (true/false) value.');", + "assert(welcomeToBooleans() === true, 'message: welcomeToBooleans() should return true.');" ], "challengeSeed": [ "function welcomeToBooleans() {", @@ -66,7 +66,7 @@ "Look at the ourName example if you get stuck." ], "tests": [ - "assert((function(){if(typeof(myName) !== \"undefined\" && typeof(myName) === \"string\" && myName.length > 0){return true;}else{return false;}})(), 'myName should be a string that contains at least one character in it.');" + "assert((function(){if(typeof(myName) !== \"undefined\" && typeof(myName) === \"string\" && myName.length > 0){return true;}else{return false;}})(), 'message: myName should be a string that contains at least one character in it.');" ], "challengeSeed": [ "// var ourName = \"Free Code Camp\";", @@ -90,8 +90,8 @@ "Now let's create two new string variables: myFirstNameand myLastName and assign them the values of your first and last name, respectively." ], "tests": [ - "assert((function(){if(typeof(myFirstName) !== \"undefined\" && typeof(myFirstName) === \"string\" && myFirstName.length > 0){return true;}else{return false;}})(), 'myFirstName should be a string with at least one character in it.');", - "assert((function(){if(typeof(myLastName) !== \"undefined\" && typeof(myLastName) === \"string\" && myLastName.length > 0){return true;}else{return false;}})(), 'myLastName should be a string with at least one character in it.');" + "assert((function(){if(typeof(myFirstName) !== \"undefined\" && typeof(myFirstName) === \"string\" && myFirstName.length > 0){return true;}else{return false;}})(), 'message: myFirstName should be a string with at least one character in it.');", + "assert((function(){if(typeof(myLastName) !== \"undefined\" && typeof(myLastName) === \"string\" && myLastName.length > 0){return true;}else{return false;}})(), 'message: myLastName should be a string with at least one character in it.');" ], "challengeSeed": [ "// var name = \"Alan Turing\";", @@ -117,8 +117,8 @@ "Use the .length property to count the number of characters in the lastName variable." ], "tests": [ - "assert((function(){if(typeof(lastNameLength) !== \"undefined\" && typeof(lastNameLength) === \"number\" && lastNameLength === 8){return true;}else{return false;}})(), 'lastNameLength should be equal to eight.');", - "assert((function(){if(editor.getValue().match(/\\.length/gi) && editor.getValue().match(/\\.length/gi).length >= 2 && editor.getValue().match(/var lastNameLength \\= 0;/gi) && editor.getValue().match(/var lastNameLength \\= 0;/gi).length >= 1){return true;}else{return false;}})(), 'You should be getting the length of lastName by using .length like this: lastName.length.');" + "assert((function(){if(typeof(lastNameLength) !== \"undefined\" && typeof(lastNameLength) === \"number\" && lastNameLength === 8){return true;}else{return false;}})(), 'message: lastNameLength should be equal to eight.');", + "assert((function(){if(editor.getValue().match(/\\.length/gi) && editor.getValue().match(/\\.length/gi).length >= 2 && editor.getValue().match(/var lastNameLength \\= 0;/gi) && editor.getValue().match(/var lastNameLength \\= 0;/gi).length >= 1){return true;}else{return false;}})(), 'message: You should be getting the length of lastName by using .length like this: lastName.length.');" ], "challengeSeed": [ "var firstNameLength = 0;", @@ -155,7 +155,7 @@ "Try looking at the firstLetterOfFirstName variable declaration if you get stuck." ], "tests": [ - "assert((function(){if(typeof(firstLetterOfLastName) !== \"undefined\" && editor.getValue().match(/\\[0\\]/gi) && typeof(firstLetterOfLastName) === \"string\" && firstLetterOfLastName === \"L\"){return true;}else{return false;}})(), 'The first letter of firstLetterOfLastName should be a \"L\".');" + "assert((function(){if(typeof(firstLetterOfLastName) !== \"undefined\" && editor.getValue().match(/\\[0\\]/gi) && typeof(firstLetterOfLastName) === \"string\" && firstLetterOfLastName === \"L\"){return true;}else{return false;}})(), 'message: The first letter of firstLetterOfLastName should be a \"L\".');" ], "challengeSeed": [ "var firstLetterOfFirstName = \"\";", @@ -189,7 +189,7 @@ "Try looking at the secondLetterOfFirstName variable declaration if you get stuck." ], "tests": [ - "assert(thirdLetterOfLastName === 'v', 'The third letter of lastName should be a \"v\".');" + "assert(thirdLetterOfLastName === 'v', 'message: The third letter of lastName should be a \"v\".');" ], "challengeSeed": [ "var firstName = \"Ada\";", @@ -220,8 +220,8 @@ "Try looking at the lastLetterOfFirstName variable declaration if you get stuck." ], "tests": [ - "assert(lastLetterOfLastName === \"e\", 'lastLetterOfLastName should be \"e\".');", - "assert(editor.getValue().match(/\\.length/g).length === 2, 'You have to use .length to get the last letter.');" + "assert(lastLetterOfLastName === \"e\", 'message: lastLetterOfLastName should be \"e\".');", + "assert(editor.getValue().match(/\\.length/g).length === 2, 'message: You have to use .length to get the last letter.');" ], "challengeSeed": [ "var firstName = \"Ada\";", @@ -252,8 +252,8 @@ "Try looking at the thirdToLastLetterOfFirstName variable declaration if you get stuck." ], "tests": [ - "assert(secondToLastLetterOfLastName === 'c', 'secondToLastLetterOfLastName should be \"c\".');", - "assert(editor.getValue().match(/\\.length/g).length === 2, 'You have to use .length to get the second last letter.');" + "assert(secondToLastLetterOfLastName === 'c', 'message: secondToLastLetterOfLastName should be \"c\".');", + "assert(editor.getValue().match(/\\.length/g).length === 2, 'message: You have to use .length to get the second last letter.');" ], "challengeSeed": [ "var firstName = \"Ada\";", @@ -283,7 +283,7 @@ "Replace the 0 with the correct number so you can get the result mentioned in the comment." ], "tests": [ - "assert((function(){if(sum === 20 && editor.getValue().match(/\\+/g).length >= 2){return true;}else{return false;}})(), 'Make the variable sum equal 20.');" + "assert((function(){if(sum === 20 && editor.getValue().match(/\\+/g).length >= 2){return true;}else{return false;}})(), 'message: Make the variable sum equal 20.');" ], "challengeSeed": [ "var sum = 10 + 0; //make this equal to 20 by changing the 0 into the appropriate number.", @@ -306,7 +306,7 @@ "Replace the 0 with the correct number so you can get the result mentioned in the comment." ], "tests": [ - "assert((function(){if(difference === 12 && editor.getValue().match(/\\-/g)){return true;}else{return false;}})(), 'Make the variable difference equal 12.');" + "assert((function(){if(difference === 12 && editor.getValue().match(/\\-/g)){return true;}else{return false;}})(), 'message: Make the variable difference equal 12.');" ], "challengeSeed": [ "var difference = 45 - 0; //make this equal to 12 by changing the 0 into the appropriate number.", @@ -329,7 +329,7 @@ "Replace the 0 with the correct number so you can get the result mentioned in the comment." ], "tests": [ - "assert((function(){if(product === 80 && editor.getValue().match(/\\*/g)){return true;}else{return false;}})(), 'Make the variable product equal 80.');" + "assert((function(){if(product === 80 && editor.getValue().match(/\\*/g)){return true;}else{return false;}})(), 'message: Make the variable product equal 80.');" ], "challengeSeed": [ "var product = 8 * 0; // Make this equal to 80 by changing the 0 into the appropriate number.", @@ -352,7 +352,7 @@ "Replace the 0 with the correct number so you can get the result mentioned in the comment." ], "tests": [ - "assert((function(){if(quotient === 2 && editor.getValue().match(/var\\s*?quotient\\s*?\\=\\s*?\\d+\\s*?\\/\\s*?\\d+\\s*?;/g)){return true;}else{return false;}})(), 'Make the variable quotient equal 2.');" + "assert((function(){if(quotient === 2 && editor.getValue().match(/var\\s*?quotient\\s*?\\=\\s*?\\d+\\s*?\\/\\s*?\\d+\\s*?;/g)){return true;}else{return false;}})(), 'message: Make the variable quotient equal 2.');" ], "challengeSeed": [ "var quotient = 66 / 0; //make this equal to 2 by changing the 0 into the appropriate number.", @@ -374,7 +374,7 @@ "Let's create a variable myDecimal and give it a decimal value." ], "tests": [ - "assert((function(){if(typeof(myDecimal) !== \"undefined\" && typeof(myDecimal) === \"number\" && editor.getValue().match(/\\./g).length >=2){return true;}else{return false;}})(), 'myDecimal should be a decimal point number.');" + "assert((function(){if(typeof(myDecimal) !== \"undefined\" && typeof(myDecimal) === \"number\" && editor.getValue().match(/\\./g).length >=2){return true;}else{return false;}})(), 'message: myDecimal should be a decimal point number.');" ], "challengeSeed": [ "// var ourDecimal = 5.7;", @@ -399,8 +399,8 @@ "Replace the 0.0 with the correct number so that you get the result mentioned in the comments." ], "tests": [ - "assert((function(){if(product === 5.0 && editor.getValue().match(/\\*/g)){return true;}else{return false;}})(), 'Make the variable product equal 5.0.');", - "assert((function(){if(quotient === 2.2 && editor.getValue().match(/\\//g)){return true;}else{return false;}})(), 'Make the variable quotient equal 2.2.');" + "assert((function(){if(product === 5.0 && editor.getValue().match(/\\*/g)){return true;}else{return false;}})(), 'message: Make the variable product equal 5.0.');", + "assert((function(){if(quotient === 2.2 && editor.getValue().match(/\\//g)){return true;}else{return false;}})(), 'message: Make the variable quotient equal 2.2.');" ], "challengeSeed": [ "var quotient = 4.4 / 2.0; // equals 2.2", @@ -426,9 +426,9 @@ "Refer to the commented code in the text editor if you get stuck." ], "tests": [ - "assert(typeof(myArray) == 'object', 'myArray should be an array.');", - "assert(typeof(myArray[0]) !== 'undefined' && typeof(myArray[0]) == 'string', 'The first item in myArray should be a string.');", - "assert(typeof(myArray[1]) !== 'undefined' && typeof(myArray[1]) == 'number', 'The second item in myArray should be a number.');" + "assert(typeof(myArray) == 'object', 'message: myArray should be an array.');", + "assert(typeof(myArray[0]) !== 'undefined' && typeof(myArray[0]) == 'string', 'message: The first item in myArray should be a string.');", + "assert(typeof(myArray[1]) !== 'undefined' && typeof(myArray[1]) == 'number', 'message: The second item in myArray should be a number.');" ], "challengeSeed": [ "// var array = [\"John\", 23];", @@ -454,7 +454,7 @@ "Let's now go create a nested array called myArray." ], "tests":[ - "assert(Array.isArray(myArray) && myArray.some(Array.isArray), 'myArray should have at least one array nested within another array.');" + "assert(Array.isArray(myArray) && myArray.some(Array.isArray), 'message: myArray should have at least one array nested within another array.');" ], "challengeSeed":[ "var ourArray = [[\"the universe\", \"everything\", 42]];", @@ -484,7 +484,7 @@ "Create a variable called myData and set it to equal the first value of myArray." ], "tests":[ - "assert((function(){if(typeof(myArray) != 'undefined' && typeof(myData) != 'undefined' && myArray[0] == myData){return true;}else{return false;}})(), 'The variable myData should equal the first value of myArray.');" + "assert((function(){if(typeof(myArray) != 'undefined' && typeof(myData) != 'undefined' && myArray[0] == myData){return true;}else{return false;}})(), 'message: The variable myData should equal the first value of myArray.');" ], "challengeSeed":[ "// var ourArray = [1,2,3];", @@ -514,8 +514,8 @@ "Now modify the data stored at index 0 of myArray to the value of 3." ], "tests":[ - "assert((function(){if(typeof(myArray) != 'undefined' && myArray[0] == 3 && myArray[1] == 2 && myArray[2] == 3){return true;}else{return false;}})(), 'myArray should now be [3,2,3].');", - "assert((function(){if(editor.getValue().match(/myArray\\[0\\]\\s?=\\s?/g)){return true;}else{return false;}})(), 'You should be using correct index to modify the value in myArray.');" + "assert((function(){if(typeof(myArray) != 'undefined' && myArray[0] == 3 && myArray[1] == 2 && myArray[2] == 3){return true;}else{return false;}})(), 'message: myArray should now be [3,2,3].');", + "assert((function(){if(editor.getValue().match(/myArray\\[0\\]\\s?=\\s?/g)){return true;}else{return false;}})(), 'message: You should be using correct index to modify the value in myArray.');" ], "challengeSeed":[ "var ourArray = [1,2,3];", @@ -544,8 +544,8 @@ "Use the .pop() function to remove the last item from myArray." ], "tests": [ - "assert((function(d){if(d[0] == 'John' && d[1] == 23 && d[2] == undefined){return true;}else{return false;}})(myArray), 'myArray should only have the first two values left([\"John\", 23]).');", - "assert((function(d){if(d[0] == 'cat' && d[1] == 2 && d[2] == undefined){return true;}else{return false;}})(removed), 'removed should only have the first two values left([\"cat\"], 2).');" + "assert((function(d){if(d[0] == 'John' && d[1] == 23 && d[2] == undefined){return true;}else{return false;}})(myArray), 'message: myArray should only contain [\"John\", 23].');", + "assert((function(d){if(d[0] == 'cat' && d[1] == 2 && d[2] == undefined){return true;}else{return false;}})(removed), 'message: removed should only contain [\"cat\"], 2.');" ], "challengeSeed": [ "// var numbers = [1,2,3];", @@ -576,7 +576,7 @@ "Take the myArray array and push() this value to the end of it: [\"dog\", 3]." ], "tests": [ - "assert((function(d){if(d[2] != undefined && d[0] == 'John' && d[1] == 23 && d[2][0] == 'dog' && d[2][1] == 3 && d[2].length == 2){return true;}else{return false;}})(myArray), 'myArray should only have the first two values left([\"John\", 23, [\"dog\", 3]]).');" + "assert((function(d){if(d[2] != undefined && d[0] == 'John' && d[1] == 23 && d[2][0] == 'dog' && d[2][1] == 3 && d[2].length == 2){return true;}else{return false;}})(myArray), 'message: myArray should now equal [\"John\", 23, [\"dog\", 3]].');" ], "challengeSeed": [ "var ourArray = [\"Stimpson\", \"J\", [\"cat\"]];", @@ -607,8 +607,8 @@ "Take the myArray array and shift() the first value off of it. Set myRemoved to the first value of myArray using shift()." ], "tests": [ - "assert((function(d){if(d[0] == 23 && d[1][0] == 'dog' && d[1][1] == 3 && d[2] == undefined){return true;}else{return false;}})(myArray), 'myArray should only have the last two values left([23, [\"dog\", 3]]).');", - "assert((function(d){if(d === 'John' && typeof(myRemoved) === 'string'){return true;}else{return false;}})(myRemoved), 'myRemoved should contain \"John\".');" + "assert((function(d){if(d[0] == 23 && d[1][0] == 'dog' && d[1][1] == 3 && d[2] == undefined){return true;}else{return false;}})(myArray), 'message: myArray should now equal [23, [\"dog\", 3]].');", + "assert((function(d){if(d === 'John' && typeof(myRemoved) === 'string'){return true;}else{return false;}})(myRemoved), 'message: myRemoved should contain \"John\".');" ], "challengeSeed": [ "var ourArray = [\"Stimpson\", \"J\", [\"cat\"]];", @@ -638,7 +638,7 @@ "Let's take the code we had last time and unshiftthis value to the start: \"Paul\"." ], "tests": [ - "assert((function(d){if(typeof(d[0]) === \"string\" && d[0].toLowerCase() == 'paul' && d[1] == 23 && d[2][0] != undefined && d[2][0] == 'dog' && d[2][1] != undefined && d[2][1] == 3){return true;}else{return false;}})(myArray), 'myArray should now have [\"Paul\", 23, [\"dog\", 3]]).');" + "assert((function(d){if(typeof(d[0]) === \"string\" && d[0].toLowerCase() == 'paul' && d[1] == 23 && d[2][0] != undefined && d[2][0] == 'dog' && d[2][1] != undefined && d[2][1] == 3){return true;}else{return false;}})(myArray), 'message: myArray should now have [\"Paul\", 23, [\"dog\", 3]]).');" ], "challengeSeed": [ "var ourArray = [\"Stimpson\", \"J\", [\"cat\"]];", @@ -677,7 +677,7 @@ "Create and call a function called myFunction that returns the sum of a and b." ], "tests":[ - "assert((function(){if(typeof(f) !== \"undefined\" && f === a + b){return true;}else{return false;}})(), 'Your function should return the value of a + b');" + "assert((function(){if(typeof(f) !== \"undefined\" && f === a + b){return true;}else{return false;}})(), 'message: Your function should return the value of a + b');" ], "challengeSeed":[ "var a = 4;", @@ -723,10 +723,10 @@ "Let's try to make an object that represents a dog called myDog which contains the properties 'name' (String), 'legs' (Number), 'tails' (Number) and 'friends' (Array)!" ], "tests":[ - "assert((function(z){if(z.hasOwnProperty(\"name\") && z.name !== undefined && typeof(z.name) === \"string\"){return true;}else{return false;}})(myDog), 'myDog should contain the property name and it should be a string.');", - "assert((function(z){if(z.hasOwnProperty(\"legs\") && z.legs !== undefined && typeof(z.legs) === \"number\"){return true;}else{return false;}})(myDog), 'myDog should contain the property legs and it should be a number.');", - "assert((function(z){if(z.hasOwnProperty(\"tails\") && z.tails !== undefined && typeof(z.tails) === \"number\"){return true;}else{return false;}})(myDog), 'myDog should contain the property tails and it should be a number.');", - "assert((function(z){if(z.hasOwnProperty(\"friends\") && z.friends !== undefined && Array.isArray(z.friends)){return true;}else{return false;}})(myDog), 'myDog should contain the property friends and it should be an array.');" + "assert((function(z){if(z.hasOwnProperty(\"name\") && z.name !== undefined && typeof(z.name) === \"string\"){return true;}else{return false;}})(myDog), 'message: myDog should contain the property name and it should be a string.');", + "assert((function(z){if(z.hasOwnProperty(\"legs\") && z.legs !== undefined && typeof(z.legs) === \"number\"){return true;}else{return false;}})(myDog), 'message: myDog should contain the property legs and it should be a number.');", + "assert((function(z){if(z.hasOwnProperty(\"tails\") && z.tails !== undefined && typeof(z.tails) === \"number\"){return true;}else{return false;}})(myDog), 'message: myDog should contain the property tails and it should be a number.');", + "assert((function(z){if(z.hasOwnProperty(\"friends\") && z.friends !== undefined && Array.isArray(z.friends)){return true;}else{return false;}})(myDog), 'message: myDog should contain the property friends and it should be an array.');" ], "challengeSeed":[ "// var ourDog = {", @@ -765,8 +765,8 @@ "Let's add the property \"bark\", and delete the property \"tails\"." ], "tests":[ - "assert(myDog.bark !== undefined, 'Add the property \"bark\" to myDog.');", - "assert(myDog.tails === undefined, 'Delete the property \"tails\" from myDog.');" + "assert(myDog.bark !== undefined, 'message: Add the property \"bark\" to myDog.');", + "assert(myDog.tails === undefined, 'message: Delete the property \"tails\" from myDog.');" ], "challengeSeed":[ "// var ourDog = {", @@ -816,8 +816,8 @@ "Let's try getting a for loop to work by pushing values to an array." ], "tests":[ - "assert(editor.getValue().match(/for/g), 'You should be using a for loop for this.');", - "assert.deepEqual(myArray, [0,1,2,3,4], 'myArray should equal [0,1,2,3,4].');" + "assert(editor.getValue().match(/for/g), 'message: You should be using a for loop for this.');", + "assert.deepEqual(myArray, [0,1,2,3,4], 'message: myArray should equal [0,1,2,3,4].');" ], "challengeSeed":[ "ourArray = [];", @@ -855,8 +855,8 @@ "Let's try getting a while loop to work by pushing values to an array." ], "tests":[ - "assert(editor.getValue().match(/while/g), 'You should be using a while loop for this.');", - "assert.deepEqual(myArray, [0,1,2,3,4], 'myArray should equal [0,1,2,3,4].');" + "assert(editor.getValue().match(/while/g), 'message: You should be using a while loop for this.');", + "assert.deepEqual(myArray, [0,1,2,3,4], 'message: myArray should equal [0,1,2,3,4].');" ], "challengeSeed":[ "var myArray = [];", @@ -883,9 +883,9 @@ "Use Math.random() to get myFunction to return a random number." ], "tests":[ - "assert(typeof(myFunction()) === \"number\", 'myFunction should return a random number.');", - "assert((myFunction()+''). match(/\\./g), 'The number returned by myFunction should be a decimal.');", - "assert(editor.getValue().match(/Math\\.random/g).length >= 2, 'You should be using Math.random to generate the random decimal number.');" + "assert(typeof(myFunction()) === \"number\", 'message: myFunction should return a random number.');", + "assert((myFunction()+''). match(/\\./g), 'message: The number returned by myFunction should be a decimal.');", + "assert(editor.getValue().match(/Math\\.random/g).length >= 2, 'message: You should be using Math.random to generate the random decimal number.');" ], "challengeSeed":[ "function myFunction() {", @@ -916,10 +916,10 @@ "Let's give this technique a go now." ], "tests":[ - "assert(typeof(myFunction()) === \"number\", 'The result of myFunction should be a number.');", - "assert(editor.getValue().match(/Math.random/g), 'You should be using Math.random to create a random number.');", - "assert(editor.getValue().match(/\\(\\s*?Math.random\\s*?\\(\\s*?\\)\\s*?\\*\\s*?10\\s*?\\)/g) || editor.getValue().match(/\\(\\s*?10\\s*?\\*\\s*?Math.random\\s*?\\(\\s*?\\)\\s*?\\)/g), 'You should have multiplied the result of Math.random by 10 to make it a number that\\'s between zero and nine.');", - "assert(editor.getValue().match(/Math.floor/g), 'You should use Math.floor to remove the decimal part of the number.');" + "assert(typeof(myFunction()) === \"number\", 'message: The result of myFunction should be a number.');", + "assert(editor.getValue().match(/Math.random/g), 'message: You should be using Math.random to create a random number.');", + "assert(editor.getValue().match(/\\(\\s*?Math.random\\s*?\\(\\s*?\\)\\s*?\\*\\s*?10\\s*?\\)/g) || editor.getValue().match(/\\(\\s*?10\\s*?\\*\\s*?Math.random\\s*?\\(\\s*?\\)\\s*?\\)/g), 'message: You should have multiplied the result of Math.random by 10 to make it a number that is between zero and nine.');", + "assert(editor.getValue().match(/Math.floor/g), 'message: You should use Math.floor to remove the decimal part of the number.');" ], "challengeSeed":[ "function myFunction(){", @@ -948,10 +948,10 @@ "By using this, we can control the output of a random number." ], "tests":[ - "assert(myFunction() >= min, 'The random number that\\'s generated by myFunction should be greater than or equal to the minimum number');", - "assert(myFunction() <= max, 'The random number that\\'s generated by myFunction should be less than or equal to the maximum number');", - "assert(myFunction() % 1 === 0 , 'The random number that\\'s generated by myFunction should be an integer');", - "assert((function(){if(editor.getValue().match(/max/g).length >= 2 && editor.getValue().match(/min/g).length >= 2 && editor.getValue().match(/Math.floor/g) && editor.getValue().match(/Math.random/g)){return true;}else{return false;}})(), 'You should be using the function given in the description to calculate the random in number in a range');" + "assert(myFunction() >= min, 'message: The random number generated by myFunction should be greater than or equal to the minimum number.');", + "assert(myFunction() <= max, 'message: The random number generated by myFunction should be less than or equal to the maximum number.');", + "assert(myFunction() % 1 === 0 , 'message: The random number generated by myFunction should be an integer, not a decimal.');", + "assert((function(){if(editor.getValue().match(/max/g).length >= 2 && editor.getValue().match(/min/g).length >= 2 && editor.getValue().match(/Math.floor/g) && editor.getValue().match(/Math.random/g)){return true;}else{return false;}})(), 'message: You should be using the function given in the description to calculate the random in number in a range.');" ], "challengeSeed":[ "var min = 0;", @@ -987,10 +987,10 @@ "Create if and else statements to return the string \"heads\" if the flip variable is zero, or else return the string \"tails\" if the flip variable is not zero." ], "tests":[ - "assert((function(){var result = myFunction();if(result === 'heads' || result === 'tails'){return true;} else {return false;}})(), 'myFunction should either return heads or tails.');", - "assert((function(){var result = myFunction();if(result === 'heads' && flip === 0 || result === 'tails' && flip !== 0){return true;} else {return false;}})(), 'myFunction should return heads when flip equals 0 and tails when flip equals 1.');", - "assert(editor.getValue().match(/if/g).length >= 4, 'You should have created a new if statement.');", - "assert(editor.getValue().match(/else/g).length >= 2, 'You should have created a new else statement.');" + "assert((function(){var result = myFunction();if(result === 'heads' || result === 'tails'){return true;} else {return false;}})(), 'message: myFunction should either return heads or tails.');", + "assert((function(){var result = myFunction();if(result === 'heads' && flip === 0 || result === 'tails' && flip !== 0){return true;} else {return false;}})(), 'message: myFunction should return heads when flip equals 0 and tails when flip equals 1.');", + "assert(editor.getValue().match(/if/g).length >= 4, 'message: You should have created a new if statement.');", + "assert(editor.getValue().match(/else/g).length >= 2, 'message: You should have created a new else statement.');" ], "challengeSeed":[ "var flip = Math.floor(Math.random() * (1 - 0 + 1)) + 0;", @@ -1025,8 +1025,8 @@ "Let's try selecting all the occurrences of the word and in the string Ada Lovelace and Charles Babbage designed the first computer and the software that would have run on it. We can do this by replacing the . part of our regular expression with the current regular expression with the word and." ], "tests":[ - "assert(test==2, 'Your regular expression should find two occurrences of the word and.');", - "assert(editor.getValue().match(/\\/and\\/gi/), 'You should have used regular expressions to find the word and.');" + "assert(test==2, 'message: Your regular expression should find two occurrences of the word and.');", + "assert(editor.getValue().match(/\\/and\\/gi/), 'message: You should have used regular expressions to find the word and.');" ], "challengeSeed":[ "var test = (function() {", @@ -1056,8 +1056,8 @@ "Use the \\d selector to select the number of numbers in the string, allowing for the possibility of multi-digit numbers." ], "tests":[ - "assert(test === 2, 'Your RegEx should have found two numbers in the testString.');", - "assert(editor.getValue().match(/\\/\\\\d\\+\\//gi), 'You should be using the following expression /\\\\d+/gi to find the numbers in the testString.');" + "assert(test === 2, 'message: Your RegEx should have found two numbers in the testString.');", + "assert(editor.getValue().match(/\\/\\\\d\\+\\//gi), 'message: You should be using the following expression /\\\\d+/gi to find the numbers in the testString.');" ], "challengeSeed":[ "var test = (function() {", @@ -1086,8 +1086,8 @@ "Select all the spaces in the sentence string." ], "tests":[ - "assert(test === 7, 'Your RegEx should have found seven spaces in the testString.');", - "assert(editor.getValue().match(/\\/\\\\s\\+\\//gi), 'You should be using the following expression /\\\\s+/gi to find the spaces in the testString.');" + "assert(test === 7, 'message: Your RegEx should have found seven spaces in the testString.');", + "assert(editor.getValue().match(/\\/\\\\s\\+\\//gi), 'message: You should be using the following expression /\\\\s+/gi to find the spaces in the testString.');" ], "challengeSeed":[ "var test = (function(){", @@ -1114,8 +1114,8 @@ "You can invert any match by using the uppercase version of the selector \\s versus \\S for example." ], "tests":[ - "assert(test === 49, 'Your RegEx should have found forty nine non-space characters in the testString.');", - "assert(editor.getValue().match(/\\/\\\\S\\/gi/gi), 'You should be using the following expression /\\\\S/gi to find non-space characters in the testString.');" + "assert(test === 49, 'message: Your RegEx should have found forty nine non-space characters in the testString.');", + "assert(editor.getValue().match(/\\/\\\\S\\/gi/gi), 'message: You should be using the following expression /\\\\S/gi to find non-space characters in the testString.');" ], "challengeSeed":[ "var test = (function(){", @@ -1145,10 +1145,10 @@ "Math.floor(Math.random() * (3 - 1 + 1)) + 1;" ], "tests":[ - "assert(typeof(runSlots($(\".slot\"))[0]) === \"number\", 'slotOne should be a random number.')", - "assert(typeof(runSlots($(\".slot\"))[1]) === \"number\", 'slotTwo should be a random number.')", - "assert(typeof(runSlots($(\".slot\"))[2]) === \"number\", 'slotThree should be a random number.')", - "assert((function(){if(editor.match(/Math\\.floor\\(\\s?Math\\.random\\(\\)\\s?\\*\\s?\\(\\s?3\\s?\\-\\s?1\\s?\\+\\s?1\\s?\\)\\s?\\)\\s?\\+\\s?1;/gi) !== null){return editor.match(/Math\\.floor\\(\\s?Math\\.random\\(\\)\\s?\\*\\s?\\(\\s?3\\s?\\-\\s?1\\s?\\+\\s?1\\s?\\)\\s?\\)\\s?\\+\\s?1;/gi).length >= 3;}else{return false;}})(), 'You should have used Math.floor(Math.random() * (3 - 1 + 1)) + 1; three times to generate your random numbers.')" + "assert(typeof(runSlots($(\".slot\"))[0]) === \"number\", 'message: slotOne should be a random number.')", + "assert(typeof(runSlots($(\".slot\"))[1]) === \"number\", 'message: slotTwo should be a random number.')", + "assert(typeof(runSlots($(\".slot\"))[2]) === \"number\", 'message: slotThree should be a random number.')", + "assert((function(){if(editor.match(/Math\\.floor\\(\\s?Math\\.random\\(\\)\\s?\\*\\s?\\(\\s?3\\s?\\-\\s?1\\s?\\+\\s?1\\s?\\)\\s?\\)\\s?\\+\\s?1;/gi) !== null){return editor.match(/Math\\.floor\\(\\s?Math\\.random\\(\\)\\s?\\*\\s?\\(\\s?3\\s?\\-\\s?1\\s?\\+\\s?1\\s?\\)\\s?\\)\\s?\\+\\s?1;/gi).length >= 3;}else{return false;}})(), 'message: You should have used Math.floor(Math.random() * (3 - 1 + 1)) + 1; three times to generate your random numbers.')" ], "challengeSeed":[ "fccss", @@ -1615,7 +1615,7 @@ }, { "id":"cf1111c1c11feddfaeb1bdff", - "title": "Give your JavaScript Slot Machine some stylish images", + "title": "Give your JavaScript Slot Machine some Stylish Images", "difficulty":"9.9901", "description":[ "Now let's add some images to our slots.", diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json index 2b89e9f6c0..ea84d904db 100644 --- a/seed/challenges/object-oriented-and-functional-programming.json +++ b/seed/challenges/object-oriented-and-functional-programming.json @@ -20,9 +20,9 @@ "Give your motorBike object a wheels, engines and seats attribute and set them to numbers." ], "tests":[ - "assert(typeof(motorBike.engines) === 'number', 'motorBike should have a engines attribute set to a number.');", - "assert(typeof(motorBike.wheels) === 'number', 'motorBike should have a wheels attribute set to a number.');", - "assert(typeof(motorBike.seats) === 'number', 'motorBike should have a seats attribute set to a number.');" + "assert(typeof(motorBike.engines) === 'number', 'message: motorBike should have a engines attribute set to a number.');", + "assert(typeof(motorBike.wheels) === 'number', 'message: motorBike should have a wheels attribute set to a number.');", + "assert(typeof(motorBike.seats) === 'number', 'message: motorBike should have a seats attribute set to a number.');" ], "challengeSeed":[ "//Here is a sample Object", @@ -57,9 +57,9 @@ "Give your myMotorBike object a wheels, engines and seats attribute and set them to numbers." ], "tests":[ - "assert(typeof((new MotorBike()).engines) === 'number', 'myMotorBike should have a engines attribute set to a number.');", - "assert(typeof((new MotorBike()).wheels) === 'number', 'myMotorBike should have a wheels attribute set to a number.');", - "assert(typeof((new MotorBike()).seats) === 'number', 'myMotorBike should have a seats attribute set to a number.');" + "assert(typeof((new MotorBike()).engines) === 'number', 'message: myMotorBike should have a engines attribute set to a number.');", + "assert(typeof((new MotorBike()).wheels) === 'number', 'message: myMotorBike should have a wheels attribute set to a number.');", + "assert(typeof((new MotorBike()).seats) === 'number', 'message: myMotorBike should have a seats attribute set to a number.');" ], "challengeSeed":[ "// Let's add the properties engines and seats to the car in the same way that the property wheels has been added below. They should both be numbers.", @@ -98,9 +98,9 @@ "See if you can keep myBike.speed and myBike.addUnit private, while making myBike.getSpeed publicly accessible." ], "tests":[ - "assert(typeof(myBike.getSpeed)!=='undefined' && typeof(myBike.getSpeed) === 'function', 'The method getSpeed of myBike should be accessible outside the object');", - "assert(typeof(myBike.speed) === 'undefined', 'myBike.speed should remain undefined.');", - "assert(typeof(myBike.addUnit) === 'undefined', 'myBike.addUnit should remain undefined.');" + "assert(typeof(myBike.getSpeed)!=='undefined' && typeof(myBike.getSpeed) === 'function', 'message: The method getSpeed of myBike should be accessible outside the object.');", + "assert(typeof(myBike.speed) === 'undefined', 'message: myBike.speed should remain undefined.');", + "assert(typeof(myBike.addUnit) === 'undefined', 'message: myBike.addUnit should remain undefined.');" ], "challengeSeed":[ "//Let's create an object with a two functions. One attached as a property and one not.", @@ -149,10 +149,10 @@ "Then you can give the instance new properties." ], "tests":[ - "assert((new Car()).wheels === 4, 'The property wheels should still be 4 like in the object constructor');", - "assert(typeof((new Car()).engines) === 'undefined', 'There should not be a property engine in the object constructor');", - "assert(myCar.wheels === 4, 'The property wheels of myCar should be four');", - "assert(typeof(myCar.engines) === 'number', 'The property engine of myCar should be a number');" + "assert((new Car()).wheels === 4, 'message: The property wheels should still be 4 like in the object constructor.');", + "assert(typeof((new Car()).engines) === 'undefined', 'message: There should not be a property engines in the object constructor.');", + "assert(myCar.wheels === 4, 'message: The property wheels of myCar should equal 4.');", + "assert(typeof(myCar.engines) === 'number', 'message: The property engines of myCar should be a number.');" ], "challengeSeed":[ "var Car = function() {", @@ -184,9 +184,9 @@ "Use the map function to add 3 to every value in the variable array" ], "tests":[ - "assert.deepEqual(array, [4,5,6,7,8], 'You should have added three to each value in the array');", - "assert(editor.getValue().match(/\\.map\\(/gi), 'You should be making use of the map method');", - "assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\]/gi), 'You should only modify the array with .map');" + "assert.deepEqual(array, [4,5,6,7,8], 'message: You should add three to each value in the array.');", + "assert(editor.getValue().match(/\\.map\\(/gi), 'message: You should be making use of the map method.');", + "assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\]/gi), 'message: You should only modify the array with .map.');" ], "challengeSeed":[ "//Use map to add three to each value in the array", @@ -212,8 +212,8 @@ "});" ], "tests":[ - "assert(singleVal == 30, 'singleVal should have been set to the result of you reduce operation');", - "assert(editor.getValue().match(/\\.reduce\\(/gi), 'You should have made use of the reduce method');" + "assert(singleVal == 30, 'message: singleVal should have been set to the result of you reduce operation.');", + "assert(editor.getValue().match(/\\.reduce\\(/gi), 'message: You should have made use of the reduce method.');" ], "challengeSeed":[ "var array = [4,5,6,7,8];", @@ -240,9 +240,9 @@ "});" ], "tests":[ - "assert.deepEqual(array, [1,2,3,4,5], 'You should have removed all the values from the array that are greater than five');", - "assert(editor.getValue().match(/array\\.filter\\(/gi), 'You should be using the filter method to remove the values from the array');", - "assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\,6\\,7\\,8\\,9\\,10\\]/gi), 'You should only be using .filter to modify the contents of the array');" + "assert.deepEqual(array, [1,2,3,4], 'message: You should have removed all the values from the array that are greater than 4.');", + "assert(editor.getValue().match(/array\\.filter\\(/gi), 'message: You should be using the filter method to remove the values from the array.');", + "assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\,6\\,7\\,8\\,9\\,10\\]/gi), 'message: You should only be using .filter to modify the contents of the array.');" ], "challengeSeed":[ "var array = [1,2,3,4,5,6,7,8,9,10];", @@ -267,9 +267,9 @@ "This will return [1, 2, 3]" ], "tests":[ - "assert.deepEqual(array, ['alpha', 'beta', 'charlie'], 'You should have sorted the array alphabetically');", - "assert(editor.getValue().match(/\\[\\'beta\\'\\,\\s\\'alpha\\'\\,\\s'charlie\\'\\];/gi), 'You should be sorting the array using sort');", - "assert(editor.getValue().match(/\\.sort\\(\\)/gi), 'You should have made use of the sort method');" + "assert.deepEqual(array, ['alpha', 'beta', 'charlie'], 'message: You should have sorted the array alphabetically.');", + "assert(editor.getValue().match(/\\[\\'beta\\'\\,\\s\\'alpha\\'\\,\\s'charlie\\'\\];/gi), 'message: You should be sorting the array using sort.');", + "assert(editor.getValue().match(/\\.sort\\(\\)/gi), 'message: You should have made use of the sort method.');" ], "challengeSeed":[ "var array = ['beta', 'alpha', 'charlie'];", @@ -291,9 +291,9 @@ "You can use the .reverse() function to reverse the contents of an array." ], "tests": [ - "assert.deepEqual(array, [7,6,5,4,3,2,1], 'You should reverse the array');", - "assert(editor.getValue().match(/\\.reverse\\(\\)/gi), '');", - "assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\,6\\,7/gi), '');" + "assert.deepEqual(array, [7,6,5,4,3,2,1], 'message: You should reverse the array.');", + "assert(editor.getValue().match(/\\.reverse\\(\\)/gi), 'message: You should use the reverse method.');", + "assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\,6\\,7/gi), 'message: You should return [7,6,5,4,3,2,1].');" ], "challengeSeed": [ "var array = [1,2,3,4,5,6,7];", @@ -316,9 +316,9 @@ "array = array.concat(otherArray);" ], "tests": [ - "assert.deepEqual(array, [1,2,3,4,5,6], 'You should concat the two arrays together');", - "assert(editor.getValue().match(/\\.concat\\(/gi), 'You should be using the concat method to merge the two arrays');", - "assert(editor.getValue().match(/\\[1\\,2\\,3\\]/gi) && editor.getValue().match(/\\[4\\,5\\,6\\]/gi), 'You should only modify the two arrays without changing the origional ones');" + "assert.deepEqual(array, [1,2,3,4,5,6], 'You should concat the two arrays together.');", + "assert(editor.getValue().match(/\\.concat\\(/gi), 'message: You should be use the concat method to merge the two arrays.');", + "assert(editor.getValue().match(/\\[1\\,2\\,3\\]/gi) && editor.getValue().match(/\\[4\\,5\\,6\\]/gi), 'message: You should only modify the two arrays without changing the origional ones.');" ], "challengeSeed": [ "var array = [1,2,3];", @@ -344,8 +344,8 @@ "array = string.split(' ');" ], "tests":[ - "assert(typeof(array) === 'object' && array.length === 5, 'You should have split the string by it\\'s spaces');", - "assert(/\\.split\\(/gi, 'You should have made use of the split method on the string');" + "assert(typeof(array) === 'object' && array.length === 5, 'message: You should split the string by its spaces.');", + "assert(/\\.split\\(/gi, 'message: You should use the split method on the string.');" ], "challengeSeed":[ "var string = \"Split me into an array\";", @@ -368,8 +368,8 @@ "var joinMe = joinMe.join(\" \");" ], "tests":[ - "assert(typeof(joinMe) === 'string' && joinMe === \"Split me into an array\", 'You should have joined the arrays by it\\'s spaces');", - "assert(/\\.join\\(/gi, 'You should have made use of the join method on the array');" + "assert(typeof(joinMe) === 'string' && joinMe === \"Split me into an array\", 'message: You should join the arrays by their spaces.');", + "assert(/\\.join\\(/gi, 'message: You should use of the join method on the array.');" ], "challengeSeed":[ "var joinMe = [\"Split\",\"me\",\"into\",\"an\",\"array\"];", From 16c0c23b2c2efb782d7e11427e5d7f293dddbb28 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Wed, 30 Sep 2015 19:04:26 -0700 Subject: [PATCH 66/90] finish QAing all bonfires --- seed/challenges/advanced-bonfires.json | 28 +++++++++++----------- seed/challenges/intermediate-bonfires.json | 19 +++++++-------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/seed/challenges/advanced-bonfires.json b/seed/challenges/advanced-bonfires.json index 48bc294b7b..3ee8a9f041 100644 --- a/seed/challenges/advanced-bonfires.json +++ b/seed/challenges/advanced-bonfires.json @@ -179,28 +179,28 @@ "", "// Example inventory lists", "var curInv = [", - " [21, 'Bowling Ball'],", - " [2, 'Dirty Sock'],", - " [1, 'Hair Pin'],", - " [5, 'Microphone']", + " [21, \"Bowling Ball\"],", + " [2, \"Dirty Sock\"],", + " [1, \"Hair Pin\"],", + " [5, \"Microphone\"]", "];", "", "var newInv = [", - " [2, 'Hair Pin'],", - " [3, 'Half-Eaten Apple'],", - " [67, 'Bowling Ball'],", - " [7, 'Toothpaste']", + " [2, \"Hair Pin\"],", + " [3, \"Half-Eaten Apple\"],", + " [67, \"Bowling Ball\"],", + " [7, \"Toothpaste\"]", "];", "", "inventory(curInv, newInv);" ], "tests": [ - "assert.isArray(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), 'message: inventory() should return an array.');", - "assert.equal(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length, 6, 'message: inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length should return an array with a length of 6.');", - "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair Pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']], 'message: inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]) should return [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair Pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']].');", - "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], []), [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], 'message: inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], []) should return [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']].);", - "assert.deepEqual(inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']], 'message: inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]) should return [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']].');", - "assert.deepEqual(inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]), [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']], 'message: inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]) should return [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']].');" + "assert.isArray(inventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]]), 'message: inventory() should return an array.');", + "assert.equal(inventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]]).length, 6, 'message: inventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]]).length should return an array with a length of 6.');", + "assert.deepEqual(inventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]]), [[88, \"Bowling Ball\"], [2, \"Dirty Sock\"], [3, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [5, \"Microphone\"], [7, \"Toothpaste\"]], 'message: inventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]]) should return [[88, \"Bowling Ball\"], [2, \"Dirty Sock\"], [3, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [5, \"Microphone\"], [7, \"Toothpaste\"]].');", + "assert.deepEqual(inventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], []), [[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], 'message: inventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], []) should return [[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]].');", + "assert.deepEqual(inventory([], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]]), [[67, \"Bowling Ball\"], [2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [7, \"Toothpaste\"]], 'message: inventory([], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]]) should return [[67, \"Bowling Ball\"], [2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [7, \"Toothpaste\"]].');", + "assert.deepEqual(inventory([[0, \"Bowling Ball\"], [0, \"Dirty Sock\"], [0, \"Hair Pin\"], [0, \"Microphone\"]], [[1, \"Hair Pin\"], [1, \"Half-Eaten Apple\"], [1, \"Bowling Ball\"], [1, \"Toothpaste\"]]), [[1, \"Bowling Ball\"], [0, \"Dirty Sock\"], [1, \"Hair Pin\"], [1, \"Half-Eaten Apple\"], [0, \"Microphone\"], [1, \"Toothpaste\"]], 'message: inventory([[0, \"Bowling Ball\"], [0, \"Dirty Sock\"], [0, \"Hair Pin\"], [0, \"Microphone\"]], [[1, \"Hair Pin\"], [1, \"Half-Eaten Apple\"], [1, \"Bowling Ball\"], [1, \"Toothpaste\"]]) should return [[1, \"Bowling Ball\"], [0, \"Dirty Sock\"], [1, \"Hair Pin\"], [1, \"Half-Eaten Apple\"], [0, \"Microphone\"], [1, \"Toothpaste\"]].');" ], "MDNlinks": [ "Global Array Object" diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json index 35ccf0c7f9..684afd44e8 100644 --- a/seed/challenges/intermediate-bonfires.json +++ b/seed/challenges/intermediate-bonfires.json @@ -151,9 +151,8 @@ ], "tests": [ "assert.deepEqual(where([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" }), [{ first: \"Tybalt\", last: \"Capulet\" }], 'message: where() should return an array of objects.');", - "assert.deepEqual(where([{ 'a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], { \"a\": 1 }), [{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], 'message: where([{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], { \"a\": 1 }) should return [{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }].');", - "assert.deepEqual(where([{ \"a\": 1, \"b\": 2 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], { \"a\": 1, \"b\": 2 }), [{ \"a\": 1, \"b\": 2 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], 'message: where([{ \"a\": 1, \"b\": 2 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], { \"a\": 1, \"b\": 2 }) should return [{ \"a\": 1, \"b\": 2 }, { \"a\": 1, \"b\": 2, \"c\": 2 }].');", - "assert.deepEqual(where([{ \"a\": 5 }, { \"b\": 10 }, { \"a\": 5, \"b\": 10 }], { \"a\": 5, \"b\": 10 }), [{ \"a\": 5, \"b\": 10 }], 'message: where([{ \"a\": 5 }, { \"b\": 10 }, { \"a\": 5, \"b\": 10 }], { \"a\": 5, \"b\": 10 }) should return [{ \"a\": 5, \"b\": 10 }].');" + "assert.deepEqual(where([{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], { \"a\": 1 }), [{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], 'message: where([{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], { \"a\": 1 }) should return [{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }].');", + "assert.deepEqual(where([{ \"a\": 1, \"b\": 2 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], { \"a\": 1, \"b\": 2 }), [{ \"a\": 1, \"b\": 2 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], 'message: where([{ \"a\": 1, \"b\": 2 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], { \"a\": 1, \"b\": 2 }) should return [{ \"a\": 1, \"b\": 2 }, { \"a\": 1, \"b\": 2, \"c\": 2 }].');" ], "MDNlinks": [ "Global Object", @@ -442,13 +441,13 @@ "convert(\"Dolce & Gabbana\");" ], "tests": [ - "assert.match(convert(\"Dolce & Gabbana\"), /Dolce & Gabbana/, 'message: convert(\"Dolce & Gabbana\") should return Dolce & Gabbana.');", - "assert.match(convert(\"Hamburgers < Pizza < Tacos\"), /Hamburgers < Pizza < Tacos/, 'message: convert(\"Hamburgers < Pizza < Tacos\") should return Hamburgers < Pizza < Tacos.');", - "assert.match(convert(\"Sixty > twelve\"), /Sixty > twelve/, 'message: convert(\"Sixty > twelve\") should return Sixty > twelve.');", - "assert.match(convert('Stuff in \"quotation marks\"'), /Stuff in "quotation marks"/, 'message: convert('Stuff in \"quotation marks\"') should return Stuff in "quotation marks".');", - "assert.match(convert(\"Shindler's List\"), /Shindler's List/, 'message: convert(\"Shindler's List\") should return Shindler's List.');", - "assert.match(convert('<>'), /<>/, 'message: convert('<>') should return <>.');", - "assert.strictEqual(convert('abc'), 'abc', 'message: convert(\"abc\") should return \"abc\".');" + "assert.match(convert(\"Dolce & Gabbana\"), /Dolce & Gabbana/, 'message: convert(\"Dolce & Gabbana\") should return Dolce &​amp; Gabbana.');", + "assert.match(convert(\"Hamburgers < Pizza < Tacos\"), /Hamburgers < Pizza < Tacos/, 'message: convert(\"Hamburgers < Pizza < Tacos\") should return Hamburgers &​lt; Pizza &​lt; Tacos.');", + "assert.match(convert(\"Sixty > twelve\"), /Sixty > twelve/, 'message: convert(\"Sixty > twelve\") should return Sixty &​gt; twelve.');", + "assert.match(convert('Stuff in \"quotation marks\"'), /Stuff in "quotation marks"/, 'message: convert('Stuff in \"quotation marks\"') should return Stuff in &​quot;quotation marks&​quot;.');", + "assert.match(convert(\"Shindler's List\"), /Shindler's List/, 'message: convert(\"Shindler's List\") should return Shindler&​apos;s List.');", + "assert.match(convert('<>'), /<>/, 'message: convert(\"<>\") should return &​lt;&​gt;.');", + "assert.strictEqual(convert('abc'), 'abc', 'message: convert(\"abc\") should return abc.');" ], "MDNlinks": [ "RegExp", From c2af4f9b4c85767014a7907959e1128240952b7f Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Wed, 30 Sep 2015 19:26:05 -0700 Subject: [PATCH 67/90] fix bad merge --- seed/challenges/intermediate-bonfires.json | 90 ---------------------- 1 file changed, 90 deletions(-) diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json index 62aef4687d..684afd44e8 100644 --- a/seed/challenges/intermediate-bonfires.json +++ b/seed/challenges/intermediate-bonfires.json @@ -61,7 +61,6 @@ "diff([1, 2, 3, 5], [1, 2, 3, 4, 5]);" ], "tests": [ -<<<<<<< HEAD "assert(typeof(diff([1, 2, 3, 5], [1, 2, 3, 4, 5])) === \"object\", 'message: diff() should return an array.');", "assert.deepEqual(diff([\"diorite\", \"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]), [\"pink wool\"], 'message: [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"] should return [\"pink wool\"].');", "assert.includeMembers(diff([\"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]), [\"diorite\", \"pink wool\"], 'message: [\"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"] should return [\"diorite\", \"pink wool\"].');", @@ -69,15 +68,6 @@ "assert.deepEqual(diff([1, 2, 3, 5], [1, 2, 3, 4, 5]), [4], 'message: [1, 2, 3, 5], [1, 2, 3, 4, 5] should return [4].');", "assert.includeMembers(diff([1, \"calf\", 3, \"piglet\"], [1, \"calf\", 3, 4]), [\"piglet\", 4], 'message: [1, \"calf\", 3, \"piglet\"], [1, \"calf\", 3, 4] should return [\"piglet\", 4].');", "assert.deepEqual(diff([], [\"snuffleupagus\", \"cookie monster\", \"elmo\"]), [\"snuffleupagus\", \"cookie monster\", \"elmo\"], 'message: [], [\"snuffleupagus\", \"cookie monster\", \"elmo\"] should return [\"snuffleupagus\", \"cookie monster\", \"elmo\"].');" -======= - "assert(typeof(diff([1, 2, 3, 5], [1, 2, 3, 4, 5])) === \"object\", 'The result should be an array.');", - "assert.deepEqual(diff(['diorite', 'andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['pink wool'], 'arrays with only one difference');", - "assert.includeMembers(diff(['andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['diorite', 'pink wool'], 'arrays with more than one difference');", - "assert.deepEqual(diff(['andesite', 'grass', 'dirt', 'dead shrub'], ['andesite', 'grass', 'dirt', 'dead shrub']), [], 'arrays with no difference');", - "assert.deepEqual(diff([1, 2, 3, 5], [1, 2, 3, 4, 5]), [4], 'arrays with numbers');", - "assert.includeMembers(diff([1, 'calf', 3, 'piglet'], [1, 'calf', 3, 4]), ['piglet', 4], 'arrays with numbers and strings');", - "assert.deepEqual(diff([], ['snuffleupagus', 'cookie monster', 'elmo']), ['snuffleupagus', 'cookie monster', 'elmo'], 'empty array');" ->>>>>>> staging ], "MDNlinks": [ "Comparison Operators", @@ -103,19 +93,11 @@ "id": "a7f4d8f2483413a6ce226cac", "title": "Roman Numeral Converter", "tests": [ -<<<<<<< HEAD "assert.deepEqual(convert(12), \"XII\", 'message: convert(12) should return \"XII\".');", "assert.deepEqual(convert(5), \"V\", 'message: convert(5) should return \"V\".');", "assert.deepEqual(convert(9), \"IX\", 'message: convert(9) should return \"IX\".');", "assert.deepEqual(convert(29), \"XXIX\", 'message: convert(29) should return \"XXIX\".');", "assert.deepEqual(convert(16), \"XVI\", 'message: convert(16) should return \"XVI\".');" -======= - "assert.deepEqual(convert(12), \"XII\", 'convert(12) should return \"XII\"');", - "assert.deepEqual(convert(5), \"V\", 'convert(5) should return \"V\"');", - "assert.deepEqual(convert(9), \"IX\", 'convert(9) should return \"IX\"');", - "assert.deepEqual(convert(29), \"XXIX\", 'convert(29) should return \"XXIX\"');", - "assert.deepEqual(convert(16), \"XVI\", 'convert(16) should return \"XVI\"');" ->>>>>>> staging ], "difficulty": "2.02", "description": [ @@ -168,16 +150,9 @@ "where([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" });" ], "tests": [ -<<<<<<< HEAD "assert.deepEqual(where([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" }), [{ first: \"Tybalt\", last: \"Capulet\" }], 'message: where() should return an array of objects.');", "assert.deepEqual(where([{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], { \"a\": 1 }), [{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], 'message: where([{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], { \"a\": 1 }) should return [{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }].');", "assert.deepEqual(where([{ \"a\": 1, \"b\": 2 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], { \"a\": 1, \"b\": 2 }), [{ \"a\": 1, \"b\": 2 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], 'message: where([{ \"a\": 1, \"b\": 2 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], { \"a\": 1, \"b\": 2 }) should return [{ \"a\": 1, \"b\": 2 }, { \"a\": 1, \"b\": 2, \"c\": 2 }].');" -======= - "assert.deepEqual(where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' }), [{ first: 'Tybalt', last: 'Capulet' }], 'should return an array of objects');", - "assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'should return with multiples');", - "assert.deepEqual(where([{ 'a': 1, 'b': 2 }, { 'a': 1 }, { 'a': 1, 'b': 2, 'c': 2 }], { 'a': 1, 'b': 2 }), [{ 'a': 1, 'b': 2 }, { 'a': 1, 'b': 2, 'c': 2 }], 'should return two objects in array');", - "assert.deepEqual(where([{ 'a': 5 }, { 'b': 10 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }), [{ 'a': 5, 'b': 10 }], 'should return a single object in array');" ->>>>>>> staging ], "MDNlinks": [ "Global Object", @@ -201,19 +176,11 @@ "id": "a0b5010f579e69b815e7c5d6", "title": "Search and Replace", "tests": [ -<<<<<<< HEAD "assert.deepEqual(myReplace(\"Let us go to the store\", \"store\", \"mall\"), \"Let us go to the mall\", 'message: myReplace(\"Let us go to the store\", \"store\", \"mall\") should return \"Let us go to the mall\".');", "assert.deepEqual(myReplace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\"), \"He is Sitting on the couch\", 'message: myReplace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\") should return \"He is Sitting on the couch\".');", "assert.deepEqual(myReplace(\"This has a spellngi error\", \"spellngi\", \"spelling\"), \"This has a spelling error\", 'message: myReplace(\"This has a spellngi error\", \"spellingi\", \"spelling\") should return \"This has a spelling error\".');", "assert.deepEqual(myReplace(\"His name is Tom\", \"Tom\", \"john\"), \"His name is John\", 'message: myReplace(\"His name is Tom\", \"Tom\", \"john\") should return \"His name is John\".');", "assert.deepEqual(myReplace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\"), \"Let us get back to more Bonfires\", 'message: myReplace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\") should return \"Let us get back to more Bonfires\".');" -======= - "assert.deepEqual(replace(\"Let us go to the store\", \"store\", \"mall\"), \"Let us go to the mall\", 'replace(\"Let us go to the store\", \"store\", \"mall\") should return \"Let us go to the mall\"');", - "assert.deepEqual(replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\"), \"He is Sitting on the couch\", 'replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\") should return \"He is Sitting on the couch\"');", - "assert.deepEqual(replace(\"This has a spellngi error\", \"spellngi\", \"spelling\"), \"This has a spelling error\", 'replace(\"This has a spellngi error\", \"spellingi\", \"spelling\") should return \"This has a spelling error\"');", - "assert.deepEqual(replace(\"His name is Tom\", \"Tom\", \"john\"), \"His name is John\", 'replace(\"His name is Tom\", \"Tom\", \"john\") should return \"His name is John\"');", - "assert.deepEqual(replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\"), \"Let us get back to more Bonfires\", 'replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\") should return \"Let us get back to more Bonfires\"');" ->>>>>>> staging ], "difficulty": "2.035", "description": [ @@ -253,19 +220,11 @@ "id": "aa7697ea2477d1316795783b", "title": "Pig Latin", "tests": [ -<<<<<<< HEAD "assert.deepEqual(translate(\"california\"), \"aliforniacay\", 'message: translate(\"california\") should return \"aliforniacay\".');", "assert.deepEqual(translate(\"paragraphs\"), \"aragraphspay\", 'message: translate(\"paragraphs\") should return \"aragraphspay\".');", "assert.deepEqual(translate(\"glove\"), \"oveglay\", 'message: translate(\"glove\") should return \"oveglay\".');", "assert.deepEqual(translate(\"algorithm\"), \"algorithmway\", 'message: translate(\"algorithm\") should return \"algorithmway\".');", "assert.deepEqual(translate(\"eight\"), \"eightway\", 'message: translate(\"eight\") should return \"eightway\".');" -======= - "assert.deepEqual(translate(\"california\"), \"aliforniacay\", 'translate(\"california\") should return \"aliforniacay\"');", - "assert.deepEqual(translate(\"paragraphs\"), \"aragraphspay\", 'translate(\"paragraphs\") should return \"aragraphspay\"');", - "assert.deepEqual(translate(\"glove\"), \"oveglay\", 'translate(\"glove\") should return \"oveglay\"');", - "assert.deepEqual(translate(\"algorithm\"), \"algorithmway\", 'translate(\"algorithm\") should return \"algorithmway\"');", - "assert.deepEqual(translate(\"eight\"), \"eightway\", 'translate(\"eight\") should return \"eightway\"');" ->>>>>>> staging ], "difficulty": "2.04", "description": [ @@ -359,17 +318,10 @@ "fearNotLetter(\"abce\");" ], "tests": [ -<<<<<<< HEAD "assert.deepEqual(fearNotLetter(\"abce\"), \"d\", 'message: fearNotLetter(\"abce\") should return \"d\".');", "assert.deepEqual(fearNotLetter(\"abcdefghjklmno\"), \"i\", 'message: fearNotLetter(\"abcdefghjklmno\") should return \"i\".');", "assert.isUndefined(fearNotLetter(\"bcd\"), 'message: fearNotLetter(\"bcd\") should return undefined.');", "assert.isUndefined(fearNotLetter(\"yz\"), 'message: fearNotLetter(\"yz\") should return undefined.');" -======= - "assert.deepEqual(fearNotLetter(\"abce\"), \"d\", 'fearNotLetter(\"abce\") should return d');", - "assert.deepEqual(fearNotLetter(\"abcdefghjklmno\"), \"i\", 'fearNotLetter(\"abcdefghjklmno\") should return i');", - "assert.isUndefined(fearNotLetter(\"bcd\"), 'fearNotLetter(\"bcd\") should return undefined');", - "assert.isUndefined(fearNotLetter(\"yz\"), 'fearNotLetter(\"yz\") should return undefined');" ->>>>>>> staging ], "MDNlinks": [ "String.charCodeAt()", @@ -572,21 +524,12 @@ "sumFibs(4);" ], "tests": [ -<<<<<<< HEAD "assert(typeof(sumFibs(1)) === \"number\", 'message: sumFibs() should return a number.');", "assert.deepEqual(sumFibs(1000), 1785, 'message: sumFibs(1000) should return 1785.');", "assert.deepEqual(sumFibs(4000000), 4613732, 'message: sumFibs(4000000) should return 4613732.');", "assert.deepEqual(sumFibs(4), 5, 'message: sumFibs(4) should return 5.');", "assert.deepEqual(sumFibs(75024), 60696, 'message: sumFibs(75024) should return 60696.');", "assert.deepEqual(sumFibs(75025), 135721, 'message: sumFibs(75025) should return 135721.');" -======= - "assert.deepEqual(typeof(sumFibs(1)), \"number\", \"The result should be a number\");", - "assert.deepEqual(sumFibs(1000), 1785, 'sumFibs(1000) should return 1785');", - "assert.deepEqual(sumFibs(4000000), 4613732, 'sumFibs(4000000) should return 4613732');", - "assert.deepEqual(sumFibs(4), 5, 'sumFibs(4) should return 5');", - "assert.deepEqual(sumFibs(75024), 60696, 'sumFibs(75024) should return 60696');", - "assert.deepEqual(sumFibs(75025), 135721, 'sumFibs(75025) should return 135721');" ->>>>>>> staging ], "MDNlinks": [ "Remainder" @@ -622,15 +565,9 @@ "sumPrimes(10);" ], "tests": [ -<<<<<<< HEAD "assert.deepEqual(typeof(sumPrimes(10)), \"number\", 'message: sumPrimes() should return a number.');", "assert.deepEqual(sumPrimes(10), 17, 'message: sumPrimes(10) should return 17.');", "assert.deepEqual(sumPrimes(977), 73156, 'message: sumPrimes(977) should return 73156.');" -======= - "assert.deepEqual(typeof(sumPrimes(10)), \"number\", \"The result should be a number\");", - "assert.deepEqual(sumPrimes(10), 17, 'sumPrimes(10) should return 17');", - "assert.deepEqual(sumPrimes(977), 73156, 'sumPrimes(977) should return 73156');" ->>>>>>> staging ], "MDNlinks": [ "For Loops", @@ -668,17 +605,10 @@ "smallestCommons([1,5]);" ], "tests": [ -<<<<<<< HEAD "assert.deepEqual(typeof(smallestCommons([1, 5])), \"number\", 'message: smallestCommons() should return a number.');", "assert.deepEqual(smallestCommons([1, 5]), 60, 'message: smallestCommons([1, 5]) should return 60.');", "assert.deepEqual(smallestCommons([5, 1]), 60, 'message: smallestCommons([5, 1]) should return 60.');", "assert.deepEqual(smallestCommons([1, 13]), 360360, 'message: smallestCommons([1, 13]) should return 360360.');" -======= - "assert.deepEqual(typeof(smallestCommons([1, 5])), \"number\", \"The result should be a number\");", - "assert.deepEqual(smallestCommons([1, 5]), 60, 'smallestCommons([1, 5]) should return 60');", - "assert.deepEqual(smallestCommons([5, 1]), 60, 'smallestCommons([5, 1]) should return 60');", - "assert.deepEqual(smallestCommons([1, 13]), 360360, 'smallestCommons([1, 13]) should return 360360');" ->>>>>>> staging ], "MDNlinks": [ "Smallest Common Multiple" @@ -749,17 +679,10 @@ "drop([1, 2, 3], function(n) {return n < 3; });" ], "tests": [ -<<<<<<< HEAD "assert.deepEqual(drop([1, 2, 3, 4], function(n) {return n>= 3;}), [3, 4], 'message: drop([1, 2, 3, 4], function(n) {return n>= 3;}) should return [3, 4].');", "assert.deepEqual(drop([1, 2, 3], function(n) {return n > 0; }), [1, 2, 3], 'message: drop([1, 2, 3], function(n) {return n > 0; }) should return [1, 2, 3].');", "assert.deepEqual(drop([1, 2, 3, 4], function(n) {return n > 5;}), [], 'message: drop([1, 2, 3, 4], function(n) {return n > 5;}) should return [].');", "assert.deepEqual(drop([1, 2, 3, 7, 4], function(n) {return n > 3}), [7, 4], 'message: drop([1, 2, 3, 7, 4], function(n) {return n>= 3}) should return [7, 4].');" -======= - "assert.deepEqual(drop([1, 2, 3, 4], function(n) {return n>= 3;}), [3, 4], 'drop([1, 2, 3, 4], function(n) {return n>= 3;}) should return [3, 4]');", - "assert.deepEqual(drop([1, 2, 3], function(n) {return n > 0; }), [1, 2, 3], 'drop([1, 2, 3], function(n) {return n > 0; }) should return [1, 2, 3]');", - "assert.deepEqual(drop([1, 2, 3, 4], function(n) {return n > 5;}), [], 'drop([1, 2, 3, 4], function(n) {return n > 5;}) should return []');", - "assert.deepEqual(drop([1, 2, 3, 7, 4], function(n) {return n > 3}), [7, 4], 'drop([1, 2, 3, 7, 4], function(n) {return n>= 3}) should return [7, 4]');" ->>>>>>> staging ], "MDNlinks": [ "Arguments object", @@ -833,13 +756,8 @@ "binaryAgent(\"01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111\");" ], "tests": [ -<<<<<<< HEAD "assert.deepEqual(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111'), \"Aren't bonfires fun!?\", 'message: binaryAgent(\"01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111\") should return \"Aren't bonfires fun!?\"');", "assert.deepEqual(binaryAgent(\"01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001\"), \"I love FreeCodeCamp!\", 'message: binaryAgent(\"01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001\" should return \"I love FreeCodeCamp!\"');" -======= - "assert.deepEqual(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111'), \"Aren't bonfires fun!?\", \"binaryAgent() should return Aren't bonfires fun!?\");", - "assert.deepEqual(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001'), \"I love FreeCodeCamp!\", 'binaryAgent() should return \"I love FreeCodeCamp!\"');" ->>>>>>> staging ], "MDNlinks": [ "String.charCodeAt()", @@ -919,19 +837,11 @@ "add(2,3);" ], "tests": [ -<<<<<<< HEAD "assert.deepEqual(add(2, 3), 5, 'message: add(2, 3) should return 5.');", "assert.deepEqual(add(2)(3), 5, 'message: add(2)(3) should return 5.');", "assert.isUndefined(add(\"http://bit.ly/IqT6zt\"), 'message: add(\"http://bit.ly/IqT6zt\") should return undefined.');", "assert.isUndefined(add(2, \"3\"), 'message: add(2, \"3\") should return undefined.');", "assert.isUndefined(add(2)([3]), 'message: add(2)([3]) should return undefined.');" -======= - "assert.deepEqual(add(2, 3), 5, 'add(2, 3) should return 5');", - "assert.deepEqual(add(2)(3), 5, 'add(2)(3) should return 5');", - "assert.isUndefined(add(\"http://bit.ly/IqT6zt\"), 'add(\"http://bit.ly/IqT6zt\") should return undefined');", - "assert.isUndefined(add(2, \"3\"), 'add(2, \"3\") should return undefined');", - "assert.isUndefined(add(2)([3]), 'add(2)([3]) should return undefined');" ->>>>>>> staging ], "MDNlinks": [ "Global Function Object", From 72e0595ca69612f94b9ad999ab5e00d9b7b4eb73 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 30 Sep 2015 22:32:31 -0700 Subject: [PATCH 68/90] add uri code storage --- client/commonFramework.js | 126 ++++++++++++++++++++++++++++++++------ 1 file changed, 108 insertions(+), 18 deletions(-) diff --git a/client/commonFramework.js b/client/commonFramework.js index 2d07b27cfc..8abcb6a9dc 100644 --- a/client/commonFramework.js +++ b/client/commonFramework.js @@ -16,8 +16,92 @@ common.challengeType = common.challengeType || window.challengeType ? common.challengeId = common.challengeId || window.challenge_Id; +common.challengeSeed = common.challengeSeed || window.challengeSeed ? + window.challengeSeed : + []; + +common.seed = common.challengeSeed.reduce(function(seed, line) { + return seed + line + '\n'; +}, ''); + +// store code in the URL +common.codeUri = (function(common, encode, decode, location, history) { + var codeUri = { + encode: function(code) { + return encode(code); + }, + decode: function(code) { + try { + return decode(code); + } catch (ignore) { + return null; + } + }, + isInQuery: function(query) { + var decoded = codeUri.decode(query); + if (!decoded || typeof decoded.split !== 'function') { + return false; + } + return decoded + .split('?') + .splice(1) + .reduce(function(found, param) { + var key = param.split('=')[0]; + if (key === 'solution') { + return true; + } + return found; + }, false); + }, + isAlive: function() { + return codeUri.isInQuery(location.search) || + codeUri.isInQuery(location.hash); + }, + parse: function() { + var query; + if (location.search && codeUri.isInQuery(location.search)) { + query = location.search.replace(/^\?/, ''); + if (history && typeof history.replaceState === 'function') { + history.replaceState( + history.state, + null, + location.href.split('?')[0] + ); + location.hash = '#?' + query; + } + } else { + query = location.hash.replace(/^\#\?/, ''); + } + if (!query) { + return null; + } + + return query + .split('&') + .reduce(function(solution, param) { + var key = param.split('=')[0]; + var value = param.split('=')[1]; + if (key === 'solution') { + return codeUri.decode(value); + } + return solution; + }, null); + }, + querify: function(solution) { + location.hash = '?solution=' + codeUri.encode(solution); + return solution; + } + }; + + common.init.push(function() { + codeUri.parse(); + }); + + return codeUri; +}(common, encodeURIComponent, decodeURIComponent, location, history)); + // codeStorage -common.codeStorageFactory = (function($, localStorage) { +common.codeStorageFactory = (function($, localStorage, codeUri) { var CodeStorageProps = { version: 0.01, @@ -58,7 +142,10 @@ common.codeStorageFactory = (function($, localStorage) { updateStorage: function() { if (typeof localStorage !== 'undefined') { var value = this.editor.getValue(); + // store in localStorage localStorage.setItem(this.keyValue, value); + // also store code in URL + codeUri.querify(value); } else { console.log('no web storage'); } @@ -83,7 +170,7 @@ common.codeStorageFactory = (function($, localStorage) { } return codeStorageFactory; -}($, localStorage)); +}($, localStorage, common.codeUri)); common.codeOutput = (function(CodeMirror, document, challengeType) { if (!CodeMirror) { @@ -319,9 +406,15 @@ var editor = (function(CodeMirror, emmetCodeMirror, common) { ); } common.init.push(function() { - editorValue = codeStorage.isAlive() ? - codeStorage.getStoredValue() : - allSeeds; + var editorValue; + if (common.codeUri.isAlive()) { + console.log('in query'); + editorValue = common.codeUri.parse(); + } else { + editorValue = codeStorage.isAlive() ? + codeStorage.getStoredValue() : + common.seed; + } editor.setValue(replaceSafeTags(editorValue)); editor.refresh(); @@ -331,16 +424,7 @@ var editor = (function(CodeMirror, emmetCodeMirror, common) { }(window.CodeMirror, window.emmetCodeMirror, common)); -var editorValue; -var challengeSeed = challengeSeed || []; var tests = tests || []; -var allSeeds = ''; - -(function() { - challengeSeed.forEach(function(elem) { - allSeeds += elem + '\n'; - }); -})(); var libraryIncludes = "" + "" + @@ -547,7 +631,9 @@ function showCompletion() { .delay(1000) .queue(function(next) { $(this).replaceWith( - '
submitting...
' + '
' + + 'submitting...
' ); next(); }); @@ -573,7 +659,7 @@ function showCompletion() { } var resetEditor = function resetEditor() { - editor.setValue(replaceSafeTags(allSeeds)); + editor.setValue(replaceSafeTags(common.seed)); $('#testSuite').empty(); bonfireExecute(true); common.codeStorage.updateStorage(); @@ -588,7 +674,6 @@ if (attempts) { var userTests; var testSalt = Math.random(); - var scrapeTests = function(userJavaScript) { // insert tests from mongo @@ -638,7 +723,11 @@ var createTestDisplay = function() { } for (var i = 0; i < userTests.length; i++) { var didTestPass = !userTests[i].err; - var testText = userTests[i].text.split('message: ').pop().replace(/\'\);/g, ''); + var testText = userTests[i].text + .split('message: ') + .pop() + .replace(/\'\);/g, ''); + var testDoc = document.createElement('div'); var iconClass = didTestPass ? @@ -674,6 +763,7 @@ var reassembleTest = function(test, data) { }; var runTests = function(err, data) { + var editorValue = editor.getValue(); // userTests = userTests ? null : []; var allTestsPassed = true; pushed = false; From 8a1a7f238d892e9cdcfba0b17662360af6892fa1 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Thu, 1 Oct 2015 20:55:55 -0700 Subject: [PATCH 69/90] fix undefined username and remove old function fix many bugs and undefined fix linting errors --- server/boot/user.js | 119 ++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 64 deletions(-) diff --git a/server/boot/user.js b/server/boot/user.js index fe678924cf..69e1d61e81 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -1,12 +1,12 @@ -import _ from 'lodash'; -import async from 'async'; +import dedent from 'dedent'; import moment from 'moment'; import debugFactory from 'debug'; -import { ifNoUser401 } from '../utils/middleware'; +import { ifNoUser401, ifNoUserRedirectTo } from '../utils/middleware'; const debug = debugFactory('freecc:boot:user'); const daysBetween = 1.5; +const sendNonUserToMap = ifNoUserRedirectTo('/map'); function calcCurrentStreak(cals) { const revCals = cals.concat([Date.now()]).slice().reverse(); @@ -52,7 +52,7 @@ function dayDiff([head, tail]) { module.exports = function(app) { var router = app.loopback.Router(); var User = app.models.User; - var Story = app.models.Story; + // var Story = app.models.Story; router.get('/login', function(req, res) { res.redirect(301, '/signin'); @@ -68,14 +68,21 @@ module.exports = function(app) { router.post('/reset-password', postReset); router.get('/email-signup', getEmailSignup); router.get('/email-signin', getEmailSignin); - router.get('/toggle-lockdown-mode', toggleLockdownMode); + router.get( + '/toggle-lockdown-mode', + sendNonUserToMap, + toggleLockdownMode + ); router.post( '/account/delete', ifNoUser401, postDeleteAccount ); - router.get('/account/unlink/:provider', getOauthUnlink); - router.get('/account', getAccount); + router.get( + '/account', + sendNonUserToMap, + getAccount + ); router.get('/vote1', vote1); router.get('/vote2', vote2); // Ensure this is the last route! @@ -116,7 +123,8 @@ module.exports = function(app) { } function getAccount(req, res) { - return res.redirect('/' + user.username); + const { username } = req.user; + return res.redirect('/' + username); } function returnUser(req, res, next) { @@ -196,33 +204,35 @@ module.exports = function(app) { ); } + function toggleLockdownMode(req, res, next) { + if (req.user.lockdownMode === true) { + req.user.lockdownMode = false; + return req.user.save(function(err) { + if (err) { return next(err); } - - function toggleLockdownMode(req, res) { - if (req.user) { - if (req.user.lockdownMode === true) { - req.user.lockdownMode = false; - req.user.save(function (err) { - if (err) { - return next(err); - } - req.flash('success', {msg: 'Other people can now view all your challenge solutions. You can change this back at any time in the "Manage My Account" section at the bottom of this page.'}); - res.redirect(req.user.username); + req.flash('success', { + msg: dedent` + Other people can now view all your challenge solutions. + You can change this back at any time in the "Manage My Account" + section at the bottom of this page. + ` }); - } else { - req.user.lockdownMode = true; - req.user.save(function (err) { - if (err) { - return next(err); - } - req.flash('success', {msg: 'All your challenge solutions are now hidden from other people. You can change this back at any time in the "Manage My Account" section at the bottom of this page.'}); - res.redirect(req.user.username); - }); - } - } else { - req.flash('error', {msg: 'You must be signed in to change your account settings.'}); - res.redirect('/'); + res.redirect('/' + req.user.username); + }); } + req.user.lockdownMode = true; + return req.user.save(function(err) { + if (err) { return next(err); } + + req.flash('success', { + msg: dedent` + All your challenge solutions are now hidden from other people. + You can change this back at any time in the "Manage My Account" + section at the bottom of this page. + ` + }); + res.redirect('/' + req.user.username); + }); } function postDeleteAccount(req, res, next) { @@ -234,25 +244,6 @@ module.exports = function(app) { }); } - function getOauthUnlink(req, res, next) { - var provider = req.params.provider; - User.findById(req.user.id, function(err, user) { - if (err) { return next(err); } - - user[provider] = null; - user.tokens = - _.reject(user.tokens, function(token) { - return token.kind === provider; - }); - - user.save(function(err) { - if (err) { return next(err); } - req.flash('info', { msg: provider + ' account has been unlinked.' }); - res.redirect('/account'); - }); - }); - } - function getReset(req, res) { if (!req.accessToken) { req.flash('errors', { msg: 'access token invalid' }); @@ -325,6 +316,7 @@ module.exports = function(app) { }); } + /* function updateUserStoryPictures(userId, picture, username, cb) { Story.find({ 'author.userId': userId }, function(err, stories) { if (err) { return cb(err); } @@ -345,31 +337,30 @@ module.exports = function(app) { }); }); } + */ - function vote1(req, res) { + function vote1(req, res, next) { if (req.user) { req.user.tshirtVote = 1; - req.user.save(function (err) { - if (err) { - return next(err); - } - req.flash('success', {msg: 'Thanks for voting!'}); + req.user.save(function(err) { + if (err) { return next(err); } + + req.flash('success', { msg: 'Thanks for voting!' }); res.redirect('/map'); }); } else { - req.flash('error', {msg: 'You must be signed in to vote.'}); + req.flash('error', { msg: 'You must be signed in to vote.' }); res.redirect('/map'); } } - function vote2(req, res) { + function vote2(req, res, next) { if (req.user) { req.user.tshirtVote = 2; - req.user.save(function (err) { - if (err) { - return next(err); - } - req.flash('success', {msg: 'Thanks for voting!'}); + req.user.save(function(err) { + if (err) { return next(err); } + + req.flash('success', { msg: 'Thanks for voting!' }); res.redirect('/map'); }); } else { From d0528ec7686188c27f690982969723d4774bd77b Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Thu, 1 Oct 2015 21:11:15 -0700 Subject: [PATCH 70/90] fix re-encode uri during redirect --- server/boot/challenge.js | 7 ++++++- server/boot/user.js | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/server/boot/challenge.js b/server/boot/challenge.js index 39cb57a33c..1102da7f62 100644 --- a/server/boot/challenge.js +++ b/server/boot/challenge.js @@ -240,7 +240,12 @@ module.exports = function(app) { } if (dasherize(challenge.name) !== origChallengeName) { - return Observable.just('/challenges/' + dasherize(challenge.name) + '?solution=' + solutionCode); + return Observable.just( + '/challenges/' + + dasherize(challenge.name) + + '?solution=' + + encodeURIComponent(solutionCode) + ); } // save user does nothing if user does not exist diff --git a/server/boot/user.js b/server/boot/user.js index 69e1d61e81..09e1034bcc 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -197,8 +197,7 @@ module.exports = function(app) { bonfires: bonfires, moment: moment, longestStreak: user.longestStreak, - currentStreak: user.currentStreak, - encodeURI: encodeURI + currentStreak: user.currentStreak }); } ); From 6c305dbc6763b4bda0c164e6fd2a5516ce08c366 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Thu, 1 Oct 2015 21:44:24 -0700 Subject: [PATCH 71/90] feature make completedChallenges uniq now when users complete a challenge, it will instead update the last save if it exists. --- common/models/user.json | 38 +++++--------------------------------- server/boot/challenge.js | 38 ++++++++++++++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/common/models/user.json b/common/models/user.json index 01a3b3a6bc..bc5e579604 100644 --- a/common/models/user.json +++ b/common/models/user.json @@ -88,39 +88,6 @@ "google": { "type": "string" }, - "completedBonfires": { - "type": [ - { - "id": "string", - "name": "string", - "completedWith": "string", - "completedDate": "string", - "solution": "string" - } - ], - "default": [] - }, - "uncompletedCoursewares": { - "type": "array", - "default": [] - }, - "completedCoursewares": { - "type": [ - { - "completedDate": { - "type": "string", - "defaultFn": "now" - }, - "id": "string", - "name": "string", - "completedWith": "string", - "solution": "string", - "githubLink": "string", - "verified": "boolean" - } - ], - "default": [] - }, "currentStreak": { "type": "number", "default": 0 @@ -140,10 +107,15 @@ "currentChallenge": { "type": {} }, + "isUniqMigrated": { + "type": "boolean", + "default": false + }, "completedChallenges": { "type": [ { "completedDate": "number", + "lastUpdated": "number", "id": "string", "name": "string", "completedWith": "string", diff --git a/server/boot/challenge.js b/server/boot/challenge.js index 1102da7f62..b8b5ed60f4 100644 --- a/server/boot/challenge.js +++ b/server/boot/challenge.js @@ -34,22 +34,52 @@ const dasherize = utils.dasherize; const unDasherize = utils.unDasherize; const getMDNLinks = utils.getMDNLinks; +function makeChallengesUnique(challengeArr) { + // clone and reverse challenges + // then filter by unique id's + // then reverse again + return _.uniq(challengeArr.slice().reverse(), 'id').reverse(); +} function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); } function updateUserProgress(user, challengeId, completedChallenge) { - const alreadyCompleted = user.completedChallenges.some(({ id }) => { - return id === challengeId; + let { completedChallenges } = user; + + // migrate user challenges object to remove + if (!user.isUniqMigrated) { + user.isUniqMigrated = true; + + completedChallenges = user.completedChallenges = + makeChallengesUnique(completedChallenges); + } + + const indexOfChallenge = _.findIndex(completedChallenges, { + id: challengeId }); + const alreadyCompleted = indexOfChallenge !== -1; + if (!alreadyCompleted) { user.progressTimestamps.push({ timestamp: Date.now(), - completedChallenge + completedChallenge: challengeId }); + user.completedChallenges.push(completedChallenge); + return user; } - user.completedChallenges.push(completedChallenge); + + const oldCompletedChallenge = completedChallenges[indexOfChallenge]; + user.completedChallenges[indexOfChallenge] = + Object.assign( + {}, + completedChallenge, + { + completedDate: oldCompletedChallenge.completedDate, + lastUpdated: completedChallenge.completedDate + } + ); return user; } From ee35fe075cb5d52dd38dc4d198b898c71e152481 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Thu, 1 Oct 2015 23:03:52 -0700 Subject: [PATCH 72/90] Feature show Waypoints on user profile page This PR also fixes some bugs in lockedDown mode --- common/models/user.json | 2 +- server/boot/user.js | 73 ++++++++++++++++++++-------------- server/views/account/show.jade | 25 ++++++++++-- 3 files changed, 65 insertions(+), 35 deletions(-) diff --git a/common/models/user.json b/common/models/user.json index bc5e579604..c46d1c2f13 100644 --- a/common/models/user.json +++ b/common/models/user.json @@ -100,7 +100,7 @@ "type": "boolean", "default": true }, - "lockdownMode": { + "isLocked": { "type": "boolean", "default": false }, diff --git a/server/boot/user.js b/server/boot/user.js index 09e1034bcc..214c0b9264 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -132,18 +132,18 @@ module.exports = function(app) { const { path } = req; User.findOne( { where: { username } }, - function(err, user) { + function(err, profileUser) { if (err) { return next(err); } - if (!user) { + if (!profileUser) { req.flash('errors', { msg: `404: We couldn't find path ${ path }` }); return res.redirect('/'); } - var cals = user + var cals = profileUser .progressTimestamps .map(objOrNum => { return typeof objOrNum === 'number' ? @@ -152,10 +152,10 @@ module.exports = function(app) { }) .sort(); - user.currentStreak = calcCurrentStreak(cals); - user.longestStreak = calcLongestStreak(cals); + profileUser.currentStreak = calcCurrentStreak(cals); + profileUser.longestStreak = calcLongestStreak(cals); - const data = user + const data = profileUser .progressTimestamps .map((objOrNum) => { return typeof objOrNum === 'number' ? @@ -170,42 +170,55 @@ module.exports = function(app) { return data; }, {}); - const challenges = user.completedChallenges.filter(function(obj) { + const baseAndZip = profileUser.completedChallenges.filter( + function(obj) { return obj.challengeType === 3 || obj.challengeType === 4; - }); + } + ); - const bonfires = user.completedChallenges.filter(function(obj) { + const bonfires = profileUser.completedChallenges.filter(function(obj) { return obj.challengeType === 5 && (obj.name || '').match(/Bonfire/g); }); + const waypoints = profileUser.completedChallenges.filter(function(obj) { + return (obj.name || '').match(/^Waypoint/i); + }); + res.render('account/show', { - title: 'Camper ' + user.username + '\'s portfolio', - username: user.username, - name: user.name, - isMigrationGrandfathered: user.isMigrationGrandfathered, - isGithubCool: user.isGithubCool, - location: user.location, - github: user.githubURL, - linkedin: user.linkedin, - google: user.google, - facebook: user.facebook, - twitter: user.twitter, - picture: user.picture, - progressTimestamps: user.progressTimestamps, + title: 'Camper ' + profileUser.username + '\'s portfolio', + username: profileUser.username, + name: profileUser.name, + isMigrationGrandfathered: profileUser.isMigrationGrandfathered, + isGithubCool: profileUser.isGithubCool, + isLocked: !!profileUser.isLocked, + + location: profileUser.location, calender: data, - challenges: challenges, - bonfires: bonfires, - moment: moment, - longestStreak: user.longestStreak, - currentStreak: user.currentStreak + + github: profileUser.githubURL, + linkedin: profileUser.linkedin, + google: profileUser.google, + facebook: profileUser.facebook, + twitter: profileUser.twitter, + picture: profileUser.picture, + + progressTimestamps: profileUser.progressTimestamps, + + baseAndZip, + bonfires, + waypoints, + moment, + + longestStreak: profileUser.longestStreak, + currentStreak: profileUser.currentStreak }); } ); } function toggleLockdownMode(req, res, next) { - if (req.user.lockdownMode === true) { - req.user.lockdownMode = false; + if (req.user.isLocked === true) { + req.user.isLocked = false; return req.user.save(function(err) { if (err) { return next(err); } @@ -219,7 +232,7 @@ module.exports = function(app) { res.redirect('/' + req.user.username); }); } - req.user.lockdownMode = true; + req.user.isLocked = true; return req.user.save(function(err) { if (err) { return next(err); } diff --git a/server/views/account/show.jade b/server/views/account/show.jade index d633f7f7b7..5f07918815 100644 --- a/server/views/account/show.jade +++ b/server/views/account/show.jade @@ -97,8 +97,8 @@ block content h4.col-sm-6.text-left Current Streak: #{currentStreak} #{currentStreak + currentStreak === 1 ? ' day' : ' days'} - if (user.username == username || !user.lockdownMode) - if (challenges.length > 0) + if (user && user.username == username || !isLocked) + if (baseAndZip.length > 0) .col-sm-12 table.table.table-striped thead @@ -106,7 +106,7 @@ block content th.col-xs-4 Project th.col-xs-2 Completed th.col-xs-6 Link - for challenge in challenges + for challenge in baseAndZip tr td.col-xs-4 a(href='/challenges/' + challenge.name, target='_blank')= challenge.name @@ -127,6 +127,23 @@ block content td.col-xs-2= moment(bonfire.completedDate, 'x').format("MMM DD, YYYY") td.col-xs-6 a(href='/challenges/' + bonfire.name + '?solution=' + encodeURIComponent(bonfire.solution), target='_blank') View my solution + if (waypoints.length > 0) + .col-sm-12 + table.table.table-striped + thead + tr + th.col-xs-4 Waypoints + th.col-xs-2 Completed + th.col-xs-6 Solution + for challenge in waypoints + tr + td.col-xs-4= challenge.name + td.col-xs-2= moment(challenge.completedDate, 'x').format("MMM DD, YYYY") + td.col-xs-6 + if (challenge.solution) + a(href='/challenges/' + challenge.name + '?solution=' + encodeURIComponent(challenge.solution), target='_blank') View my solution + else + a(href='/challenges/' + challenge.name) View this challenge if (user && user.username === username) .panel.panel-info @@ -136,7 +153,7 @@ block content a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='mailto:team@freecodecamp.com') span.ion-email | Email us at team@freecodecamp.com - if (!user.lockdownMode) + if (!user.isLocked) .col-xs-12 a.btn.btn-lg.btn-block.btn-info.btn-link-social(href='/toggle-lockdown-mode') span.ion-locked From 69a372902582745ba30b1e93d171c35564163c5f Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Thu, 1 Oct 2015 23:54:20 -0700 Subject: [PATCH 73/90] restructure challenges and add certificate challenge skeletons --- seed/challenges/advanced-bonfires.json | 2 +- seed/challenges/angularjs.json | 2 +- .../automated-testing-and-debugging.json | 2 +- seed/challenges/basejumps.json | 2 +- seed/challenges/basic-bonfires.json | 2 +- seed/challenges/basic-javascript.json | 2 +- seed/challenges/basic-ziplines.json | 92 ++--------- seed/challenges/bootstrap.json | 2 +- .../front-end-development-certificate.json | 33 ++++ .../full-stack-development-certificate.json | 33 ++++ seed/challenges/getting-started.json | 2 +- seed/challenges/git.json | 2 +- seed/challenges/html5-and-css.json | 2 +- seed/challenges/intermediate-bonfires.json | 2 +- seed/challenges/intermediate-ziplines.json | 143 +++++++++++++----- seed/challenges/jquery.json | 2 +- seed/challenges/json-apis-and-ajax.json | 23 +++ seed/challenges/mongodb.json | 2 +- seed/challenges/nodejs-and-expressjs.json | 2 +- ...t-oriented-and-functional-programming.json | 2 +- .../upper-intermediate-bonfires.json | 2 +- 21 files changed, 223 insertions(+), 133 deletions(-) create mode 100644 seed/challenges/front-end-development-certificate.json create mode 100644 seed/challenges/full-stack-development-certificate.json create mode 100644 seed/challenges/json-apis-and-ajax.json diff --git a/seed/challenges/advanced-bonfires.json b/seed/challenges/advanced-bonfires.json index 3ee8a9f041..beb458c837 100644 --- a/seed/challenges/advanced-bonfires.json +++ b/seed/challenges/advanced-bonfires.json @@ -1,6 +1,6 @@ { "name": "Advanced Algorithm Scripting", - "order": 0.013, + "order": 15, "challenges": [ { "id": "aff0395860f5d3034dc0bfc9", diff --git a/seed/challenges/angularjs.json b/seed/challenges/angularjs.json index 7a3155ed4f..72235565bf 100644 --- a/seed/challenges/angularjs.json +++ b/seed/challenges/angularjs.json @@ -1,6 +1,6 @@ { "name": "AngularJS", - "order": 0.014, + "order": 16, "challenges": [ { "id": "bd7154d8c441eddfaeb5bdef", diff --git a/seed/challenges/automated-testing-and-debugging.json b/seed/challenges/automated-testing-and-debugging.json index 294739a6ca..b5ab25c2f9 100644 --- a/seed/challenges/automated-testing-and-debugging.json +++ b/seed/challenges/automated-testing-and-debugging.json @@ -1,6 +1,6 @@ { "name": "Automated Testing and Debugging", - "order": 0.012, + "order": 14, "challenges": [ { "id":"cf1111c1c16feddfaeb6bdef", diff --git a/seed/challenges/basejumps.json b/seed/challenges/basejumps.json index 2235eefc58..7fe92f14bc 100644 --- a/seed/challenges/basejumps.json +++ b/seed/challenges/basejumps.json @@ -1,6 +1,6 @@ { "name": "Full Stack JavaScript Projects", - "order": 0.019, + "order": 20, "challenges": [ { "id": "bd7158d8c443eddfaeb5bcef", diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index 54d3879aff..55b0284595 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -1,6 +1,6 @@ { "name": "Basic Algorithm Scripting", - "order": 0.007, + "order": 7, "challenges": [ { "id": "ad7123c8c441eddfaeb5bdef", diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index 1c7ecb2b7e..1047c6845d 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -1,6 +1,6 @@ { "name": "Basic JavaScript", - "order": 0.005, + "order": 5, "challenges": [ { "id":"bd7123c9c441eddfaeb4bdef", diff --git a/seed/challenges/basic-ziplines.json b/seed/challenges/basic-ziplines.json index 113d9e7de5..e26eb9faca 100644 --- a/seed/challenges/basic-ziplines.json +++ b/seed/challenges/basic-ziplines.json @@ -1,6 +1,6 @@ { "name": "Basic Front End Development Projects", - "order": 0.008, + "order": 8, "challenges": [ { "id": "bd7158d8c442eddfbeb5bd1f", @@ -148,56 +148,10 @@ "namePt": "", "descriptionPt": [] }, - { - "id": "bd7158d8c442eddfaeb5bd10", - "title": "Show the Local Weather", - "difficulty": 1.03, - "challengeSeed": ["126415127"], - "description": [ - "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/AdventureBear/full/yNBJRj.", - "Rule #1: Don't look at the example project's code on CodePen. Figure it out for yourself.", - "Rule #2: You may use whichever libraries or APIs you need.", - "Rule #3: Reverse engineer the example project's functionality, and also feel free to personalize it.", - "Here are the user stories you must enable, and optional bonus user stories:", - "User Story: As a user, I can see the weather in my current location.", - "Bonus User Story: As a user, I can see an icon depending on the weather.", - "Bonus User Story: As a user, I see a different background image (e.g. snowy mountain, hot desert) depending on the weather.", - "Bonus User Story: As a user, I can push a button to toggle between Fahrenheit and Celsius.", - "Remember to use Read-Search-Ask if you get stuck.", - "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", - "If you'd like immediate feedback on your project from fellow campers, click this button and paste in a link to your CodePen project.

Click here then add your link to your tweet's text" - ], - "type": "zipline", - "challengeType": 3, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "Покажите местную погоду", - "descriptionRu": [ - "Задание: Создайте CodePen.io который успешно копирует вот этот: http://codepen.io/AdventureBear/full/yNBJRj.", - "Правило #1: Не подсматривайте код приведенного на CodePen примера. Напишите его самостоятельно.", - "Правило #2: Можете использовать любые библиотеки или API, которые потребуются.", - "Правило #3: Воссоздайте функционал приведенного примера и не стесняйтесь добавить что-нибудь от себя.", - "Реализуйте следующие пользовательские истории, сделайте также бонусные по желанию:", - "Пользовательская история: В качестве пользователя, я могу узнать погоду с учетом моего текущего местоположения.", - "Бонусная пользовательская история: В качестве пользователя, я могу в зависимости от погоды видеть различные температурные значки.", - "Бонусная пользовательская история: В качестве пользователя, я могу в зависимости от погоды видеть различные фоновые изображения (снежные горы, знойная пустыня).", - "Бонусная пользовательская история: В качестве пользователя, я могу нажать на кнопку чтобы переключится между градусами по Цельсию или по Фаренгейту.", - "Если что-то не получается, воспользуйтесь Read-Search-Ask.", - "Когда выполните задание кликните кнопку \"I've completed this challenge\" и добавьте ссылку на ваш CodePen. Если вы программировали с кем-то в паре, также добавьте имя вашего напарника.", - "Если вы хотите получить немедленную оценку вашего проекта, нажмите эту кнопку и добавьте ссылку на ваш CodePen. В противном случае мы проверим его перед тем как вы приступите к проектам для некоммерческих организаций.

Click here then add your link to your tweet's text" - ], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, { "id": "bd7158d8c442eddfaeb5bd0f", "title": "Build a Pomodoro Clock", - "difficulty": 1.04, + "difficulty": 1.03, "challengeSeed": ["126411567"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/GeoffStorbeck/full/RPbGxZ/.", @@ -239,24 +193,19 @@ "descriptionPt": [] }, { - "id": "bd7158d8c442eddfaeb5bd1f", - "title": "Use the Twitch.tv JSON API", - "difficulty": 1.05, - "challengeSeed": ["126411564"], + "id": "bd7158d8c442eddfaeb5bd17", + "title": "Build a JavaScript Calculator", + "difficulty": 1.04, + "challengeSeed": ["126411565"], "description": [ - "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/GeoffStorbeck/full/GJKRxZ.", + "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/GeoffStorbeck/full/zxgaqw.", "Rule #1: Don't look at the example project's code on CodePen. Figure it out for yourself.", "Rule #2: You may use whichever libraries or APIs you need.", "Rule #3: Reverse engineer the example project's functionality, and also feel free to personalize it.", "Here are the user stories you must enable, and optional bonus user stories:", - "User Story: As a user, I can see whether Free Code Camp is currently streaming on Twitch.tv.", - "User Story: As a user, I can click the status output and be sent directly to the Free Code Camp's Twitch.tv channel.", - "User Story: As a user, if Free Code Camp is streaming, I can see additional details about what they are streaming.", - "Bonus User Story: As a user, I can search through the streams listed.", - "Bonus User Story: As a user, I will see a placeholder notification if a streamer has closed their Twitch account. You can verify this works by adding brunofin and comster404 to your array of Twitch streamers.", - "Hint: Here's an example call to Twitch.tv's JSON API: https://api.twitch.tv/kraken/streams/freecodecamp.", - "Hint: The relevant documentation about this API call is here: https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel.", - "Hint: Here's an array of the Twitch.tv usernames of people who regularly stream coding: [\"freecodecamp\", \"storbeck\", \"terakilobyte\", \"habathcx\",\"RobotCaleb\",\"thomasballinger\",\"noobs2ninjas\",\"beohoff\"]", + "User Story: As a user, I can add, subtract, multiply and divide two numbers.", + "Bonus User Story: I can clear the input field with a clear button.", + "Bonus User Story: I can keep chaining mathematical operations together until I hit the clear button, and the calculator will tell me the correct output.", "Remember to use Read-Search-Ask if you get stuck.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project from fellow campers, click this button and paste in a link to your CodePen project.

Click here then add your link to your tweet's text" @@ -268,25 +217,8 @@ "descriptionCn": [], "nameFr": "", "descriptionFr": [], - "nameRu": "Используйте Twitch.tv JSON API", - "descriptionRu": [ - "Задание: Создайте CodePen.io который успешно копирует вот этот: http://codepen.io/GeoffStorbeck/full/GJKRxZ.", - "Правило #1: Не подсматривайте код приведенного на CodePen примера. Напишите его самостоятельно.", - "Правило #2: Можете использовать любые библиотеки или API, которые потребуются.", - "Правило #3: Воссоздайте функционал приведенного примера и не стесняйтесь добавить что-нибудь от себя.", - "Реализуйте следующие пользовательские истории, сделайте также бонусные по желанию:", - "Пользовательская история: В качестве пользователя, я могу увидеть идет ли в данный момент на Twitch.tv трансляция Free Code Camp.", - "Пользовательская история: В качестве пользователя, я могу, кликнув на описание трансляции, перейти на канал Free Code Camp.", - "Пользовательская история: В качестве пользователя, я могу видеть дополнительную информацию о текущей трансляции Free Code Camp.", - "Бонусная пользовательская история: В качестве пользователя, я могу произвести поиск среди перечисленных каналов.", - "Бонусная пользовательская история: В качестве пользователя, я могу видеть уведомление, если создатель канала закрыл свой аккаунт на Twitch.tv. Добавьте в массив имена пользователей brunofin и comster404, чтобы убедиться, что эта функция реализована правильно.", - "Подсказка: Пример запроса к Twitch.tv JSON API: https://api.twitch.tv/kraken/streams/freecodecamp.", - "Подсказка: Документацию об этом запросе можно найти по ссылке: https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel.", - "Подсказка: В этом массиве приведены имена пользователей, которые регулярно пишут код онлайн: [\"freecodecamp\", \"storbeck\", \"terakilobyte\", \"habathcx\",\"RobotCaleb\",\"comster404\",\"brunofin\",\"thomasballinger\",\"noobs2ninjas\",\"beohoff\"]", - "Если что-то не получается, воспользуйтесь Read-Search-Ask.", - "Когда выполните задание кликните кнопку \"I've completed this challenge\" и добавьте ссылку на ваш CodePen. Если вы программировали с кем-то в паре, также добавьте имя вашего напарника.", - "Если вы хотите получить немедленную оценку вашего проекта, нажмите эту кнопку и добавьте ссылку на ваш CodePen. В противном случае мы проверим его перед тем как вы приступите к проектам для некоммерческих организаций.

Click here then add your link to your tweet's text" - ], + "nameRu": "", + "descriptionRu": [], "nameEs": "", "descriptionEs": [], "namePt": "", diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json index fb4f864474..ad61359b30 100644 --- a/seed/challenges/bootstrap.json +++ b/seed/challenges/bootstrap.json @@ -1,6 +1,6 @@ { "name": "Responsive Design with Bootstrap", - "order": 0.003, + "order": 3, "challenges": [ { "id": "bad87fee1348bd9acde08712", diff --git a/seed/challenges/front-end-development-certificate.json b/seed/challenges/front-end-development-certificate.json new file mode 100644 index 0000000000..fc34cac488 --- /dev/null +++ b/seed/challenges/front-end-development-certificate.json @@ -0,0 +1,33 @@ +{ + "name": "Claim Your Front End Development Certificate", + "order": 12, + "challenges": [ + { + "id": "561add10cb82ac38a17513be", + "title": "Claim Your Front End Development Certificate", + "difficulty": 0.00, + "challengeSeed": [], + "description": [ + [ + "http://i.imgur.com/RlEk2IF.jpg", + "a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", + "Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", + "" + ] + ], + "type": "Waypoint", + "challengeType": 7, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + } + ] +} diff --git a/seed/challenges/full-stack-development-certificate.json b/seed/challenges/full-stack-development-certificate.json new file mode 100644 index 0000000000..edd2c5e932 --- /dev/null +++ b/seed/challenges/full-stack-development-certificate.json @@ -0,0 +1,33 @@ +{ + "name": "Claim Your Full Stack Development Certificate", + "order": 21, + "challenges": [ + { + "id": "660add10cb82ac38a17513be", + "title": "Claim Your Full Stack Development Certificate", + "difficulty": 0.00, + "challengeSeed": [], + "description": [ + [ + "http://i.imgur.com/RlEk2IF.jpg", + "a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", + "Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", + "" + ] + ], + "type": "Waypoint", + "challengeType": 7, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + } + ] +} diff --git a/seed/challenges/getting-started.json b/seed/challenges/getting-started.json index 5ac330c4e3..71a6ee995a 100644 --- a/seed/challenges/getting-started.json +++ b/seed/challenges/getting-started.json @@ -1,6 +1,6 @@ { "name": "Get Started with Free Code Camp", - "order": 0.000, + "order": 1, "challenges": [ { "id": "560add10cb82ac38a17513be", diff --git a/seed/challenges/git.json b/seed/challenges/git.json index 4cb9c7c930..40bc382434 100644 --- a/seed/challenges/git.json +++ b/seed/challenges/git.json @@ -1,6 +1,6 @@ { "name": "Git", - "order" : 0.016, + "order" : 17, "challenges": [ { "id": "bd7353d8c341eddeaeb5bd0f", diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json index d865ce2d56..105b877909 100644 --- a/seed/challenges/html5-and-css.json +++ b/seed/challenges/html5-and-css.json @@ -1,6 +1,6 @@ { "name": "HTML5 and CSS", - "order": 0.002, + "order": 2, "challenges": [ { "id": "bd7123c8c441eddfaeb5bdef", diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json index 684afd44e8..c1299dfce2 100644 --- a/seed/challenges/intermediate-bonfires.json +++ b/seed/challenges/intermediate-bonfires.json @@ -1,6 +1,6 @@ { "name": "Intermediate Algorithm Scripting", - "order": 0.009, + "order": 9, "challenges": [ { "id": "a3566b1109230028080c9345", diff --git a/seed/challenges/intermediate-ziplines.json b/seed/challenges/intermediate-ziplines.json index c119db33af..409b225be6 100644 --- a/seed/challenges/intermediate-ziplines.json +++ b/seed/challenges/intermediate-ziplines.json @@ -1,11 +1,112 @@ { "name": "Intermediate Front End Development Projects", - "order": 0.015, + "order": 11, "challenges": [ { + "id": "bd7158d8c442eddfaeb5bd10", + "title": "Show the Local Weather", + "difficulty": 1.01, + "challengeSeed": ["126415127"], + "description": [ + "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/AdventureBear/full/yNBJRj.", + "Rule #1: Don't look at the example project's code on CodePen. Figure it out for yourself.", + "Rule #2: You may use whichever libraries or APIs you need.", + "Rule #3: Reverse engineer the example project's functionality, and also feel free to personalize it.", + "Here are the user stories you must enable, and optional bonus user stories:", + "User Story: As a user, I can see the weather in my current location.", + "Bonus User Story: As a user, I can see an icon depending on the weather.", + "Bonus User Story: As a user, I see a different background image (e.g. snowy mountain, hot desert) depending on the weather.", + "Bonus User Story: As a user, I can push a button to toggle between Fahrenheit and Celsius.", + "Remember to use Read-Search-Ask if you get stuck.", + "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", + "If you'd like immediate feedback on your project from fellow campers, click this button and paste in a link to your CodePen project.

Click here then add your link to your tweet's text" + ], + "type": "zipline", + "challengeType": 3, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "Покажите местную погоду", + "descriptionRu": [ + "Задание: Создайте CodePen.io который успешно копирует вот этот: http://codepen.io/AdventureBear/full/yNBJRj.", + "Правило #1: Не подсматривайте код приведенного на CodePen примера. Напишите его самостоятельно.", + "Правило #2: Можете использовать любые библиотеки или API, которые потребуются.", + "Правило #3: Воссоздайте функционал приведенного примера и не стесняйтесь добавить что-нибудь от себя.", + "Реализуйте следующие пользовательские истории, сделайте также бонусные по желанию:", + "Пользовательская история: В качестве пользователя, я могу узнать погоду с учетом моего текущего местоположения.", + "Бонусная пользовательская история: В качестве пользователя, я могу в зависимости от погоды видеть различные температурные значки.", + "Бонусная пользовательская история: В качестве пользователя, я могу в зависимости от погоды видеть различные фоновые изображения (снежные горы, знойная пустыня).", + "Бонусная пользовательская история: В качестве пользователя, я могу нажать на кнопку чтобы переключится между градусами по Цельсию или по Фаренгейту.", + "Если что-то не получается, воспользуйтесь Read-Search-Ask.", + "Когда выполните задание кликните кнопку \"I've completed this challenge\" и добавьте ссылку на ваш CodePen. Если вы программировали с кем-то в паре, также добавьте имя вашего напарника.", + "Если вы хотите получить немедленную оценку вашего проекта, нажмите эту кнопку и добавьте ссылку на ваш CodePen. В противном случае мы проверим его перед тем как вы приступите к проектам для некоммерческих организаций.

Click here then add your link to your tweet's text" + ], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "bd7158d8c442eddfaeb5bd1f", + "title": "Use the Twitch.tv JSON API", + "difficulty": 1.02, + "challengeSeed": ["126411564"], + "description": [ + "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/GeoffStorbeck/full/GJKRxZ.", + "Rule #1: Don't look at the example project's code on CodePen. Figure it out for yourself.", + "Rule #2: You may use whichever libraries or APIs you need.", + "Rule #3: Reverse engineer the example project's functionality, and also feel free to personalize it.", + "Here are the user stories you must enable, and optional bonus user stories:", + "User Story: As a user, I can see whether Free Code Camp is currently streaming on Twitch.tv.", + "User Story: As a user, I can click the status output and be sent directly to the Free Code Camp's Twitch.tv channel.", + "User Story: As a user, if Free Code Camp is streaming, I can see additional details about what they are streaming.", + "Bonus User Story: As a user, I can search through the streams listed.", + "Bonus User Story: As a user, I will see a placeholder notification if a streamer has closed their Twitch account. You can verify this works by adding brunofin and comster404 to your array of Twitch streamers.", + "Hint: Here's an example call to Twitch.tv's JSON API: https://api.twitch.tv/kraken/streams/freecodecamp.", + "Hint: The relevant documentation about this API call is here: https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel.", + "Hint: Here's an array of the Twitch.tv usernames of people who regularly stream coding: [\"freecodecamp\", \"storbeck\", \"terakilobyte\", \"habathcx\",\"RobotCaleb\",\"thomasballinger\",\"noobs2ninjas\",\"beohoff\"]", + "Remember to use Read-Search-Ask if you get stuck.", + "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", + "If you'd like immediate feedback on your project from fellow campers, click this button and paste in a link to your CodePen project.

Click here then add your link to your tweet's text" + ], + "type": "zipline", + "challengeType": 3, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "Используйте Twitch.tv JSON API", + "descriptionRu": [ + "Задание: Создайте CodePen.io который успешно копирует вот этот: http://codepen.io/GeoffStorbeck/full/GJKRxZ.", + "Правило #1: Не подсматривайте код приведенного на CodePen примера. Напишите его самостоятельно.", + "Правило #2: Можете использовать любые библиотеки или API, которые потребуются.", + "Правило #3: Воссоздайте функционал приведенного примера и не стесняйтесь добавить что-нибудь от себя.", + "Реализуйте следующие пользовательские истории, сделайте также бонусные по желанию:", + "Пользовательская история: В качестве пользователя, я могу увидеть идет ли в данный момент на Twitch.tv трансляция Free Code Camp.", + "Пользовательская история: В качестве пользователя, я могу, кликнув на описание трансляции, перейти на канал Free Code Camp.", + "Пользовательская история: В качестве пользователя, я могу видеть дополнительную информацию о текущей трансляции Free Code Camp.", + "Бонусная пользовательская история: В качестве пользователя, я могу произвести поиск среди перечисленных каналов.", + "Бонусная пользовательская история: В качестве пользователя, я могу видеть уведомление, если создатель канала закрыл свой аккаунт на Twitch.tv. Добавьте в массив имена пользователей brunofin и comster404, чтобы убедиться, что эта функция реализована правильно.", + "Подсказка: Пример запроса к Twitch.tv JSON API: https://api.twitch.tv/kraken/streams/freecodecamp.", + "Подсказка: Документацию об этом запросе можно найти по ссылке: https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel.", + "Подсказка: В этом массиве приведены имена пользователей, которые регулярно пишут код онлайн: [\"freecodecamp\", \"storbeck\", \"terakilobyte\", \"habathcx\",\"RobotCaleb\",\"comster404\",\"brunofin\",\"thomasballinger\",\"noobs2ninjas\",\"beohoff\"]", + "Если что-то не получается, воспользуйтесь Read-Search-Ask.", + "Когда выполните задание кликните кнопку \"I've completed this challenge\" и добавьте ссылку на ваш CodePen. Если вы программировали с кем-то в паре, также добавьте имя вашего напарника.", + "Если вы хотите получить немедленную оценку вашего проекта, нажмите эту кнопку и добавьте ссылку на ваш CodePen. В противном случае мы проверим его перед тем как вы приступите к проектам для некоммерческих организаций.

Click here then add your link to your tweet's text" + ], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "bd7158d8c442eddfaeb5bd18", "title": "Stylize Stories on Camper News", - "difficulty": 1.02, + "difficulty": 1.03, "challengeSeed": ["126415129"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/MarufSarker/full/ZGPZLq/.", @@ -38,7 +139,7 @@ { "id": "bd7158d8c442eddfaeb5bd19", "title": "Build a Wikipedia Viewer", - "difficulty": 1.03, + "difficulty": 1.04, "challengeSeed": ["126415131"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/GeoffStorbeck/full/MwgQea.", @@ -68,42 +169,10 @@ "namePt": "", "descriptionPt": [] }, - { - "id": "bd7158d8c442eddfaeb5bd17", - "title": "Build a JavaScript Calculator", - "difficulty": 1.05, - "challengeSeed": ["126411565"], - "description": [ - "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/GeoffStorbeck/full/zxgaqw.", - "Rule #1: Don't look at the example project's code on CodePen. Figure it out for yourself.", - "Rule #2: You may use whichever libraries or APIs you need.", - "Rule #3: Reverse engineer the example project's functionality, and also feel free to personalize it.", - "Here are the user stories you must enable, and optional bonus user stories:", - "User Story: As a user, I can add, subtract, multiply and divide two numbers.", - "Bonus User Story: I can clear the input field with a clear button.", - "Bonus User Story: I can keep chaining mathematical operations together until I hit the clear button, and the calculator will tell me the correct output.", - "Remember to use Read-Search-Ask if you get stuck.", - "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", - "If you'd like immediate feedback on your project from fellow campers, click this button and paste in a link to your CodePen project.

Click here then add your link to your tweet's text" - ], - "type": "zipline", - "challengeType": 3, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, { "id": "bd7158d8c442eedfaeb5bd1c", "title": "Build a Tic Tac Toe Game", - "difficulty": 1.06, + "difficulty": 1.05, "challengeSeed": ["126415123"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/alex-dixon/full/JogOpQ/.", @@ -136,7 +205,7 @@ { "id": "bd7158d8c442eddfaeb5bd1c", "title": "Build a Simon Game", - "difficulty": 1.07, + "difficulty": 1.06, "challengeSeed": ["137213633"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/dting/full/QbRyqq/.", diff --git a/seed/challenges/jquery.json b/seed/challenges/jquery.json index 95214991e4..32a312788b 100644 --- a/seed/challenges/jquery.json +++ b/seed/challenges/jquery.json @@ -1,6 +1,6 @@ { "name": "jQuery", - "order": 0.004, + "order": 4, "challenges": [ { "id": "bad87fee1348bd9acdd08826", diff --git a/seed/challenges/json-apis-and-ajax.json b/seed/challenges/json-apis-and-ajax.json new file mode 100644 index 0000000000..f8e11696b7 --- /dev/null +++ b/seed/challenges/json-apis-and-ajax.json @@ -0,0 +1,23 @@ +{ + "name": "JSON APIs and Ajax", + "order": 10, + "challenges": [ + { + "id": "bad88fee1348bd9ae8c08416", + "title": "Stand in challenge", + "dashedName": "waypoint-stand-in-challenge", + "difficulty": 3.24, + "description": [ + "" + ], + "tests": [ + + ], + "challengeSeed": [ + "" + ], + "challengeType": 0, + "type": "waypoint" + } + ] +} diff --git a/seed/challenges/mongodb.json b/seed/challenges/mongodb.json index ad7961c8a8..7e87d0c5fe 100644 --- a/seed/challenges/mongodb.json +++ b/seed/challenges/mongodb.json @@ -1,6 +1,6 @@ { "name": "MongoDB", - "order" : 0.018, + "order" : 19, "challenges": [ { "id": "bd7243d8c341eddeaeb5bd0f", diff --git a/seed/challenges/nodejs-and-expressjs.json b/seed/challenges/nodejs-and-expressjs.json index b2fe33e477..c38c67becc 100644 --- a/seed/challenges/nodejs-and-expressjs.json +++ b/seed/challenges/nodejs-and-expressjs.json @@ -1,6 +1,6 @@ { "name": "Node.js and Express.js", - "order" : 0.017, + "order" : 18, "challenges": [ { "id": "bd7153d8c441eddfaeb5bd0f", diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json index ea84d904db..256a7e0c8c 100644 --- a/seed/challenges/object-oriented-and-functional-programming.json +++ b/seed/challenges/object-oriented-and-functional-programming.json @@ -1,6 +1,6 @@ { "name": "Object Oriented and Functional Programming", - "order": 0.006, + "order": 6, "note": [ "Methods", "Closures", diff --git a/seed/challenges/upper-intermediate-bonfires.json b/seed/challenges/upper-intermediate-bonfires.json index 83e3584e5b..beb0019040 100644 --- a/seed/challenges/upper-intermediate-bonfires.json +++ b/seed/challenges/upper-intermediate-bonfires.json @@ -1,6 +1,6 @@ { "name": "Upper Intermediate Algorithm Scripting", - "order": 0.011, + "order": 13, "challenges": [ { "id": "a2f1d72d9b908d0bd72bb9f6", From a90fdf1e0cf7802687487ea41c312aca0cf71f92 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Thu, 1 Oct 2015 23:58:56 -0700 Subject: [PATCH 74/90] Fix check for existence --- server/views/partials/challenge-modals.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/views/partials/challenge-modals.jade b/server/views/partials/challenge-modals.jade index 85165c357b..46f6eae7ee 100644 --- a/server/views/partials/challenge-modals.jade +++ b/server/views/partials/challenge-modals.jade @@ -35,5 +35,5 @@ a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Cancel script. if (typeof localStorage !== 'undefined') { - localStorage.setItem('currentDashedName', common.dashedName || dashedName || ''); + localStorage.setItem('currentDashedName', typeof common !== 'undefined' && common.dashedName || dashedName || ''); } From ea33385fea80630878d0b51b1fe5ce1eb2b17e3a Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Fri, 2 Oct 2015 01:06:27 -0700 Subject: [PATCH 75/90] remove vestigial difficulty attribute from challenges --- seed/challenges/advanced-bonfires.json | 6 -- seed/challenges/angularjs.json | 5 -- seed/challenges/basejumps.json | 6 -- seed/challenges/basic-bonfires.json | 16 ----- seed/challenges/basic-javascript.json | 19 ----- seed/challenges/basic-ziplines.json | 6 -- seed/challenges/bootstrap.json | 31 -------- seed/challenges/getting-started.json | 7 -- seed/challenges/git.json | 1 - seed/challenges/hikes.json | 21 ------ seed/challenges/html5-and-css.json | 71 +------------------ seed/challenges/intermediate-bonfires.json | 21 ------ seed/challenges/intermediate-ziplines.json | 5 -- seed/challenges/jquery.json | 17 ----- seed/challenges/mongodb.json | 1 - seed/challenges/nodejs-and-expressjs.json | 5 -- ...t-oriented-and-functional-programming.json | 2 - .../upper-intermediate-bonfires.json | 3 - .../json-apis-and-ajax.json | 13 ---- 19 files changed, 2 insertions(+), 254 deletions(-) diff --git a/seed/challenges/advanced-bonfires.json b/seed/challenges/advanced-bonfires.json index 3ee8a9f041..fff06546dd 100644 --- a/seed/challenges/advanced-bonfires.json +++ b/seed/challenges/advanced-bonfires.json @@ -5,7 +5,6 @@ { "id": "aff0395860f5d3034dc0bfc9", "title": "Validate US Telephone Numbers", - "difficulty": "4.01", "description": [ "Return true if the passed string is a valid US phone number", "The user may fill out the form field any way they choose as long as it is a valid US number. The following are all valid formats for US numbers:", @@ -71,7 +70,6 @@ { "id": "a3f503de51cf954ede28891d", "title": "Symmetric Difference", - "difficulty": "4.02", "description": [ "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.", "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.", @@ -110,7 +108,6 @@ { "id": "aa2e6f85cab2ab736c9a9b24", "title": "Exact Change", - "difficulty": "4.03", "description": [ "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.", "cid is a 2d array listing available currency.", @@ -166,7 +163,6 @@ { "id": "a56138aff60341a09ed6c480", "title": "Inventory Update", - "difficulty": "4.04", "description": [ "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.", "Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code." @@ -221,7 +217,6 @@ { "id": "a7bf700cd123b9a54eef01d5", "title": "No repeats please", - "difficulty": "4.05", "description": [ "Return the number of total permutations of the provided string that don't have repeated consecutive letters.", "For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.", @@ -264,7 +259,6 @@ "id": "a19f0fbe1872186acd434d5a", "title": "Friendly Date Ranges", "dashedName": "bonfire-friendly-date-ranges", - "difficulty": "4.06", "description": [ "Implement a way of converting two dates into a more friendly date range that could be presented to a user.", "It must not show any redundant information in the date range.", diff --git a/seed/challenges/angularjs.json b/seed/challenges/angularjs.json index 7a3155ed4f..fcdc14cf3a 100644 --- a/seed/challenges/angularjs.json +++ b/seed/challenges/angularjs.json @@ -5,7 +5,6 @@ { "id": "bd7154d8c441eddfaeb5bdef", "title": "Get Started with Angular.js", - "difficulty": 0.34, "challengeSeed": ["114684726"], "description": [ "Code School has a short, free Angular.js course. This will give us a quick tour of Angular.js's mechanics and features.", @@ -29,7 +28,6 @@ { "id": "bd7155d8c441eddfaeb5bdef", "title": "Apply Angular.js Directives", - "difficulty": 0.35, "challengeSeed": ["114684727"], "description": [ "Directives serve as markers in your HTML. When Angular.js compiles your HTML, it will alter the behavior of DOM elements based on the directives you've used.", @@ -53,7 +51,6 @@ { "id": "bd7156d8c441eddfaeb5bdef", "title": "Power Forms with Angular.js", - "difficulty": 0.36, "challengeSeed": ["114684729"], "description": [ "One area where Angular.js really shines is its powerful web forms.", @@ -77,7 +74,6 @@ { "id": "bd7157d8c441eddfaeb5bdef", "title": "Customize Angular.js Directives", - "difficulty": 0.37, "challengeSeed": ["114685062"], "description": [ "Now we'll learn how to modify existing Angular.js directives, and even build directives of your own.", @@ -100,7 +96,6 @@ { "id": "bd7158d8c441eddfaeb5bdef", "title": "Create Angular.js Services", - "difficulty": 0.38, "challengeSeed": ["114685060"], "description": [ "Services are functions that you can use and reuse throughout your Angular.js app to get things done.", diff --git a/seed/challenges/basejumps.json b/seed/challenges/basejumps.json index 2235eefc58..bfa6d56d1c 100644 --- a/seed/challenges/basejumps.json +++ b/seed/challenges/basejumps.json @@ -5,7 +5,6 @@ { "id": "bd7158d8c443eddfaeb5bcef", "title": "Get Set for Basejumps", - "difficulty": 2.00, "challengeSeed": ["128451852"], "description": [ "Objective: Get the MEAN stack running on Cloud 9, push your code to GitHub, and deploy it to Heroku.", @@ -66,7 +65,6 @@ { "id": "bd7158d8c443eddfaeb5bdef", "title": "Build a Voting App", - "difficulty": 2.01, "challengeSeed": ["133315786"], "description": [ "Objective: Build a full stack JavaScript app that successfully reverse-engineers this: http://votingapp.herokuapp.com/ and deploy it to Heroku.", @@ -103,7 +101,6 @@ { "id": "bd7158d8c443eddfaeb5bdff", "title": "Build a Nightlife Coordination App", - "difficulty": 2.02, "challengeSeed": ["133315781"], "description": [ "Objective: Build a full stack JavaScript app that successfully reverse-engineers this: http://whatsgoinontonight.herokuapp.com/ and deploy it to Heroku.", @@ -137,7 +134,6 @@ { "id": "bd7158d8c443eddfaeb5bd0e", "title": "Chart the Stock Market", - "difficulty": 2.03, "challengeSeed": ["133315787"], "description": [ "Objective: Build a full stack JavaScript app that successfully reverse-engineers this: http://stockstream.herokuapp.com/ and deploy it to Heroku.", @@ -170,7 +166,6 @@ { "id": "bd7158d8c443eddfaeb5bd0f", "title": "Manage a Book Trading Club", - "difficulty": 2.04, "challengeSeed": ["133316032"], "description": [ "Objective: Build a full stack JavaScript app that successfully reverse-engineers this: http://bookjump.herokuapp.com/ and deploy it to Heroku.", @@ -203,7 +198,6 @@ { "id": "bd7158d8c443eddfaeb5bdee", "title": "Build a Pinterest Clone", - "difficulty": 2.05, "challengeSeed": ["133315784"], "description": [ "Objective: Build a full stack JavaScript app that successfully reverse-engineers this: http://stark-lowlands-3680.herokuapp.com/ and deploy it to Heroku.", diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index 54d3879aff..c8fbdd1920 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -5,7 +5,6 @@ { "id": "ad7123c8c441eddfaeb5bdef", "title": "Meet Bonfire", - "difficulty": "0", "description": [ "Your goal is to fix the failing test.", "First, run all the tests by clicking \"Run tests\" or by pressing Control + Enter.", @@ -44,7 +43,6 @@ { "id": "a202eed8fc186c8434cb6d61", "title": "Reverse a String", - "difficulty": "1.01", "tests": [ "assert(typeof(reverseString(\"hello\")) === \"string\", 'message: reverseString() should return a string.');", "assert(reverseString(\"hello\") === \"olleh\", 'message: reverseString(\"hello\") should become \"olleh\".');", @@ -93,7 +91,6 @@ "assert(factorialize(20) === 2432902008176640000, 'message: factorialize(20) should return 2432902008176640000.');", "assert(factorialize(0) === 1, 'message: factorialize(0) should return 1.');" ], - "difficulty": "1.02", "description": [ "Return the factorial of the provided integer.", "If the integer is represented with the letter n, a factorial is the product of all positive integers less than or equal to n.", @@ -127,7 +124,6 @@ { "id": "aaa48de84e1ecc7c742e1124", "title": "Check for Palindromes", - "difficulty": "1.03", "description": [ "Return true if the given string is a palindrome. Otherwise, return false.", "A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing.", @@ -178,7 +174,6 @@ { "id": "a26cbbe9ad8655a977e1ceb5", "title": "Find the Longest Word in a String", - "difficulty": "1.04", "description": [ "Return the length of the longest word in the provided sentence.", "Your response should be a number.", @@ -219,7 +214,6 @@ { "id": "ab6137d4e35944e21037b769", "title": "Title Case a Sentence", - "difficulty": "1.05", "description": [ "Return the provided string with the first letter of each word capitalized. Make sure the rest of the word is in lower case.", "For the purpose of this exercise, you should also capitalize connecting words like \"the\" and \"of\".", @@ -257,7 +251,6 @@ { "id": "a789b3483989747d63b0e427", "title": "Return Largest Numbers in Arrays", - "difficulty": "1.06", "description": [ "Return an array consisting of the largest number from each provided sub-array. For simplicity, the provided array will contain exactly 4 sub-arrays.", "Remember, you can iterate through an array with a simple for loop, and access each member with array syntax arr[i] .", @@ -296,7 +289,6 @@ { "id": "acda2fb1324d9b0fa741e6b5", "title": "Confirm the Ending", - "difficulty": "1.07", "description": [ "Check if a string (first argument) ends with the given target string (second argument).", "Remember to use Read-Search-Ask if you get stuck. Write your own code." @@ -336,7 +328,6 @@ { "id": "afcc8d540bea9ea2669306b6", "title": "Repeat a string repeat a string", - "difficulty": "1.08", "description": [ "Repeat a given string (first argument) n times (second argument). Return an empty string if n is a negative number.", "Remember to use Read-Search-Ask if you get stuck. Write your own code." @@ -373,7 +364,6 @@ { "id": "ac6993d51946422351508a41", "title": "Truncate a string", - "difficulty": "1.09", "description": [ "Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a \"...\" ending.", "Note that the three dots at the end add to the string length.", @@ -412,7 +402,6 @@ { "id": "a9bd25c716030ec90084d8a1", "title": "Chunky Monkey", - "difficulty": "1.10", "description": [ "Write a function that splits an array (first argument) into groups the length of size (second argument) and returns them as a multidimensional array.", "Remember to use Read-Search-Ask if you get stuck. Write your own code." @@ -450,7 +439,6 @@ { "id": "ab31c21b530c0dafa9e241ee", "title": "Slasher Flick", - "difficulty": "1.11", "description": [ "Return the remaining elements of an array after chopping off n elements from the head.", "The head meaning the beginning of the array, or the zeroth index", @@ -489,7 +477,6 @@ { "id": "af2170cad53daa0770fabdea", "title": "Mutations", - "difficulty": "1.12", "description": [ "Return true if the string in the first element of the array contains all of the letters of the string in the second element of the array.", "For example, [\"hello\", \"Hello\"], should return true because all of the letters in the second string are present in the first, ignoring case.", @@ -533,7 +520,6 @@ { "id": "adf08ec01beb4f99fc7a68f2", "title": "Falsy Bouncer", - "difficulty": "1.50", "description": [ "Remove all falsy values from an array.", "Falsy values in javascript are false, null, 0, \"\", undefined, and NaN.", @@ -572,7 +558,6 @@ { "id": "a39963a4c10bc8b4d4f06d7e", "title": "Seek and Destroy", - "difficulty": "1.60", "description": [ "You will be provided with an initial array (the first argument in the destroyer function), followed by one or more arguments. Remove all elements from the initial array that are of the same value as these arguments.", "Remember to use Read-Search-Ask if you get stuck. Write your own code." @@ -612,7 +597,6 @@ { "id": "a24c1a4622e3c05097f71d67", "title": "Where do I belong", - "difficulty": "1.61", "description": [ "Return the lowest index at which a value (second argument) should be inserted into a sorted array (first argument).", "For example, where([1,2,3,4], 1.5) should return 1 because it is greater than 1 (0th index), but less than 2 (1st index).", diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index 1c7ecb2b7e..424df615db 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -29,7 +29,6 @@ { "id": "bd7123c9c441eddfaeb5bdef", "title": "Understand Boolean Values", - "difficulty": "9.98001", "description": [ "In computer science, data structures are things that hold data. JavaScript has seven of these. For example, the Number data structure holds numbers.", "Let's learn about the most basic data structure of all: the Boolean. Booleans can only hold the value of either true or false. They are basically little on-off switches.", @@ -57,7 +56,6 @@ { "id": "bd7123c9c443eddfaeb5bdef", "title": "Declare JavaScript Variables", - "difficulty": "9.9801", "description": [ "When we store data in a data structure, we call it a variable. These variables are no different from the x and y variables you use in math.", "Let's create our first variable and call it \"myName\".", @@ -84,7 +82,6 @@ { "id": "bd7123c9c444eddfaeb5bdef", "title": "Declare String Variables", - "difficulty": "9.9802", "description": [ "In the previous challenge, we used the code var myName = \"your name\". This is what we call a String variable. It is nothing more than a \"string\" of characters. JavaScript strings are always wrapped in quotes.", "Now let's create two new string variables: myFirstNameand myLastName and assign them the values of your first and last name, respectively." @@ -110,7 +107,6 @@ { "id": "bd7123c9c448eddfaeb5bdef", "title": "Check the Length Property of a String Variable", - "difficulty": "9.9809", "description": [ "Data structures have properties. For example, strings have a property called .length that will tell you how many characters are in the string.", "For example, if we created a variable var firstName = \"Charles\", we could find out how long the string \"Charles\" is by using the firstName.length property.", @@ -146,7 +142,6 @@ { "id": "bd7123c9c549eddfaeb5bdef", "title": "Use Bracket Notation to Find the First Character in a String", - "difficulty": "9.9810", "description": [ "Bracket notation is a way to get a character at a specific index within a string.", "Computers don't start counting at 1 like humans do. They start at 0.", @@ -181,7 +176,6 @@ { "id": "bd7123c9c450eddfaeb5bdef", "title": "Use Bracket Notation to Find the Nth Character in a String", - "difficulty": "9.9811", "description": [ "You can also use bracket Notationto get the character at other positions within a string.", "Remember that computers start counting at 0, so the first character is actually the zeroth character.", @@ -212,7 +206,6 @@ { "id": "bd7123c9c451eddfaeb5bdef", "title": "Use Bracket Notation to Find the Last Character in a String", - "difficulty": "9.9812", "description": [ "In order to get the last letter of a string, you can subtract one from the string's length.", "For example, if var firstName = \"Charles\", you can get the value of the last letter of the string by using firstName[firstName.length - 1].", @@ -244,7 +237,6 @@ { "id": "bd7123c9c452eddfaeb5bdef", "title": "Use Bracket Notation to Find the Nth-to-Last Character in a String", - "difficulty": "9.9813", "description": [ "In order to get the last letter of a string, you can subtract one from the string's length.", "For example, you can get the value of the third-to-last letter of the var firstName = \"Charles\" string by using firstName[firstName.length - 3].", @@ -276,7 +268,6 @@ { "id": "cf1111c1c11feddfaeb3bdef", "title": "Add Two Numbers with JavaScript", - "difficulty": "9.98141", "description": [ "Let's try to add two numbers using JavaScript.", "JavaScript uses the + symbol for addition.", @@ -299,7 +290,6 @@ { "id": "cf1111c1c11feddfaeb4bdef", "title": "Subtract One Number from Another with JavaScript", - "difficulty": "9.98142", "description": [ "We can also subtract one number from another.", "JavaScript uses the - symbol for subtraction.", @@ -322,7 +312,6 @@ { "id": "cf1231c1c11feddfaeb5bdef", "title": "Multiply Two Numbers with JavaScript", - "difficulty": "9.98143", "description": [ "We can also multiply one number by another.", "JavaScript uses the * symbol for multiplication.", @@ -345,7 +334,6 @@ { "id": "cf1111c1c11feddfaeb6bdef", "title": "Divide One Number by Another with JavaScript", - "difficulty": "9.9814", "description": [ "We can also divide one number by another.", "JavaScript uses the / symbol for division.", @@ -368,7 +356,6 @@ { "id": "cf1391c1c11feddfaeb4bdef", "title": "Create Decimal Numbers with JavaScript", - "difficulty": "9.9815", "description": [ "JavaScript number variables can also have decimals.", "Let's create a variable myDecimal and give it a decimal value." @@ -393,7 +380,6 @@ { "id": "bd7993c9c69feddfaeb7bdef", "title": "Perform Arithmetic Operations on Decimals with JavaScript", - "difficulty": "9.98151", "description": [ "In JavaScript, you can also perform calculations with decimal numbers, just like whole numbers.", "Replace the 0.0 with the correct number so that you get the result mentioned in the comments." @@ -418,7 +404,6 @@ { "id": "bd7993c9c69feddfaeb8bdef", "title": "Store Multiple Values in one Variable using JavaScript Arrays", - "difficulty": "9.9816", "description": [ "With JavaScript array variables, we can store several pieces of data in one place.", "You start an array declaration with an opening square bracket, end it with a closing square bracket, and put a comma between each entry, like this: var sandwich = [\"peanut butter\", \"jelly\", \"bread\"].", @@ -536,7 +521,6 @@ { "id": "bg9994c9c69feddfaeb9bdef", "title": "Manipulate Arrays With pop()", - "difficulty": "9.9818", "description": [ "Another way to change the data in an array is with the .pop() function.", ".pop()is used to \"pop\" a value off of the end of an array. We can retrieve this value by performing pop() in a variable declaration.", @@ -570,7 +554,6 @@ { "id": "bg9995c9c69feddfaeb9bdef", "title": "Manipulate Arrays With push()", - "difficulty": "9.9818", "description": [ "Not only can you pop() data off of the end of an array, you can also push() data onto the end of an array.", "Take the myArray array and push() this value to the end of it: [\"dog\", 3]." @@ -601,7 +584,6 @@ { "id": "bg9996c9c69feddfaeb9bdef", "title": "Manipulate Arrays With shift()", - "difficulty": "9.9817", "description": [ "pop() always removes the last element of an array. What if you want to remove the first? That's where .shift() comes in.", "Take the myArray array and shift() the first value off of it. Set myRemoved to the first value of myArray using shift()." @@ -632,7 +614,6 @@ { "id": "bg9997c9c69feddfaeb9bdef", "title": "Manipulate Arrays With unshift()", - "difficulty": "9.9818", "description": [ "Now that we've learned how to shiftthings from the start of the array, we need to learn how to unshiftstuff back to the start.", "Let's take the code we had last time and unshiftthis value to the start: \"Paul\"." diff --git a/seed/challenges/basic-ziplines.json b/seed/challenges/basic-ziplines.json index 113d9e7de5..0e51533b87 100644 --- a/seed/challenges/basic-ziplines.json +++ b/seed/challenges/basic-ziplines.json @@ -5,7 +5,6 @@ { "id": "bd7158d8c442eddfbeb5bd1f", "title": "Get Set for Ziplines", - "difficulty": 1.00, "challengeSeed": ["125658022"], "description": [ "Now you're ready to start our Zipline challenges. These front-end development challenges will give you many opportunities to apply the HTML, CSS, jQuery and JavaScript you've learned to build static (database-less) applications.", @@ -53,7 +52,6 @@ { "id": "bd7158d8c242eddfaeb5bd13", "title": "Build a Personal Portfolio Webpage", - "difficulty": 1.01, "challengeSeed": ["133315782"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/ThiagoFerreir4/full/eNMxEp.", @@ -107,7 +105,6 @@ { "id": "bd7158d8c442eddfaeb5bd13", "title": "Build a Random Quote Machine", - "difficulty": 1.02, "challengeSeed": ["126415122"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/AdventureBear/full/vEoVMw.", @@ -151,7 +148,6 @@ { "id": "bd7158d8c442eddfaeb5bd10", "title": "Show the Local Weather", - "difficulty": 1.03, "challengeSeed": ["126415127"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/AdventureBear/full/yNBJRj.", @@ -197,7 +193,6 @@ { "id": "bd7158d8c442eddfaeb5bd0f", "title": "Build a Pomodoro Clock", - "difficulty": 1.04, "challengeSeed": ["126411567"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/GeoffStorbeck/full/RPbGxZ/.", @@ -241,7 +236,6 @@ { "id": "bd7158d8c442eddfaeb5bd1f", "title": "Use the Twitch.tv JSON API", - "difficulty": 1.05, "challengeSeed": ["126411564"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/GeoffStorbeck/full/GJKRxZ.", diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json index fb4f864474..091c94446e 100644 --- a/seed/challenges/bootstrap.json +++ b/seed/challenges/bootstrap.json @@ -5,7 +5,6 @@ { "id": "bad87fee1348bd9acde08712", "title": "Use Responsive Design with Bootstrap Fluid Containers", - "difficulty": 2.01, "description": [ "Now let's go back to our Cat Photo App. This time, we'll style it using the popular Bootstrap responsive CSS framework.", "Bootstrap will figure out how wide your screen is and respond by resizing your HTML elements - hence the name Responsive Design.", @@ -89,7 +88,6 @@ { "id": "bad87fee1348bd9acde08812", "title": "Make Images Mobile Responsive", - "difficulty": 2.02, "description": [ "First, add a new image below the existing one. Set it's src attribute to http://bit.ly/fcc-running-cats.", "It would be great if this image could be exactly the width of our phone's screen.", @@ -174,7 +172,6 @@ { "id": "bad87fee1348bd8acde08812", "title": "Center Text with Bootstrap", - "difficulty": 2.03, "description": [ "Now that we're using Bootstrap, we can center our heading element to make it look better. All we need to do is add the class text-center to our h2 element.", "Remember that you can add several classes to the same element by separating each of them with a space, like this: <h2 class=\"red-text text-center\">your text</h2>." @@ -257,7 +254,6 @@ { "id": "bad87fee1348cd8acdf08812", "title": "Create a Bootstrap Button", - "difficulty": 2.04, "description": [ "Bootstrap has its own styles for button elements, which look much better than the plain HTML ones.", "Create a new button element below your large kitten photo. Give it the class btn and the text of \"Like\"." @@ -343,7 +339,6 @@ { "id": "bad87fee1348cd8acef08812", "title": "Create a Block Element Bootstrap Button", - "difficulty": 2.05, "description": [ "Normally, your button elements are only as wide as the text that they contain. By making them block elements, your button will stretch to fill your page's entire horizontal space.", "This image illustrates the difference between inline elements and block-level elements:", @@ -432,7 +427,6 @@ { "id": "bad87fee1348cd8acef08811", "title": "Taste the Bootstrap Button Color Rainbow", - "difficulty": 2.06, "description": [ "The btn-primary class is the main color you'll use in your app. It is useful for highlighting actions you want your user to take.", "Add Bootstrap's btn-primary class to your button.", @@ -519,7 +513,6 @@ { "id": "bad87fee1348cd8acef08813", "title": "Call out Optional Actions with Button Info", - "difficulty": 2.07, "description": [ "Bootstrap comes with several pre-defined colors for buttons. The btn-info class is used to call attention to optional actions that the user can take.", "Create a new block-level Bootstrap button below your \"Like\" button with the text \"Info\", and add Bootstrap's btn-info and btn-block classes to it.", @@ -607,7 +600,6 @@ { "id": "bad87fee1348ce8acef08814", "title": "Warn your Users of a Dangerous Action", - "difficulty": 2.08, "description": [ "Bootstrap comes with several pre-defined colors for buttons. The btn-danger class is the button color you'll use to notify users that the button performs a destructive action, such as deleting a cat photo.", "Create a button with the text \"Delete\" and give it the class btn-danger.", @@ -696,7 +688,6 @@ { "id": "bad88fee1348ce8acef08815", "title": "Use the Bootstrap Grid to Put Elements Side By Side", - "difficulty": 2.09, "description": [ "Bootstrap uses a responsive grid system, which makes it easy to put elements into rows and specify each element's relative width. Most of Bootstrap's classes can be applied to a div element.", "Here's a diagram of how Bootstrap's 12-column grid layout works:", @@ -790,7 +781,6 @@ { "id": "bad87fee1347bd9aedf08845", "title": "Ditch Custom CSS for Bootstrap", - "difficulty": 2.10, "description": [ "We can clean up our code and make our Cat Photo App look more conventional by using Bootstrap's built-in styles instead of the custom styles we created earlier.", "Don't worry - there will be plenty of time to customize our CSS later.", @@ -891,7 +881,6 @@ { "id": "bad87fee1348bd9aedf08845", "title": "Use Spans for Inline Elements", - "difficulty": 2.105, "description": [ "You can use spans to create inline elements. Remember when we used the btn-block class to make the button fill the entire row?", "This image illustrates the difference between inline elements and block-level elements:", @@ -979,7 +968,6 @@ { "id": "bad87fee1348bd9aede08845", "title": "Create a Custom Heading", - "difficulty": 2.11, "description": [ "We will make a simple heading for our Cat Photo App by putting them in the same row.", "Remember, Bootstrap uses a responsive grid system, which makes it easy to put elements into rows and specify each element's relative width. Most of Bootstrap's classes can be applied to a div element.", @@ -1068,7 +1056,6 @@ { "id": "bad87fee1348bd9aedd08845", "title": "Add Font Awesome Icons to our Buttons", - "difficulty": 2.12, "description": [ "Font Awesome is a convenient library of icons. These icons are vector graphics, stored in the .svg file format. These icons are treated just like fonts. You can specify their size using pixels, and they will assume the font size of their parent HTML elements.", "Use Font Awesome to add a thumbs-up icon to your like button by giving it a i element with the classes fa and fa-thumbs-up." @@ -1153,7 +1140,6 @@ { "id": "bad87fee1348bd9aedc08845", "title": "Add Font Awesome Icons to all of our Buttons", - "difficulty": 2.13, "description": [ "Font Awesome is a convenient library of icons. These icons are vector graphics, stored in the .svg file format. These icons are treated just like fonts. You can specify their size using pixels, and they will assume the font size of their parent HTML elements.", "Use Font Awesome to add a info-circle icon to your info button and a trash icon to your delete button." @@ -1238,7 +1224,6 @@ { "id": "bad87fee1348bd9aedb08845", "title": "Responsively Style Radio Buttons", - "difficulty": 2.14, "description": [ "You can use Bootstrap's col-xs-* classes on form elements, too! This way, our radio buttons will be evenly spread out across the page, regardless of how wide the screen resolution is.", "Nest all of your radio buttons within a <div class=\"row\"> element. Then nest each of them within a <div class=\"col-xs-6\"> element." @@ -1323,7 +1308,6 @@ { "id": "bad87fee1348bd9aeda08845", "title": "Responsively Style Checkboxes", - "difficulty": 2.15, "description": [ "You can use Bootstrap's col-xs-* classes on form elements, too! This way, our checkboxes will be evenly spread out across the page, regardless of how wide the screen resolution is.", "Nest all your checkboxes in a <div class=\"row\"> element. Then nest each of them in a <div class=\"col-xs-4\"> element." @@ -1415,7 +1399,6 @@ { "id": "bad87fee1348bd9aed908845", "title": "Style Text Inputs as Form Controls", - "difficulty": 2.16, "description": [ "You can add the fa-paper-plane Font Awesome icon by adding <i class=\"fa fa-paper-plane\"></i> within your submit button element.", "Give your form's text input field a class of form-control. Give your form's submit button the classes btn btn-primary. Also give this button the Font Awesome icon of fa-paper-plane." @@ -1516,7 +1499,6 @@ { "id": "bad87fee1348bd9aec908845", "title": "Line up Form Elements Responsively with Bootstrap", - "difficulty": 2.17, "description": [ "Now let's get your form input and your submission button on the same line. We'll do this the same way we have previously: by using a div element with the class row, and other div elements within it using the col-xs-* class.", "Nest both your form's text input and submit button within a div with the class row. Nest your form's text input within a div with the class of col-xs-7. Nest your form's submit button in a div with the class col-xs-5.", @@ -1618,7 +1600,6 @@ { "id": "bad87fee1348bd9aec908846", "title": "Create a Bootstrap Headline", - "difficulty": 2.18, "description": [ "Now let's build something from scratch to practice our HTML, CSS and Bootstrap skills.", "We'll build a jQuery playground, which we'll soon put to use in our jQuery challenges.", @@ -1653,7 +1634,6 @@ { "id": "bad87fee1348bd9aec908746", "title": "House our page within a Bootstrap Container Fluid Div", - "difficulty": 2.18, "description": [ "Now let's make sure all the content on your page is mobile-responsive.", "Let's nest your h3 element within a div element with the class container-fluid." @@ -1683,7 +1663,6 @@ { "id": "bad87fee1348bd9bec908846", "title": "Create a Bootstrap Row", - "difficulty": 2.19, "description": [ "Now we'll create a Bootstrap row for our inline elements.", "Create a div element with the class row." @@ -1716,7 +1695,6 @@ { "id": "bad87fee1348bd9aec908847", "title": "Split your Bootstrap Row", - "difficulty": 2.20, "description": [ "Now that we have a Bootstrap Row, let's split it into two columns to house our elements.", "Create two div elements within your row, both with the class col-xs-6." @@ -1750,7 +1728,6 @@ { "id": "bad87fee1348bd9aec908848", "title": "Create Bootstrap Wells", - "difficulty": 2.21, "description": [ "Bootstrap has a class called well that can create a visual sense of depth for your columns.", "Nest one div element with the class well within each of your col-xs-6 div elements." @@ -1789,7 +1766,6 @@ { "id": "bad87fee1348bd9aec908849", "title": "Add Elements within your Bootstrap Wells", - "difficulty": 2.22, "description": [ "Now we're several div elements deep on each column of our row. This is as deep as we'll need to go. Now we can add our button elements.", "Nest three button elements within each of your well div elements." @@ -1836,7 +1812,6 @@ { "id": "bad87fee1348bd9aec908850", "title": "Apply the Default Bootstrap Button Style", - "difficulty": 2.23, "description": [ "Bootstrap has another button class called btn-default.", "Apply both the btn and btn-default classes to each of your button elements." @@ -1882,7 +1857,6 @@ { "id": "bad87fee1348bd9aec908852", "title": "Create a Class to Target with jQuery Selectors", - "difficulty": 2.24, "description": [ "Not every class needs to have corresponding CSS. Sometimes we create classes just for the purpose of selecting these elements more easily using jQuery.", "Give each of your button elements the class target." @@ -1927,7 +1901,6 @@ { "id": "bad87fee1348bd9aec908853", "title": "Add ID Attributes to Bootstrap Elements", - "difficulty": 2.25, "description": [ "Recall that in addition to class attributes, you can give each of your elements an id attribute.", "Each id should be unique to a specific element.", @@ -1976,7 +1949,6 @@ { "id": "bad87fee1348bd9aec908854", "title": "Label Bootstrap Wells", - "difficulty": 2.26, "description": [ "For the sake of clarity, let's label both of our wells with their ids.", "Above your left-well, inside its col-xs-6 div element, add a h4 element with the text #left-well.", @@ -2027,7 +1999,6 @@ { "id": "bad87fee1348bd9aec908855", "title": "Give Each Element a Unique ID", - "difficulty": 2.27, "description": [ "We will also want to be able to use jQuery to target each button by its unique id.", "Give each of your buttons a unique id like, starting with target1 and ending with target6." @@ -2079,7 +2050,6 @@ { "id": "bad87fee1348bd9aec908856", "title": "Label Bootstrap Buttons", - "difficulty": 2.28, "description": [ "Just like we labeled our wells, we want to label our buttons.", "Give each of your button elements text that corresponds to their id." @@ -2131,7 +2101,6 @@ { "id": "bad87fee1348bd9aec908857", "title": "Use Comments to Clarify Code", - "difficulty": 2.29, "description": [ "When we start using jQuery, we will modify HTML elements without needing to actually change them in HTML.", "Let's make sure that everyone knows they shouldn't actually modify any of this code directly.", diff --git a/seed/challenges/getting-started.json b/seed/challenges/getting-started.json index 5ac330c4e3..d5f7163c68 100644 --- a/seed/challenges/getting-started.json +++ b/seed/challenges/getting-started.json @@ -5,7 +5,6 @@ { "id": "560add10cb82ac38a17513be", "title": "Learn how Free Code Camp Works", - "difficulty": 0.00, "challengeSeed": [], "description": [ [ @@ -62,7 +61,6 @@ { "id": "560add37cb82ac38a17513bf", "title": "Create a GitHub Account and Join our Chat Rooms", - "difficulty": 0.01, "challengeSeed": [], "description": [ [ @@ -137,7 +135,6 @@ { "id": "560add56cb82ac38a17513c0", "title": "Configure your Public Profile", - "difficulty": 0.02, "challengeSeed": [], "description": [ [ @@ -170,7 +167,6 @@ { "id": "560add65cb82ac38a17513c1", "title": "Try our Wiki and Camper News", - "difficulty": 0.03, "challengeSeed": [], "description": [ [ @@ -203,7 +199,6 @@ { "id": "560add71cb82ac38a17513c2", "title": "Join a Campsite in Your City", - "difficulty": 0.04, "challengeSeed": [], "description": [ [ @@ -236,7 +231,6 @@ { "id": "560add8ccb82ac38a17513c3", "title": "Join our Alumni Network and Commit to Your Goal", - "difficulty": 0.05, "challengeSeed": [], "description": [ [ @@ -269,7 +263,6 @@ { "id": "560add8ccb82ac38a17513c4", "title": "Learn What to Do If You Get Stuck", - "difficulty": 0.06, "challengeSeed": [], "description": [ [ diff --git a/seed/challenges/git.json b/seed/challenges/git.json index 4cb9c7c930..7c53503f0f 100644 --- a/seed/challenges/git.json +++ b/seed/challenges/git.json @@ -5,7 +5,6 @@ { "id": "bd7353d8c341eddeaeb5bd0f", "title": "Save your Code Revisions Forever with Git", - "difficulty": 0.01, "challengeSeed": ["133316034"], "description": [ "We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.", diff --git a/seed/challenges/hikes.json b/seed/challenges/hikes.json index e24da79d85..1f5d7f3113 100644 --- a/seed/challenges/hikes.json +++ b/seed/challenges/hikes.json @@ -5,7 +5,6 @@ { "id": "bd7128d8c441eddfbeb5bddf", "title": "Computer Basics 1: The 4 Basic Parts of a Computer", - "difficulty": 9.01, "challengeSeed": [ "132542064" ], @@ -45,7 +44,6 @@ { "id": "bd7127d8c441eddfbeb5bddf", "title": "Computer Basics 2: More Computer Hardware", - "difficulty": 9.02, "challengeSeed": [ "132542458" ], @@ -84,7 +82,6 @@ { "id": "bd7126d8c441eddfbeb5bddf", "title": "Computer Basics 3: Intro to Binary Code", - "difficulty": 9.03, "challengeSeed": [ "132542757" ], @@ -118,7 +115,6 @@ { "id": "bd7125d8c441eddfbeb5bddf", "title": "Computer Basics 4: Decoding a Binary Number", - "difficulty": 9.04, "challengeSeed": [ "132543332" ], @@ -154,7 +150,6 @@ { "id": "bd7124d8c441eddfbeb5bddf", "title": "Computer Basics 5: How To Measure Data Size", - "difficulty": 9.05, "challengeSeed": [ "132543959" ], @@ -193,7 +188,6 @@ { "id": "bd7123d8c441eddfbeb5bddf", "title": "Computer Basics 6: Measuring Data Speed", - "difficulty": 9.06, "challengeSeed": [ "132545171" ], @@ -230,7 +224,6 @@ { "id": "bd7122d8c441eddfbeb5bddf", "title": "Computer Basics 7: Binary Bytes", - "difficulty": 9.07, "challengeSeed": [ "132545417" ], @@ -264,7 +257,6 @@ { "id": "bd7121d8c441eddfbeb5bddf", "title": "Computer Basics 8: Types of Computers", - "difficulty": 9.08, "challengeSeed": [ "132546182" ], @@ -303,7 +295,6 @@ { "id": "bd7120d8c441eddfbeb5bddf", "title": "Computer Basics 9: More on the Motherboard", - "difficulty": 9.09, "challengeSeed": [ "132547285" ], @@ -344,7 +335,6 @@ { "id": "bd712fd8c441eddfbeb5bddf", "title": "Computer Basics 10: Data Networks", - "difficulty": 9.10, "challengeSeed": [ "132547590" ], @@ -384,7 +374,6 @@ { "id": "bd712ed8c441eddfbeb5bddf", "title": "Computer Basics 11: IP Addresses", - "difficulty": 9.11, "challengeSeed": [ "132548071" ], @@ -423,7 +412,6 @@ { "id": "bd712dd8c441eddfbeb5bddf", "title": "Computer Basics 12: How the Internet Works", - "difficulty": 9.12, "challengeSeed": [ "132548579" ], @@ -462,7 +450,6 @@ { "id": "bd712cd8c441eddfbeb5bddf", "title": "Computer Basics 13: Software", - "difficulty": 9.13, "challengeSeed": [ "132548908" ], @@ -495,7 +482,6 @@ { "id": "bd712bd8c441eddfbeb5bddf", "title": "What Do Programmers Do?", - "difficulty": 9.14, "challengeSeed": [ "133166912" ], @@ -532,7 +518,6 @@ { "id": "bd712ad8c441eddfbeb5bddf", "title": "Console and Logging", - "difficulty": 9.15, "challengeSeed": [ "133170880" ], @@ -569,7 +554,6 @@ { "id": "bd7119d8c441eddfbeb5bddf", "title": "Variables In Code", - "difficulty": 9.16, "challengeSeed": [ "133172920" ], @@ -602,7 +586,6 @@ { "id": "bd7029d8c441eddfbeb5bddf", "title": "Source Code", - "difficulty": 9.17, "challengeSeed": [ "133177129" ], @@ -647,7 +630,6 @@ { "id": "bd7129d8b441eddfbeb5bddf", "title": "Routers and Packets", - "difficulty": 9.18, "challengeSeed": [ "133181251" ], @@ -698,7 +680,6 @@ { "id": "bd7129d8a441eddfbeb5bddf", "title": "Hardware: Chips and Moore's Law", - "difficulty": 9.19, "challengeSeed": [ "133182057" ], @@ -735,7 +716,6 @@ { "id": "bd7129d80441eddfbeb5bddf", "title": "Analog vs Digital and File Compression", - "difficulty": 9.20, "challengeSeed": [ "133182587" ], @@ -774,7 +754,6 @@ { "id": "bd7129d89441eddfbeb5bddf", "title": "Computer Security", - "difficulty": 9.21, "challengeSeed": [ "133186284" ], diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json index d865ce2d56..cdfbf6543c 100644 --- a/seed/challenges/html5-and-css.json +++ b/seed/challenges/html5-and-css.json @@ -5,7 +5,6 @@ { "id": "bd7123c8c441eddfaeb5bdef", "title": "Say Hello to HTML Elements", - "difficulty": 1.01, "description": [ "Welcome to Free Code Camp's first coding challenge!", "You can edit code in your text editor, which we've embedded into this web page.", @@ -54,8 +53,9 @@ { "id": "bad87fee1348bd9aedf0887a", "title": "Headline with the h2 Element", - "difficulty": 1.02, "description": [ + "Over the next few challenges, we'll build an HTML5 app that will look something like this:", + "\"A", "Add an h2 tag that says \"CatPhotoApp\" to create a second HTML element below your \"Hello World\" h1 element.", "The h2 element you enter will create an h2 element on the website.", "This element tells the browser how to render the text that it contains.", @@ -98,7 +98,6 @@ { "id": "bad87fee1348bd9aedf08801", "title": "Inform with the Paragraph Element", - "difficulty": 1.03, "description": [ "Create a p element below your h2 element, and give it the text \"Hello Paragraph\".", "p elements are the preferred element for normal-sized paragraph text on websites. P is short for \"paragraph\".", @@ -139,7 +138,6 @@ { "id": "bad87fee1348bd9aedf08802", "title": "Uncomment HTML", - "difficulty": 1.04, "description": [ "Uncomment your h1, h2 and p elements.", "Commenting is a way that you can leave comments within your code without affecting the code itself.", @@ -189,7 +187,6 @@ { "id": "bad87fee1348bd9aedf08804", "title": "Comment out HTML", - "difficulty": 1.05, "description": [ "Comment out your h1 element and your p element, but leave your h2 element uncommented.", "Remember that in order to start a comment, you need to use <!-- and to end a comment, you need to use -->.", @@ -236,7 +233,6 @@ { "id": "bad87fee1348bd9aedf08833", "title": "Fill in the Blank with Placeholder Text", - "difficulty": 1.06, "description": [ "Web developers traditionally use lorem ipsum text as placeholder text. It's called lorem ipsum text because those are the first two words of a famous passage by Cicero of Ancient Rome.", "lorem ipsum text has been used as placeholder text by typesetters since the 16th century, and this tradition continues on the web.", @@ -283,7 +279,6 @@ { "id": "bad87fed1348bd9aedf08833", "title": "Delete HTML Elements", - "difficulty": 1.07, "description": [ "Delete your h1 element so we can simplify our view.", "Our phone doesn't have much vertical space.", @@ -327,7 +322,6 @@ { "id": "bad87fee1348bd9aedf08803", "title": "Change the Color of Text", - "difficulty": 1.08, "description": [ "Change your h2 element's style so that its text color is red.", "We can do this by changing the \"style\" of your h2 element.", @@ -369,7 +363,6 @@ { "id": "bad87fee1348bd9aedf08805", "title": "Use CSS Selectors to Style Elements", - "difficulty": 1.09, "description": [ "Delete your h2 element's style attribute and instead create a CSS style element. Add the necessary CSS to turn all h2 elements blue.", "With CSS, there are hundreds of CSS properties that you can use to change the way an element looks on your page.", @@ -424,7 +417,6 @@ { "id": "bad87fee1348bd9aecf08806", "title": "Use a CSS Class to Style an Element", - "difficulty": 1.11, "description": [ "Create a CSS class called red-text and apply it to your h2 element.", "Classes are reusable styles that can be added to HTML elements.", @@ -491,7 +483,6 @@ { "id": "bad87fee1348bd9aefe08806", "title": "Style Multiple Elements with a CSS Class", - "difficulty": 1.12, "description": [ "Apply the red-text class to your h2 and p elements.", "Remember that you can attach classes to HTML elements by using class=\"your-class-here\" within the relevant element's opening tag.", @@ -540,7 +531,6 @@ { "id": "bad87fee1348bd9aedf08806", "title": "Change the Font Size of an Element", - "difficulty": 1.13, "description": [ "Create a second p element with the following kitty ipsum text: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.", "Then, inside your <style> element, set the font-size of all p elements to 16 pixels.", @@ -593,7 +583,6 @@ { "id": "bad87fee1348bd9aede08807", "title": "Set the Font Family of an Element", - "difficulty": 1.14, "description": [ "Make all of your p elements use the Monospace font.", "You can set an element's font by using the font-family property.", @@ -640,7 +629,6 @@ { "id": "bad87fee1348bd9aedf08807", "title": "Import a Google Font", - "difficulty": 1.15, "description": [ "Apply the font-family of Lobster to your h2 element.", "First, you'll need to make a call to Google to grab the Lobster font and load it into your HTML.", @@ -694,7 +682,6 @@ { "id": "bad87fee1348bd9aedf08808", "title": "Specify How Fonts Should Degrade", - "difficulty": 1.16, "description": [ "There are several default fonts that are available in all browsers. These include Monospace, Serif and Sans-Serif. Leave Lobster as the font-family for your h2 elements. Make them \"degrade\" to Monospace when Lobster isn't available.", "For example, if you wanted an element to use the Helvetica font, but also degrade to the Sans-Serif font when Helvetica wasn't available, you could use this CSS style: p { font-family: Helvetica, Sans-Serif; }.", @@ -752,7 +739,6 @@ { "id": "bad87fee1348bd9aedf08812", "title": "Add Images to your Website", - "difficulty": 1.17, "description": [ "You can add images to your website by using the img element, and point to a specific image's URL using the src attribute.", "An example of this would be <img src=\"http://www.your-image-source.com/your-image.jpg\">. Note that in most cases, img elements are self-closing.", @@ -807,7 +793,6 @@ { "id": "bad87fee1348bd9acdf08812", "title": "Size your Images", - "difficulty": 1.18, "description": [ "CSS has a property called width that controls an element's width. Just like with fonts, we'll use px (pixels) to specify the image's width.", "For example, if we wanted to create a CSS class called larger-image that gave HTML elements a width of 500 pixels, we'd use: <style> .larger-image { width: 500px; } </style>.", @@ -863,7 +848,6 @@ { "id": "bad87fee1348bd9bedf08813", "title": "Add Borders Around your Elements", - "difficulty": 1.19, "description": [ "CSS borders have properties like style, color and width.", "For example, if we wanted to create a red, 5 pixel border around an HTML element, we could use this class: <style> .thin-red-border { border-color: red; border-width: 5px; border-style: solid; } </style>.", @@ -927,7 +911,6 @@ { "id": "bad87fee1348bd9aedf08814", "title": "Add Rounded Corners with a Border Radius", - "difficulty": 1.20, "description": [ "Your cat photo currently has sharp corners. We can round out those corners with a CSS property called border-radius.", "You can specify a border-radius with pixels. This will affect how rounded the corners are. Add this property to your thick-green-border class and set it to 10px.", @@ -993,7 +976,6 @@ { "id": "bad87fee1348bd9aedf08815", "title": "Make Circular Images with a Border Radius", - "difficulty": 1.21, "description": [ "In addition to pixels, you can also specify a border-radius using a percentage.", "Give your cat photo a border-radius of 50%." @@ -1058,7 +1040,6 @@ { "id": "bad87fee1348bd9aedf08816", "title": "Link to External Pages with Anchor Elements", - "difficulty": 1.22, "description": [ "a elements, also known as anchor elements, are used to link to content outside of the current page.", "Here's a diagram of an a element. In this case, the a element is used in the middle of a paragraph element, which means the link will appear in the middle of a sentence.", @@ -1129,7 +1110,6 @@ { "id": "bad87fee1348bd9aede08817", "title": "Nest an Anchor Element within a Paragraph", - "difficulty": 1.23, "description": [ "Again, here's a diagram of an a element for your reference:", "\"a", @@ -1206,7 +1186,6 @@ { "id": "bad87fee1348bd9aedf08817", "title": "Make Dead Links using the Hash Symbol", - "difficulty": 1.24, "description": [ "Sometimes you want to add a elements to your website before you know where they will link.", "This is also handy when you're changing the behavior of a link using jQuery, which we'll learn about later.", @@ -1275,7 +1254,6 @@ { "id": "bad87fee1348bd9aedf08820", "title": "Turn an Image into a Link", - "difficulty": 1.25, "description": [ "You can make elements into links by nesting them within an a element.", "Nest your image within an a element. Here's an example: <a href=\"#\"><img src=\"http://bit.ly/fcc-running-cats\"/></a>.", @@ -1348,7 +1326,6 @@ { "id": "bad87fee1348bd9aedf08818", "title": "Add Alt Text to an Image for Accessibility", - "difficulty": 1.26, "description": [ "alt attributes, also known as alt text, are what browsers will display if they fail to load the image. alt attributes are also important for blind or visually impaired users to understand what an image portrays. And search engines also look at alt attributes.", "In short, every image should have an alt attribute!", @@ -1419,7 +1396,6 @@ { "id": "bad87fee1348bd9aedf08827", "title": "Create a Bulleted Unordered List", - "difficulty": 1.27, "description": [ "HTML has a special element for creating unordered lists, or bullet point-style lists.", "Unordered lists start with a <ul> element. Then they contain some number of <li> elements.", @@ -1497,7 +1473,6 @@ { "id": "bad87fee1348bd9aedf08828", "title": "Create an Ordered List", - "difficulty": 1.28, "description": [ "HTML has a special element for creating ordered lists, or numbered-style lists.", "Ordered lists start with a <ol> element. Then they contain some number of <li> elements.", @@ -1583,7 +1558,6 @@ { "id": "bad87fee1348bd9aedf08829", "title": "Create a Text Field", - "difficulty": 1.29, "description": [ "Now let's create a web form.", "Text inputs are a convenient way to get input from your user.", @@ -1662,7 +1636,6 @@ { "id": "bad87fee1348bd9aedf08830", "title": "Add Placeholder Text to a Text Field", - "difficulty": 1.30, "description": [ "Your placeholder text is what appears in your text input before your user has inputed anything.", "You can create placeholder text like so: <input type=\"text\" placeholder=\"this is placeholder text\">.", @@ -1742,7 +1715,6 @@ { "id": "bad87fee1348bd9aede08830", "title": "Create a Form Element", - "difficulty": 1.31, "description": [ "You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action on your form element.", "For example: <form action=\"/url-where-you-want-to-submit-form-data\"></form>.", @@ -1823,7 +1795,6 @@ { "id": "bad87fee1348bd9aedd08830", "title": "Add a Submit Button to a Form", - "difficulty": 1.32, "description": [ "Let's add a submit button to your form. Clicking this button will send the data from your form to the URL you specified with your form's action attribute.", "Here's an example submit button: <button type=\"submit\">this button submits the form</button>.", @@ -1907,7 +1878,6 @@ { "id": "bad87fee1348bd9aedc08830", "title": "Use HTML5 to Require a Field", - "difficulty": 1.33, "description": [ "You can require specific form fields so that your user will not be able to submit your form until he or she has filled them out.", "For example, if you wanted to make a text input field required, you can just add the word required within your input element, you would use: <input type=\"text\" required>.", @@ -1989,7 +1959,6 @@ { "id": "bad87fee1348bd9aedf08834", "title": "Create a Set of Radio Buttons", - "difficulty": 1.34, "description": [ "You can use radio buttons for questions where you want the user to only give you one answer.", "Radio buttons are a type of input.", @@ -2082,7 +2051,6 @@ { "id": "bad87fee1348bd9aedf08835", "title": "Create a Set of Checkboxes", - "difficulty": 1.35, "description": [ "Forms commonly use checkboxes for questions that may have more than one answer.", "Checkboxes are a type of input.", @@ -2172,7 +2140,6 @@ { "id": "bad87fee1348bd9aedd08835", "title": "Check Radio Buttons and Checkboxes by Default", - "difficulty": 1.37, "description": [ "You can set a checkbox or radio button to be checked by default using the checked attribute.", "To do this, just add the word \"checked\" to the inside of an input element. For example, <input type=\"radio\" name=\"test-name\" checked>.", @@ -2260,7 +2227,6 @@ { "id": "bad87fee1348bd9aede08835", "title": "Nest Many Elements within a Single Div Element", - "difficulty": 1.38, "description": [ "The div element, also known as a division element, is a general purpose container for other elements.", "The div element is probably the most commonly used HTML element of all. It's useful for passing the CSS of its own class declarations down to all the elements that it contains.", @@ -2355,7 +2321,6 @@ { "id": "bad87fed1348bd9aede07836", "title": "Give a Background Color to a Div Element", - "difficulty": 1.39, "description": [ "You can set an element's background color with the background-color property.", "For example, if you wanted an element's background color to be green, you'd use .green-background { background-color: green; } within your style element.", @@ -2442,7 +2407,6 @@ { "id": "bad87eee1348bd9aede07836", "title": "Set the ID of an Element", - "difficulty": 1.391, "description": [ "In addition to classes, each HTML element can also have an id attribute.", "There are several benefits to using id attributes, and you'll learn more about them once you start using jQuery.", @@ -2533,7 +2497,6 @@ { "id": "bad87dee1348bd9aede07836", "title": "Use an ID Attribute to Style an Element", - "difficulty": 1.392, "description": [ "One cool thing about id attributes is that, like classes, you can style them using CSS.", "Here's an example of how you can take your element with the id attribute of cat-photo-element and give it the background color of green. In your style element: #cat-photo-element { background-color: green; }", @@ -2626,7 +2589,6 @@ { "id": "bad88fee1348bd9aedf08825", "title": "Adjusting the Padding of an Element", - "difficulty": 1.40, "description": [ "You may have already noticed this, but all HTML elements are essentially little rectangles.", "Three important properties control the space that surrounds each HTML element: padding, margin, and border.", @@ -2697,7 +2659,6 @@ { "id": "bad87fee1348bd9aedf08822", "title": "Adjust the Margin of an Element", - "difficulty": 1.41, "description": [ "An element's margin controls the amount of space between an element's border and surrounding elements.", "Here, we can see that the green box and the red box are nested within the yellow box. Note that the red box has more margin than the green box, making it appear smaller.", @@ -2768,7 +2729,6 @@ { "id": "bad87fee1348bd9aedf08823", "title": "Add a Negative Margin to an Element", - "difficulty": 1.42, "description": [ "An element's margin controls the amount of space between an element's border and surrounding elements.", "If you set an element's margin to a negative value, the element will grow larger.", @@ -2838,7 +2798,6 @@ { "id": "bad87fee1348bd9aedf08824", "title": "Add Different Padding to Each Side of an Element", - "difficulty": 1.43, "description": [ "Sometimes you will want to customize an element so that it has different padding on each of its sides.", "CSS allows you to control the padding of an element on all four sides with padding-top, padding-right, padding-bottom, and padding-left properties.", @@ -2910,7 +2869,6 @@ { "id": "bad87fee1248bd9aedf08824", "title": "Add Different Margins to Each Side of an Element", - "difficulty": 1.44, "description": [ "Give the green box a margin of 40px on its top and left side, but only 20px on its bottom and right side.", "Sometimes you will want to customize an element so that it has a different margin on each of its sides.", @@ -2981,7 +2939,6 @@ { "id": "bad87fee1348bd9aedf08826", "title": "Use Clockwise Notation to Specify the Padding of an Element", - "difficulty": 1.44, "description": [ "Instead of specifying an element's padding-top, padding-right, padding-bottom, and padding-left properties, you can specify them all in one line, like this: padding: 10px 20px 10px 20px;.", "These four values work like a clock: top, right, bottom, left, and will produce the exact same result as using the side-specific padding instructions.", @@ -3050,7 +3007,6 @@ { "id": "bad87fee1348bd9afdf08726", "title": "Use Clockwise Notation to Specify the Margin of an Element", - "difficulty": 1.45, "description": [ "Let's try this again, but with margin this time.", "Instead of specifying an element's margin-top, margin-right, margin-bottom, and margin-left properties, you can specify them all in one line, like this: margin: 10px 20px 10px 20px;.", @@ -3120,7 +3076,6 @@ { "id": "bad87fee1348bd9aedf08736", "title": "Style the HTML Body Element", - "difficulty": 1.46, "description": [ "Now let's start fresh and talk about CSS inheritance.", "Every HTML page has a body element.", @@ -3153,7 +3108,6 @@ { "id": "bad87fee1348bd9aedf08746", "title": "Inherit Styles from the Body Element", - "difficulty": 1.47, "description": [ "Now we've proven that every HTML page has a body element, and that its body element can also be styled with CSS.", "Remember, you can style your body element just like any other HTML element, and all your other elements will inherit your body element's styles.", @@ -3196,7 +3150,6 @@ { "id": "bad87fee1348bd9aedf08756", "title": "Prioritize One Style Over Another", - "difficulty": 1.48, "description": [ "Sometimes your HTML elements will receive multiple styles that conflict with one another.", "For example, your h1 element can't be both green and pink at the same time.", @@ -3236,7 +3189,6 @@ { "id": "bad87fee1348bd9aedf04756", "title": "Override Styles in Subsequent CSS", - "difficulty": 1.49, "description": [ "Our \"pink-text\" class overrode our body element's CSS declaration!", "We just proved that our classes will override the body element's CSS. So the next logical question is, what can we do to override our pink-text class?", @@ -3280,7 +3232,6 @@ { "id": "bad87fee1348bd8aedf06756", "title": "Override Class Declarations by Styling ID Attributes", - "difficulty": 1.52, "description": [ "We just proved that browsers read CSS from top to bottom. That means that, in the event of a conflict, the browser will use whichever CSS declaration came last.", "But we're not done yet. There are other ways that you can override CSS. Do you remember id attributes?", @@ -3331,7 +3282,6 @@ { "id": "bad87fee1348bd9aedf06756", "title": "Override Class Declarations with Inline Styles", - "difficulty": 1.52, "description": [ "So we've proven that id declarations override class declarations, regardless of where they are declared in your style element CSS.", "There are other ways that you can override CSS. Do you remember inline styles?", @@ -3382,7 +3332,6 @@ { "id": "bad87fee1348bd9aedf07756", "title": "Override All Other Styles by using Important", - "difficulty": 1.53, "description": [ "Yay! We just proved that in-line styles will override all the CSS declarations in your style element.", "But wait. There's one last way to override CSS. This is the most powerful method of all. But before we do it, let's talk about why you would ever want to override CSS.", @@ -3436,7 +3385,6 @@ { "id": "bad87fee1348bd9aedf08726", "title": "Use Hex Code for Specific Colors", - "difficulty": 1.54, "description": [ "Did you know there are other ways to represent colors in CSS? One of these ways is called hexadecimal code, or hex code for short.", "Decimal means the numbers zero through nine - the numbers that people use in everyday life. Hexadecimal includes these 10 numbers, plus the letters A, B, C, D, E and F. This means that Hexidecimal has a total of 16 possible values, instead of the 10 possible values that our normal base-10 number system gives us.", @@ -3472,7 +3420,6 @@ { "id": "bad87fee1348bd9aedf08725", "title": "Use Hex Code to Color Elements White", - "difficulty": 1.55, "description": [ "0 is the lowest number in hex code, and represents a complete absence of color.", "F is the highest number in hex code, and it represents the maximum possible brightness.", @@ -3507,7 +3454,6 @@ { "id": "bad87fee1348bd9aedf08724", "title": "Use Hex Code to Color Elements Red", - "difficulty": 1.56, "description": [ "You may be wondering why we use 6 digits to represent a color instead of just one or two. The answer is that using 6 digits gives us a huge variety.", "How many colors are possible? 16 values and 6 positions means we have 16 to the 6th power, or more than 16 million possible colors.", @@ -3544,7 +3490,6 @@ { "id": "bad87fee1348bd9aedf08723", "title": "Use Hex Code to Color Elements Green", - "difficulty": 1.57, "description": [ "Remember that hex code follows the red-green-blue, or rgb format. The first two digits of hex code represent the amount of red in the color. The third and fourth digit represent the amount of green. The fifth and sixth represent the amount of blue.", "So to get the absolute brightest green, you would just use F for the third and fourth digits (the highest possible value) and 0 for all the other digits (the lowest possible value).", @@ -3579,7 +3524,6 @@ { "id": "bad87fee1348bd9aedf08722", "title": "Use Hex Code to Color Elements Blue", - "difficulty": 1.58, "description": [ "Hex code follows the red-green-blue, or rgb format. The first two digits of hex code represent the amount of red in the color. The third and fourth digit represent the amount of green. The fifth and sixth represent the amount of blue.", "So to get the absolute brightest blue, we use F for the fifth and sixth digits (the highest possible value) and 0 for all the other digits (the lowest possible value).", @@ -3614,7 +3558,6 @@ { "id": "bad87fee1348bd9aedf08721", "title": "Use Hex Code to Mix Colors", - "difficulty": 1.59, "description": [ "From these three pure colors (red, green and blue), we can create 16 million other colors.", "For example, orange is pure red, mixed with some green, and no blue.", @@ -3649,7 +3592,6 @@ { "id": "bad87fee1348bd9aede08720", "title": "Use Hex Code to Color Elements Gray", - "difficulty": 1.60, "description": [ "From these three pure colors (red, green and blue), we can create 16 million other colors.", "We can also create different shades of gray by evenly mixing all three colors.", @@ -3684,7 +3626,6 @@ { "id": "bad87fee1348bd9aedf08720", "title": "Use Hex Code for Specific Shades of Gray", - "difficulty": 1.61, "description": [ "We can also create other shades of gray by evenly mixing all three colors. We can go very close to true black.", "Make the body element's background color a dark gray by giving it the hex code value of #111111." @@ -3718,7 +3659,6 @@ { "id": "bad87fee1348bd9aedf08719", "title": "Use Abbreviated Hex Code", - "difficulty": 1.62, "description": [ "Many people feel overwhelmed by the possibilities of more than 16 million colors. And it's difficult to remember hex code. Fortunately, you can shorten it.", "For example, red, which is #FF0000 in hex code, can be shortened to #F00. That is, one digit for red, one digit for green, one digit for blue.", @@ -3754,7 +3694,6 @@ { "id": "bad87fee1348bd9aede08718", "title": "Use RGB values to Color Elements", - "difficulty": 1.63, "description": [ "Another way you can represent colors in CSS is by using rgb values.", "RGB values look like this: rgb(0, 0, 0) for black and rgb(255, 255, 255) for white.", @@ -3791,7 +3730,6 @@ { "id": "bad88fee1348bd9aedf08726", "title": "Use RGB to Color Elements White", - "difficulty": 1.64, "description": [ "RGB values look like this: rgb(0, 0, 0) for black and rgb(255, 255, 255) for white.", "Instead of using six hexadecimal digits like you do with hex code, with rgb you specify the brightness of each color with a number between 0 and 255.", @@ -3826,7 +3764,6 @@ { "id": "bad89fee1348bd9aedf08724", "title": "Use RGB to Color Elements Red", - "difficulty": 1.65, "description": [ "Just like with hex code, you can represent different colors in RGB by using combinations of different values.", "These values follow the pattern of RGB: the first number represents red, the second number represents green, and the third number represents blue.", @@ -3861,7 +3798,6 @@ { "id": "bad80fee1348bd9aedf08723", "title": "Use RGB to Color Elements Green", - "difficulty": 1.66, "description": [ "Now change the body element's background color to the rgb value green: rgb(0, 255, 0)" ], @@ -3894,7 +3830,6 @@ { "id": "bad81fee1348bd9aedf08722", "title": "Use RGB to Color Elements Blue", - "difficulty": 1.67, "description": [ "Change the body element's background color to the RGB value blue: rgb(0, 0, 255)" ], @@ -3927,7 +3862,6 @@ { "id": "bad82fee1348bd9aedf08721", "title": "Use RGB to Mix Colors", - "difficulty": 1.68, "description": [ "Just like with hex code, you can mix colors in RGB by using combinations of different values.", "Change the body element's background color to the RGB value orange: rgb(255, 165, 0)" @@ -3961,7 +3895,6 @@ { "id": "bad83fee1348bd9aede08720", "title": "Use RGB to Color Elements Gray", - "difficulty": 1.69, "description": [ "With RGB values, we can make an element gray by using combinations of the same value for all three colors.", "Change the body element's background color to the RGB value for gray: rgb(128, 128, 128)" diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json index 684afd44e8..fc2c035374 100644 --- a/seed/challenges/intermediate-bonfires.json +++ b/seed/challenges/intermediate-bonfires.json @@ -5,7 +5,6 @@ { "id": "a3566b1109230028080c9345", "title": "Sum All Numbers in a Range", - "difficulty": "2.00", "description": [ "We'll pass you an array of two numbers. Return the sum of those two numbers and all numbers between them.", "The lowest number will not always come first.", @@ -46,7 +45,6 @@ { "id": "a5de63ebea8dbee56860f4f2", "title": "Diff Two Arrays", - "difficulty": "2.01", "description": [ "Compare two arrays and return a new array with any items not found in both of the original arrays.", "Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code." @@ -99,7 +97,6 @@ "assert.deepEqual(convert(29), \"XXIX\", 'message: convert(29) should return \"XXIX\".');", "assert.deepEqual(convert(16), \"XVI\", 'message: convert(16) should return \"XVI\".');" ], - "difficulty": "2.02", "description": [ "Convert the given number into a roman numeral.", "All roman numerals answers should be provided in upper-case.", @@ -134,7 +131,6 @@ { "id": "a8e512fbe388ac2f9198f0fa", "title": "Where art thou", - "difficulty": "2.03", "description": [ "Make a function that looks through an array of objects (first argument) and returns an array of all objects that have matching property and value pairs (second argument). Each property and value pair of the source object has to be present in the object from the collection if it is to be included in the returned array.", "For example, if the first argument is [{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], and the second argument is { last: \"Capulet\" }, then you must return the third object from the array (the first argument), because it contains the property and it's value, that was passed on as the second argument.", @@ -182,7 +178,6 @@ "assert.deepEqual(myReplace(\"His name is Tom\", \"Tom\", \"john\"), \"His name is John\", 'message: myReplace(\"His name is Tom\", \"Tom\", \"john\") should return \"His name is John\".');", "assert.deepEqual(myReplace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\"), \"Let us get back to more Bonfires\", 'message: myReplace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\") should return \"Let us get back to more Bonfires\".');" ], - "difficulty": "2.035", "description": [ "Perform a search and replace on the sentence using the arguments provided and return the new sentence.", "First argument is the sentence to perform the search and replace on.", @@ -226,7 +221,6 @@ "assert.deepEqual(translate(\"algorithm\"), \"algorithmway\", 'message: translate(\"algorithm\") should return \"algorithmway\".');", "assert.deepEqual(translate(\"eight\"), \"eightway\", 'message: translate(\"eight\") should return \"eightway\".');" ], - "difficulty": "2.04", "description": [ "Translate the provided string to pig latin.", "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".", @@ -268,7 +262,6 @@ "assert.deepEqual(pair(\"TTGAG\"),[[\"T\",\"A\"],[\"T\",\"A\"],[\"G\",\"C\"],[\"A\",\"T\"],[\"G\",\"C\"]], 'message: pair(\"TTGAG\") should return [[\"T\",\"A\"],[\"T\",\"A\"],[\"G\",\"C\"],[\"A\",\"T\"],[\"G\",\"C\"]].');", "assert.deepEqual(pair(\"CTCTA\"),[[\"C\",\"G\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"T\",\"A\"],[\"A\",\"T\"]], 'message: pair(\"CTCTA\") should return [[\"C\",\"G\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"T\",\"A\"],[\"A\",\"T\"]].');" ], - "difficulty": "2.05", "description": [ "The DNA strand is missing the pairing element. Take each character, get its pair, and return the results as a 2d array.", "Base pairs are a pair of AT and CG. Match the missing element to the provided character.", @@ -304,7 +297,6 @@ { "id": "af7588ade1100bde429baf20", "title": "Missing letters", - "difficulty": "2.05", "description": [ "Find the missing letter in the passed letter range and return it.", "If all letters are present in the range, return undefined.", @@ -343,7 +335,6 @@ { "id": "a77dbc43c33f39daa4429b4f", "title": "Boo who", - "difficulty": "2.06", "description": [ "Check if a value is classified as a boolean primitive. Return true or false.", "Boolean primitives are true and false.", @@ -386,7 +377,6 @@ { "id": "a105e963526e7de52b219be9", "title": "Sorted Union", - "difficulty": "2.07", "description": [ "Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.", "In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array.", @@ -427,7 +417,6 @@ { "id": "a6b0bb188d873cb2c8729495", "title": "Convert HTML Entities", - "difficulty": "2.07", "description": [ "Convert the characters \"&\", \"<\", \">\", '\"' (double quote), and \"'\" (apostrophe), in a string to their corresponding HTML entities.", "Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code." @@ -469,7 +458,6 @@ { "id": "a103376db3ba46b2d50db289", "title": "Spinal Tap Case", - "difficulty": "2.08", "description": [ "Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.", "Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code." @@ -509,7 +497,6 @@ { "id": "a5229172f011153519423690", "title": "Sum All Odd Fibonacci Numbers", - "difficulty": "2.09", "description": [ "Return the sum of all odd Fibonacci numbers up to and including the passed number if it is a Fibonacci number.", "The first few numbers of the Fibonacci sequence are 1, 1, 2, 3, 5 and 8, and each subsequent number is the sum of the previous two numbers.", @@ -550,7 +537,6 @@ { "id": "a3bfc1673c0526e06d3ac698", "title": "Sum All Primes", - "difficulty": "2.10", "description": [ "Sum all the prime numbers up to and including the provided number.", "A prime number is defined as having only two divisors, 1 and itself. For example, 2 is a prime number because it's only divisible by 1 and 2. 1 isn't a prime number, because it's only divisible by itself.", @@ -589,7 +575,6 @@ { "id": "ae9defd7acaf69703ab432ea", "title": "Smallest Common Multiple", - "difficulty": "2.11", "description": [ "Find the smallest common multiple of the provided parameters that can be evenly divided by both, as well as by all sequential numbers in the range between these parameters.", "The range will be an array of two numbers that will not necessarily be in numerical order.", @@ -629,7 +614,6 @@ { "id": "a6e40f1041b06c996f7b2406", "title": "Finders Keepers", - "difficulty": "2.12", "description": [ "Create a function that looks through an array (first argument) and returns the first element in the array that passes a truth test (second argument).", "Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code." @@ -665,7 +649,6 @@ { "id": "a5deed1811a43193f9f1c841", "title": "Drop it", - "difficulty": "2.13", "description": [ "Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns true.", "Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code." @@ -704,7 +687,6 @@ { "id": "ab306dbdcc907c7ddfc30830", "title": "Steamroller", - "difficulty": "2.14", "description": [ "Flatten a nested array. You must account for varying levels of nesting.", "Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code." @@ -742,7 +724,6 @@ { "id": "a8d97bd4c764e91f9d2bda01", "title": "Binary Agents", - "difficulty": "2.15", "description": [ "Return an English translated sentence of the passed binary string.", "The binary string will be space separated.", @@ -779,7 +760,6 @@ { "id": "a10d2431ad0c6a099a4b8b52", "title": "Everything Be True", - "difficulty": "2.21", "description": [ "Check if the predicate (second argument) returns truthy (defined) for all elements of a collection (first argument).", "For this, check to see if the property defined in the second argument is present on every element of the collection.", @@ -819,7 +799,6 @@ { "id": "a97fd23d9b809dac9921074f", "title": "Arguments Optional", - "difficulty": "2.22", "description": [ "Create a function that sums two arguments together. If only one argument is provided, then return a function that expects one argument and returns the sum.", "For example, add(2, 3) should return 5, and add(2) should return a function.", diff --git a/seed/challenges/intermediate-ziplines.json b/seed/challenges/intermediate-ziplines.json index c119db33af..c702e91356 100644 --- a/seed/challenges/intermediate-ziplines.json +++ b/seed/challenges/intermediate-ziplines.json @@ -5,7 +5,6 @@ { "id": "bd7158d8c442eddfaeb5bd18", "title": "Stylize Stories on Camper News", - "difficulty": 1.02, "challengeSeed": ["126415129"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/MarufSarker/full/ZGPZLq/.", @@ -38,7 +37,6 @@ { "id": "bd7158d8c442eddfaeb5bd19", "title": "Build a Wikipedia Viewer", - "difficulty": 1.03, "challengeSeed": ["126415131"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/GeoffStorbeck/full/MwgQea.", @@ -71,7 +69,6 @@ { "id": "bd7158d8c442eddfaeb5bd17", "title": "Build a JavaScript Calculator", - "difficulty": 1.05, "challengeSeed": ["126411565"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/GeoffStorbeck/full/zxgaqw.", @@ -103,7 +100,6 @@ { "id": "bd7158d8c442eedfaeb5bd1c", "title": "Build a Tic Tac Toe Game", - "difficulty": 1.06, "challengeSeed": ["126415123"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/alex-dixon/full/JogOpQ/.", @@ -136,7 +132,6 @@ { "id": "bd7158d8c442eddfaeb5bd1c", "title": "Build a Simon Game", - "difficulty": 1.07, "challengeSeed": ["137213633"], "description": [ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/dting/full/QbRyqq/.", diff --git a/seed/challenges/jquery.json b/seed/challenges/jquery.json index 95214991e4..8e3566bca9 100644 --- a/seed/challenges/jquery.json +++ b/seed/challenges/jquery.json @@ -5,7 +5,6 @@ { "id": "bad87fee1348bd9acdd08826", "title": "Learn how Script Tags and Document Ready Work", - "difficulty": 3.01, "description": [ "Now we're ready to learn jQuery, the most popular JavaScript tool of all time. Don't worry about JavaScript itself - we will cover it soon.", "Before we can start using jQuery, we need to add some things to our HTML.", @@ -52,7 +51,6 @@ { "id": "bad87fee1348bd9bedc08826", "title": "Target HTML Elements with Selectors Using jQuery", - "difficulty": 3.02, "description": [ "Now we have a document ready function. We'll learn more about functions later. The important thing to know is that code you put inside this function will run as soon as your browser has loaded your page.", "This is important because without your document ready function, your code may run before your HTML is rendered, which would cause bugs.", @@ -102,7 +100,6 @@ { "id": "bad87fee1348bd9aedc08826", "title": "Target Elements by Class Using jQuery", - "difficulty": 3.03, "description": [ "You see how we made all of your button elements bounce? We selected them with $(\"button\"), then we added some CSS classes to them with .addClass(\"animated bounce\");.", "You just used jQuery's .addClass() function, which allows you to add classes to elements.", @@ -152,7 +149,6 @@ { "id": "bad87fee1348bd9aeda08826", "title": "Target Elements by ID Using jQuery", - "difficulty": 3.04, "description": [ "You can also target elements by their id attributes.", "First target your button element with the id target3 by using the $(\"#target3\") selector.", @@ -204,7 +200,6 @@ { "id": "bad87fee1348bd9aeda08726", "title": "Delete your jQuery Functions", - "difficulty": 3.05, "description": [ "These animations were cool at first, but now they're getting kind of distracting.", "Delete all three of these jQuery functions from your document ready function, but leave your document ready function itself intact." @@ -256,7 +251,6 @@ { "id": "bad87fee1348bd9aed908626", "title": "Target the same element with multiple jQuery Selectors", - "difficulty": 3.06, "description": [ "Now you know three ways of targeting elements: by type: $(\"button\"), by class: $(\".btn\"), and by id $(\"#target1\").", "Use each of these jQuery selectors to target your button element with the class btn and the id target1.", @@ -307,7 +301,6 @@ { "id": "bad87fee1348bd9aed918626", "title": "Remove Classes from an element with jQuery", - "difficulty": 3.07, "description": [ "In the same way you can add classes to an element with jQuery's addClass() function, you can remove them with jQuery's removeClass() function.", "Here's how you would do this for a specific button, add $(\"#target2\").removeClass(\"btn-default\");", @@ -358,7 +351,6 @@ { "id": "bad87fee1348bd9aed908826", "title": "Change the CSS of an Element Using jQuery", - "difficulty": 3.08, "description": [ "We can also change the CSS of an HTML element directly with jQuery.", "jQuery has a function called .css() that allows you to change the CSS of an element.", @@ -412,7 +404,6 @@ { "id": "bad87fee1348bd9aed808826", "title": "Disable an Element Using jQuery", - "difficulty": 3.09, "description": [ "You can also change the non-CSS properties of HTML elements with jQuery. For example, you can disable buttons.", "When you disable a button, it will become grayed-out and can no longer be clicked.", @@ -463,7 +454,6 @@ { "id": "bad87fee1348bd9aed708826", "title": "Remove an Element Using jQuery", - "difficulty": 3.10, "description": [ "Now let's remove an HTML element from your page using jQuery.", "jQuery has a function called .remove() that will remove an HTML element entirely", @@ -512,7 +502,6 @@ { "id": "bad87fee1348bd9aed608826", "title": "Use appendTo to Move Elements with jQuery", - "difficulty": 3.11, "description": [ "Now let's try moving elements from one div to another.", "jQuery has a function called appendTo() that allows you to select HTML elements and append them to another element.", @@ -564,7 +553,6 @@ { "id": "bad87fee1348bd9aed508826", "title": "Clone an Element Using jQuery", - "difficulty": 3.12, "description": [ "In addition to moving elements, you can also copy them from one place to another.", "jQuery has a function called clone() that makes a copy of an element.", @@ -618,7 +606,6 @@ { "id": "bad87fee1348bd9aed308826", "title": "Target the Parent of an Element Using jQuery", - "difficulty": 3.13, "description": [ "Every HTML element has a parent element from which it inherits properties.", "For example, your jQuery Playground h3 element has the parent element of <div class=\"container-fluid\">, which itself has the parent body.", @@ -674,7 +661,6 @@ { "id": "bad87fee1348bd9aed208826", "title": "Target the Children of an Element Using jQuery", - "difficulty": 3.14, "description": [ "Many HTML elements have children which inherit their properties from their parent HTML elements.", "For example, every HTML element is a child of your body element, and your \"jQuery Playground\" h3 element is a child of your <div class=\"container-fluid\"> element.", @@ -730,7 +716,6 @@ { "id": "bad87fee1348bd9aed108826", "title": "Target a Specific Child of an Element Using jQuery", - "difficulty": 3.15, "description": [ "You've seen why id attributes are so convenient for targeting with jQuery selectors. But you won't always have such neat ids to work with.", "Fortunately, jQuery has some other tricks for targeting the right elements.", @@ -787,7 +772,6 @@ { "id": "bad87fee1348bd9aed008826", "title": "Target Even Numbered Elements Using jQuery", - "difficulty": 3.16, "description": [ "You can also target all the even-numbered elements.", "Here's how you would target all the odd-numbered elements with class target and give them classes: $(\".target:odd\").addClass(\"animated shake\");", @@ -845,7 +829,6 @@ { "id": "bad87fee1348bd9aecb08826", "title": "Use jQuery to Modify the Entire Page", - "difficulty": 3.20, "description": [ "We're done playing with our jQuery playground. Let's tear it down!", "jQuery can target the body element as well.", diff --git a/seed/challenges/mongodb.json b/seed/challenges/mongodb.json index ad7961c8a8..d1ed0e65ed 100644 --- a/seed/challenges/mongodb.json +++ b/seed/challenges/mongodb.json @@ -5,7 +5,6 @@ { "id": "bd7243d8c341eddeaeb5bd0f", "title": "Store Data in MongoDB", - "difficulty": 0.01, "challengeSeed": ["133316035"], "description": [ "We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.", diff --git a/seed/challenges/nodejs-and-expressjs.json b/seed/challenges/nodejs-and-expressjs.json index b2fe33e477..1055a59221 100644 --- a/seed/challenges/nodejs-and-expressjs.json +++ b/seed/challenges/nodejs-and-expressjs.json @@ -5,7 +5,6 @@ { "id": "bd7153d8c441eddfaeb5bd0f", "title": "Manage Packages with NPM", - "difficulty": 0.39, "challengeSeed": ["126433450"], "description": [ "We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.", @@ -59,7 +58,6 @@ { "id": "bd7153d8c441eddfaeb5bdff", "title": "Start a Node.js Server", - "difficulty": 0.40, "challengeSeed": ["126411561"], "description": [ "We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud. We'll do the first 7 steps of Node School's LearnYouNode challenges.", @@ -101,7 +99,6 @@ { "id": "bd7153d8c441eddfaeb5bdfe", "title": "Continue working with Node.js Servers", - "difficulty": 0.41, "challengeSeed": ["128836506"], "description": [ "Let's continue the LearnYouNode Node School challenge. For this Waypoint, we'll do challenges 8 through 10.", @@ -130,7 +127,6 @@ { "id": "bd7153d8c441eddfaeb5bdfd", "title": "Finish working with Node.js Servers", - "difficulty": 0.42, "challengeSeed": ["128836507"], "description": [ "Let's continue the LearnYouNode Node School challenge. For this Waypoint, we'll do challenges 11 through 13.", @@ -159,7 +155,6 @@ { "id": "bd7153d8c441eddfaeb5bd1f", "title": "Build Web Apps with Express.js", - "difficulty": 0.43, "challengeSeed": [ "126411559" ], diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json index ea84d904db..5670520ce7 100644 --- a/seed/challenges/object-oriented-and-functional-programming.json +++ b/seed/challenges/object-oriented-and-functional-programming.json @@ -286,7 +286,6 @@ { "id": "cf1111c1c16feddfaeb2bdef", "title": "Reverse Arrays with .reverse", - "difficulty": 0, "description": [ "You can use the .reverse() function to reverse the contents of an array." ], @@ -310,7 +309,6 @@ { "id": "cf1111c1c16feddfaeb3bdef", "title": "Concatenate Strings with .concat", - "difficulty": 0, "description": [ ".concat() can be used to merge the contents of two arrays into one.", "array = array.concat(otherArray);" diff --git a/seed/challenges/upper-intermediate-bonfires.json b/seed/challenges/upper-intermediate-bonfires.json index 83e3584e5b..b1ee890d80 100644 --- a/seed/challenges/upper-intermediate-bonfires.json +++ b/seed/challenges/upper-intermediate-bonfires.json @@ -5,7 +5,6 @@ { "id": "a2f1d72d9b908d0bd72bb9f6", "title": "Make a Person", - "difficulty": "3.01", "description": [ "Fill in the object constructor with the methods specified in the tests.", "Those methods are getFirstName(), getLastName(), getFullName(), setFirstName(first), setLastName(last), and setFullName(firstAndLast).", @@ -51,7 +50,6 @@ "id": "af4afb223120f7348cdfc9fd", "title": "Map the Debris", "dashedName": "bonfire-map-the-debris", - "difficulty": "3.02", "description": [ "Return a new array that transforms the element's average altitude into their orbital periods.", "The array will contain objects in the format {name: 'name', avgAlt: avgAlt}.", @@ -92,7 +90,6 @@ { "id": "a3f503de51cfab748ff001aa", "title": "Pairwise", - "difficulty": "3.03", "description": [ "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.", "For example, pairwise([1, 4, 2, 3, 0, 5], 7) should return 11 because 4, 2, 3 and 5 can be paired with each other to equal 7.", diff --git a/seed/under-construction/json-apis-and-ajax.json b/seed/under-construction/json-apis-and-ajax.json index ab12090b02..f45e7178ba 100644 --- a/seed/under-construction/json-apis-and-ajax.json +++ b/seed/under-construction/json-apis-and-ajax.json @@ -5,7 +5,6 @@ { "id": "bad87fed1348bd9aeca08826", "title": "Trigger on click Events with jQuery", - "difficulty": 3.19, "description": [ "With jQuery we are able to get data from APIs via Ajax", "This data normally comes in the form of JSON", @@ -106,7 +105,6 @@ { "id": "bad87fee1348bd9aeca08826", "title": "Displaying JSON data in HTML", - "difficulty": 3.19, "description": [ "JSON stands for \"JavaScript Object Notation\". It\"s how you create objects in JavaScript.", "JSON is a series of \"key-value pairs\". Everything on the left of the colon (:) is the \"key\" you use to unlock the \"value\" on the right of the colon." @@ -153,7 +151,6 @@ "id": "bad84fee1348bd9aecc48826", "title": "Read Data from an Element Using jQuery", "dashedName": "waypoint-read-data-from-an-element-using-jquery", - "difficulty": 3.17, "description": [ "Let's make everything roll with rollOut." ], @@ -192,7 +189,6 @@ "id": "bad84fee1348bd9aecc38826", "title": "Read Data from an Element Using jQuery", "dashedName": "waypoint-read-data-from-an-element-using-jquery", - "difficulty": 3.17, "description": [ "Let's make everything roll with rollOut." ], @@ -232,7 +228,6 @@ "id": "bad84fee1348bd9aecc28826", "title": "Read Data from an Element Using jQuery", "dashedName": "waypoint-read-data-from-an-element-using-jquery", - "difficulty": 3.17, "description": [ "Let's make everything roll with rollOut." ], @@ -272,7 +267,6 @@ "id": "bad84fee1348bd9aecc18826", "title": "Read Data from an Element Using jQuery", "dashedName": "waypoint-read-data-from-an-element-using-jquery", - "difficulty": 3.17, "description": [ ], @@ -312,7 +306,6 @@ "id": "bad87fee1348bd9aecc08826", "title": "Trigger onHover Events with jQuery", "dashedName": "waypoint-trigger-onhover-events-with-jquery", - "difficulty": 3.18, "description": [ ], @@ -330,7 +323,6 @@ "id": "bad87fee1348bd9aebc08826", "title": "Get Data from an URL Using jQuery", "dashedName": "waypoint-get-data-from-a-url-using-jquery", - "difficulty": 3.21, "description": [ ], @@ -364,7 +356,6 @@ "id": "bad87fee1348bd9ae9c08826", "title": "Loop through JSON Data Using jQuery", "dashedName": "waypoint-loop-through-json-data-using-jquery", - "difficulty": 3.22, "description": [ ], @@ -398,7 +389,6 @@ "id": "bad88fee1348bd9ae8c08726", "title": "Wire AJAX Call into a jQuery Click Event", "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event", - "difficulty": 3.24, "description": [ "" ], @@ -432,7 +422,6 @@ "id": "bad88fee1348bd9ae8c08626", "title": "Wire AJAX Call into a jQuery Click Event", "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event", - "difficulty": 3.24, "description": [ "" ], @@ -466,7 +455,6 @@ "id": "bad88fee1348bd9ae8c08526", "title": "Wire AJAX Call into a jQuery Click Event", "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event", - "difficulty": 3.24, "description": [ "" ], @@ -500,7 +488,6 @@ "id": "bad88fee1348bd9ae8c08426", "title": "Wire AJAX Call into a jQuery Click Event", "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event", - "difficulty": 3.24, "description": [ "" ], From 5c3973c36513b18a553e5767dd21d2b96ea7aea1 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Fri, 2 Oct 2015 10:50:35 -0700 Subject: [PATCH 76/90] Fix last completed logic bug This PR fixes a regression introduced in an earlier patch --- server/boot/challenge.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/boot/challenge.js b/server/boot/challenge.js index b8b5ed60f4..15cb507855 100644 --- a/server/boot/challenge.js +++ b/server/boot/challenge.js @@ -557,7 +557,7 @@ module.exports = function(app) { const lastCompletedBlock = _.findLast(blocks, (block) => { return block.completed === 100; }); - lastCompleted = lastCompleted && lastCompletedBlock.name || null; + lastCompleted = lastCompletedBlock && lastCompletedBlock.name || null; }); Observable.combineLatest( From 86344d5c9e75b942e59a4e3b926d6641f301fcfd Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Fri, 2 Oct 2015 11:11:28 -0700 Subject: [PATCH 77/90] fix travis yaml and test challenges --- .travis.yml | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26804033f5..b6bd11e2c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js -services: - - mongodb - node_js: - - '0.10' \ No newline at end of file + - 'node' + - '1.6.4' + +sudo: false diff --git a/package.json b/package.json index f16e4bb9db..c3f7c0bebb 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "prestart-production": "bower cache clean && bower install && gulp build", "start-production": "node pm2Start", "lint": "eslint --ext=.js,.jsx .", - "test": "mocha --compilers js:babel/register" + "test": "gulp test-challenges" }, "license": "(BSD-3-Clause AND CC-BY-SA-4.0)", "dependencies": { From c688082ee48262e3f002cb5fa13567141610aca7 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Fri, 2 Oct 2015 11:44:29 -0700 Subject: [PATCH 78/90] add appropriate challenges to certificate challenges --- .../front-end-development-certificate.json | 195 +++++++++++++- .../full-stack-development-certificate.json | 255 +++++++++++++++++- 2 files changed, 448 insertions(+), 2 deletions(-) diff --git a/seed/challenges/front-end-development-certificate.json b/seed/challenges/front-end-development-certificate.json index fc34cac488..fa0bb1ce40 100644 --- a/seed/challenges/front-end-development-certificate.json +++ b/seed/challenges/front-end-development-certificate.json @@ -17,7 +17,200 @@ ], "type": "Waypoint", "challengeType": 7, - "tests": [], + "tests": [ + { + "id": "ad7123c8c441eddfaeb5bdef", + "title": "Meet Bonfire" + }, + { + "id": "a202eed8fc186c8434cb6d61", + "title": "Reverse a String" + }, + { + "id": "a302f7aae1aa3152a5b413bc", + "title": "Factorialize a Number" + }, + { + "id": "aaa48de84e1ecc7c742e1124", + "title": "Check for Palindromes" + }, + { + "id": "a26cbbe9ad8655a977e1ceb5", + "title": "Find the Longest Word in a String" + }, + { + "id": "ab6137d4e35944e21037b769", + "title": "Title Case a Sentence" + }, + { + "id": "a789b3483989747d63b0e427", + "title": "Return Largest Numbers in Arrays" + }, + { + "id": "acda2fb1324d9b0fa741e6b5", + "title": "Confirm the Ending" + }, + { + "id": "afcc8d540bea9ea2669306b6", + "title": "Repeat a string repeat a string" + }, + { + "id": "ac6993d51946422351508a41", + "title": "Truncate a string" + }, + { + "id": "a9bd25c716030ec90084d8a1", + "title": "Chunky Monkey" + }, + { + "id": "ab31c21b530c0dafa9e241ee", + "title": "Slasher Flick" + }, + { + "id": "af2170cad53daa0770fabdea", + "title": "Mutations" + }, + { + "id": "adf08ec01beb4f99fc7a68f2", + "title": "Falsy Bouncer" + }, + { + "id": "a39963a4c10bc8b4d4f06d7e", + "title": "Seek and Destroy" + }, + { + "id": "a24c1a4622e3c05097f71d67", + "title": "Where do I belong" + }, + { + "id": "a3566b1109230028080c9345", + "title": "Sum All Numbers in a Range" + }, + { + "id": "a5de63ebea8dbee56860f4f2", + "title": "Diff Two Arrays" + }, + { + "id": "a7f4d8f2483413a6ce226cac", + "title": "Roman Numeral Converter" + }, + { + "id": "a8e512fbe388ac2f9198f0fa", + "title": "Where art thou" + }, + { + "id": "a0b5010f579e69b815e7c5d6", + "title": "Search and Replace" + }, + { + "id": "aa7697ea2477d1316795783b", + "title": "Pig Latin" + }, + { + "id": "afd15382cdfb22c9efe8b7de", + "title": "DNA Pairing" + }, + { + "id": "af7588ade1100bde429baf20", + "title": "Missing letters" + }, + { + "id": "a77dbc43c33f39daa4429b4f", + "title": "Boo who" + }, + { + "id": "a105e963526e7de52b219be9", + "title": "Sorted Union" + }, + { + "id": "a6b0bb188d873cb2c8729495", + "title": "Convert HTML Entities" + }, + { + "id": "a103376db3ba46b2d50db289", + "title": "Spinal Tap Case" + }, + { + "id": "a5229172f011153519423690", + "title": "Sum All Odd Fibonacci Numbers" + }, + { + "id": "a3bfc1673c0526e06d3ac698", + "title": "Sum All Primes" + }, + { + "id": "ae9defd7acaf69703ab432ea", + "title": "Smallest Common Multiple" + }, + { + "id": "a6e40f1041b06c996f7b2406", + "title": "Finders Keepers" + }, + { + "id": "a5deed1811a43193f9f1c841", + "title": "Drop it" + }, + { + "id": "ab306dbdcc907c7ddfc30830", + "title": "Steamroller" + }, + { + "id": "a8d97bd4c764e91f9d2bda01", + "title": "Binary Agents" + }, + { + "id": "a10d2431ad0c6a099a4b8b52", + "title": "Everything Be True" + }, + { + "id": "a97fd23d9b809dac9921074f", + "title": "Arguments Optional" + }, + { + "id": "bd7158d8c442eddfbeb5bd1f", + "title": "Get Set for Ziplines" + }, + { + "id": "bd7158d8c242eddfaeb5bd13", + "title": "Build a Personal Portfolio Webpage" + }, + { + "id": "bd7158d8c442eddfaeb5bd13", + "title": "Build a Random Quote Machine" + }, + { + "id": "bd7158d8c442eddfaeb5bd0f", + "title": "Build a Pomodoro Clock" + }, + { + "id": "bd7158d8c442eddfaeb5bd17", + "title": "Build a JavaScript Calculator" + }, + { + "id": "bd7158d8c442eddfaeb5bd10", + "title": "Show the Local Weather" + }, + { + "id": "bd7158d8c442eddfaeb5bd1f", + "title": "Use the Twitch.tv JSON API" + }, + { + "id": "bd7158d8c442eddfaeb5bd18", + "title": "Stylize Stories on Camper News" + }, + { + "id": "bd7158d8c442eddfaeb5bd19", + "title": "Build a Wikipedia Viewer" + }, + { + "id": "bd7158d8c442eedfaeb5bd1c", + "title": "Build a Tic Tac Toe Game" + }, + { + "id": "bd7158d8c442eddfaeb5bd1c", + "title": "Build a Simon Game" + } + ], "nameCn": "", "descriptionCn": [], "nameFr": "", diff --git a/seed/challenges/full-stack-development-certificate.json b/seed/challenges/full-stack-development-certificate.json index edd2c5e932..901883aebc 100644 --- a/seed/challenges/full-stack-development-certificate.json +++ b/seed/challenges/full-stack-development-certificate.json @@ -17,7 +17,260 @@ ], "type": "Waypoint", "challengeType": 7, - "tests": [], + "tests": [ + { + "id": "ad7123c8c441eddfaeb5bdef", + "title": "Meet Bonfire" + }, + { + "id": "a202eed8fc186c8434cb6d61", + "title": "Reverse a String" + }, + { + "id": "a302f7aae1aa3152a5b413bc", + "title": "Factorialize a Number" + }, + { + "id": "aaa48de84e1ecc7c742e1124", + "title": "Check for Palindromes" + }, + { + "id": "a26cbbe9ad8655a977e1ceb5", + "title": "Find the Longest Word in a String" + }, + { + "id": "ab6137d4e35944e21037b769", + "title": "Title Case a Sentence" + }, + { + "id": "a789b3483989747d63b0e427", + "title": "Return Largest Numbers in Arrays" + }, + { + "id": "acda2fb1324d9b0fa741e6b5", + "title": "Confirm the Ending" + }, + { + "id": "afcc8d540bea9ea2669306b6", + "title": "Repeat a string repeat a string" + }, + { + "id": "ac6993d51946422351508a41", + "title": "Truncate a string" + }, + { + "id": "a9bd25c716030ec90084d8a1", + "title": "Chunky Monkey" + }, + { + "id": "ab31c21b530c0dafa9e241ee", + "title": "Slasher Flick" + }, + { + "id": "af2170cad53daa0770fabdea", + "title": "Mutations" + }, + { + "id": "adf08ec01beb4f99fc7a68f2", + "title": "Falsy Bouncer" + }, + { + "id": "a39963a4c10bc8b4d4f06d7e", + "title": "Seek and Destroy" + }, + { + "id": "a24c1a4622e3c05097f71d67", + "title": "Where do I belong" + }, + { + "id": "a3566b1109230028080c9345", + "title": "Sum All Numbers in a Range" + }, + { + "id": "a5de63ebea8dbee56860f4f2", + "title": "Diff Two Arrays" + }, + { + "id": "a7f4d8f2483413a6ce226cac", + "title": "Roman Numeral Converter" + }, + { + "id": "a8e512fbe388ac2f9198f0fa", + "title": "Where art thou" + }, + { + "id": "a0b5010f579e69b815e7c5d6", + "title": "Search and Replace" + }, + { + "id": "aa7697ea2477d1316795783b", + "title": "Pig Latin" + }, + { + "id": "afd15382cdfb22c9efe8b7de", + "title": "DNA Pairing" + }, + { + "id": "af7588ade1100bde429baf20", + "title": "Missing letters" + }, + { + "id": "a77dbc43c33f39daa4429b4f", + "title": "Boo who" + }, + { + "id": "a105e963526e7de52b219be9", + "title": "Sorted Union" + }, + { + "id": "a6b0bb188d873cb2c8729495", + "title": "Convert HTML Entities" + }, + { + "id": "a103376db3ba46b2d50db289", + "title": "Spinal Tap Case" + }, + { + "id": "a5229172f011153519423690", + "title": "Sum All Odd Fibonacci Numbers" + }, + { + "id": "a3bfc1673c0526e06d3ac698", + "title": "Sum All Primes" + }, + { + "id": "ae9defd7acaf69703ab432ea", + "title": "Smallest Common Multiple" + }, + { + "id": "a6e40f1041b06c996f7b2406", + "title": "Finders Keepers" + }, + { + "id": "a5deed1811a43193f9f1c841", + "title": "Drop it" + }, + { + "id": "ab306dbdcc907c7ddfc30830", + "title": "Steamroller" + }, + { + "id": "a8d97bd4c764e91f9d2bda01", + "title": "Binary Agents" + }, + { + "id": "a10d2431ad0c6a099a4b8b52", + "title": "Everything Be True" + }, + { + "id": "a97fd23d9b809dac9921074f", + "title": "Arguments Optional" + }, + { + "id": "bd7158d8c442eddfbeb5bd1f", + "title": "Get Set for Ziplines" + }, + { + "id": "bd7158d8c242eddfaeb5bd13", + "title": "Build a Personal Portfolio Webpage" + }, + { + "id": "bd7158d8c442eddfaeb5bd13", + "title": "Build a Random Quote Machine" + }, + { + "id": "bd7158d8c442eddfaeb5bd0f", + "title": "Build a Pomodoro Clock" + }, + { + "id": "bd7158d8c442eddfaeb5bd17", + "title": "Build a JavaScript Calculator" + }, + { + "id": "bd7158d8c442eddfaeb5bd10", + "title": "Show the Local Weather" + }, + { + "id": "bd7158d8c442eddfaeb5bd1f", + "title": "Use the Twitch.tv JSON API" + }, + { + "id": "bd7158d8c442eddfaeb5bd18", + "title": "Stylize Stories on Camper News" + }, + { + "id": "bd7158d8c442eddfaeb5bd19", + "title": "Build a Wikipedia Viewer" + }, + { + "id": "bd7158d8c442eedfaeb5bd1c", + "title": "Build a Tic Tac Toe Game" + }, + { + "id": "bd7158d8c442eddfaeb5bd1c", + "title": "Build a Simon Game" + }, + { + "id": "a2f1d72d9b908d0bd72bb9f6", + "title": "Make a Person" + }, + { + "id": "af4afb223120f7348cdfc9fd", + "title": "Map the Debris" + }, + { + "id": "a3f503de51cfab748ff001aa", + "title": "Pairwise" + }, + { + "id": "aff0395860f5d3034dc0bfc9", + "title": "Validate US Telephone Numbers" + }, + { + "id": "a3f503de51cf954ede28891d", + "title": "Symmetric Difference" + }, + { + "id": "aa2e6f85cab2ab736c9a9b24", + "title": "Exact Change" + }, + { + "id": "a56138aff60341a09ed6c480", + "title": "Inventory Update" + }, + { + "id": "a7bf700cd123b9a54eef01d5", + "title": "No repeats please" + }, + { + "id": "a19f0fbe1872186acd434d5a", + "title": "Friendly Date Ranges" + }, + { + "id": "bd7158d8c443eddfaeb5bcef", + "title": "Get Set for Basejumps" + }, + { + "id": "bd7158d8c443eddfaeb5bdef", + "title": "Build a Voting App" + }, + { + "id": "bd7158d8c443eddfaeb5bdff", + "title": "Build a Nightlife Coordination App" + }, + { + "id": "bd7158d8c443eddfaeb5bd0e", + "title": "Chart the Stock Market" + }, + { + "id": "bd7158d8c443eddfaeb5bd0f", + "title": "Manage a Book Trading Club" + }, + { + "id": "bd7158d8c443eddfaeb5bdee", + "title": "Build a Pinterest Clone" + } + ], "nameCn": "", "descriptionCn": [], "nameFr": "", From dc4f5212c280d91c969495a4864f4efb67ba7932 Mon Sep 17 00:00:00 2001 From: Joseph Breihan Date: Sun, 4 Oct 2015 23:20:09 -0400 Subject: [PATCH 79/90] Fix typo described in issue #3585 --- seed/challenges/object-oriented-and-functional-programming.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json index 3d32886fac..2d8c22f32d 100644 --- a/seed/challenges/object-oriented-and-functional-programming.json +++ b/seed/challenges/object-oriented-and-functional-programming.json @@ -103,7 +103,7 @@ "assert(typeof(myBike.addUnit) === 'undefined', 'message: myBike.addUnit should remain undefined.');" ], "challengeSeed":[ - "//Let's create an object with a two functions. One attached as a property and one not.", + "//Let's create an object with two functions. One attached as a property and one not.", "var Car = function() {", " this.gear = 1;", " function addStyle(styleMe){", From 8c48626f031c40b5ffc6fc20684f846260181f93 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Fri, 2 Oct 2015 11:47:36 -0700 Subject: [PATCH 80/90] Add certification page --- client/commonFramework.js | 51 ++++++- common/models/user.json | 21 ++- public/fonts/saxmono.ttf | Bin 0 -> 103740 bytes .../front-end-development-certificate.json | 17 ++- .../full-stack-development-certificate.json | 16 ++- server/boot/certificate.js | 131 ++++++++++++++++++ server/boot/challenge.js | 9 +- server/boot/user.js | 94 ++++++++++++- server/utils/middleware.js | 48 +------ server/utils/rx.js | 23 +-- server/views/account/show.jade | 7 +- server/views/certificate/font.jade | 45 ++++++ server/views/certificate/front-end.jade | 6 + server/views/certificate/full-stack.jade | 6 + server/views/certificate/index.jade | 7 + server/views/certificate/script.jade | 8 ++ server/views/coursewares/showStep.jade | 8 +- 17 files changed, 415 insertions(+), 82 deletions(-) create mode 100755 public/fonts/saxmono.ttf create mode 100644 server/boot/certificate.js create mode 100644 server/views/certificate/font.jade create mode 100644 server/views/certificate/front-end.jade create mode 100644 server/views/certificate/full-stack.jade create mode 100644 server/views/certificate/index.jade create mode 100644 server/views/certificate/script.jade diff --git a/client/commonFramework.js b/client/commonFramework.js index 8abcb6a9dc..fcb1ccc58d 100644 --- a/client/commonFramework.js +++ b/client/commonFramework.js @@ -865,14 +865,53 @@ common.init.push((function() { } next(); }); - } - function handleActionClick() { - $(this) - .parent() - .find('.disabled') - .removeClass('disabled'); + function handleActionClick(e) { + var props = common.challengeSeed[0] || + { stepIndex: [] }; + + var $el = $(this); + var index = +$el.attr('id'); + var propIndex = props.stepIndex.indexOf(index); + + if (propIndex === -1) { + return $el + .parent() + .find('.disabled') + .removeClass('disabled'); + } + + // an API action + // prevent link from opening + e.preventDefault(); + var prop = props.properties[propIndex]; + var api = props.apis[propIndex]; + if (common[prop]) { + return $el + .parent() + .find('.disabled') + .removeClass('disabled'); + } + $ + .post(api) + .done(function(data) { + // assume a boolean indicates passing + if (typeof data === 'boolean') { + return $el + .parent() + .find('.disabled') + .removeClass('disabled'); + } + // assume api returns string when fails + $el + .parent() + .find('.disabled') + .replaceWith('

' + data + '

'); + }) + .fail(function() { + console.log('failed'); + }); } function handleFinishClick(e) { diff --git a/common/models/user.json b/common/models/user.json index c46d1c2f13..cb34389b80 100644 --- a/common/models/user.json +++ b/common/models/user.json @@ -102,14 +102,31 @@ }, "isLocked": { "type": "boolean", - "default": false + "default": false, + "description": "Campers profile does not show challenges to the public" }, "currentChallenge": { "type": {} }, "isUniqMigrated": { "type": "boolean", - "default": false + "default": false, + "description": "Campers completedChallenges array is free of duplicates" + }, + "isHonest": { + "type": "boolean", + "default": false, + "description": "Camper has signed academic honesty policy" + }, + "isFrontEndCert": { + "type": "boolean", + "defaut": false, + "description": "Camper is front end certified" + }, + "isFullStackCert": { + "type": "boolean", + "default": false, + "description": "Campers is full stack certified" }, "completedChallenges": { "type": [ diff --git a/public/fonts/saxmono.ttf b/public/fonts/saxmono.ttf new file mode 100755 index 0000000000000000000000000000000000000000..76c77d6411749741383ddb3d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CxH3?QF-`*|%}UUh zcBllUNcA!ZTbBXk`n{rIir~l1Hdu;tNwegK<;5JEOWAGC{HiHiae5v{b+@9r^)Xjj z)MdWPDO^=b;YzQ8S~OoSW;n2xG)>t`&ntmB_p4bMqQ1&AYFbLzJr*dfiy9t9cFT(1 zu+%>3ijp8(Z9Llay34ysmYtMX+F it)-7sCZA|q;iBr{{6jd}Z+`B}g8nu91rI($?)oRnx?GF^ literal 0 HcmV?d00001 diff --git a/seed/challenges/front-end-development-certificate.json b/seed/challenges/front-end-development-certificate.json index fa0bb1ce40..ac8b53ee21 100644 --- a/seed/challenges/front-end-development-certificate.json +++ b/seed/challenges/front-end-development-certificate.json @@ -5,14 +5,25 @@ { "id": "561add10cb82ac38a17513be", "title": "Claim Your Front End Development Certificate", - "difficulty": 0.00, - "challengeSeed": [], + "challengeSeed": [ + { + "properties": ["isHonest", "isFrontEndCert"], + "apis": ["/certificate/honest", "/certificate/verify/front-end"], + "stepIndex": [0, 1] + } + ], "description": [ [ "http://i.imgur.com/RlEk2IF.jpg", "a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", "Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", - "" + "#" + ], + [ + "http://i.imgur.com/RlEk2IF.jpg", + "a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", + "Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", + "#" ] ], "type": "Waypoint", diff --git a/seed/challenges/full-stack-development-certificate.json b/seed/challenges/full-stack-development-certificate.json index 901883aebc..bfb2f7df4a 100644 --- a/seed/challenges/full-stack-development-certificate.json +++ b/seed/challenges/full-stack-development-certificate.json @@ -6,13 +6,25 @@ "id": "660add10cb82ac38a17513be", "title": "Claim Your Full Stack Development Certificate", "difficulty": 0.00, - "challengeSeed": [], + "challengeSeed": [ + { + "properties": ["isHonest", "isFullStackCert"], + "apis": ["/certificate/honest", "/certificate/verify/full-stack"], + "stepIndex": [0, 1] + } + ], "description": [ [ "http://i.imgur.com/RlEk2IF.jpg", "a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", "Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", - "" + "#" + ], + [ + "http://i.imgur.com/RlEk2IF.jpg", + "a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", + "Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", + "#" ] ], "type": "Waypoint", diff --git a/server/boot/certificate.js b/server/boot/certificate.js new file mode 100644 index 0000000000..b6a3db9461 --- /dev/null +++ b/server/boot/certificate.js @@ -0,0 +1,131 @@ +import _ from 'lodash'; +import dedent from 'dedent'; +import { Observable } from 'rx'; +import debugFactory from 'debug'; + +import { + ifNoUser401, + ifNoUserSend +} from '../utils/middleware'; + +import { + saveUser, + observeQuery +} from '../utils/rx'; + +const frontEndChallangeId = '561add10cb82ac38a17513be'; +const fullStackChallangeId = '660add10cb82ac38a17513be'; +const debug = debugFactory('freecc:certification'); +const sendMessageToNonUser = ifNoUserSend( + 'must be logged in to complete.' +); + +function isCertified(frontEndIds, { completedChallenges, isFrontEndCert }) { + if (isFrontEndCert) { + return true; + } + return _.every(frontEndIds, ({ id }) => _.some(completedChallenges, { id })); +} + +export default function certificate(app) { + const router = app.loopback.Router(); + const { Challenge } = app.models; + + const frontEndChallangeIds$ = observeQuery( + Challenge, + 'findById', + frontEndChallangeId, + { + tests: true + } + ) + .map(({ tests = [] }) => tests) + .shareReplay(); + + const fullStackChallangeIds$ = observeQuery( + Challenge, + 'findById', + fullStackChallangeId, + { + tests: true + } + ) + .map(({ tests = [] }) => tests) + .shareReplay(); + + router.post( + '/certificate/verify/front-end', + ifNoUser401, + verifyCert + ); + + router.post( + '/certificate/verify/full-stack', + ifNoUser401, + verifyCert + ); + + router.post( + '/certificate/honest', + sendMessageToNonUser, + postHonest + ); + + app.use(router); + + function verifyCert(req, res, next) { + const isFront = req.path.split('/').pop() === 'front-end'; + Observable.just({}) + .flatMap(() => { + if (isFront) { + return frontEndChallangeIds$; + } + return fullStackChallangeIds$; + }) + .flatMap((tests) => { + const { user } = req; + if ( + isFront && !user.isFrontEndCert && isCertified(tests, user) || + !isFront && !user.isFullStackCert && isCertified(tests, user) + ) { + debug('certified'); + if (isFront) { + user.isFrontEndCert = true; + } else { + user.isFullStackCert = true; + } + return saveUser(user); + } + return Observable.just(user); + }) + .subscribe( + user => { + if ( + isFront && user.isFrontEndCert || + !isFront && user.isFullStackCert + ) { + return res.status(200).send(true); + } + return res.status(200).send( + dedent` + Looks like you have not completed the neccessary steps, + Please return the map + ` + ); + }, + next + ); + } + + function postHonest(req, res, next) { + const { user } = req; + user.isHonest = true; + saveUser(user) + .subscribe( + (user) => { + res.status(200).send(!!user.isHonest); + }, + next + ); + } +} diff --git a/server/boot/challenge.js b/server/boot/challenge.js index 15cb507855..6a056b705d 100644 --- a/server/boot/challenge.js +++ b/server/boot/challenge.js @@ -9,11 +9,10 @@ import utils from '../utils'; import { saveUser, observeMethod, - observableQueryFromModel + observeQuery } from '../utils/rx'; import { - userMigration, ifNoUserSend } from '../utils/middleware'; @@ -147,8 +146,6 @@ module.exports = function(app) { completedBonfire ); - // the follow routes are covered by userMigration - router.use(userMigration); router.get('/map', challengeMap); router.get( '/challenges/next-challenge', @@ -330,7 +327,7 @@ module.exports = function(app) { challengeType: 5 }; - observableQueryFromModel( + observeQuery( User, 'findOne', { where: { username: ('' + completedWith).toLowerCase() } } @@ -458,7 +455,7 @@ module.exports = function(app) { verified: false }; - observableQueryFromModel( + observeQuery( User, 'findOne', { where: { username: completedWith.toLowerCase() } } diff --git a/server/boot/user.js b/server/boot/user.js index 214c0b9264..9567a5066a 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -1,8 +1,11 @@ +import _ from 'lodash'; import dedent from 'dedent'; import moment from 'moment'; +import { Observable } from 'rx'; import debugFactory from 'debug'; import { ifNoUser401, ifNoUserRedirectTo } from '../utils/middleware'; +import { observeQuery } from '../utils/rx'; const debug = debugFactory('freecc:boot:user'); const daysBetween = 1.5; @@ -52,7 +55,16 @@ function dayDiff([head, tail]) { module.exports = function(app) { var router = app.loopback.Router(); var User = app.models.User; - // var Story = app.models.Story; + function findUserByUsername$(username, fields) { + return observeQuery( + User, + 'findOne', + { + where: { username }, + fields + } + ); + } router.get('/login', function(req, res) { res.redirect(301, '/signin'); @@ -85,7 +97,18 @@ module.exports = function(app) { ); router.get('/vote1', vote1); router.get('/vote2', vote2); - // Ensure this is the last route! + + // Ensure these are the last routes! + router.get( + '/:username/front-end-certification', + showCert + ); + + router.get( + '/:username/full-stack-certification', + showCert + ); + router.get('/:username', returnUser); app.use(router); @@ -184,14 +207,20 @@ module.exports = function(app) { return (obj.name || '').match(/^Waypoint/i); }); + debug('user is fec', profileUser.isFrontEndCert); res.render('account/show', { title: 'Camper ' + profileUser.username + '\'s portfolio', username: profileUser.username, name: profileUser.name, + isMigrationGrandfathered: profileUser.isMigrationGrandfathered, isGithubCool: profileUser.isGithubCool, isLocked: !!profileUser.isLocked, + isFrontEndCert: profileUser.isFrontEndCert, + isFullStackCert: profileUser.isFullStackCert, + isHonest: profileUser.isHonest, + location: profileUser.location, calender: data, @@ -216,6 +245,62 @@ module.exports = function(app) { ); } + function showCert(req, res, next) { + const username = req.params.username.toLowerCase(); + const { user } = req; + const showFront = req.path.split('/').pop() === 'front-end-certification'; + Observable.just(user) + .flatMap(user => { + if (user && user.username === username) { + return Observable.just(user); + } + return findUserByUsername$(username, { + isFrontEndCert: true, + isFullStackCert: true, + completedChallenges: true, + username: true, + name: true + }); + }) + .subscribe( + (user) => { + if (!user) { + req.flash('errors', { + msg: `404: We couldn't find the user ${username}` + }); + return res.redirect('/'); + } + if ( + showFront && user.isFrontEndCert || + !showFront && user.isFullStackCert + ) { + var { completedDate } = _.find(user.completedChallenges, { + id: '561add10cb82ac38a17513be' + }); + + return res.render( + showFront ? + 'certificate/front-end.jade' : + 'certificate/full-stack.jade', + { + username: user.username, + date: moment(new Date(completedDate)) + .format('MMMM, Do YYYY'), + name: user.name + } + ); + } + req.flash('errors', { + msg: showFront ? + `Looks like user ${username} is not Front End certified` : + `Looks like user ${username} is not Full Stack certified` + }); + res.redirect('/map'); + }, + next + ); + } + function toggleLockdownMode(req, res, next) { if (req.user.isLocked === true) { req.user.isLocked = false; @@ -297,11 +382,6 @@ module.exports = function(app) { }); } - /** - * POST /forgot - * Create a random token, then the send user an email with a reset link. - */ - function postForgot(req, res) { const errors = req.validationErrors(); const email = req.body.email.toLowerCase(); diff --git a/server/utils/middleware.js b/server/utils/middleware.js index 1edec7a59b..3c541cbb11 100644 --- a/server/utils/middleware.js +++ b/server/utils/middleware.js @@ -1,60 +1,24 @@ -var R = require('ramda'); - -/* - * Middleware to migrate users from fragmented challenge structure to unified - * challenge structure - * - * @param req - * @param res - * @returns null - */ -exports.userMigration = function userMigration(req, res, next) { - if (!req.user || req.user.completedChallenges.length !== 0) { - return next(); - } - req.user.completedChallenges = R.filter(function(elem) { - // getting rid of undefined - return elem; - }, R.concat( - req.user.completedCoursewares, - req.user.completedBonfires.map(function(bonfire) { - return ({ - completedDate: bonfire.completedDate, - id: bonfire.id, - name: bonfire.name, - completedWith: bonfire.completedWith, - solution: bonfire.solution, - githubLink: '', - verified: false, - challengeType: 5 - }); - }) - ) - ); - return next(); -}; - -exports.ifNoUserRedirectTo = function ifNoUserRedirectTo(url) { +export function ifNoUserRedirectTo(url) { return function(req, res, next) { if (req.user) { return next(); } return res.redirect(url); }; -}; +} -exports.ifNoUserSend = function ifNoUserSend(sendThis) { +export function ifNoUserSend(sendThis) { return function(req, res, next) { if (req.user) { return next(); } return res.status(200).send(sendThis); }; -}; +} -exports.ifNoUser401 = function ifNoUser401(req, res, next) { +export function ifNoUser401(req, res, next) { if (req.user) { return next(); } return res.status(401).end(); -}; +} diff --git a/server/utils/rx.js b/server/utils/rx.js index d3b1ac41b0..68086d2563 100644 --- a/server/utils/rx.js +++ b/server/utils/rx.js @@ -1,7 +1,9 @@ -var Rx = require('rx'); -var debug = require('debug')('freecc:rxUtils'); +import Rx from 'rx'; +import debugFactory from 'debug'; -exports.saveInstance = function saveInstance(instance) { +const debug = debugFactory('freecc:rxUtils'); + +export function saveInstance(instance) { return new Rx.Observable.create(function(observer) { if (!instance || typeof instance.save !== 'function') { debug('no instance or save method'); @@ -17,16 +19,15 @@ exports.saveInstance = function saveInstance(instance) { observer.onCompleted(); }); }); -}; +} // alias saveInstance -exports.saveUser = exports.saveInstance; +export const saveUser = saveInstance; -exports.observeQuery = exports.observableQueryFromModel = - function observableQueryFromModel(Model, method, query) { - return Rx.Observable.fromNodeCallback(Model[method], Model)(query); - }; +export function observeQuery(Model, method, query) { + return Rx.Observable.fromNodeCallback(Model[method], Model)(query); +} -exports.observeMethod = function observeMethod(context, methodName) { +export function observeMethod(context, methodName) { return Rx.Observable.fromNodeCallback(context[methodName], context); -}; +} diff --git a/server/views/account/show.jade b/server/views/account/show.jade index 5f07918815..530f74b746 100644 --- a/server/views/account/show.jade +++ b/server/views/account/show.jade @@ -58,8 +58,13 @@ block content h1.flat-top.wrappable= name h1.flat-top.wrappable= location h1.flat-top.text-primary= "[ " + (progressTimestamps.length) + " ]" + if isFrontEndCert + a.btn.btn-primary(href='/' + username + '/front-end-certification') View My Front End Development Certification + if isFullStackCert + .button-spacer + a.btn.btn-success(href='/' + username + '/full-stack-certification') View My Full Stack Development Certification if (user && user.username !== username) - a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/link/twitter') + a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/leaderboard/add?username=#{username}') i.fa.fa-plus-square | Add them to my personal leaderboard diff --git a/server/views/certificate/font.jade b/server/views/certificate/font.jade new file mode 100644 index 0000000000..54b76b935f --- /dev/null +++ b/server/views/certificate/font.jade @@ -0,0 +1,45 @@ +style. + @font-face { + font-family: "Sax Mono"; + src: url("/fonts/saxmono.ttf") format("truetype"); + } + + body { + display: inline-block; + font-family: "Sax Mono", monospace; + margin: 0; + position: absolute; + text-align: center; + } + + .img-abs { + left 0; + position: relative; + top: 0; + width: 2000px + } + + .cert-name { + font-size: 64px; + left: 1000px; + position: absolute; + top: 704px; + z-index: 1000; + } + + .cert-date { + font-size: 60px; + left: 760px; + position: absolute; + top: 1004.8px; + z-index: 1000; + } + + .cert-link { + font-size: 22px; + left: 120px; + position: absolute; + top: 1488px; + z-index: 1000; + } + diff --git a/server/views/certificate/front-end.jade b/server/views/certificate/front-end.jade new file mode 100644 index 0000000000..379dfb7dd1 --- /dev/null +++ b/server/views/certificate/front-end.jade @@ -0,0 +1,6 @@ +include font +#name.cert-name= name +img#cert.img-abs(src='http://i.imgur.com/ToFZKBd.jpg') +.cert-date= date +.cert-link verify this certification at: http://freecodecamp.com/#{username}/front-end-certification +include script diff --git a/server/views/certificate/full-stack.jade b/server/views/certificate/full-stack.jade new file mode 100644 index 0000000000..95c94a6eb0 --- /dev/null +++ b/server/views/certificate/full-stack.jade @@ -0,0 +1,6 @@ +include font +#name.cert-name= name +img#cert.img-abs(src='http://i.imgur.com/Z4PgjBQ.jpg') +.cert-date= date +.cert-link verify this certification at: http://freecodecamp.com/#{username}/full-stack-certification +include script diff --git a/server/views/certificate/index.jade b/server/views/certificate/index.jade new file mode 100644 index 0000000000..51e0294db2 --- /dev/null +++ b/server/views/certificate/index.jade @@ -0,0 +1,7 @@ +extends ../layout +block content + .panel.panel-info + .panel-heading.text-center + h1 Certificate + .panel-body + p foo diff --git a/server/views/certificate/script.jade b/server/views/certificate/script.jade new file mode 100644 index 0000000000..ccb83323c5 --- /dev/null +++ b/server/views/certificate/script.jade @@ -0,0 +1,8 @@ +script. + (function() { + var containerWidth = document.getElementById('cert').offsetWidth; + var nameDiv = document.getElementById('name'); + var nameWidth = nameDiv.offsetWidth; + console.log(containerWidth, nameWidth); + nameDiv.style.left = ((containerWidth - nameWidth) / 2) + 15; + })(); diff --git a/server/views/coursewares/showStep.jade b/server/views/coursewares/showStep.jade index f89d65eda2..fa8f11431a 100644 --- a/server/views/coursewares/showStep.jade +++ b/server/views/coursewares/showStep.jade @@ -9,7 +9,7 @@ block content .caption p.large-p= step[2] if step[3] - a.btn.btn-block.btn-primary.challenge-step-btn-action(href='#{step[3]}' target='_blank') Go To Link + a.btn.btn-block.btn-primary.challenge-step-btn-action(id='#{index}' href='#{step[3]}' target='_blank') Go To Link if index + 1 === description.length .btn.btn-block.btn-primary.challenge-step-btn-finish(id='last' class=step[3] ? 'disabled' : '') Finish challenge else @@ -32,8 +32,12 @@ block content a.btn.btn-lg.btn-primary.btn-block(href='/challenges/next-challenge?id=' + challengeId) Go to my next challenge script(src=rev('/js', 'commonFramework.js')) script. - var common = common || { init: [] }; + var common = window.common || { init: [] }; common.challengeId = !{JSON.stringify(challengeId)}; common.challengeName = !{JSON.stringify(name)}; common.challengeType = 7; common.dashedName = !{JSON.stringify(dashedName || '')}; + common.isHonest = !{JSON.stringify(isHonest || false)}; + common.isFrontEndCert = !{JSON.stringify(isFrontEndCert || false)}; + common.isFullStackCert = !{JSON.stringify(isFullStackCert || false)}; + common.challengeSeed = !{JSON.stringify(challengeSeed || [])}; From 8f845961427162f6fd4084913bb8e9258e6255ab Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 5 Oct 2015 16:38:58 -0700 Subject: [PATCH 81/90] Fix 500 out of range bug when completing last challenge --- server/boot/challenge.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/boot/challenge.js b/server/boot/challenge.js index 15cb507855..adf4c95c21 100644 --- a/server/boot/challenge.js +++ b/server/boot/challenge.js @@ -183,9 +183,9 @@ module.exports = function(app) { 'could not find challenge block for ' + challenge.block ); } - const nextBlock$ = blocks$.elementAt(blockIndex + 1); - const firstChallengeOfNextBlock$ = nextBlock$ - .map(block => block.challenges[0]); + const firstChallengeOfNextBlock$ = blocks$ + .elementAtOrDefault(blockIndex + 1, {}) + .map(({ challenges = [] }) => challenges[0]); return blocks$ .elementAt(blockIndex) @@ -214,6 +214,9 @@ module.exports = function(app) { }); }) .map(nextChallenge => { + if (!nextChallenge) { + return null; + } nextChallengeName = nextChallenge.dashedName; return nextChallengeName; }) From 34efc43f6a5cf5c0d1d6d76eb4fa5ca85ce8c110 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Mon, 5 Oct 2015 17:18:35 -0700 Subject: [PATCH 82/90] update copy of certificate flows --- .../front-end-development-certificate.json | 26 ++++++++++++++----- .../full-stack-development-certificate.json | 26 ++++++++++++++----- server/boot/certificate.js | 8 ++++++ server/boot/user.js | 4 ++- 4 files changed, 49 insertions(+), 15 deletions(-) diff --git a/seed/challenges/front-end-development-certificate.json b/seed/challenges/front-end-development-certificate.json index ac8b53ee21..351809e702 100644 --- a/seed/challenges/front-end-development-certificate.json +++ b/seed/challenges/front-end-development-certificate.json @@ -9,21 +9,33 @@ { "properties": ["isHonest", "isFrontEndCert"], "apis": ["/certificate/honest", "/certificate/verify/front-end"], - "stepIndex": [0, 1] + "stepIndex": [1, 2] } ], "description": [ [ - "http://i.imgur.com/RlEk2IF.jpg", - "a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", - "Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", + "http://i.imgur.com/luMkKst.jpg", + "An image of our Front End Development Certificate", + "This challenge will give you your verified Front End Development Certificate. Before we issue your certificate, we must verify that you have completed all of our basic and intermediate Bonfires, and all our basic and intermediate Ziplines. You must also accept our Academic Honesty Pledge. Click the button below to start this process.", + "" + ], + [ + "http://i.imgur.com/HArFfMN.jpg", + "The definition of plagiarism: Plagiarism (noun) - copying someone else’s work and presenting it as your own without crediting them", + "By clicking below, you pledge that all of your submitted code A) is code you or your pair personally wrote, or B) comes from open source libraries like jQuery, or C) has been clearly attributed to its original authors. You also give us permission to audit your challenge solutions and revoke your certificate if we discover evidence of plagiarism.", "#" ], [ - "http://i.imgur.com/RlEk2IF.jpg", - "a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", - "Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", + "http://i.imgur.com/14F2Van.jpg", + "An image of the text \"Front End Development Certificate requirements\"", + "Let's confirm that you have completed all of our basic and intermediate Bonfires, and all our basic and intermediate Ziplines. Click the button below to verify this.", "#" + ], + [ + "http://i.imgur.com/16SIhHO.jpg", + "An image of the word \"Congratulations\"", + "Congratulations! We've added your Front End Development Certificate to your certificate to your portfolio page. Unless you choose to hide your solutions, this certificate will remain publicly visible and verifiable.", + "" ] ], "type": "Waypoint", diff --git a/seed/challenges/full-stack-development-certificate.json b/seed/challenges/full-stack-development-certificate.json index bfb2f7df4a..7ae95c94e7 100644 --- a/seed/challenges/full-stack-development-certificate.json +++ b/seed/challenges/full-stack-development-certificate.json @@ -10,21 +10,33 @@ { "properties": ["isHonest", "isFullStackCert"], "apis": ["/certificate/honest", "/certificate/verify/full-stack"], - "stepIndex": [0, 1] + "stepIndex": [1, 2] } ], "description": [ [ - "http://i.imgur.com/RlEk2IF.jpg", - "a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", - "Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", + "http://i.imgur.com/qXublEe.jpg", + "An image of our Full Stack Development Certificate", + "This challenge will give you your verified Full Stack Development Certificate. Before we issue your certificate, we must verify that you have completed all of Bonfires, Ziplines and Basejumps. You must also accept our Academic Honesty Pledge. Click the button below to start this process.", + "" + ], + [ + "http://i.imgur.com/HArFfMN.jpg", + "The definition of plagiarism: Plagiarism (noun) - copying someone else’s work and presenting it as your own without crediting them", + "By clicking below, you pledge that all of your submitted code A) is code you or your pair personally wrote, or B) comes from open source libraries like jQuery, or C) has been clearly attributed to its original authors. You also give us permission to audit your challenge solutions and revoke your certificate if we discover evidence of plagiarism.", "#" ], [ - "http://i.imgur.com/RlEk2IF.jpg", - "a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", - "Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", + "http://i.imgur.com/2qn7tHp.jpg", + "An image of the text \"Full Stack Development Certificate requirements\"", + "Let's confirm that you have completed all of our Bonfires, Ziplines and Basejumps. Click the button below to verify this.", "#" + ], + [ + "http://i.imgur.com/16SIhHO.jpg", + "An image of the word \"Congratulations\"", + "Congratulations! We've added your Full Stack Development Certificate to your certificate to your portfolio page. Unless you choose to hide your solutions, this certificate will remain publicly visible and verifiable.", + "" ] ], "type": "Waypoint", diff --git a/server/boot/certificate.js b/server/boot/certificate.js index b6a3db9461..ba28cb8a16 100644 --- a/server/boot/certificate.js +++ b/server/boot/certificate.js @@ -91,8 +91,16 @@ export default function certificate(app) { debug('certified'); if (isFront) { user.isFrontEndCert = true; + user.completedChallenges.push({ + completedDate: new Date(), + id: frontEndChallangeId + }) } else { user.isFullStackCert = true; + user.completedChallenges.push({ + completedDate: new Date(), + id: fullStackChallangeId + }) } return saveUser(user); } diff --git a/server/boot/user.js b/server/boot/user.js index 9567a5066a..a7c6fe2978 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -275,7 +275,9 @@ module.exports = function(app) { !showFront && user.isFullStackCert ) { var { completedDate } = _.find(user.completedChallenges, { - id: '561add10cb82ac38a17513be' + id: showFront ? + '561add10cb82ac38a17513be' : + '660add10cb82ac38a17513be' }); return res.render( From 202d0fa0683e1351ceace18fe8bb129ede23026b Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 5 Oct 2015 19:58:44 -0700 Subject: [PATCH 83/90] Fix add to completed challenges on cert verify --- server/boot/certificate.js | 42 ++++++++++++++++++++----------- server/utils/constantStrings.json | 4 ++- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/server/boot/certificate.js b/server/boot/certificate.js index ba28cb8a16..b084d9f4b8 100644 --- a/server/boot/certificate.js +++ b/server/boot/certificate.js @@ -13,8 +13,11 @@ import { observeQuery } from '../utils/rx'; -const frontEndChallangeId = '561add10cb82ac38a17513be'; -const fullStackChallangeId = '660add10cb82ac38a17513be'; +import { + frontEndChallangeId, + fullStackChallangeId +} from '../utils/constantStrings.json'; + const debug = debugFactory('freecc:certification'); const sendMessageToNonUser = ifNoUserSend( 'must be logged in to complete.' @@ -36,10 +39,12 @@ export default function certificate(app) { 'findById', frontEndChallangeId, { - tests: true + id: true, + tests: true, + name: true, + challengeType: true } ) - .map(({ tests = [] }) => tests) .shareReplay(); const fullStackChallangeIds$ = observeQuery( @@ -47,10 +52,12 @@ export default function certificate(app) { 'findById', fullStackChallangeId, { - tests: true + id: true, + tests: true, + name: true, + challengeType: true } ) - .map(({ tests = [] }) => tests) .shareReplay(); router.post( @@ -82,8 +89,14 @@ export default function certificate(app) { } return fullStackChallangeIds$; }) - .flatMap((tests) => { + .flatMap(challenge => { const { user } = req; + const { + id, + tests, + name, + challengeType + } = challenge; if ( isFront && !user.isFrontEndCert && isCertified(tests, user) || !isFront && !user.isFullStackCert && isCertified(tests, user) @@ -91,17 +104,16 @@ export default function certificate(app) { debug('certified'); if (isFront) { user.isFrontEndCert = true; - user.completedChallenges.push({ - completedDate: new Date(), - id: frontEndChallangeId - }) } else { user.isFullStackCert = true; - user.completedChallenges.push({ - completedDate: new Date(), - id: fullStackChallangeId - }) } + + user.completedChallenges.push({ + id, + name, + completedDate: new Date(), + challengeType + }); return saveUser(user); } return Observable.just(user); diff --git a/server/utils/constantStrings.json b/server/utils/constantStrings.json index 70f5d9766c..a2f5b29df8 100644 --- a/server/utils/constantStrings.json +++ b/server/utils/constantStrings.json @@ -1,3 +1,5 @@ { - "gitHubUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1521.3 Safari/537.36" + "gitHubUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1521.3 Safari/537.36", + "frontEndChallangeId": "561add10cb82ac38a17513be", + "fullStackChallangeId": "660add10cb82ac38a17513be" } From 188da02ffcbf5a5709810495590888ed8f676325 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 5 Oct 2015 20:00:25 -0700 Subject: [PATCH 84/90] Fix disable cert Disable certificate when user is locked to the public or when they haven't signed academic honesty --- common/models/user.json | 2 +- server/boot/user.js | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/common/models/user.json b/common/models/user.json index cb34389b80..776c2c500e 100644 --- a/common/models/user.json +++ b/common/models/user.json @@ -103,7 +103,7 @@ "isLocked": { "type": "boolean", "default": false, - "description": "Campers profile does not show challenges to the public" + "description": "Campers profile does not show challenges/certificates to the public" }, "currentChallenge": { "type": {} diff --git a/server/boot/user.js b/server/boot/user.js index a7c6fe2978..9ecbe288dd 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -4,6 +4,10 @@ import moment from 'moment'; import { Observable } from 'rx'; import debugFactory from 'debug'; +import { + frontEndChallangeId, + fullStackChallangeId +} from '../utils/constantStrings.json'; import { ifNoUser401, ifNoUserRedirectTo } from '../utils/middleware'; import { observeQuery } from '../utils/rx'; @@ -270,14 +274,33 @@ module.exports = function(app) { }); return res.redirect('/'); } + if (user.isLocked) { + req.flash('errors', { + msg: dedent` + Looks like user '${username}'s account is locked + down to the public. + ` + }); + return res.redirect('/'); + } + if (!user.isHonest) { + req.flash('errors', { + msg: dedent` + Looks like the user '${username}'s has not signed + the academic honesty pledge. + ` + }); + return res.redirect('/'); + } + if ( showFront && user.isFrontEndCert || !showFront && user.isFullStackCert ) { var { completedDate } = _.find(user.completedChallenges, { id: showFront ? - '561add10cb82ac38a17513be' : - '660add10cb82ac38a17513be' + frontEndChallangeId : + fullStackChallangeId }); return res.render( From 85f2c005cdf5c3cbf74b9ab187011337a8e7306a Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 5 Oct 2015 20:18:52 -0700 Subject: [PATCH 85/90] fix shareable challenges solution undefined During challenges when a user tries to navigate to a challenge and hits the name redirect, the solution is filled with undefined starting the user with an empty box. This PR fixes the issue by ignoring the solution param if it is empty --- server/boot/challenge.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/server/boot/challenge.js b/server/boot/challenge.js index 6a056b705d..dade963b1e 100644 --- a/server/boot/challenge.js +++ b/server/boot/challenge.js @@ -267,12 +267,13 @@ module.exports = function(app) { } if (dasherize(challenge.name) !== origChallengeName) { - return Observable.just( - '/challenges/' + - dasherize(challenge.name) + - '?solution=' + - encodeURIComponent(solutionCode) - ); + let redirectUrl = `/challenges/${dasherize(challenge.name)}`; + + if (solutionCode) { + redirectUrl += `?solution=${encodeURIComponent(solutionCode)}`; + } + + return Observable.just(redirectUrl); } // save user does nothing if user does not exist From 68b12caf485404eda634e850f5b6c7a0e0c77557 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Fri, 2 Oct 2015 23:58:22 -0700 Subject: [PATCH 86/90] minor improvements to onboarding and create skeleton commit page --- seed/challenges/getting-started.json | 2 +- server/boot/user.js | 10 ++++++ server/views/account/commit.jade | 49 ++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 server/views/account/commit.jade diff --git a/seed/challenges/getting-started.json b/seed/challenges/getting-started.json index c35c3541f8..23b43e6b59 100644 --- a/seed/challenges/getting-started.json +++ b/seed/challenges/getting-started.json @@ -242,7 +242,7 @@ [ "", "", - "Free Code Camp will always be free. If you want to feel more motivated to earn our certificates faster, we encourage you to instead donate each month to a nonprofit.", + "Free Code Camp will always be free. If you want to feel more motivated to earn our certificates faster, we encourage you to instead pledge to donate to a nonprofit each day.", "" ] ], diff --git a/server/boot/user.js b/server/boot/user.js index a7c6fe2978..ae7accda41 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -80,6 +80,10 @@ module.exports = function(app) { router.post('/reset-password', postReset); router.get('/email-signup', getEmailSignup); router.get('/email-signin', getEmailSignin); + router.get( + '/commit', + commitToNonprofit + ); router.get( '/toggle-lockdown-mode', sendNonUserToMap, @@ -122,6 +126,12 @@ module.exports = function(app) { }); } + function commitToNonprofit(req, res) { + res.render('account/commit', { + title: 'Commit to a nonprofit. Commit to your goal.' + }); + } + function signout(req, res) { req.logout(); res.redirect('/'); diff --git a/server/views/account/commit.jade b/server/views/account/commit.jade new file mode 100644 index 0000000000..32629096df --- /dev/null +++ b/server/views/account/commit.jade @@ -0,0 +1,49 @@ +extends ../layout +block content + .panel.panel-info + .panel-body + h3.text-center Commit to your goal. Commit to a nonprofit. + .col-xs-12.col-sm-6.col-sm-offset-3 + h4 Step 1: Choose your goal + .radio + label + input(type='radio' id='front-end-development-certificate' name='goal') + | Front End Development Certificate (takes about 400 hours) + .radio + label + input(type='radio' id='full-stack-development-certificate' name='goal') + | Full Stack Development Certificate (takes about 800 hours) + .spacer + h4 Step 2: Choose your nonprofit + .row + .col-xs-12.col-sm-6 + a(href="http://i.imgur.com/U1CyEuA.jpg" data-lightbox="img-enlarge") + img.img-responsive(src='http://i.imgur.com/U1CyEuA.jpg' alt="Girl Develop It participants coding at tables.") + .radio + label + input(type='radio' id='girl-develop-it' name='nonprofit') + | Girl Develop It is a nonprofit that provides in-person classes for women to learn to code. + .col-xs-12.col-sm-6 + a(href="http://i.imgur.com/NERytFF.jpg" data-lightbox="img-enlarge") + img.img-responsive(src='http://i.imgur.com/NERytFF.jpg' alt="Vets in Tech participants standing together at a conference.") + .radio + label + input(type='radio' id='vets-in-tech' name='nonprofit') + | Vets in Tech is a nonprofit that helps veterans prepare for tech jobs. + + .spacer + h4 Step 3: Choose your monthly pledge + .radio + label + input(type='radio' id='10-dollar-pledge' name='pledge-amount') + | $10 per month + .radio + label + input(type='radio' id='50-dollar-pledge' name='pledge-amount') + | $50 per month + + .spacer + a.button.btn.btn-block.btn-primary(href='https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=T3x0DY-bLMFXuhmjYZXs-BhmDoiXfuNh5BWad5VBcMomkkDSZY0b_-_W3HS&dispatch=5885d80a13c0db1f8e263663d3faee8d0b9dcb01a9b6dc564e45f62871326a5e') Commit + .button-spacer + a.button.btn.btn-block.btn-warning(href='/') Maybe later + .spacer From f02b3ffd4c59a50f7862efabaccb7aee08d1d13f Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sat, 3 Oct 2015 08:32:25 -0700 Subject: [PATCH 87/90] update commit copy --- server/views/account/commit.jade | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/views/account/commit.jade b/server/views/account/commit.jade index 32629096df..4786369441 100644 --- a/server/views/account/commit.jade +++ b/server/views/account/commit.jade @@ -2,7 +2,9 @@ extends ../layout block content .panel.panel-info .panel-body - h3.text-center Commit to your goal. Commit to a nonprofit. + h3.text-center Commit to yourself. Commit to a nonprofit. + .col-xs-12.col-sm-6.col-sm-offset-3 + p Are you looking for a burst of motivation? Do you want to help nonprofits before you’re ready to code for them? You can do both by pledging a monthly donation to a nonprofit until you've earned either your Front End or Full Stack Development certificate. Join Commit below or click "maybe later". .col-xs-12.col-sm-6.col-sm-offset-3 h4 Step 1: Choose your goal .radio @@ -14,7 +16,7 @@ block content input(type='radio' id='full-stack-development-certificate' name='goal') | Full Stack Development Certificate (takes about 800 hours) .spacer - h4 Step 2: Choose your nonprofit + h4 Step 2: Choose one of our nonprofits .row .col-xs-12.col-sm-6 a(href="http://i.imgur.com/U1CyEuA.jpg" data-lightbox="img-enlarge") @@ -30,7 +32,6 @@ block content label input(type='radio' id='vets-in-tech' name='nonprofit') | Vets in Tech is a nonprofit that helps veterans prepare for tech jobs. - .spacer h4 Step 3: Choose your monthly pledge .radio From e16efc832cd949c40612bca72c0b4289340897e8 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 5 Oct 2015 21:13:11 -0700 Subject: [PATCH 88/90] Move commit to separate router --- server/boot/commit.js | 15 +++++++++++++++ server/boot/user.js | 10 ---------- .../{account/commit.jade => commit/index.jade} | 0 3 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 server/boot/commit.js rename server/views/{account/commit.jade => commit/index.jade} (100%) diff --git a/server/boot/commit.js b/server/boot/commit.js new file mode 100644 index 0000000000..a54dc19506 --- /dev/null +++ b/server/boot/commit.js @@ -0,0 +1,15 @@ +export default function commit(app) { + const router = app.loopback.Router(); + router.get( + '/commit', + commitToNonprofit + ); + + app.use(router); + + function commitToNonprofit(req, res) { + res.render('commit/', { + title: 'Commit to a nonprofit. Commit to your goal.' + }); + } +} diff --git a/server/boot/user.js b/server/boot/user.js index ae7accda41..a7c6fe2978 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -80,10 +80,6 @@ module.exports = function(app) { router.post('/reset-password', postReset); router.get('/email-signup', getEmailSignup); router.get('/email-signin', getEmailSignin); - router.get( - '/commit', - commitToNonprofit - ); router.get( '/toggle-lockdown-mode', sendNonUserToMap, @@ -126,12 +122,6 @@ module.exports = function(app) { }); } - function commitToNonprofit(req, res) { - res.render('account/commit', { - title: 'Commit to a nonprofit. Commit to your goal.' - }); - } - function signout(req, res) { req.logout(); res.redirect('/'); diff --git a/server/views/account/commit.jade b/server/views/commit/index.jade similarity index 100% rename from server/views/account/commit.jade rename to server/views/commit/index.jade From e6afda62c7354a83b00b293b66c22d482d22e695 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 5 Oct 2015 22:18:50 -0700 Subject: [PATCH 89/90] Add 5 dollar option to commit --- server/views/commit/index.jade | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/views/commit/index.jade b/server/views/commit/index.jade index 4786369441..ba15d37fc1 100644 --- a/server/views/commit/index.jade +++ b/server/views/commit/index.jade @@ -34,6 +34,10 @@ block content | Vets in Tech is a nonprofit that helps veterans prepare for tech jobs. .spacer h4 Step 3: Choose your monthly pledge + .radio + label + input(type='radio' id='5-dollar-pledge' name='pledge-amount') + | $5 per month .radio label input(type='radio' id='10-dollar-pledge' name='pledge-amount') From 9a0505f782dee6675b9f820593c10ca0eb3d63dd Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Mon, 5 Oct 2015 22:42:42 -0700 Subject: [PATCH 90/90] add github linking enforcement --- server/boot/user.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/server/boot/user.js b/server/boot/user.js index 9ecbe288dd..fa529cdd62 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -274,23 +274,32 @@ module.exports = function(app) { }); return res.redirect('/'); } + if (!user.isGithubCool) { + req.flash('errors', { + msg: dedent` + This user needs to link GitHub with their account + in order to display this certificate to the public. + ` + }); + return res.redirect('back'); + } if (user.isLocked) { req.flash('errors', { msg: dedent` - Looks like user '${username}'s account is locked - down to the public. + ${username} has chosen to hide their work from the public. + They need to unhide their work in order for this certificate to + be verifiable. ` }); - return res.redirect('/'); + return res.redirect('back'); } if (!user.isHonest) { req.flash('errors', { msg: dedent` - Looks like the user '${username}'s has not signed - the academic honesty pledge. + ${username} has not agreed to our Academic Honesty Pledge yet. ` }); - return res.redirect('/'); + return res.redirect('back'); } if (