diff --git a/client/commonFramework/display-test-results.js b/client/commonFramework/display-test-results.js index a925b3b213..0647384c87 100644 --- a/client/commonFramework/display-test-results.js +++ b/client/commonFramework/display-test-results.js @@ -1,6 +1,6 @@ window.common = (function({ $, common = { init: [] }}) { - common.displayTestResults = function displayTestResults(data = []) { + common.displayTestResults = function displayTestResults(data = [], down) { $('#testSuite').children().remove(); $('#testSuite').fadeIn('slow'); data.forEach(({ err = false, text = '' }) => { @@ -21,7 +21,11 @@ window.common = (function({ $, common = { init: [] }}) { `) .appendTo($('#testSuite')); }); - $('#scroll-locker').animate({ scrollTop: $(document).height() }, 'slow'); + if (down) { + $('#scroll-locker').animate( + { scrollTop: $(document).height() }, 'slow' + ); + } return data; }; diff --git a/client/commonFramework/end.js b/client/commonFramework/end.js index 1a841de50c..1a8ae7be86 100644 --- a/client/commonFramework/end.js +++ b/client/commonFramework/end.js @@ -110,7 +110,7 @@ $(document).ready(function() { return common.updateOutputDisplay('' + err); } common.updateOutputDisplay(output); - common.displayTestResults(tests); + common.displayTestResults(tests, true); if (solved) { common.showCompletion(); } @@ -140,7 +140,7 @@ $(document).ready(function() { } return common.updateOutputDisplay('' + err); } - common.displayTestResults(tests); + common.displayTestResults(tests, false); return null; }, ({ err }) => { @@ -164,7 +164,7 @@ $(document).ready(function() { return common.updateOutputDisplay('' + err); } common.codeStorage.updateStorage(challengeName, originalCode); - common.displayTestResults(tests); + common.displayTestResults(tests, false); return null; }, (err) => { diff --git a/client/less/main.less b/client/less/main.less index a42153283b..0d2614133f 100644 --- a/client/less/main.less +++ b/client/less/main.less @@ -1161,6 +1161,11 @@ code { background-color: @brand-primary; } +// user bio +.bio { + font-size: 17px; +} + @import "chat.less"; @import "jobs.less"; @import "challenge.less"; diff --git a/seed/challenges/01-front-end-development-certification/basic-bonfires.json b/seed/challenges/01-front-end-development-certification/basic-bonfires.json index c1e26aaa33..006cd80bdc 100644 --- a/seed/challenges/01-front-end-development-certification/basic-bonfires.json +++ b/seed/challenges/01-front-end-development-certification/basic-bonfires.json @@ -325,6 +325,7 @@ "title": "Confirm the Ending", "description": [ "Check if a string (first argument, str) ends with the given target string (second argument, target).", + "This challenge can be solved with the .endsWith() method, which was introduced in ES2015. But for the purpose of this challenge, we would like you to use one of the JavaScript substring methods instead.", "Remember to use Read-Search-Ask if you get stuck. Write your own code." ], "challengeSeed": [ @@ -343,7 +344,8 @@ "assert(confirmEnding(\"He has to give me a new name\", \"name\") === true, 'message: confirmEnding(\"He has to give me a new name\", \"name\") should return true.');", "assert(confirmEnding(\"He has to give me a new name\", \"me\") === true, 'message: confirmEnding(\"He has to give me a new name\", \"me\") should return true.');", "assert(confirmEnding(\"He has to give me a new name\", \"na\") === false, 'message: confirmEnding(\"He has to give me a new name\", \"na\") should return false.');", - "assert(confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\") === false, 'message: confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\") should return false.');" + "assert(confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\") === false, 'message: confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\") should return false.');", + "assert(!/\\.endsWith\\(.*?\\)\\s*?;/.test(code), 'message: Do not use the built-in method .endsWith() to solve the challenge.');" ], "type": "bonfire", "isRequired": true, @@ -351,7 +353,8 @@ "function confirmEnding(str, target) {\n return str.substring(str.length-target.length) === target;\n};\n" ], "MDNlinks": [ - "String.prototype.substr()" + "String.prototype.substr()", + "String.prototype.substring()" ], "challengeType": 5, "titleEs": "Confirma la terminación", @@ -362,7 +365,7 @@ }, { "id": "afcc8d540bea9ea2669306b6", - "title": "Repeat a string repeat a string", + "title": "Repeat a string", "description": [ "Repeat a given string (first argument) num times (second argument). Return an empty string if num is not a positive number.", "Remember to use Read-Search-Ask if you get stuck. Write your own code." @@ -648,7 +651,7 @@ "id": "a24c1a4622e3c05097f71d67", "title": "Where do I belong", "description": [ - "Return the lowest index at which a value (second argument) should be inserted into an array (first argument) once it has been sorted.", + "Return the lowest index at which a value (second argument) should be inserted into an array (first argument) once it has been sorted. The returned value should be a number.", "For example, getIndexToIns([1,2,3,4], 1.5) should return 1 because it is greater than 1 (index 0), but less than 2 (index 1).", "Likewise, getIndexToIns([20,3,5], 19) should return 2 because once the array has been sorted it will look like [3,5,20] and 19 is less than 20 (index 2) and greater than 5 (index 1).", "Remember to use Read-Search-Ask if you get stuck. Write your own code." diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index 2cb9c20b33..4cd62c2f5b 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -235,7 +235,7 @@ "Examples:", "
var someVariable;
var anotherVariableName;
var thisVariableNameIsTooLong;
", "

Instructions

", - "Fix the variable declarations and assignments so their names use camelCase." + "Modify the existing declarations and assignments so their names use camelCase.
Do not create any new variables." ], "releasedOn": "January 1, 2016", "challengeSeed": [ @@ -4559,7 +4559,7 @@ " }", "};", "// Keep a copy of the collection for tests", - "var collectionCopy = JSON.parse(stringify(collection));", + "var collectionCopy = JSON.parse(JSON.stringify(collection));", "", "// Only change code below this line", "function updateRecords(id, prop, value) {", diff --git a/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json b/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json index c5adcaedcc..c1e11bd3b4 100644 --- a/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json +++ b/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json @@ -169,14 +169,14 @@ }, { "id": "a8e512fbe388ac2f9198f0fa", - "title": "Where art thou", + "title": "Wherefore art thou", "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 its value, that was passed on as the second argument.", "Remember to use Read-Search-Ask if you get stuck. Write your own code." ], "challengeSeed": [ - "function whereAreYou(collection, source) {", + "function whatIsInAName(collection, source) {", " // What's in a name?", " var arr = [];", " // Only change code below this line", @@ -186,16 +186,16 @@ " return arr;", "}", "", - "whereAreYou([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" });" + "whatIsInAName([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" });" ], "solutions": [ - "function whereAreYou(collection, source) {\n var arr = [];\n var keys = Object.keys(source);\n collection.forEach(function(e) {\n if(keys.every(function(key) {return e[key] === source[key];})) {\n arr.push(e); \n }\n });\n return arr;\n}" + "function whatIsInAName(collection, source) {\n var arr = [];\n var keys = Object.keys(source);\n collection.forEach(function(e) {\n if(keys.every(function(key) {return e[key] === source[key];})) {\n arr.push(e); \n }\n });\n return arr;\n}" ], "tests": [ - "assert.deepEqual(whereAreYou([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" }), [{ first: \"Tybalt\", last: \"Capulet\" }], 'message: whereAreYou([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" }) should return [{ first: \"Tybalt\", last: \"Capulet\" }].');", - "assert.deepEqual(whereAreYou([{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], { \"a\": 1 }), [{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], 'message: whereAreYou([{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], { \"a\": 1 }) should return [{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }].');", - "assert.deepEqual(whereAreYou([{ \"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: whereAreYou([{ \"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(whereAreYou([{ \"a\": 1, \"b\": 2 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], { \"a\": 1, \"c\": 2 }), [{ \"a\": 1, \"b\": 2, \"c\": 2 }], 'message: whereAreYou([{ \"a\": 1, \"b\": 2 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], { \"a\": 1, \"c\": 2 }) should return [{ \"a\": 1, \"b\": 2, \"c\": 2 }].');" + "assert.deepEqual(whatIsInAName([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" }), [{ first: \"Tybalt\", last: \"Capulet\" }], 'message: whatIsInAName([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" }) should return [{ first: \"Tybalt\", last: \"Capulet\" }].');", + "assert.deepEqual(whatIsInAName([{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], { \"a\": 1 }), [{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], 'message: whatIsInAName([{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }], { \"a\": 1 }) should return [{ \"a\": 1 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2 }].');", + "assert.deepEqual(whatIsInAName([{ \"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: whatIsInAName([{ \"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(whatIsInAName([{ \"a\": 1, \"b\": 2 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], { \"a\": 1, \"c\": 2 }), [{ \"a\": 1, \"b\": 2, \"c\": 2 }], 'message: whatIsInAName([{ \"a\": 1, \"b\": 2 }, { \"a\": 1 }, { \"a\": 1, \"b\": 2, \"c\": 2 }], { \"a\": 1, \"c\": 2 }) should return [{ \"a\": 1, \"b\": 2, \"c\": 2 }].');" ], "type": "bonfire", "MDNlinks": [ diff --git a/seed/challenges/03-back-end-development-certification/api-projects.json b/seed/challenges/03-back-end-development-certification/api-projects.json index 54d69c4a32..fabd77cff4 100644 --- a/seed/challenges/03-back-end-development-certification/api-projects.json +++ b/seed/challenges/03-back-end-development-certification/api-projects.json @@ -58,8 +58,8 @@ ], [ "//i.imgur.com/2a20Vah.gif", - "A gif showing you how to start mongoDB in c9.io's terminal.", - "In your terminal, start MongoDB by entering:

mongod --smallfiles", + "A gif showing you how to install MongoDB and start it in c9.io's terminal.", + "In your terminal, install MongoDB by entering:

sudo apt-get install mongodb-org

then start MongoDB by entering:

mongod --smallfiles", "" ], [ @@ -151,7 +151,7 @@ [ "//i.imgur.com/2a20Vah.gif", "Una imagen gif que te muestra cómo iniciar mongoDB en la terminal de c9.io.", - "En tu terminal, inicia MongoDB con el siguiente comando: mongod --smallfiles", + "En tu terminal, instala MongoDB usando el siguiente comando:

sudo apt-get install mongodb-org

. Inicia MongoDB con el siguiente comando: mongod --smallfiles", "" ], [ diff --git a/seed/challenges/03-back-end-development-certification/mongodb.json b/seed/challenges/03-back-end-development-certification/mongodb.json index 21b5eee22b..453b310605 100644 --- a/seed/challenges/03-back-end-development-certification/mongodb.json +++ b/seed/challenges/03-back-end-development-certification/mongodb.json @@ -17,6 +17,7 @@ "Click the \"Create workspace\" button.", "Once C9 builds and loads your workspace, you should see a terminal window in the lower right hand corner. In this window use the following commands. You don't need to know what these mean at this point.", "Install learnyoumongo with this command: npm install learnyoumongo -g", + "Install MongoDB with this command: sudo apt-get install mongodb-org", "Set up your mongod alias by following the directions at https://community.c9.io/t/setting-up-mongodb/1717.", "Now start the tutorial by running learnyoumongo.", "Whenever you run a command that includes mongod on c9.io, use ./mongod instead.", @@ -51,6 +52,7 @@ "Haz click en el botón que dice \"Create workspace\".", "Una vez C9 termine de cargar tu espacio de trabajo, verás una terminal en la ventana de la esquina inferior derecha. Introduce los comandos siguientes en esa ventana (no te preocupes si no entiendes por ahora qué es lo que hacen):", "Instala learnyoumongo usando el siguiente comando: npm install learnyoumongo -g", + "Instala MongoDB usando el siguiente comando: sudo apt-get install mongodb-org", "Ahora inicia el tutorial ejecutando learnyoumongo", "Siempre que ejecutes un comando que incluya mongod en c9.io, asegúrate de usar la bandera --nojournal. Por ejemplo: mongod --nojournal.", "Puedes modificar el tamaño de las ventanas en c9.io arrastrándolas por el borde.", diff --git a/server/utils/auth.js b/server/utils/auth.js index da282b7022..38b480f0b4 100644 --- a/server/utils/auth.js +++ b/server/utils/auth.js @@ -27,6 +27,7 @@ export function setProfileFromGithub( created_at: joinedGithubOn, blog: website, location, + bio, name } ) { @@ -37,6 +38,7 @@ export function setProfileFromGithub( email: user.email || githubEmail, username: username.toLowerCase(), location, + bio, joinedGithubOn, website, isGithubCool: true, diff --git a/server/views/account/show.jade b/server/views/account/show.jade index 53375e3d2b..6f21a63196 100644 --- a/server/views/account/show.jade +++ b/server/views/account/show.jade @@ -37,6 +37,7 @@ block content a.fa.fa-linkedin-square.text-primary(title="@#{username}'s LinkedIn Profile", href=linkedin, target='_blank') h1.flat-top.wrappable= name h1.flat-top.wrappable= location + p.flat-top.bio= bio h1.flat-top.text-primary= "[ " + (progressTimestamps.length) + " ]" if pledge .spacer