From 7b04184fcc0d0d42bf06c51948a23c9cef642bc7 Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Wed, 9 Sep 2015 18:10:22 +0100 Subject: [PATCH] Set up new curriculum order. OOPF is now before basic bonfires and where art thou is now in intermediate --- seed/challenges/basic-bonfires.json | 44 +------------------ seed/challenges/intermediate-bonfires.json | 44 ++++++++++++++++++- ...t-oriented-and-functional-programming.json | 2 +- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index 250e4a9a2a..15422c317d 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -1,6 +1,6 @@ { "name": "Basic Algorithm Scripting", - "order": 0.006, + "order": 0.007, "challenges": [ { "id": "ad7123c8c441eddfaeb5bdef", @@ -568,48 +568,6 @@ "namePt": "", "descriptionPt": [] }, - { - "id": "a8e512fbe388ac2f9198f0fa", - "title": "Where art thou", - "difficulty": "1.55", - "description": [ - "Make a function that looks through an array of objects (first argument) and returns an array of all objects that have matching property and value pairs (second argument). Each property and value pair of the source object has to be present in the object from the collection if it is to be included in the returned array.", - "For example, if the first argument is [{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], and the second argument is { last: 'Capulet' }, then you must return the third object from the array (the first argument), because it contains the property and it's value, that was passed on as the second argument.", - "Remember to use Read-Search-Ask if you get stuck. Write your own code." - ], - "challengeSeed": [ - "function where(collection, source) {", - " var arr = [];", - " // What's in a name?", - " return arr;", - "}", - "", - "where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' });" - ], - "tests": [ - "assert.deepEqual(where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' }), [{ first: 'Tybalt', last: 'Capulet' }], 'should return an array of objects');", - "assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'should return with multiples');", - "assert.deepEqual(where([{ 'a': 1, 'b': 2 }, { 'a': 1 }, { 'a': 1, 'b': 2, 'c': 2 }], { 'a': 1, 'b': 2 }), [{ 'a': 1, 'b': 2 }, { 'a': 1, 'b': 2, 'c': 2 }], 'should return two objects in array');", - "assert.deepEqual(where([{ 'a': 5 }, { 'a': 5 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }), [{ 'a': 5, 'b': 10 }], 'should return a single object in array');" - ], - "MDNlinks": [ - "Global Object", - "Object.hasOwnProperty()", - "Object.keys()" - ], - "type": "bonfire", - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, { "id": "a39963a4c10bc8b4d4f06d7e", "title": "Seek and Destroy", diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json index d8f3023c4d..208b4fa7df 100644 --- a/seed/challenges/intermediate-bonfires.json +++ b/seed/challenges/intermediate-bonfires.json @@ -131,6 +131,48 @@ "namePt": "", "descriptionPt": [] }, + { + "id": "a8e512fbe388ac2f9198f0fa", + "title": "Where art thou", + "difficulty": "2.03", + "description": [ + "Make a function that looks through an array of objects (first argument) and returns an array of all objects that have matching property and value pairs (second argument). Each property and value pair of the source object has to be present in the object from the collection if it is to be included in the returned array.", + "For example, if the first argument is [{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], and the second argument is { last: 'Capulet' }, then you must return the third object from the array (the first argument), because it contains the property and it's value, that was passed on as the second argument.", + "Remember to use Read-Search-Ask if you get stuck. Write your own code." + ], + "challengeSeed": [ + "function where(collection, source) {", + " var arr = [];", + " // What's in a name?", + " return arr;", + "}", + "", + "where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' });" + ], + "tests": [ + "assert.deepEqual(where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' }), [{ first: 'Tybalt', last: 'Capulet' }], 'should return an array of objects');", + "assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'should return with multiples');", + "assert.deepEqual(where([{ 'a': 1, 'b': 2 }, { 'a': 1 }, { 'a': 1, 'b': 2, 'c': 2 }], { 'a': 1, 'b': 2 }), [{ 'a': 1, 'b': 2 }, { 'a': 1, 'b': 2, 'c': 2 }], 'should return two objects in array');", + "assert.deepEqual(where([{ 'a': 5 }, { 'a': 5 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }), [{ 'a': 5, 'b': 10 }], 'should return a single object in array');" + ], + "MDNlinks": [ + "Global Object", + "Object.hasOwnProperty()", + "Object.keys()" + ], + "type": "bonfire", + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, { "id": "a0b5010f579e69b815e7c5d6", "title": "Search and Replace", @@ -141,7 +183,7 @@ "expect(replace(\"His name is Tom\", \"Tom\", \"john\")).to.equal(\"His name is John\");", "expect(replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\")).to.equal(\"Let us get back to more Bonfires\");" ], - "difficulty": "2.03", + "difficulty": "2.035", "description": [ "Perform a search and replace on the sentence using the arguments provided and return the new sentence.", "First argument is the sentence to perform the search and replace on.", diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json index b7701304f1..9f0aeed7e2 100644 --- a/seed/challenges/object-oriented-and-functional-programming.json +++ b/seed/challenges/object-oriented-and-functional-programming.json @@ -1,6 +1,6 @@ { "name": "Object Oriented and Functional Programming", - "order": 0.010, + "order": 0.006, "note": [ "Methods", "Closures",