From e85b91de361b5d8ea1230e1c80bb4848685a64f1 Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Tue, 3 Mar 2015 17:10:33 +0900 Subject: [PATCH 1/3] Fixup of bonfires for clarity, thanks to our users --- seed_data/bonfires.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index a389e7a118..d2cbb72c0d 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -198,13 +198,18 @@ "name": "Mutations", "difficulty": "1.12", "description": [ - "Return true if the string in the first element of the array contains the string in the second element in any form." + "Return true if the string in the first element of the array contains 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.", + "The arguments ['hello', 'hey'] should return false because the string 'hello' does not contain a 'y'.", + "Another example, ['Alien', 'line'], should return true because all of the letters in 'line' are present in 'Alien'." ], "challengeSeed": "function mutation(arr) {\n return arr;\n}\n\nmutation(['hello', 'hey']);", "tests": [ "expect(mutation(['hello', 'hey'])).to.be.false;", "expect(mutation(['hello', 'Hello'])).to.be.true;", - "expect(mutation(['zyxwvutsrqponmlkjihgfedcba', 'qrstu'])).to.be.true;" + "expect(mutation(['zyxwvutsrqponmlkjihgfedcba', 'qrstu'])).to.be.true;", + "expect(mutation(['Mary', 'Army'])).to.be.true;", + "expect(mutation(['Alien', 'line'])).to.be.true;" ] }, { @@ -566,9 +571,10 @@ "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}.", "You can read about orbital periods on wikipedia.", - "The values should be rounded to the nearest whole number. Assume the body being orbited is Earth." + "The values should be rounded to the nearest whole number. The body being orbited is Earth.", + "The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418" ], - "challengeSeed": "function orbitalPeriod(arr) {\n\/\/Use 398600.4418 for GM. Look up any other values on wolfram alpha\n return arr;\r\n}\r\n\r\norbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);", + "challengeSeed": "function orbitalPeriod(arr) {\n var GM = 398600.4418;\n var earthRadius = 6367.4447;\n return arr;\r\n}\r\n\r\norbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);", "tests": [ "expect(orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputkin\", orbitalPeriod: 86400}]);", "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);" From 130f743dfc0ccc76f134b218f4fc786cfea73e5b Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Tue, 3 Mar 2015 00:22:39 -0800 Subject: [PATCH 2/3] wrap some json notation that Nathan left unwrapped in code tags --- seed_data/bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index d2cbb72c0d..dc9dd277a6 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -569,7 +569,7 @@ "difficulty": "3.50", "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}.", + "The array will contain objects in the format {name: 'name', avgAlt: avgAlt}.", "You can read about orbital periods on wikipedia.", "The values should be rounded to the nearest whole number. The body being orbited is Earth.", "The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418" From 3416353baf3ac096aa5c6ee71797886e3ab0ed9c Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Tue, 3 Mar 2015 11:31:16 -0800 Subject: [PATCH 3/3] remove mention of forum from fcc --- controllers/challenges.js | 3 +++ seed_data/challenges.json | 2 +- views/partials/navbar.jade | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/controllers/challenges.js b/controllers/challenges.js index a0d3f3f52f..ec63b3eac6 100644 --- a/controllers/challenges.js +++ b/controllers/challenges.js @@ -31,6 +31,9 @@ exports.returnNextChallenge = function(req, res) { exports.returnChallenge = function(req, res) { var challengeNumber = parseInt(req.params.challengeNumber) || 0; + if (challengeNumber === 2) { + return res.redirect('../challenges/3'); + } if (challengeNumber > highestChallengeNumber) { req.flash('errors', { msg: "It looks like you've either completed all the challenges we have available or requested a challenge we don't have." diff --git a/seed_data/challenges.json b/seed_data/challenges.json index 7286158d48..0a6f70227e 100644 --- a/seed_data/challenges.json +++ b/seed_data/challenges.json @@ -35,7 +35,7 @@ ] }, { - "name": "Join Our Forum", + "name": "Join Our Forum (currently disabled)", "time": 5, "video": "115275066", "challengeNumber": 2, diff --git a/views/partials/navbar.jade b/views/partials/navbar.jade index 221abeebf0..0b23e6edd3 100644 --- a/views/partials/navbar.jade +++ b/views/partials/navbar.jade @@ -15,8 +15,6 @@ a(href='/challenges') Challenges li a(href='/chat') Chat - li - a(href='http://forum.freecodecamp.com' target='_blank') Forum li a(href='/bonfires') Bonfires if !user