diff --git a/common/models/user.json b/common/models/user.json index 1cb7a4d203..c3cb375b11 100644 --- a/common/models/user.json +++ b/common/models/user.json @@ -108,7 +108,7 @@ "resetPasswordExpires": "string", "uncompletedBonfires": "array", "completedBonfires": [{ - "_id": "string", + "id": "string", "name": "string", "completedWith": "string", "completedDate": "string", @@ -120,7 +120,7 @@ "type": "string", "defaultFn": "now" }, - "_id": "string", + "id": "string", "name": "string", "completedWith": "string", "solution": "string", @@ -152,7 +152,7 @@ "completedChallenges": { "type": [{ "completedDate": "number", - "_id": "string", + "id": "string", "name": "string", "completedWith": "string", "solution": "string", diff --git a/public/js/main_0.0.2.js b/public/js/main_0.0.2.js index b9a89d982f..b4b21f6c31 100644 --- a/public/js/main_0.0.2.js +++ b/public/js/main_0.0.2.js @@ -272,7 +272,7 @@ $(document).ready(function() { }); var upvoteHandler = function () { - var _id = storyId; + var id = storyId; $('#upvote').unbind('click'); var alreadyUpvoted = false; for (var i = 0; i < upVotes.length; i++) { @@ -285,7 +285,7 @@ $(document).ready(function() { $.post('/stories/upvote', { data: { - id: _id + id: id } }) .fail(function (xhr, textStatus, errorThrown) { diff --git a/seed/challenge-migration.js b/seed/challenge-migration.js index 6109f7775b..5c8fd01590 100644 --- a/seed/challenge-migration.js +++ b/seed/challenge-migration.js @@ -40,7 +40,7 @@ MongoClient.connect(oldUri, function(err, database) { }) .map(function(key) { return({ - _id: coursewares[key].id, + id: coursewares[key].id, completedDate: user.challengesHash[key] }); }); diff --git a/seed/challenges/advanced-bonfires.json b/seed/challenges/advanced-bonfires.json index eefd2d60ff..2ee30908a0 100644 --- a/seed/challenges/advanced-bonfires.json +++ b/seed/challenges/advanced-bonfires.json @@ -3,7 +3,7 @@ "order": 0.011, "challenges": [ { - "_id": "aff0395860f5d3034dc0bfc9", + "id": "aff0395860f5d3034dc0bfc9", "name": "Bonfire: Validate US Telephone Numbers", "difficulty": "4.01", "description": [ @@ -63,7 +63,7 @@ "descriptionPt": [] }, { - "_id": "a3f503de51cf954ede28891d", + "id": "a3f503de51cf954ede28891d", "name": "Bonfire: Symmetric Difference", "difficulty": "4.02", "description": [ @@ -100,7 +100,7 @@ "descriptionPt": [] }, { - "_id": "aa2e6f85cab2ab736c9a9b24", + "id": "aa2e6f85cab2ab736c9a9b24", "name": "Bonfire: Exact Change", "difficulty": "4.03", "description": [ @@ -155,7 +155,7 @@ "descriptionPt": [] }, { - "_id": "a56138aff60341a09ed6c480", + "id": "a56138aff60341a09ed6c480", "name": "Bonfire: Inventory Update", "difficulty": "4.04", "description": [ @@ -209,7 +209,7 @@ "descriptionPt": [] }, { - "_id": "a7bf700cd123b9a54eef01d5", + "id": "a7bf700cd123b9a54eef01d5", "name": "Bonfire: No repeats please", "difficulty": "4.05", "description": [ @@ -250,7 +250,7 @@ "descriptionPt": [] }, { - "_id": "a19f0fbe1872186acd434d5a", + "id": "a19f0fbe1872186acd434d5a", "name": "Bonfire: Friendly Date Ranges", "difficulty": "4.06", "description": [ @@ -294,4 +294,4 @@ "descriptionPt": [] } ] -} \ No newline at end of file +} diff --git a/seed/challenges/basejumps.json b/seed/challenges/basejumps.json index b14e0b1030..50b55a0063 100644 --- a/seed/challenges/basejumps.json +++ b/seed/challenges/basejumps.json @@ -3,7 +3,7 @@ "order": 0.014, "challenges": [ { - "_id": "bd7158d8c443eddfaeb5bcef", + "id": "bd7158d8c443eddfaeb5bcef", "name": "Waypoint: Get Set for Basejumps", "difficulty": 2.00, "challengeSeed": ["128451852"], @@ -64,7 +64,7 @@ "tests": [] }, { - "_id": "bd7158d8c443eddfaeb5bdef", + "id": "bd7158d8c443eddfaeb5bdef", "name": "Basejump: Build a Voting App", "difficulty": 2.01, "challengeSeed": ["128451852"], @@ -99,7 +99,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c443eddfaeb5bdff", + "id": "bd7158d8c443eddfaeb5bdff", "name": "Basejump: Build a Nightlife Coordination App", "difficulty": 2.02, "challengeSeed": ["128451852"], @@ -130,7 +130,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c443eddfaeb5bd0e", + "id": "bd7158d8c443eddfaeb5bd0e", "name": "Basejump: Chart the Stock Market", "difficulty": 2.03, "challengeSeed": ["128451852"], @@ -161,7 +161,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c443eddfaeb5bd0f", + "id": "bd7158d8c443eddfaeb5bd0f", "name": "Basejump: Manage a Book Trading Club", "difficulty": 2.04, "challengeSeed": ["128451852"], @@ -192,7 +192,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c443eddfaeb5bdee", + "id": "bd7158d8c443eddfaeb5bdee", "name": "Basejump: Build a Pinterest Clone", "difficulty": 2.05, "challengeSeed": ["128451852"], diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index 229322df15..e1a7d98653 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -3,7 +3,7 @@ "order": 0.007, "challenges": [ { - "_id": "bd7139d8c441eddfaeb5bdef", + "id": "bd7139d8c441eddfaeb5bdef", "name": "Waypoint: Pair Program on Bonfires", "difficulty": 0.44, "challengeSeed": ["119657641"], @@ -39,7 +39,7 @@ "descriptionPt": [] }, { - "_id": "ad7123c8c441eddfaeb5bdef", + "id": "ad7123c8c441eddfaeb5bdef", "name": "Bonfire: Meet Bonfire", "difficulty": "0", "description": [ @@ -78,7 +78,7 @@ "descriptionPt": [] }, { - "_id": "a202eed8fc186c8434cb6d61", + "id": "a202eed8fc186c8434cb6d61", "name": "Bonfire: Reverse a String", "difficulty": "1.01", "tests": [ @@ -119,7 +119,7 @@ "descriptionPt": [] }, { - "_id": "a302f7aae1aa3152a5b413bc", + "id": "a302f7aae1aa3152a5b413bc", "name": "Bonfire: Factorialize a Number", "tests": [ "expect(factorialize(5)).to.be.a(\"Number\");", @@ -158,7 +158,7 @@ "descriptionPt": [] }, { - "_id": "aaa48de84e1ecc7c742e1124", + "id": "aaa48de84e1ecc7c742e1124", "name": "Bonfire: Check for Palindromes", "difficulty": "1.03", "description": [ @@ -204,7 +204,7 @@ "descriptionPt": [] }, { - "_id": "a26cbbe9ad8655a977e1ceb5", + "id": "a26cbbe9ad8655a977e1ceb5", "name": "Bonfire: Find the Longest Word in a String", "difficulty": "1.04", "description": [ @@ -243,7 +243,7 @@ "descriptionPt": [] }, { - "_id": "ab6137d4e35944e21037b769", + "id": "ab6137d4e35944e21037b769", "name": "Bonfire: Title Case a Sentence", "difficulty": "1.05", "description": [ @@ -280,7 +280,7 @@ "descriptionPt": [] }, { - "_id": "a789b3483989747d63b0e427", + "id": "a789b3483989747d63b0e427", "name": "Bonfire: Return Largest Numbers in Arrays", "difficulty": "1.06", "description": [ @@ -318,7 +318,7 @@ "descriptionPt": [] }, { - "_id": "acda2fb1324d9b0fa741e6b5", + "id": "acda2fb1324d9b0fa741e6b5", "name": "Bonfire: Confirm the Ending", "difficulty": "1.07", "description": [ @@ -355,7 +355,7 @@ "descriptionPt": [] }, { - "_id": "afcc8d540bea9ea2669306b6", + "id": "afcc8d540bea9ea2669306b6", "name": "Bonfire: Repeat a string repeat a string", "difficulty": "1.08", "description": [ @@ -391,7 +391,7 @@ "descriptionPt": [] }, { - "_id": "ac6993d51946422351508a41", + "id": "ac6993d51946422351508a41", "name": "Bonfire: Truncate a string", "difficulty": "1.09", "description": [ @@ -428,7 +428,7 @@ "descriptionPt": [] }, { - "_id": "a9bd25c716030ec90084d8a1", + "id": "a9bd25c716030ec90084d8a1", "name": "Bonfire: Chunky Monkey", "difficulty": "1.10", "description": [ @@ -465,7 +465,7 @@ "descriptionPt": [] }, { - "_id": "ab31c21b530c0dafa9e241ee", + "id": "ab31c21b530c0dafa9e241ee", "name": "Bonfire: Slasher Flick", "difficulty": "1.11", "description": [ @@ -502,7 +502,7 @@ "descriptionPt": [] }, { - "_id": "af2170cad53daa0770fabdea", + "id": "af2170cad53daa0770fabdea", "name": "Bonfire: Mutations", "difficulty": "1.12", "description": [ @@ -545,7 +545,7 @@ "descriptionPt": [] }, { - "_id": "adf08ec01beb4f99fc7a68f2", + "id": "adf08ec01beb4f99fc7a68f2", "name": "Bonfire: Falsey Bouncer", "difficulty": "1.50", "description": [ @@ -583,7 +583,7 @@ "descriptionPt": [] }, { - "_id": "a8e512fbe388ac2f9198f0fa", + "id": "a8e512fbe388ac2f9198f0fa", "name": "Bonfire: Where art thou", "difficulty": "1.55", "description": [ @@ -621,7 +621,7 @@ "descriptionPt": [] }, { - "_id": "a39963a4c10bc8b4d4f06d7e", + "id": "a39963a4c10bc8b4d4f06d7e", "name": "Bonfire: Seek and Destroy", "difficulty": "1.60", "description": [ @@ -657,7 +657,7 @@ "descriptionPt": [] }, { - "_id": "a24c1a4622e3c05097f71d67", + "id": "a24c1a4622e3c05097f71d67", "name": "Bonfire: Where do I belong", "difficulty": "1.61", "description": [ @@ -693,7 +693,7 @@ "descriptionPt": [] }, { - "_id": "a3566b1109230028080c9345", + "id": "a3566b1109230028080c9345", "name": "Bonfire: Sum All Numbers in a Range", "difficulty": "2.00", "description": [ @@ -733,7 +733,7 @@ "descriptionPt": [] }, { - "_id": "a5de63ebea8dbee56860f4f2", + "id": "a5de63ebea8dbee56860f4f2", "name": "Bonfire: Diff Two Arrays", "difficulty": "2.01", "description": [ @@ -778,7 +778,7 @@ "descriptionPt": [] }, { - "_id": "a7f4d8f2483413a6ce226cac", + "id": "a7f4d8f2483413a6ce226cac", "name": "Bonfire: Roman Numeral Converter", "tests": [ "expect(convert(12)).to.equal(\"XII\");", @@ -818,7 +818,7 @@ "descriptionPt": [] }, { - "_id": "a0b5010f579e69b815e7c5d6", + "id": "a0b5010f579e69b815e7c5d6", "name": "Bonfire: Search and Replace", "tests": [ "expect(replace(\"Let us go to the store\", \"store\", \"mall\")).to.equal(\"Let us go to the mall\");", @@ -861,7 +861,7 @@ "descriptionPt": [] }, { - "_id": "aa7697ea2477d1316795783b", + "id": "aa7697ea2477d1316795783b", "name": "Bonfire: Pig Latin", "tests": [ "expect(translate(\"california\")).to.equal(\"aliforniacay\");", @@ -904,7 +904,7 @@ "descriptionPt": [] }, { - "_id": "afd15382cdfb22c9efe8b7de", + "id": "afd15382cdfb22c9efe8b7de", "name": "Bonfire: DNA Pairing", "tests": [ "assert.deepEqual(pair(\"ATCGA\"),[['A','T'],['T','A'],['C','G'],['G','C'],['A','T']], 'should return the dna pair');", @@ -942,7 +942,7 @@ "descriptionPt": [] }, { - "_id": "af7588ade1100bde429baf20", + "id": "af7588ade1100bde429baf20", "name": "Bonfire: Missing letters", "difficulty": "2.05", "description": [ @@ -979,7 +979,7 @@ "descriptionPt": [] }, { - "_id": "a77dbc43c33f39daa4429b4f", + "id": "a77dbc43c33f39daa4429b4f", "name": "Bonfire: Boo who", "difficulty": "2.06", "description": [ @@ -1021,7 +1021,7 @@ "descriptionPt": [] }, { - "_id": "a105e963526e7de52b219be9", + "id": "a105e963526e7de52b219be9", "name": "Bonfire: Sorted Union", "difficulty": "2.07", "description": [ @@ -1058,7 +1058,7 @@ "descriptionPt": [] }, { - "_id": "a6b0bb188d873cb2c8729495", + "id": "a6b0bb188d873cb2c8729495", "name": "Bonfire: Convert HTML Entities", "difficulty": "2.07", "description": [ @@ -1093,7 +1093,7 @@ "descriptionPt": [] }, { - "_id": "a103376db3ba46b2d50db289", + "id": "a103376db3ba46b2d50db289", "name": "Bonfire: Spinal Tap Case", "difficulty": "2.08", "description": [ @@ -1132,7 +1132,7 @@ "descriptionPt": [] }, { - "_id": "a5229172f011153519423690", + "id": "a5229172f011153519423690", "name": "Bonfire: Sum All Odd Fibonacci Numbers", "difficulty": "2.09", "description": [ @@ -1172,7 +1172,7 @@ "descriptionPt": [] }, { - "_id": "a3bfc1673c0526e06d3ac698", + "id": "a3bfc1673c0526e06d3ac698", "name": "Bonfire: Sum All Primes", "difficulty": "2.10", "description": [ @@ -1210,7 +1210,7 @@ "descriptionPt": [] }, { - "_id": "ae9defd7acaf69703ab432ea", + "id": "ae9defd7acaf69703ab432ea", "name": "Bonfire: Smallest Common Multiple", "difficulty": "2.11", "description": [ @@ -1248,7 +1248,7 @@ "descriptionPt": [] }, { - "_id": "a6e40f1041b06c996f7b2406", + "id": "a6e40f1041b06c996f7b2406", "name": "Bonfire: Finders Keepers", "difficulty": "2.12", "description": [ @@ -1283,7 +1283,7 @@ "descriptionPt": [] }, { - "_id": "a5deed1811a43193f9f1c841", + "id": "a5deed1811a43193f9f1c841", "name": "Bonfire: Drop it", "difficulty": "2.13", "description": [ @@ -1320,7 +1320,7 @@ "descriptionPt": [] }, { - "_id": "ab306dbdcc907c7ddfc30830", + "id": "ab306dbdcc907c7ddfc30830", "name": "Bonfire: Steamroller", "difficulty": "2.14", "description": [ @@ -1356,7 +1356,7 @@ "descriptionPt": [] }, { - "_id": "a8d97bd4c764e91f9d2bda01", + "id": "a8d97bd4c764e91f9d2bda01", "name": "Bonfire: Binary Agents", "difficulty": "2.15", "description": [ @@ -1392,7 +1392,7 @@ "descriptionPt": [] }, { - "_id": "a10d2431ad0c6a099a4b8b52", + "id": "a10d2431ad0c6a099a4b8b52", "name": "Bonfire: Everything Be True", "difficulty": "2.21", "description": [ @@ -1430,7 +1430,7 @@ "descriptionPt": [] }, { - "_id": "a97fd23d9b809dac9921074f", + "id": "a97fd23d9b809dac9921074f", "name": "Bonfire: Arguments Optional", "difficulty": "2.22", "description": [ diff --git a/seed/challenges/basic-html5-and-css.json b/seed/challenges/basic-html5-and-css.json index d2a8e1f64e..dd7f467e9b 100644 --- a/seed/challenges/basic-html5-and-css.json +++ b/seed/challenges/basic-html5-and-css.json @@ -3,7 +3,7 @@ "order": 0.002, "challenges": [ { - "_id": "bd7123c8c441eddfaeb5bdef", + "id": "bd7123c8c441eddfaeb5bdef", "name": "Waypoint: Say Hello to HTML Elements", "difficulty": 0.0085, "description": [ @@ -42,7 +42,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf0887a", + "id": "bad87fee1348bd9aedf0887a", "name": "Waypoint: Headline with the h2 Element", "difficulty": 0.010, "description": [ @@ -78,7 +78,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08801", + "id": "bad87fee1348bd9aedf08801", "name": "Waypoint: Inform with the Paragraph Element", "difficulty": 0.011, "description": [ @@ -112,7 +112,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aeaf08801", + "id": "bad87fee1348bd9aeaf08801", "name": "Waypoint: Visually Separate Elements with Line Breaks", "difficulty": 0.012, "description": [ @@ -147,7 +147,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08802", + "id": "bad87fee1348bd9aedf08802", "name": "Waypoint: Uncomment HTML", "difficulty": 0.013, "description": [ @@ -191,7 +191,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08804", + "id": "bad87fee1348bd9aedf08804", "name": "Waypoint: Comment out HTML", "difficulty": 0.014, "description": [ @@ -233,7 +233,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08833", + "id": "bad87fee1348bd9aedf08833", "name": "Waypoint: Fill in the Blank with Placeholder Text", "difficulty": 0.015, "description": [ @@ -274,7 +274,7 @@ "descriptionPt": [] }, { - "_id": "bad87fed1348bd9aedf08833", + "id": "bad87fed1348bd9aedf08833", "name": "Waypoint: Delete HTML Elements", "difficulty": 0.016, "description": [ @@ -314,7 +314,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08803", + "id": "bad87fee1348bd9aedf08803", "name": "Waypoint: Change the Color of Text", "difficulty": 0.017, "description": [ @@ -349,7 +349,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08805", + "id": "bad87fee1348bd9aedf08805", "name": "Waypoint: Use CSS Selectors to Style Elements", "difficulty": 0.018, "description": [ @@ -393,7 +393,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aecf08806", + "id": "bad87fee1348bd9aecf08806", "name": "Waypoint: Use a CSS Class to Style an Element", "difficulty": 0.019, "description": [ @@ -434,7 +434,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aefe08806", + "id": "bad87fee1348bd9aefe08806", "name": "Waypoint: Style Multiple Elements with a CSS Class", "difficulty": 0.020, "description": [ @@ -472,7 +472,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08806", + "id": "bad87fee1348bd9aedf08806", "name": "Waypoint: Change the Font Size of an Element", "difficulty": 0.021, "description": [ @@ -511,7 +511,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aede08807", + "id": "bad87fee1348bd9aede08807", "name": "Waypoint: Set the Font Family of an Element", "difficulty": 0.022, "description": [ @@ -551,7 +551,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08807", + "id": "bad87fee1348bd9aedf08807", "name": "Waypoint: Import a Google Font", "difficulty": 0.023, "description": [ @@ -596,7 +596,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08808", + "id": "bad87fee1348bd9aedf08808", "name": "Waypoint: Specify How Fonts Should Degrade", "difficulty": 0.024, "description": [ @@ -645,7 +645,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08809", + "id": "bad87fee1348bd9aedf08809", "name": "Waypoint: Override Styles with Important", "difficulty": 0.025, "description": [ @@ -701,7 +701,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08812", + "id": "bad87fee1348bd9aedf08812", "name": "Waypoint: Add Images to your Website", "difficulty": 0.026, "description": [ @@ -749,7 +749,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9acdf08812", + "id": "bad87fee1348bd9acdf08812", "name": "Waypoint: Size your Images", "difficulty": 0.027, "description": [ @@ -798,7 +798,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9bedf08813", + "id": "bad87fee1348bd9bedf08813", "name": "Waypoint: Add Borders Around your Elements", "difficulty": 0.028, "description": [ @@ -853,7 +853,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08814", + "id": "bad87fee1348bd9aedf08814", "name": "Waypoint: Add Rounded Corners with a Border Radius", "difficulty": 0.029, "description": [ @@ -912,7 +912,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08815", + "id": "bad87fee1348bd9aedf08815", "name": "Waypoint: Make Circular Images with a Border Radius", "difficulty": 0.030, "description": [ @@ -970,7 +970,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08816", + "id": "bad87fee1348bd9aedf08816", "name": "Waypoint: Link to External Pages with Anchor Elements", "difficulty": 0.031, "description": [ @@ -1032,7 +1032,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aede08817", + "id": "bad87fee1348bd9aede08817", "name": "Waypoint: Wrap an Anchor Element within a Paragraph", "difficulty": 0.032, "description": [ @@ -1099,7 +1099,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08817", + "id": "bad87fee1348bd9aedf08817", "name": "Waypoint: Make Dead Links using the Hash Symbol", "difficulty": 0.033, "description": [ @@ -1161,7 +1161,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08820", + "id": "bad87fee1348bd9aedf08820", "name": "Waypoint: Turn an Image into a Link", "difficulty": 0.034, "description": [ @@ -1226,7 +1226,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08818", + "id": "bad87fee1348bd9aedf08818", "name": "Waypoint: Add Alt Text to an Image for Accessibility", "difficulty": 0.035, "description": [ @@ -1289,7 +1289,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08827", + "id": "bad87fee1348bd9aedf08827", "name": "Waypoint: Create a Bulleted Unordered List", "difficulty": 0.036, "description": [ @@ -1354,7 +1354,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08828", + "id": "bad87fee1348bd9aedf08828", "name": "Waypoint: Create an Ordered List", "difficulty": 0.037, "description": [ @@ -1426,7 +1426,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08829", + "id": "bad87fee1348bd9aedf08829", "name": "Waypoint: Create a Text Field", "difficulty": 0.038, "description": [ @@ -1497,7 +1497,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08830", + "id": "bad87fee1348bd9aedf08830", "name": "Waypoint: Add Placeholder Text to a Text Field", "difficulty": 0.039, "description": [ @@ -1570,7 +1570,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aede08830", + "id": "bad87fee1348bd9aede08830", "name": "Waypoint: Create a Form Element", "difficulty": 0.040, "description": [ @@ -1645,7 +1645,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedd08830", + "id": "bad87fee1348bd9aedd08830", "name": "Waypoint: Add a Submit Button to a Form", "difficulty": 0.041, "description": [ @@ -1722,7 +1722,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedc08830", + "id": "bad87fee1348bd9aedc08830", "name": "Waypoint: Use HTML5 to Require a Field", "difficulty": 0.042, "description": [ @@ -1797,7 +1797,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08834", + "id": "bad87fee1348bd9aedf08834", "name": "Waypoint: Create a Set of Radio Buttons", "difficulty": 0.043, "description": [ @@ -1880,7 +1880,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08835", + "id": "bad87fee1348bd9aedf08835", "name": "Waypoint: Create a Set of Checkboxes", "difficulty": 0.044, "description": [ @@ -1960,7 +1960,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aede18835", + "id": "bad87fee1348bd9aede18835", "name": "Waypoint: Clean up your form using Linebreaks", "difficulty": 0.045, "description": [ @@ -2039,7 +2039,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedd08835", + "id": "bad87fee1348bd9aedd08835", "name": "Waypoint: Check Radio Buttons and Checkboxes by Default", "difficulty": 0.046, "description": [ @@ -2122,7 +2122,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aede08835", + "id": "bad87fee1348bd9aede08835", "name": "Waypoint: Wrap Many Elements within a Single Div Element", "difficulty": 0.047, "description": [ @@ -2210,7 +2210,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aede07836", + "id": "bad87fee1348bd9aede07836", "name": "Waypoint: Give a Background Color to a Div Element", "difficulty": 0.048, "description": [ @@ -2296,7 +2296,7 @@ "descriptionPt": [] }, { - "_id": "bad88fee1348bd9aedf08825", + "id": "bad88fee1348bd9aedf08825", "name": "Waypoint: Adjusting the Padding of an Element", "difficulty": 0.064, "description": [ @@ -2357,7 +2357,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08822", + "id": "bad87fee1348bd9aedf08822", "name": "Waypoint: Adjust the Margin of an Element", "difficulty": 0.065, "description": [ @@ -2420,7 +2420,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08823", + "id": "bad87fee1348bd9aedf08823", "name": "Waypoint: Add a Negative Margin to an Element", "difficulty": 0.066, "description": [ @@ -2482,7 +2482,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08824", + "id": "bad87fee1348bd9aedf08824", "name": "Waypoint: Add Different Padding to Each Side of an Element", "difficulty": 0.067, "description": [ @@ -2547,7 +2547,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1248bd9aedf08824", + "id": "bad87fee1248bd9aedf08824", "name": "Waypoint: Add Different Margins to Each Side of an Element", "difficulty": 0.068, "description": [ @@ -2612,7 +2612,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08826", + "id": "bad87fee1348bd9aedf08826", "name": "Waypoint: Use Clockwise Notation to Specify the Padding of an Element", "difficulty": 0.069, "description": [ @@ -2674,7 +2674,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08726", + "id": "bad87fee1348bd9aedf08726", "name": "Waypoint: Use Clockwise Notation to Specify the Margin of an Element", "difficulty": 0.070, "description": [ diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index 8f21bb5970..5960d9f88a 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -3,7 +3,7 @@ "order": 0.006, "challenges": [ { - "_id": "bd7129d8c441eddfaeb5bdef", + "id": "bd7129d8c441eddfaeb5bdef", "name": "Waypoint: Build an Adventure Game", "difficulty": 0.24, "challengeSeed": ["114604814"], @@ -28,7 +28,7 @@ "descriptionPt": [] }, { - "_id": "bd7130d8c441eddfaeb5bdef", + "id": "bd7130d8c441eddfaeb5bdef", "name": "Waypoint: Build Rock Paper Scissors", "difficulty": 0.25, "challengeSeed": ["114604815"], @@ -51,7 +51,7 @@ "descriptionPt": [] }, { - "_id": "bd7131d8c441eddfaeb5bdef", + "id": "bd7131d8c441eddfaeb5bdef", "name": "Waypoint: Learn JavaScript For Loops", "difficulty": 0.26, "challengeSeed": ["114614220"], @@ -74,7 +74,7 @@ "descriptionPt": [] }, { - "_id": "bd7132d8c441eddfaeb5bdef", + "id": "bd7132d8c441eddfaeb5bdef", "name": "Waypoint: Learn JavaScript While Loops", "difficulty": 0.27, "challengeSeed": ["114612889"], @@ -96,7 +96,7 @@ "descriptionPt": [] }, { - "_id": "bd7133d8c441eddfaeb5bdef", + "id": "bd7133d8c441eddfaeb5bdef", "name": "Waypoint: Learn Control Flow", "difficulty": 0.28, "challengeSeed": ["114612888"], @@ -120,7 +120,7 @@ "descriptionPt": [] }, { - "_id": "bd7134d8c441eddfaeb5bdef", + "id": "bd7134d8c441eddfaeb5bdef", "name": "Waypoint: Build a Contact List", "difficulty": 0.29, "challengeSeed": ["114612887"], @@ -143,14 +143,14 @@ "descriptionPt": [] }, { - "_id": "bd7135d8c441eddfaeb5bdef", + "id": "bd7135d8c441eddfaeb5bdef", "name": "Waypoint: Build an Address Book", "difficulty": 0.30, "challengeSeed": ["114612885"], "description": [ "Let's learn more about objects.", "Go to http://www.codecademy.com/courses/spencer-sandbox/0/1 and complete the section.", - "Be sure to also complete this section: http://www.codecademy.com/courses/building-an-address-book/0/1?curriculum_id=506324b3a7dffd00020bf661." + "Be sure to also complete this section: http://www.codecademy.com/courses/building-an-address-book/0/1?curriculumid=506324b3a7dffd00020bf661." ], "challengeType": 2, "tests": [], @@ -166,7 +166,7 @@ "descriptionPt": [] }, { - "_id": "bd7136d8c441eddfaeb5bdef", + "id": "bd7136d8c441eddfaeb5bdef", "name": "Waypoint: Build a Cash Register", "difficulty": 0.31, "challengeSeed": ["114612882"], @@ -189,7 +189,7 @@ "descriptionPt": [] }, { - "_id": "bd7118d8c441eddfaeb5bdef", + "id": "bd7118d8c441eddfaeb5bdef", "name": "Waypoint: Discover Chrome DevTools", "difficulty": 0.32, "challengeSeed": ["110752743"], @@ -220,7 +220,7 @@ "descriptionPt": [] }, { - "_id": "bd7138d8c441eddfaeb5bdef", + "id": "bd7138d8c441eddfaeb5bdef", "name": "Waypoint: Learn Regular Expressions", "difficulty": 0.33, "challengeSeed": ["112547802"], @@ -252,4 +252,4 @@ "descriptionPt": [] } ] -} \ No newline at end of file +} diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json index 0981868baa..6bddb3b578 100644 --- a/seed/challenges/bootstrap.json +++ b/seed/challenges/bootstrap.json @@ -3,7 +3,7 @@ "order": 0.003, "challenges": [ { - "_id": "bad87fee1348bd9acde08812", + "id": "bad87fee1348bd9acde08812", "name": "Waypoint: Mobile Responsive Images", "difficulty": 0.047, "description": [ @@ -89,7 +89,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd8acde08812", + "id": "bad87fee1348bd8acde08812", "name": "Waypoint: Center Text with Bootstrap", "difficulty": 0.048, "description": [ @@ -172,7 +172,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348cd8acdf08812", + "id": "bad87fee1348cd8acdf08812", "name": "Waypoint: Create a Bootstrap Button", "difficulty": 0.049, "description": [ @@ -256,7 +256,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348cd8acef08812", + "id": "bad87fee1348cd8acef08812", "name": "Waypoint: Create a Block Element Bootstrap Button", "difficulty": 0.050, "description": [ @@ -344,7 +344,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348cd8acef08811", + "id": "bad87fee1348cd8acef08811", "name": "Waypoint: Taste the Bootstrap Button Color Rainbow", "difficulty": 0.051, "description": [ @@ -430,7 +430,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348cd8acef08813", + "id": "bad87fee1348cd8acef08813", "name": "Waypoint: Call out Optional Actions with Button Info", "difficulty": 0.052, "description": [ @@ -517,7 +517,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348ce8acef08814", + "id": "bad87fee1348ce8acef08814", "name": "Waypoint: Warn your Users of a Dangerous Action", "difficulty": 0.053, "description": [ @@ -605,7 +605,7 @@ "descriptionPt": [] }, { - "_id": "bad88fee1348ce8acef08815", + "id": "bad88fee1348ce8acef08815", "name": "Waypoint: Use the Bootstrap Grid to Put Elements Side By Side", "difficulty": 0.054, "description": [ @@ -698,7 +698,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedf08845", + "id": "bad87fee1348bd9aedf08845", "name": "Waypoint: Ditch Custom CSS for Bootstrap", "difficulty": 0.055, "description": [ @@ -796,7 +796,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aede08845", + "id": "bad87fee1348bd9aede08845", "name": "Waypoint: Create a Custom Heading", "difficulty": 0.056, "description": [ @@ -885,7 +885,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedd08845", + "id": "bad87fee1348bd9aedd08845", "name": "Waypoint: Add Font Awesome Icons to our Buttons", "difficulty": 0.057, "description": [ @@ -973,7 +973,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedc08845", + "id": "bad87fee1348bd9aedc08845", "name": "Waypoint: Add Font Awesome Icons all of our Buttons", "difficulty": 0.058, "description": [ @@ -1060,7 +1060,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aedb08845", + "id": "bad87fee1348bd9aedb08845", "name": "Waypoint: Responsively Style Radio Buttons", "difficulty": 0.059, "description": [ @@ -1146,7 +1146,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aeda08845", + "id": "bad87fee1348bd9aeda08845", "name": "Waypoint: Responsively Style Checkboxes", "difficulty": 0.060, "description": [ @@ -1239,7 +1239,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aed908845", + "id": "bad87fee1348bd9aed908845", "name": "Waypoint: Style Text Inputs as Form Controls", "difficulty": 0.061, "description": [ @@ -1342,7 +1342,7 @@ "descriptionPt": [] }, { - "_id": "bad87fee1348bd9aec908845", + "id": "bad87fee1348bd9aec908845", "name": "Waypoint: Line up Form Elements Responsively with Bootstrap", "difficulty": 0.062, "description": [ diff --git a/seed/challenges/computer-science.json b/seed/challenges/computer-science.json index cd6acc6425..25d4565ebd 100644 --- a/seed/challenges/computer-science.json +++ b/seed/challenges/computer-science.json @@ -3,7 +3,7 @@ "order": 0.005, "challenges": [ { - "_id": "bd7123d8c441eddfaeb5bdef", + "id": "bd7123d8c441eddfaeb5bdef", "name": "Waypoint: Learn Basic Computer Science", "difficulty": 0.90, "challengeSeed": ["114628241"], @@ -32,7 +32,7 @@ "descriptionPt": [] }, { - "_id": "bd8124d8c441eddfaeb5bdef", + "id": "bd8124d8c441eddfaeb5bdef", "name": "Waypoint: Learn Loops", "difficulty": 0.19, "challengeSeed": ["114597348"], @@ -59,7 +59,7 @@ "descriptionPt": [] }, { - "_id": "bd8125d8c441eddfaeb5bdef", + "id": "bd8125d8c441eddfaeb5bdef", "name": "Waypoint: Learn Computer Hardware", "difficulty": 0.20, "challengeSeed": ["114597347"], @@ -86,7 +86,7 @@ "descriptionPt": [] }, { - "_id": "bd8126d8c441eddfaeb5bdef", + "id": "bd8126d8c441eddfaeb5bdef", "name": "Waypoint: Learn Computer Networking", "difficulty": 0.21, "challengeSeed": ["114604811"], @@ -113,7 +113,7 @@ "descriptionPt": [] }, { - "_id": "bd8127d8c441eddfaeb5bdef", + "id": "bd8127d8c441eddfaeb5bdef", "name": "Waypoint: Learn Boolean Logic", "difficulty": 0.22, "challengeSeed": ["114604812"], @@ -140,7 +140,7 @@ "descriptionPt": [] }, { - "_id": "bd8128d8c441eddfaeb5bdef", + "id": "bd8128d8c441eddfaeb5bdef", "name": "Waypoint: Learn Computer Security", "difficulty": 0.23, "challengeSeed": ["114604813"], diff --git a/seed/challenges/full-stack-javascript.json b/seed/challenges/full-stack-javascript.json index 15018ed772..4a91042a8c 100644 --- a/seed/challenges/full-stack-javascript.json +++ b/seed/challenges/full-stack-javascript.json @@ -3,7 +3,7 @@ "order": 0.013, "challenges": [ { - "_id": "bd7154d8c441eddfaeb5bdef", + "id": "bd7154d8c441eddfaeb5bdef", "name": "Waypoint: Get Started with Angular.js", "difficulty": 0.34, "challengeSeed": ["114684726"], @@ -26,7 +26,7 @@ "descriptionPt": [] }, { - "_id": "bd7155d8c441eddfaeb5bdef", + "id": "bd7155d8c441eddfaeb5bdef", "name": "Waypoint: Apply Angular.js Directives", "difficulty": 0.35, "challengeSeed": ["114684727"], @@ -49,7 +49,7 @@ "descriptionPt": [] }, { - "_id": "bd7156d8c441eddfaeb5bdef", + "id": "bd7156d8c441eddfaeb5bdef", "name": "Waypoint: Power Forms with Angular.js", "difficulty": 0.36, "challengeSeed": ["114684729"], @@ -72,7 +72,7 @@ "descriptionPt": [] }, { - "_id": "bd7157d8c441eddfaeb5bdef", + "id": "bd7157d8c441eddfaeb5bdef", "name": "Waypoint: Customize Angular.js Directives", "difficulty": 0.37, "challengeSeed": ["114685062"], @@ -94,7 +94,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c441eddfaeb5bdef", + "id": "bd7158d8c441eddfaeb5bdef", "name": "Waypoint: Create Angular.js Services", "difficulty": 0.38, "challengeSeed": ["114685060"], @@ -117,7 +117,7 @@ "descriptionPt": [] }, { - "_id": "bd7153d8c441eddfaeb5bd0f", + "id": "bd7153d8c441eddfaeb5bd0f", "name": "Waypoint: Manage Packages with NPM", "difficulty": 0.39, "challengeSeed": ["126433450"], @@ -170,7 +170,7 @@ "descriptionPt": [] }, { - "_id": "bd7153d8c441eddfaeb5bdff", + "id": "bd7153d8c441eddfaeb5bdff", "name": "Waypoint: Start a Node.js Server", "difficulty": 0.40, "challengeSeed": ["126411561"], @@ -212,7 +212,7 @@ "descriptionPt": [] }, { - "_id": "bd7153d8c441eddfaeb5bdfe", + "id": "bd7153d8c441eddfaeb5bdfe", "name": "Waypoint: Continue working with Node.js Servers", "difficulty": 0.41, "challengeSeed": ["128836506"], @@ -239,7 +239,7 @@ "descriptionPt": [] }, { - "_id": "bd7153d8c441eddfaeb5bdfd", + "id": "bd7153d8c441eddfaeb5bdfd", "name": "Waypoint: Finish working with Node.js Servers", "difficulty": 0.42, "challengeSeed": ["128836507"], @@ -266,7 +266,7 @@ "descriptionPt": [] }, { - "_id": "bd7153d8c441eddfaeb5bd1f", + "id": "bd7153d8c441eddfaeb5bd1f", "name": "Waypoint: Build Web Apps with Express.js", "difficulty": 0.43, "challengeSeed": ["126411559"], @@ -307,7 +307,7 @@ "descriptionPt": [] }, { - "_id": "bd7140d8c441eddfaeb5bdef", + "id": "bd7140d8c441eddfaeb5bdef", "name": "Waypoint: Manage Source Code with Git", "difficulty": 0.44, "challengeSeed": ["114635309"], diff --git a/seed/challenges/functional-programming.json b/seed/challenges/functional-programming.json index 2742dc7fe7..868b626372 100644 --- a/seed/challenges/functional-programming.json +++ b/seed/challenges/functional-programming.json @@ -3,7 +3,7 @@ "order": 0.010, "challenges": [ { - "_id": "bd7129d8c441eddfbeb5bddf", + "id": "bd7129d8c441eddfbeb5bddf", "name": "Waypoint: Practice Functional Programming", "difficulty": 0.01, "challengeSeed": ["129169463"], diff --git a/seed/challenges/get-set-for-free-code-camp.json b/seed/challenges/get-set-for-free-code-camp.json index fc29841ef2..30e00e71ed 100644 --- a/seed/challenges/get-set-for-free-code-camp.json +++ b/seed/challenges/get-set-for-free-code-camp.json @@ -3,7 +3,7 @@ "order": 0.001, "challenges": [ { - "_id": "bd7124d8c441eddfaeb5bdef", + "id": "bd7124d8c441eddfaeb5bdef", "name": "Waypoint: Learn how Free Code Camp Works", "difficulty": 0.001, "challengeSeed": ["125407438"], @@ -40,7 +40,7 @@ "descriptionPt": [] }, { - "_id": "bd7125d8c441eddfaeb5bd0f", + "id": "bd7125d8c441eddfaeb5bd0f", "name": "Waypoint: Join Our Chat Room", "difficulty": 0.002, "challengeSeed": ["124555254"], @@ -81,7 +81,7 @@ "descriptionPt": [] }, { - "_id": "bd7125d8c441eddfaeb5bdff", + "id": "bd7125d8c441eddfaeb5bdff", "name": "Waypoint: Preview our Challenge Map", "difficulty": 0.003, "challengeSeed": ["125407437"], @@ -114,7 +114,7 @@ "descriptionPt": [] }, { - "_id": "bd7125d8c441eddfaeb5bd1f", + "id": "bd7125d8c441eddfaeb5bd1f", "name": "Waypoint: Browse our Field Guide", "difficulty": 0.004, "challengeSeed": ["125407435"], @@ -145,7 +145,7 @@ "descriptionPt": [] }, { - "_id": "bd7125d8c441eddfaeb5bd2f", + "id": "bd7125d8c441eddfaeb5bd2f", "name": "Waypoint: Customize your Portfolio Page", "difficulty": 0.005, "challengeSeed": ["125407433"], @@ -180,7 +180,7 @@ "descriptionPt": [] }, { - "_id": "bd7126d8c441eddfaeb5bd3f", + "id": "bd7126d8c441eddfaeb5bd3f", "name": "Waypoint: Try Camper News", "difficulty": 0.006, "challengeSeed": ["124553410"], @@ -219,7 +219,7 @@ "descriptionPt": [] }, { - "_id": "bd7126d8c441eddfaeb5bd3e", + "id": "bd7126d8c441eddfaeb5bd3e", "name": "Waypoint: Meet Other Campers in your City", "difficulty": 0.007, "challengeSeed": ["127358841"], @@ -256,7 +256,7 @@ "descriptionPt": [] }, { - "_id": "bd7137d8c441eddfaeb5bdef", + "id": "bd7137d8c441eddfaeb5bdef", "name": "Waypoint: Get Help the Hacker Way with RSAP", "difficulty": 0.008, "challengeSeed": ["125407432"], diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json index 8f9ac09445..b005ba67d2 100644 --- a/seed/challenges/intermediate-bonfires.json +++ b/seed/challenges/intermediate-bonfires.json @@ -3,7 +3,7 @@ "order": 0.009, "challenges": [ { - "_id": "a2f1d72d9b908d0bd72bb9f6", + "id": "a2f1d72d9b908d0bd72bb9f6", "name": "Bonfire: Make a Person", "difficulty": "3.01", "description": [ @@ -54,7 +54,7 @@ "descriptionPt": [] }, { - "_id": "af4afb223120f7348cdfc9fd", + "id": "af4afb223120f7348cdfc9fd", "name": "Bonfire: Map the Debris", "difficulty": "3.02", "description": [ @@ -94,7 +94,7 @@ "descriptionPt": [] }, { - "_id": "a3f503de51cfab748ff001aa", + "id": "a3f503de51cfab748ff001aa", "name": "Bonfire: Pairwise", "difficulty": "3.03", "description": [ @@ -133,4 +133,4 @@ "descriptionPt": [] } ] -} \ No newline at end of file +} diff --git a/seed/challenges/jquery-ajax-and-json.json b/seed/challenges/jquery-ajax-and-json.json index 3431de604f..a03cb7e7cb 100644 --- a/seed/challenges/jquery-ajax-and-json.json +++ b/seed/challenges/jquery-ajax-and-json.json @@ -3,7 +3,7 @@ "order": 0.004, "challenges": [ { - "_id": "bd7112d8c441eddfaeb5bded", + "id": "bd7112d8c441eddfaeb5bded", "name": "Waypoint: Get Started with jQuery", "difficulty": 0.13, "challengeSeed": ["125671865"], @@ -28,7 +28,7 @@ "descriptionPt": [] }, { - "_id": "bd7113d8c441eddfaeb5bdef", + "id": "bd7113d8c441eddfaeb5bdef", "name": "Waypoint: Write Functions with jQuery", "difficulty": 0.14, "challengeSeed": ["125658029"], @@ -52,7 +52,7 @@ "descriptionPt": [] }, { - "_id": "bd7114d8c441eddfaeb5bdef", + "id": "bd7114d8c441eddfaeb5bdef", "name": "Waypoint: Harness Dynamic HTML", "difficulty": 0.15, "challengeSeed": ["125658028"], @@ -75,7 +75,7 @@ "descriptionPt": [] }, { - "_id": "bd7115d8c441eddfaeb5bdef", + "id": "bd7115d8c441eddfaeb5bdef", "name": "Waypoint: Listen for jQuery Events", "difficulty": 0.16, "challengeSeed": ["125658027"], @@ -98,7 +98,7 @@ "descriptionPt": [] }, { - "_id": "bd7116d8c441eddfaeb5bdef", + "id": "bd7116d8c441eddfaeb5bdef", "name": "Waypoint: Trigger jQuery Effects", "difficulty": 0.17, "challengeSeed": ["125658025"], diff --git a/seed/challenges/object-oriented-javascript.json b/seed/challenges/object-oriented-javascript.json index cffaa033aa..75d0f83836 100644 --- a/seed/challenges/object-oriented-javascript.json +++ b/seed/challenges/object-oriented-javascript.json @@ -3,7 +3,7 @@ "order" : 0.008, "challenges": [ { - "_id": "bd7129d8c441eddfaeb5bddf", + "id": "bd7129d8c441eddfaeb5bddf", "name": "Waypoint: Scope Your Variables", "difficulty": 0.01, "challengeSeed": ["128836683"], @@ -29,7 +29,7 @@ "descriptionPt": [] }, { - "_id": "bd7131d8c441eddfaeb5bdbf", + "id": "bd7131d8c441eddfaeb5bdbf", "name": "Waypoint: Reference your Current Object with This", "difficulty": 0.03, "challengeSeed": ["128836508"], @@ -55,7 +55,7 @@ "descriptionPt": [] }, { - "_id": "bd7132d8c441eddfaeb5bdaf", + "id": "bd7132d8c441eddfaeb5bdaf", "name": "Waypoint: Traverse the Prototype Chain", "difficulty": 0.04, "challengeSeed": ["128836684"], @@ -80,7 +80,7 @@ "descriptionPt": [] }, { - "_id": "bd7133d8c441eddfaeb5bd0f", + "id": "bd7133d8c441eddfaeb5bd0f", "name": "Waypoint: Reuse Code with Decorators", "difficulty": 0.05, "challengeSeed": ["128836681"], @@ -106,7 +106,7 @@ "descriptionPt": [] }, { - "_id": "bd7134d8c441eddfaeb5bd1f", + "id": "bd7134d8c441eddfaeb5bd1f", "name": "Waypoint: Build Objects with Functional Classes", "difficulty": 0.06, "challengeSeed": ["128836503"], @@ -132,7 +132,7 @@ "descriptionPt": [] }, { - "_id": "bd7135d8c441eddfaeb5bd2f", + "id": "bd7135d8c441eddfaeb5bd2f", "name": "Waypoint: Build Objects with Prototypal Classes", "difficulty": 0.07, "challengeSeed": ["128836505"], @@ -158,7 +158,7 @@ "descriptionPt": [] }, { - "_id": "bd7136d8c441eddfaeb5bd3f", + "id": "bd7136d8c441eddfaeb5bd3f", "name": "Waypoint: Understand Pseudoclassical Patterns", "difficulty": 0.08, "challengeSeed": ["128836689"], @@ -184,7 +184,7 @@ "descriptionPt": [] }, { - "_id": "bd7136d8c441eddfaeb5bd4f", + "id": "bd7136d8c441eddfaeb5bd4f", "name": "Waypoint: Subclass one Object to Another", "difficulty": 0.09, "challengeSeed": ["128836686"], @@ -209,7 +209,7 @@ "descriptionPt": [] }, { - "_id": "bd7136d8c441eddfaeb5bd5f", + "id": "bd7136d8c441eddfaeb5bd5f", "name": "Waypoint: Use Pseudoclassical Subclasses", "difficulty": 0.10, "challengeSeed": ["128836937"], diff --git a/seed/challenges/ziplines.json b/seed/challenges/ziplines.json index 09392b2a66..01ade1969d 100644 --- a/seed/challenges/ziplines.json +++ b/seed/challenges/ziplines.json @@ -3,7 +3,7 @@ "order": 0.012, "challenges": [ { - "_id": "bd7158d8c442eddfbeb5bd1f", + "id": "bd7158d8c442eddfbeb5bd1f", "name": "Waypoint: Get Set for Ziplines", "difficulty": 1.00, "challengeSeed": ["125658022"], @@ -36,7 +36,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c442eddfaeb5bd1f", + "id": "bd7158d8c442eddfaeb5bd1f", "name": "Zipline: Use the Twitch.tv JSON API", "difficulty": 1.01, "challengeSeed": ["126411564"], @@ -71,7 +71,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c442eddfaeb5bd13", + "id": "bd7158d8c442eddfaeb5bd13", "name": "Zipline: Build a Random Quote Machine", "difficulty": 1.02, "challengeSeed": ["126415122"], @@ -101,7 +101,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c442eddfaeb5bd10", + "id": "bd7158d8c442eddfaeb5bd10", "name": "Zipline: Show the Local Weather", "difficulty": 1.03, "challengeSeed": ["126415127"], @@ -133,7 +133,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c442eddfaeb5bd18", + "id": "bd7158d8c442eddfaeb5bd18", "name": "Zipline: Stylize Stories on Camper News", "difficulty": 1.04, "challengeSeed": ["126415129"], @@ -166,7 +166,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c442eddfaeb5bd19", + "id": "bd7158d8c442eddfaeb5bd19", "name": "Zipline: Wikipedia Viewer", "difficulty": 1.05, "challengeSeed": ["126415131"], @@ -198,7 +198,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c442eddfaeb5bd0f", + "id": "bd7158d8c442eddfaeb5bd0f", "name": "Zipline: Build a Pomodoro Clock", "difficulty": 1.06, "challengeSeed": ["126411567"], @@ -229,7 +229,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c442eddfaeb5bd17", + "id": "bd7158d8c442eddfaeb5bd17", "name": "Zipline: Build a JavaScript Calculator", "difficulty": 1.07, "challengeSeed": ["126411565"], @@ -260,7 +260,7 @@ "descriptionPt": [] }, { - "_id": "bd7158d8c442eddfaeb5bd1c", + "id": "bd7158d8c442eddfaeb5bd1c", "name": "Zipline: Build a Tic Tac Toe Game", "difficulty": 1.08, "challengeSeed": ["126415123"], diff --git a/seed/field-guides.json b/seed/field-guides.json index d241f8858b..261f166b0c 100644 --- a/seed/field-guides.json +++ b/seed/field-guides.json @@ -1,6 +1,6 @@ [ { - "_id": "bd7158d9c441eddfaeb5bdef", + "id": "bd7158d9c441eddfaeb5bdef", "name": "How do I use this guide?", "dashedName": "how-do-i-use-this-guide", "description": [ @@ -12,7 +12,7 @@ ] }, { - "_id": "bd7158d9c441eddfaeb5bdff", + "id": "bd7158d9c441eddfaeb5bdff", "name": "What exactly is Free Code Camp?", "dashedName": "what-exactly-is-free-code-camp", "description": [ @@ -30,7 +30,7 @@ ] }, { - "_id": "bd7158d9c441eddfaeb5bd1f", + "id": "bd7158d9c441eddfaeb5bd1f", "name": "Why do I need Free Code Camp?", "dashedName": "why-do-i-need-free-code-camp", "description": [ @@ -48,7 +48,7 @@ ] }, { - "_id": "bd7158d9c441eddfaeb5bd2f", + "id": "bd7158d9c441eddfaeb5bd2f", "name": "What are the main advantages of Free Code Camp?", "dashedName": "what-are-the-main-advantages-of-free-code-camp", "description": [ @@ -65,7 +65,7 @@ ] }, { - "_id": "bd7158d9c441eddfaeb5bd3f", + "id": "bd7158d9c441eddfaeb5bd3f", "name": "How does Free Code Camp work?", "dashedName": "how-does-free-code-camp-work", "description": [ @@ -87,7 +87,7 @@ ] }, { - "_id": "bd7158d9c441eddfaeb5bd4f", + "id": "bd7158d9c441eddfaeb5bd4f", "name": "Will I really be able to get software engineering job after Free Code Camp?", "dashedName": "will-i-really-be-able-to-get-a-software-engineering-job-after-free-code-camp", "description": [ @@ -107,7 +107,7 @@ ] }, { - "_id": "bd7158d9c440eddfaeb5bdef", + "id": "bd7158d9c440eddfaeb5bdef", "name": "What will I learn, and in what sequence?", "dashedName": "what-will-i-learn-and-in-what-sequence", "description": [ @@ -144,7 +144,7 @@ ] }, { - "_id": "bd7158d9c434eddfaeb5bdef", + "id": "bd7158d9c434eddfaeb5bdef", "name": "How long does Free Code Camp take?", "dashedName": "how-long-does-free-code-camp-take", "description": [ @@ -182,7 +182,7 @@ ] }, { - "_id": "bd7158d9c438eddfaeb5bdef", + "id": "bd7158d9c438eddfaeb5bdef", "name": "Why does Free Code Camp use JavaScript instead of Ruby or Python?", "dashedName": "why-does-free-code-camp-use-javascript-instead-of-ruby-or-python", "description": [ @@ -196,7 +196,7 @@ ] }, { - "_id": "bd7158d9c437eddfaeb5bdef", + "id": "bd7158d9c437eddfaeb5bdef", "name": "What is pair programming, and why is it special?", "dashedName": "what-is-pair-programming-and-why-is-it-special", "description": [ @@ -209,7 +209,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bd2f", + "id": "bd7158d9c436eddfaeb5bd2f", "name": "How do I get help when I get stuck?", "dashedName": "how-do-i-get-help-when-i-get-stuck", "description": [ @@ -232,7 +232,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bd3f", + "id": "bd7158d9c436eddfaeb5bd3f", "name": "Can I jump around in this guide?", "dashedName": "can-i-jump-around-in-this-guide", "description": [ @@ -244,7 +244,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bdef", + "id": "bd7158d9c436eddfaeb5bdef", "name": "If Free Code Camp is free, how does it make money?", "dashedName": "if-free-code-camp-is-free-how-does-it-make-money", "description": [ @@ -257,7 +257,7 @@ ] }, { - "_id": "bd7158d9c435eddfaeb5bdef", + "id": "bd7158d9c435eddfaeb5bdef", "name": "Does Free Code Camp have an application process?", "dashedName": "does-free-code-camp-have-an-application-process", "description": [ @@ -269,7 +269,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bd3b", + "id": "bd7158d9c436eddfaeb5bd3b", "name": "How can I stream my live coding sessions on Free Code Camp's Twitch.tv channel?", "dashedName": "how-can-i-stream-my-live-coding-sessions-on-free-code-camps-twitch-tv-channel", "description": [ @@ -290,7 +290,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bd3d", + "id": "bd7158d9c436eddfaeb5bd3d", "name": "How can I find other Free Code Camp campers in my city?", "dashedName": "how-can-i-find-other-free-code-camp-campers-in-my-city", "description": [ @@ -482,7 +482,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bd3e", + "id": "bd7158d9c436eddfaeb5bd3e", "name": "Does Free Code Camp have an alumni network?", "dashedName": "does-free-code-camp-have-an-alumni-network", "description": [ @@ -492,7 +492,7 @@ ] }, { - "_id": "bd7158d9c442eddfaeb5b2ef", + "id": "bd7158d9c442eddfaeb5b2ef", "name": "Why doesn't Free Code Camp teach technical interviewing skills?", "dashedName": "why-doesnt-free-code-camp-teach-technical-interviewing-skills", "description": [ @@ -508,7 +508,7 @@ ] }, { - "_id": "bd7158d9c442eddfaeb5bdef", + "id": "bd7158d9c442eddfaeb5bdef", "name": "How do I best use the Global Control Shortcuts for Mac?", "dashedName": "how-do-i-best-use-the-global-control-shortcuts-for-mac", "description": [ @@ -533,7 +533,7 @@ ] }, { - "_id": "bd7158d9c445eddfaeb5bdef", + "id": "bd7158d9c445eddfaeb5bdef", "name": "How can I get to Inbox Zero with Gmail shortcuts?", "dashedName": "how-can-i-get-to-inbox-zero-with-gmail-shortcuts", "description": [ @@ -562,7 +562,7 @@ ] }, { - "_id": "bd7158d9c445eddfaeb5bdff", + "id": "bd7158d9c445eddfaeb5bdff", "name": "How can I deploy a website without writing any code at all?", "dashedName": "how-can-i-deploy-a-website-without-writing-any-code-at-all", "description": [ @@ -585,7 +585,7 @@ ] }, { - "_id": "bd7158d9c446eddfaeb5bdef", + "id": "bd7158d9c446eddfaeb5bdef", "name": "How do Free Code Camp's Nonprofit Projects work?", "dashedName": "how-do-free-code-camps-nonprofit-projects-work", "description": [ @@ -660,7 +660,7 @@ ] }, { - "_id": "bd7158d9c447eddfaeb5bdef", + "id": "bd7158d9c447eddfaeb5bdef", "name": "How do I install Screenhero?", "dashedName": "how-do-i-install-screenhero", "description": [ @@ -672,7 +672,7 @@ ] }, { - "_id": "bd7158d9c451eddfaeb5bded", + "id": "bd7158d9c451eddfaeb5bded", "name": "What is the style guide for Bonfires?", "dashedName": "what-is-the-style-guide-for-bonfires", "description": [ @@ -708,7 +708,7 @@ ] }, { - "_id": "bd7158d9c451eddfaeb5bdee", + "id": "bd7158d9c451eddfaeb5bdee", "name": "What is the Free Code Camp Code of Conduct?", "dashedName": "what-is-the-free-code-camp-code-of-conduct", "description": [ @@ -733,7 +733,7 @@ ] }, { - "_id": "bd7158d9c451eddfaeb5bdef", + "id": "bd7158d9c451eddfaeb5bdef", "name": "What is the Free Code Camp Privacy Policy?", "dashedName": "what-is-the-free-code-camp-privacy-policy", "description": [ @@ -775,7 +775,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bd3c", + "id": "bd7158d9c436eddfaeb5bd3c", "name": "How can I reach the Free Code Camp team to interview them for my publication?", "dashedName": "how-can-i-reach-the-free-code-camp-team-to-interview-them-for-my-publication", "description": [ @@ -794,7 +794,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5dd3b", + "id": "bd7158d9c436eddfaeb5dd3b", "name": "What other resources does Free Code Camp recommend to nonprofits?", "dashedName": "what-other-resources-does-free-code-camp-recommend-to-nonprofits", "description": [ @@ -836,7 +836,7 @@ ] }, { - "_id": "bd7158d9c436eddfadb5bd3e", + "id": "bd7158d9c436eddfadb5bd3e", "name": "How can I contribute to this guide?", "dashedName": "how-can-i-contribute-to-this-guide", "description": [ diff --git a/seed/future-jquery-ajax-json.json b/seed/future-jquery-ajax-json.json index 4ceea2fafc..97d0504f04 100644 --- a/seed/future-jquery-ajax-json.json +++ b/seed/future-jquery-ajax-json.json @@ -3,7 +3,7 @@ "order" : 0.004, "challenges": [ { - "_id": "bad87fee1348bd9acdd08826", + "id": "bad87fee1348bd9acdd08826", "name": "Waypoint: Learn how Script Tags and Document Ready Work", "difficulty": 0.072, "description": [ @@ -25,7 +25,7 @@ }, { - "_id": "bad87fee1348bd9aedc08826", + "id": "bad87fee1348bd9aedc08826", "name": "Waypoint: Target Elements by Selectors Using jQuery", "difficulty": 0.073, "description": [ @@ -41,7 +41,7 @@ }, { - "_id": "bad87fee1348bd9aedb08826", + "id": "bad87fee1348bd9aedb08826", "name": "Waypoint: Target Elements by Class Using jQuery", "difficulty": 0.074, "description": [ @@ -57,7 +57,7 @@ }, { - "_id": "bad87fee1348bd9aeda08826", + "id": "bad87fee1348bd9aeda08826", "name": "Waypoint: Target an element by ID Using jQuery", "difficulty": 0.075, "description": [ @@ -73,7 +73,7 @@ }, { - "_id": "bad87fee1348bd9aed908826", + "id": "bad87fee1348bd9aed908826", "name": "Waypoint: Change the CSS of an Element Using jQuery", "difficulty": 0.076, "description": [ @@ -89,7 +89,7 @@ }, { - "_id": "bad87fee1348bd9aed808826", + "id": "bad87fee1348bd9aed808826", "name": "Waypoint: Disable an Element Using jQuery", "difficulty": 0.077, "description": [ @@ -105,7 +105,7 @@ }, { - "_id": "bad87fee1348bd9aed708826", + "id": "bad87fee1348bd9aed708826", "name": "Waypoint: Remove an Element Using jQuery", "difficulty": 0.078, "description": [ @@ -121,7 +121,7 @@ }, { - "_id": "bad87fee1348bd9aed608826", + "id": "bad87fee1348bd9aed608826", "name": "Waypoint: Move an Element Using jQuery", "difficulty": 0.079, "description": [ @@ -137,7 +137,7 @@ }, { - "_id": "bad87fee1348bd9aed508826", + "id": "bad87fee1348bd9aed508826", "name": "Waypoint: Clone an Element Using jQuery", "difficulty": 0.080, "description": [ @@ -153,7 +153,7 @@ }, { - "_id": "bad87fee1348bd9aed408826", + "id": "bad87fee1348bd9aed408826", "name": "Waypoint: Animate an Element Using jQuery", "difficulty": 0.081, "description": [ @@ -169,7 +169,7 @@ }, { - "_id": "bad87fee1348bd9aed308826", + "id": "bad87fee1348bd9aed308826", "name": "Waypoint: Target the Parent of an Element Using jQuery", "difficulty": 0.082, "description": [ @@ -185,7 +185,7 @@ }, { - "_id": "bad87fee1348bd9aed208826", + "id": "bad87fee1348bd9aed208826", "name": "Waypoint: Target the Children of an Element Using jQuery", "difficulty": 0.083, "description": [ @@ -202,7 +202,7 @@ { - "_id": "bad87fee1348bd9aed108826", + "id": "bad87fee1348bd9aed108826", "name": "Waypoint: Target a Specific Child of an Element Using jQuery", "difficulty": 0.084, "description": [ @@ -218,7 +218,7 @@ }, { - "_id": "bad87fee1348bd9aed008826", + "id": "bad87fee1348bd9aed008826", "name": "Waypoint: Target Even Numbered Elements Using jQuery", "difficulty": 0.085, "description": [ @@ -234,7 +234,7 @@ }, { - "_id": "bad87fee1348bd9aecc08826", + "id": "bad87fee1348bd9aecc08826", "name": "Waypoint: Read Data from an Element Using jQuery", "difficulty": 0.086, "description": [ @@ -250,7 +250,7 @@ }, { - "_id": "bad87fee1348bd9aebc08826", + "id": "bad87fee1348bd9aebc08826", "name": "Waypoint: Get Data from an URL Using jQuery", "difficulty": 0.087, "description": [ @@ -266,7 +266,7 @@ }, { - "_id": "bad87fee1348bd9ae9c08826", + "id": "bad87fee1348bd9ae9c08826", "name": "Waypoint: Loop through JSON Data Using jQuery", "difficulty": 0.089, "description": [ @@ -282,7 +282,7 @@ }, { - "_id": "bad87fee1348bd9ae8c08826", + "id": "bad87fee1348bd9ae8c08826", "name": "Waypoint: Setup Click Events Using jQuery", "difficulty": 0.089, "description": [ @@ -297,7 +297,7 @@ "challengeType": 0 }, { - "_id": "bad87fee1348bd9aede08826", + "id": "bad87fee1348bd9aede08826", "name": "Waypoint: Use Hex Codes for Precise Colors", "difficulty": 0.071, "description": [ @@ -312,7 +312,7 @@ "challengeType": 0 }, { - "_id": "bad87fee1348bd9aedd08826", + "id": "bad87fee1348bd9aedd08826", "name": "Waypoint: Use Shortened Hex Codes for Colors", "difficulty": 0.071, "description": [ diff --git a/seed/userMigration.js b/seed/userMigration.js index c1b44d81fa..350a57ffe3 100644 --- a/seed/userMigration.js +++ b/seed/userMigration.js @@ -10,10 +10,10 @@ var User = require('../models/User.js'), mongoose.connect(secrets.db); var ziplineIds = ziplines.challenges.map(function(elem) { - return elem._id; + return elem.id; }); var basejumpIds = basejumps.challenges.map(function(elem) { - return elem._id; + return elem.id; }); var ziplineAndBaseJumpIds = R.concat(ziplineIds, basejumpIds); @@ -81,14 +81,14 @@ function userModelMigration(cb) { newChallenges.forEach(function (challenge) { if (oldChallenges.indexOf(challenge.oldNumber) !== -1 && challenge.newId) { user.completedCoursewares.push({ - _id: challenge.newId, + id: challenge.newId, completedDate: user.challengesHash[challenge.oldNumber] * 1000 }); } }); user.completedCoursewares.forEach(function (course) { - var indexOfCourse = user.uncompletedCoursewares.indexOf(course._id) !== -1; + var indexOfCourse = user.uncompletedCoursewares.indexOf(course.id) !== -1; if (indexOfCourse !== -1) { user.uncompletedCoursewares.splice(indexOfCourse, 1); } @@ -102,9 +102,9 @@ function userModelMigration(cb) { */ user.needsMigration = false; user.completedChallenges = user.completedChallenges.map(function(elem) { - if (ziplineAndBaseJumpIds.indexOf(elem._id) > 0) { + if (ziplineAndBaseJumpIds.indexOf(elem.id) > 0) { return ({ - _id: elem._id, + id: elem.id, name: elem.name, completedWith: elem.completedWith, completedDate: elem.completedDate, diff --git a/server/boot/challenge.js b/server/boot/challenge.js index 135523087b..0f51e203ab 100644 --- a/server/boot/challenge.js +++ b/server/boot/challenge.js @@ -82,7 +82,7 @@ module.exports = function(app) { return res.redirect('../challenges/learn-how-free-code-camp-works'); } var completed = req.user.completedChallenges.map(function (elem) { - return elem._id; + return elem.id; }); req.user.uncompletedChallenges = utils.allChallengeIds() @@ -136,7 +136,7 @@ module.exports = function(app) { return res.redirect('../challenges/learn-how-free-code-camp-works'); } var completed = req.user.completedChallenges.map(function (elem) { - return elem._id; + return elem.id; }); req.user.uncompletedChallenges = utils.allChallengeIds() @@ -203,13 +203,13 @@ module.exports = function(app) { return res.redirect('../challenges/' + dashedNameFull); } else if (req.user) { req.user.currentChallenge = { - challengeId: challenge._id, + challengeId: challenge.id, challengeName: challenge.name, challengeBlock: R.head(R.flatten(Object.keys(challengeMapWithIds). map(function (key) { return challengeMapWithIds[key] .filter(function (elem) { - return String(elem) === String(challenge._id); + return String(elem) === String(challenge.id); }).map(function () { return key; }); @@ -231,7 +231,7 @@ module.exports = function(app) { verb: utils.randomVerb(), phrase: utils.randomPhrase(), compliment: utils.randomCompliment(), - challengeId: challenge._id, + challengeId: challenge.id, environment: utils.whichEnvironment(), challengeType: challenge.challengeType }); @@ -249,7 +249,7 @@ module.exports = function(app) { verb: utils.randomVerb(), phrase: utils.randomPhrase(), compliment: utils.randomCompliment(), - challengeId: challenge._id, + challengeId: challenge.id, challengeType: challenge.challengeType }); }, @@ -265,7 +265,7 @@ module.exports = function(app) { verb: utils.randomVerb(), phrase: utils.randomPhrase(), compliment: utils.randomCompliment(), - challengeId: challenge._id, + challengeId: challenge.id, challengeType: challenge.challengeType }); }, @@ -280,7 +280,7 @@ module.exports = function(app) { verb: utils.randomVerb(), phrase: utils.randomPhrase(), compliment: utils.randomCompliment(), - challengeId: challenge._id, + challengeId: challenge.id, challengeType: challenge.challengeType }); }, @@ -295,7 +295,7 @@ module.exports = function(app) { verb: utils.randomVerb(), phrase: utils.randomPhrase(), compliment: utils.randomCompliment(), - challengeId: challenge._id, + challengeId: challenge.id, challengeType: challenge.challengeType }); }, @@ -315,7 +315,7 @@ module.exports = function(app) { phrase: utils.randomPhrase(), compliment: utils.randomCompliment(), bonfires: challenge, - challengeId: challenge._id, + challengeId: challenge.id, MDNkeys: challenge.MDNlinks, MDNlinks: getMDNlinks(challenge.MDNlinks), challengeType: challenge.challengeType @@ -365,18 +365,18 @@ module.exports = function(app) { } pairedWith.completedChallenges.push({ - _id: challengeId, + id: challengeId, name: challengeName, - completedWith: req.user._id, + completedWith: req.user.id, completedDate: isCompletedDate, solution: isSolution, challengeType: 5 }); req.user.completedChallenges.push({ - _id: challengeId, + id: challengeId, name: challengeName, - completedWith: pairedWith._id, + completedWith: pairedWith.id, completedDate: isCompletedDate, solution: isSolution, challengeType: 5 @@ -384,7 +384,7 @@ module.exports = function(app) { } // User said they paired, but pair wasn't found req.user.completedChallenges.push({ - _id: challengeId, + id: challengeId, name: challengeName, completedWith: null, completedDate: isCompletedDate, @@ -411,7 +411,7 @@ module.exports = function(app) { }); } else { req.user.completedChallenges.push({ - _id: challengeId, + id: challengeId, name: challengeName, completedWith: null, completedDate: isCompletedDate, @@ -439,7 +439,7 @@ module.exports = function(app) { var challengeId = req.body.challengeInfo.challengeId; req.user.completedChallenges.push({ - _id: challengeId, + id: challengeId, completedDate: isCompletedDate, name: req.body.challengeInfo.challengeName, solution: null, @@ -495,9 +495,9 @@ module.exports = function(app) { var pairedWith = pairedWithFromMongo.pop(); req.user.completedChallenges.push({ - _id: challengeId, + id: challengeId, name: req.body.challengeInfo.challengeName, - completedWith: pairedWith._id, + completedWith: pairedWith.id, completedDate: isCompletedDate, solution: solutionLink, githubLink: githubLink, @@ -508,7 +508,7 @@ module.exports = function(app) { req.user.save(function (err, user) { if (err) { return next(err); } - if (req.user._id.toString() === pairedWith._id.toString()) { + if (req.user.id.toString() === pairedWith.id.toString()) { return res.sendStatus(200); } index = pairedWith.uncompletedChallenges.indexOf(challengeId); @@ -519,9 +519,9 @@ module.exports = function(app) { } pairedWith.completedChallenges.push({ - _id: challengeId, + id: challengeId, name: req.body.challengeInfo.coursewareName, - completedWith: req.user._id, + completedWith: req.user.id, completedDate: isCompletedDate, solution: solutionLink, githubLink: githubLink, @@ -541,7 +541,7 @@ module.exports = function(app) { } else { req.user.completedChallenges.push({ - _id: challengeId, + id: challengeId, name: req.body.challengeInfo.challengeName, completedWith: null, completedDate: isCompletedDate, diff --git a/server/boot/challengeMap.js b/server/boot/challengeMap.js index 42261ac378..280768366c 100644 --- a/server/boot/challengeMap.js +++ b/server/boot/challengeMap.js @@ -29,7 +29,7 @@ module.exports = function(app) { var completedChallengeList = noDuplicatedChallenges .map(function(challenge) { - return challenge._id; + return challenge.id; }); var challengeList = utils. getChallengeMapForDisplay(completedChallengeList); @@ -37,7 +37,7 @@ module.exports = function(app) { Object.keys(challengeList).forEach(function(key) { challengeList[key].completed = challengeList[key] .challenges.filter(function(elem) { - return completedChallengeList.indexOf(elem._id) > -1; + return completedChallengeList.indexOf(elem.id) > -1; }); }); diff --git a/server/boot/fieldGuide.js b/server/boot/fieldGuide.js index 8cebbe461b..f30f7b73fc 100644 --- a/server/boot/fieldGuide.js +++ b/server/boot/fieldGuide.js @@ -57,7 +57,7 @@ module.exports = function(app) { } res.render('field-guide/show', { title: fieldGuide.name, - fieldGuideId: fieldGuide._id, + fieldGuideId: fieldGuide.id, description: fieldGuide.description.join('') }); } @@ -83,7 +83,7 @@ module.exports = function(app) { } var displayedFieldGuides = - FieldGuide.find({'_id': req.user.uncompletedFieldGuides[0]}); + FieldGuide.find({'id': req.user.uncompletedFieldGuides[0]}); displayedFieldGuides.exec(function(err, fieldGuide) { if (err) { return next(err); } diff --git a/server/boot/story.js b/server/boot/story.js index dbfaf936ca..3184a02141 100755 --- a/server/boot/story.js +++ b/server/boot/story.js @@ -184,7 +184,7 @@ module.exports = function(app) { rank: story.upVotes.length, upVotes: story.upVotes, comments: story.comments, - id: story._id, + id: story.id, timeAgo: moment(story.timePosted).fromNow(), image: story.image, page: 'show', @@ -238,7 +238,7 @@ module.exports = function(app) { function upvote(req, res, next) { var data = req.body.data; - Story.find({'_id': data.id}, function(err, story) { + Story.find({'id': data.id}, function(err, story) { if (err) { return next(err); } @@ -246,7 +246,7 @@ module.exports = function(app) { story.rank++; story.upVotes.push( { - upVotedBy: req.user._id, + upVotedBy: req.user.id, upVotedByUsername: req.user.username } ); @@ -280,7 +280,7 @@ module.exports = function(app) { function comments(req, res, next) { var data = req.params.id; Comment.find( - { where: {'_id': data } }, + { where: {'id': data } }, function(err, comment) { if (err) { return next(err); @@ -396,12 +396,12 @@ module.exports = function(app) { }).replace(/"/g, '"'), rank: 1, upVotes: [({ - upVotedBy: req.user._id, + upVotedBy: req.user.id, upVotedByUsername: req.user.username })], author: { picture: req.user.picture, - userId: req.user._id, + userId: req.user.id, username: req.user.username, email: req.user.email }, @@ -453,7 +453,7 @@ module.exports = function(app) { upvotes: 0, author: { picture: req.user.picture, - userId: req.user._id, + userId: req.user.id, username: req.user.username, email: req.user.email }, @@ -495,7 +495,7 @@ module.exports = function(app) { originalStoryAuthorEmail: data.originalStoryAuthorEmail, author: { picture: req.user.picture, - userId: req.user._id, + userId: req.user.id, username: req.user.username, email: req.user.email }, @@ -514,7 +514,7 @@ module.exports = function(app) { } cmt = cmt.pop(); - if (!req.user && cmt.author.userId !== req.user._id) { + if (!req.user && cmt.author.userId !== req.user.id) { return next(new Error('Not authorized')); } @@ -558,7 +558,7 @@ module.exports = function(app) { } associatedContext = associatedContext.pop(); if (associatedContext) { - associatedContext.comments.push(data._id); + associatedContext.comments.push(data.id); associatedContext.save(function (err) { if (err) { return next(err); diff --git a/server/boot/user.js b/server/boot/user.js index 488997ea73..3d1d661baa 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -527,7 +527,7 @@ module.exports = function(app) { return next(err); } updateUserStoryPictures( - user._id.toString(), + user.id.toString(), user.picture, user.username, function(err) { diff --git a/server/utils/index.js b/server/utils/index.js index a0f082bd4a..18d8012ff6 100644 --- a/server/utils/index.js +++ b/server/utils/index.js @@ -78,7 +78,7 @@ module.exports = { challengeMapWithIds = {}; Object.keys(challengeMap).forEach(function (key) { var onlyIds = challengeMap[key].challenges.map(function (elem) { - return elem._id; + return elem.id; }); challengeMapWithIds[key] = onlyIds; }); @@ -147,7 +147,7 @@ module.exports = { return allFieldGuideIds; } else { allFieldGuideIds = fieldGuides.map(function (elem) { - return elem._id; + return elem.id; }); return allFieldGuideIds; } @@ -161,7 +161,7 @@ module.exports = { return { name: elem.name, dashedName: elem.dashedName, - id: elem._id + id: elem.id }; }); return allFieldGuideNames; diff --git a/server/utils/middleware.js b/server/utils/middleware.js index 6cc0810b6c..5d2d12741c 100644 --- a/server/utils/middleware.js +++ b/server/utils/middleware.js @@ -20,7 +20,7 @@ exports.userMigration = function userMigration(req, res, next) { req.user.completedBonfires.map(function (bonfire) { return ({ completedDate: bonfire.completedDate, - _id: bonfire._id, + id: bonfire.id, name: bonfire.name, completedWith: bonfire.completedWith, solution: bonfire.solution, diff --git a/server/views/challengeMap/show.jade b/server/views/challengeMap/show.jade index 4c569263cb..edda59743b 100644 --- a/server/views/challengeMap/show.jade +++ b/server/views/challengeMap/show.jade @@ -82,7 +82,7 @@ block content .col-xs-12 ol for challenge in challengeBlock.challenges - if completedChallengeList.indexOf(challenge._id) > -1 + if completedChallengeList.indexOf(challenge.id) > -1 .row .hidden-xs.col-sm-3.col-md-2.text-primary.ion-checkmark-circled.padded-ionic-icon.text-center.large-p.negative-10 .col-xs-12.col-sm-9.col-md-10 diff --git a/server/views/stories/comments.jade b/server/views/stories/comments.jade index f24917c86f..e8f1372df0 100755 --- a/server/views/stories/comments.jade +++ b/server/views/stories/comments.jade @@ -25,7 +25,7 @@ // todo if (commentDetails.author.username === DF105CFA89562196E702912B3818C6A5B46E80D262442FDF29976621E5AF0D23) { if ((Date.now() - commentDetails.commentOn) < 600000){ - editButton = "Edit · "; + editButton = "Edit · "; } } $(div) @@ -36,12 +36,12 @@ '' + commentDetails.author.username + '' + '' + '' + - '
' + + '
' + '
' + '

' + commentDetails.body + '

' + '
' + '
' + - "Reply · " + + "Reply · " + editButton + "commented " + moment(commentDetails.commentOn).fromNow() + " by " + "@" + commentDetails.author.username + "" + @@ -56,7 +56,7 @@ sentinel += commentDetails.comments.length; - renderComments(commentDetails.comments, '.comment_' + commentDetails._id, ++level); + renderComments(commentDetails.comments, '.comment_' + commentDetails.id, ++level); }, complete: function () { diff --git a/server/views/stories/index.jade b/server/views/stories/index.jade index 14b63dbf5e..0204840763 100644 --- a/server/views/stories/index.jade +++ b/server/views/stories/index.jade @@ -3,7 +3,7 @@ block content if (user) script. var isLoggedIn = true; - var B3BA669EC5C1DD70FB478221E067A7E1B686929C569F5E73561B69C8F42129B = !{JSON.stringify(user._id)}; + var B3BA669EC5C1DD70FB478221E067A7E1B686929C569F5E73561B69C8F42129B = !{JSON.stringify(user.id)}; var DF105CFA89562196E702912B3818C6A5B46E80D262442FDF29976621E5AF0D23 = !{JSON.stringify(user.username)}; else script.