From ed275f5817f975768fbb79a2543a9241cb168bd8 Mon Sep 17 00:00:00 2001 From: Arsen Melikyan Date: Mon, 11 Jan 2016 02:20:20 +0400 Subject: [PATCH 1/3] Fixes invalid JSON format data exporting --- get-challenge-completion.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/get-challenge-completion.js b/get-challenge-completion.js index 06688b1e2c..93d525677d 100644 --- a/get-challenge-completion.js +++ b/get-challenge-completion.js @@ -17,6 +17,8 @@ MongoClient.connect(secrets.db, function(err, database) { if (err) { throw err; } + var firstTime = true; + var stream = database.collection('user') .find({'completedChallenges': { $ne: null }, 'isLocked': { $ne: true } }, @@ -36,7 +38,12 @@ MongoClient.connect(secrets.db, function(err, database) { }); }); if (dataOut.length) { - console.log(JSON.stringify(dataOut) + ','); + if (!firstTime) { + console.log(',' + JSON.stringify(dataOut)); + } else { + firstTime = false; + console.log(JSON.stringify(dataOut)); + } } } }).on('end', function() { From 104993531901c6f1f9c87f428a696ee7de8e2a29 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Tue, 12 Jan 2016 22:09:14 +0800 Subject: [PATCH 2/3] Use "Submit" in test prompt for "Add a Submit Button to a Form" The description says the text should be "Submit", but the test shows "submit" (lower cased). Let's try to make them the same :) --- .../01-front-end-development-certification/html5-and-css.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/01-front-end-development-certification/html5-and-css.json b/challenges/01-front-end-development-certification/html5-and-css.json index 4aafe3e436..9a8fde63d1 100644 --- a/challenges/01-front-end-development-certification/html5-and-css.json +++ b/challenges/01-front-end-development-certification/html5-and-css.json @@ -1820,7 +1820,7 @@ "tests": [ "assert($(\"form\").children(\"button\").length > 0, 'message: Your form should have a button inside it.');", "assert($(\"button\").attr(\"type\") === \"submit\", 'message: Your submit button should have the attribute type set to submit.');", - "assert($(\"button\").text().match(/submit/gi), 'message: Your submit button should have the text \"submit\".');", + "assert($(\"button\").text().match(/submit/gi), 'message: Your submit button should have the text \"Submit\".');", "assert(code.match(/<\\/button>/g) && code.match(/