From cc90d97bdb7b8b2ce749de586aac7bb203ef63f5 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sat, 9 May 2015 18:36:21 -0700 Subject: [PATCH 01/10] add code of conduct --- gulpfile.js | 2 +- seed_data/coursewares.json | 1 + seed_data/field-guides.json | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 4faab8e3ad..b8568baefc 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -57,7 +57,7 @@ gulp.task('sync', ['serve'], function() { logLeval: 'debug', files: ['public/js/lib/*/*.{js, jsx}'], port: 3001, - open: true, + open: false, reloadDelay: reloadDelay }); }); diff --git a/seed_data/coursewares.json b/seed_data/coursewares.json index 27831c4956..993eb38e2b 100644 --- a/seed_data/coursewares.json +++ b/seed_data/coursewares.json @@ -29,6 +29,7 @@ "Now check your email and click the link in the email from Slack", "Complete the sign up process, then update your biographical information and upload an image. A picture of your face works best. This is how people will see you in the chat room, so put your best foot forward.", "Now enter the general chat room and introduce yourself to our chat room by typing: \"hello world!\".", + "Note that you're expected to follow our Code of Conduct: http://freecodecamp.com/field-guide/what-is-free-code-camp's-code-of-conduct.", "Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.", "Keep the chat room open while you work through the other challenges. That way you ask for help if you get stuck on a challenge. You can also socialize when you feel like taking a break.", "You can also access this chat room by clicking the \"Chat\" button in the upper right hand corner." diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json index a4261db3f0..cc3e7c597f 100644 --- a/seed_data/field-guides.json +++ b/seed_data/field-guides.json @@ -292,6 +292,7 @@ "
  • San Diego
  • ", "
  • San Francisco
  • ", "
  • Scottsdale
  • ", + "
  • Seattle
  • ", "
  • Tampa
  • ", "
  • Tempe
  • ", " ", @@ -547,6 +548,30 @@ "" ] }, + { + "_id": "bd7158d9c451eddfaeb5bdee", + "name": "What is Free Code Camp's Code of Conduct?", + "description": [ + "
    ", + "

    Free Code Camp is friendly place to learn to code. We're committed to keeping it that way.

    ", + "

    All campers are required to agree with the following code of conduct. We'll enforce this code. We're expecting cooperation from all campers in ensuring a friendly environment for everybody.

    ", + "

    In short: be nice to your fellow campers.

    ", + "

    Remember these 3 things and your fellow campers will like you:

    ", + "

    ", + "
      ", + "
    1. Compliment your fellow campers when they do good work. Congratulate them when they accomplish something (like finishing a nonprofit project or getting a job).
    2. ", + "
    3. Critique the work, not the camper doing it.
    4. ", + "
    5. Only argue about something if it's important to the greater discussion.
    6. ", + "
    ", + "

    ", + "

    Free Code Camp should be a harassment-free experience for everyone, regardless of gender, gender identity and expression, age, sexual orientation, disability, physical appearance, body size, race, national origin, or religion (or lack thereof).

    ", + "

    We do not tolerate harassment of campers in any form, anywhere on Free Code Camp's online media (Slack, Twitch, etc.) or during pair programming. Harassment includes sexual language and imagery, deliberate intimidation, stalking, unwelcome sexual attention, libel, and any malicious hacking or social engineering.

    ", + "

    If a camper engages in harassing behavior, our team will take any action we deem appropriate, up to and including banning them from Free Code Camp.

    ", + "

    We want everyone to feel safe and respected. If you are being harassed or notice that someone else is being harassed, say something! Message @quincylarson, @terakilobyte and @codenonprofit in Slack (preferably with a screen shot of the offending language) so we can take fast action.

    ", + "

    If you have questions about this code of conduct, email us at team@freecodecamp.com.

    ", + "
    " + ] + }, { "_id": "bd7158d9c451eddfaeb5bdef", "name": "What is Free Code Camp's Privacy Policy?", From 10c4cec293edd3417e5c5fa75ddd7521fe644f4d Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sat, 9 May 2015 23:20:35 -0700 Subject: [PATCH 02/10] update facebook groups --- seed_data/field-guides.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json index cc3e7c597f..fd7ec0440b 100644 --- a/seed_data/field-guides.json +++ b/seed_data/field-guides.json @@ -283,16 +283,21 @@ "

    ", "
      ", "
    1. Atlanta
    2. ", + "
    3. Hyderabad
    4. ", + "
    5. Kalamazoo
    6. ", "
    7. Karachi
    8. ", "
    9. Los Angeles
    10. ", "
    11. Minneapolis
    12. ", "
    13. Paris
    14. ", "
    15. Philadelphia
    16. ", "
    17. Phoenix
    18. ", + "
    19. Richmond
    20. ", "
    21. San Diego
    22. ", "
    23. San Francisco
    24. ", + "
    25. San Jose
    26. ", "
    27. Scottsdale
    28. ", "
    29. Seattle
    30. ", + "
    31. Taipei
    32. ", "
    33. Tampa
    34. ", "
    35. Tempe
    36. ", "
    ", From 1033d74ccbd4a16db141727c198d3c38aa4bc25e Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sat, 9 May 2015 23:40:28 -0700 Subject: [PATCH 03/10] hotfixes for field guide --- controllers/fieldGuide.js | 20 +++++++++++--------- views/partials/field-guide.jade | 3 ++- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/controllers/fieldGuide.js b/controllers/fieldGuide.js index a7d00fc97b..f8e35a47de 100644 --- a/controllers/fieldGuide.js +++ b/controllers/fieldGuide.js @@ -9,15 +9,17 @@ exports.returnIndividualFieldGuide = function(req, res, next) { var fieldGuideName = dashedName.replace(/\-/g, ' '); - var completed = req.user.completedFieldGuides; + if (req.user) { + var completed = req.user.completedFieldGuides; - var uncompletedFieldGuides = resources.allFieldGuideIds().filter(function (elem) { - if (completed.indexOf(elem) === -1) { - return elem; - } - }); - req.user.uncompletedFieldGuides = uncompletedFieldGuides; - req.user.save(); + var uncompletedFieldGuides = resources.allFieldGuideIds().filter(function (elem) { + if (completed.indexOf(elem) === -1) { + return elem; + } + }); + req.user.uncompletedFieldGuides = uncompletedFieldGuides; + req.user.save(); + } FieldGuide.find({'name': new RegExp(fieldGuideName, 'i')}, function(err, fieldGuideFromMongo) { if (err) { @@ -59,7 +61,7 @@ exports.showAllFieldGuides = function(req, res) { exports.returnNextFieldGuide = function(req, res, next) { if (!req.user) { - return res.redirect('../field-guide/how-do-i-use-this-guide?'); + return res.redirect('/field-guide/how-do-i-use-this-guide?'); } var displayedFieldGuides = FieldGuide.find({'_id': req.user.uncompletedFieldGuides[0]}); diff --git a/views/partials/field-guide.jade b/views/partials/field-guide.jade index 5c08d39896..e4d70b01d1 100644 --- a/views/partials/field-guide.jade +++ b/views/partials/field-guide.jade @@ -30,9 +30,10 @@ h3 } else { $(div).html("
    " + "" + - "
    " + + "" + + "
    " + "
    " + "
    "); } From 3b79bb6c036dd454407c28e4c366d47813cf1ab0 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sun, 10 May 2015 03:25:52 -0700 Subject: [PATCH 04/10] add additional facebook groups --- seed_data/field-guides.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json index fd7ec0440b..64c98fac94 100644 --- a/seed_data/field-guides.json +++ b/seed_data/field-guides.json @@ -288,10 +288,13 @@ "
  • Karachi
  • ", "
  • Los Angeles
  • ", "
  • Minneapolis
  • ", + "
  • Nashville
  • ", + "
  • New York City
  • ", "
  • Paris
  • ", "
  • Philadelphia
  • ", "
  • Phoenix
  • ", "
  • Richmond
  • ", + "
  • San Bernardino
  • ", "
  • San Diego
  • ", "
  • San Francisco
  • ", "
  • San Jose
  • ", From 158785c605a8d4b991d794144d78cf28df8147a0 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sun, 10 May 2015 12:26:57 -0700 Subject: [PATCH 05/10] update facebook groups --- seed_data/field-guides.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json index 64c98fac94..9155c85fe0 100644 --- a/seed_data/field-guides.json +++ b/seed_data/field-guides.json @@ -283,17 +283,25 @@ "

    ", "
      ", "
    1. Atlanta
    2. ", + "
    3. Bandung
    4. ", + "
    5. Denver
    6. ", + "
    7. Dubai
    8. ", "
    9. Hyderabad
    10. ", "
    11. Kalamazoo
    12. ", "
    13. Karachi
    14. ", + "
    15. London
    16. ", "
    17. Los Angeles
    18. ", + "
    19. Manila
    20. ", "
    21. Minneapolis
    22. ", "
    23. Nashville
    24. ", "
    25. New York City
    26. ", + "
    27. Oxford, Alabama
    28. ", "
    29. Paris
    30. ", "
    31. Philadelphia
    32. ", + "
    33. Pittsburgh
    34. ", "
    35. Phoenix
    36. ", "
    37. Richmond
    38. ", + "
    39. Rio de Janeiro
    40. ", "
    41. San Bernardino
    42. ", "
    43. San Diego
    44. ", "
    45. San Francisco
    46. ", @@ -303,6 +311,7 @@ "
    47. Taipei
    48. ", "
    49. Tampa
    50. ", "
    51. Tempe
    52. ", + "
    53. Washington, DC
    54. ", "
    ", "

    ", "

    If you didn't see your city on this list, you should create your own Facebook group for your city. Please follow these steps:

    ", @@ -327,7 +336,8 @@ " A screen shot showing you the group description box on the Facebook page.", "
  • Click the \"Upload a photo button. To start out, you'll probably just want to use Free Code Camp's banner (download it here), or a scenic shot of your city. Later you can update this with a picture from one of your city's Free Code Camp events.
  • ", " A screenshot showing the \"Upload a photo\" button.", - "
  • Finally, message @quincylarson in Slack with a link to your city's group page and he'll include it here.
  • ", + "
  • Message @quincylarson in Slack with a link to your city's group page and he'll include it here.
  • ", + "
  • Join our #local-group-leaders channel on Slack, where we share ideas about involving campers in your city.
  • ", " ", "

    ", "

    If you don't have a Facebook page, we strongly recommend you create one, even if it's just for the purpose of coordinating with campers in your city through this group.

    ", From 63d29827f3548458233ed1a37c5102b62fb7e107 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sun, 10 May 2015 17:45:32 -0700 Subject: [PATCH 06/10] update field guide --- seed_data/field-guides.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json index 9155c85fe0..44cec43124 100644 --- a/seed_data/field-guides.json +++ b/seed_data/field-guides.json @@ -284,6 +284,8 @@ "
      ", "
    1. Atlanta
    2. ", "
    3. Bandung
    4. ", + "
    5. Berlin
    6. ", + "
    7. Cincinnati
    8. ", "
    9. Denver
    10. ", "
    11. Dubai
    12. ", "
    13. Hyderabad
    14. ", @@ -292,6 +294,7 @@ "
    15. London
    16. ", "
    17. Los Angeles
    18. ", "
    19. Manila
    20. ", + "
    21. Miami
    22. ", "
    23. Minneapolis
    24. ", "
    25. Nashville
    26. ", "
    27. New York City
    28. ", @@ -300,6 +303,7 @@ "
    29. Philadelphia
    30. ", "
    31. Pittsburgh
    32. ", "
    33. Phoenix
    34. ", + "
    35. Providence
    36. ", "
    37. Richmond
    38. ", "
    39. Rio de Janeiro
    40. ", "
    41. San Bernardino
    42. ", @@ -362,10 +366,10 @@ "

      We're happy to do a quick interview for your publication or show. Here's whom you should contact about what, and how to best reach them:

      ", "

      ", "
        ", - "
      1. Want to talk to about Free Code Camp's curriculum or long-term vision? Reach out to Quincy Larson. He's @ossia on Twitter and @quincylarson on Slack.
      2. ", - "
      3. Want to talk about Free Code Camp's open source codebase, infrastructure, or JavaScript in general? Talk to Nathan Leniz. He's @terakilobyte on Twitter and @terakilobyte on Slack.
      4. ", - "
      5. Want to explore our efforts to empower nonprofits with code? Michael D. Johnson eats, sleeps and breathes that. He's @figitalboy on Twitter and @codenonprofit on Slack.
      6. ", - "
      7. Want to get a camper's perspective on our community? Talk with Bianca Mihai (@biancamihai on Slack and @bubuslubu on Twitter) or Suzanne Atkinson (@adventurebear on Slack and @steelcitycoach on Twitter).", + "
      8. Want to talk to about Free Code Camp's curriculum or long-term vision? Reach out to Quincy Larson. He's @ossia on Twitter and @quincylarson on Slack.
      9. ", + "
      10. Want to talk about Free Code Camp's open source codebase, infrastructure, or JavaScript in general? Talk to Nathan Leniz. He's @terakilobyte on Twitter and @terakilobyte on Slack.
      11. ", + "
      12. Want to explore our efforts to empower nonprofits with code? Michael D. Johnson eats, sleeps and breathes that. He's @figitalboy on Twitter and @codenonprofit on Slack.
      13. ", + "
      14. Want to get a camper's perspective on our community? Talk with Bianca Mihai (@biancamihai on Slack and @bubuslubu on Twitter) or Suzanne Atkinson (@adventurebear on Slack and @steelcitycoach on Twitter).", "
      ", "

      ", "

      We strive to be helpful and transparent in everything we do. We'll do what we can to help you share our community with your audience.

      ", From 0f83072c4ed664926fe07eb4109e5a7b08a3ea31 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sun, 10 May 2015 17:52:25 -0700 Subject: [PATCH 07/10] add one more local group; --- seed_data/field-guides.json | 1 + 1 file changed, 1 insertion(+) diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json index 44cec43124..2ce415e087 100644 --- a/seed_data/field-guides.json +++ b/seed_data/field-guides.json @@ -296,6 +296,7 @@ "
    43. Manila
    44. ", "
    45. Miami
    46. ", "
    47. Minneapolis
    48. ", + "
    49. Missoula
    50. ", "
    51. Nashville
    52. ", "
    53. New York City
    54. ", "
    55. Oxford, Alabama
    56. ", From 40a58ec7e76ab14cad5761d35727f14e005ee38e Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sun, 10 May 2015 18:14:33 -0700 Subject: [PATCH 08/10] add berkeley local group --- seed_data/field-guides.json | 1 + 1 file changed, 1 insertion(+) diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json index 2ce415e087..e0761835bc 100644 --- a/seed_data/field-guides.json +++ b/seed_data/field-guides.json @@ -284,6 +284,7 @@ "
        ", "
      1. Atlanta
      2. ", "
      3. Bandung
      4. ", + "
      5. Berkeley
      6. ", "
      7. Berlin
      8. ", "
      9. Cincinnati
      10. ", "
      11. Denver
      12. ", From d63b8f01be15ad38b8dd8409d56a577e756fa90b Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sun, 10 May 2015 21:59:55 -0700 Subject: [PATCH 09/10] improve bonfires and js coursewares --- bower.json | 3 ++- public/css/main.less | 4 ++++ ...ireFramework_v0.1.2.js => bonfireFramework_v0.1.3.js} | 9 +++++---- ...ework_v0.1.1.js => coursewaresHCJQFramework_0.1.1.js} | 2 +- ...resJSFramework.js => coursewaresJSFramework_0.0.1.js} | 8 ++++---- .../{iFrameScripts.js => iFrameScripts_0.0.1.js} | 4 ++-- views/bonfire/show.jade | 4 +--- views/coursewares/showHTML.jade | 2 +- views/coursewares/showJS.jade | 2 +- views/partials/universal-head.jade | 4 +++- 10 files changed, 24 insertions(+), 18 deletions(-) rename public/js/lib/bonfire/{bonfireFramework_v0.1.2.js => bonfireFramework_v0.1.3.js} (95%) rename public/js/lib/coursewares/{coursewaresHCJQFramework_v0.1.1.js => coursewaresHCJQFramework_0.1.1.js} (99%) rename public/js/lib/coursewares/{coursewaresJSFramework.js => coursewaresJSFramework_0.0.1.js} (95%) rename public/js/lib/coursewares/{iFrameScripts.js => iFrameScripts_0.0.1.js} (85%) diff --git a/bower.json b/bower.json index 2f4a054399..0d92dd37c2 100644 --- a/bower.json +++ b/bower.json @@ -24,6 +24,7 @@ "bootstrap": "~3.3.4", "font-awesome": "~4.3.0", "moment": "~2.10.2", - "angular-bootstrap": "~0.13.0" + "angular-bootstrap": "~0.13.0", + "ramda": "~0.13.0" } } diff --git a/public/css/main.less b/public/css/main.less index 4b632e2dbc..7d04cbba7c 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -1073,6 +1073,10 @@ hr { border-radius: 5px; } +.grayed-out-test-output { + color: @gray-light; +} + //uncomment this to see the dimensions of all elements outlined in red //* { // border-color: red; diff --git a/public/js/lib/bonfire/bonfireFramework_v0.1.2.js b/public/js/lib/bonfire/bonfireFramework_v0.1.3.js similarity index 95% rename from public/js/lib/bonfire/bonfireFramework_v0.1.2.js rename to public/js/lib/bonfire/bonfireFramework_v0.1.3.js index 2e68888f53..0e0c5f5005 100644 --- a/public/js/lib/bonfire/bonfireFramework_v0.1.2.js +++ b/public/js/lib/bonfire/bonfireFramework_v0.1.3.js @@ -197,11 +197,11 @@ var createTestDisplay = function() { var testDoc = document.createElement("div"); if (test.err != null) { $(testDoc) - .html("
        " + test.text + "
        " + test.err + "
        ") + .html("
        " + test.text + "
        " + test.err + "
        ") .prependTo($('#testSuite')) } else { $(testDoc) - .html("
        " + test.text + "
        ") + .html("
        " + test.text + "
        ") .appendTo($('#testSuite')); } }; @@ -209,6 +209,7 @@ var createTestDisplay = function() { var assert = chai.assert; var expect = chai.expect; var should = chai.should(); +chai.config.showDiff = true; var reassembleTest = function(test, data) { var lineNum = test.line; @@ -233,7 +234,7 @@ var runTests = function(err, data) { } } catch(error) { allTestsPassed = false; - arr[ix].err = error.name + ":" + error.message; + arr[ix].err = error.message; } finally { if (!test) { createTestDisplay(); @@ -258,4 +259,4 @@ function showCompletion() { $('.next-bonfire-button').click(); } }); -} \ No newline at end of file +} diff --git a/public/js/lib/coursewares/coursewaresHCJQFramework_v0.1.1.js b/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.1.js similarity index 99% rename from public/js/lib/coursewares/coursewaresHCJQFramework_v0.1.1.js rename to public/js/lib/coursewares/coursewaresHCJQFramework_0.1.1.js index 6ab42ee738..4407a23be2 100644 --- a/public/js/lib/coursewares/coursewaresHCJQFramework_v0.1.1.js +++ b/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.1.js @@ -56,7 +56,7 @@ var allTests = ''; }); })(); -var otherTestsForNow = ""; +var otherTestsForNow = ""; var delay; // Initialize CodeMirror editor with a nice html5 canvas demo. diff --git a/public/js/lib/coursewares/coursewaresJSFramework.js b/public/js/lib/coursewares/coursewaresJSFramework_0.0.1.js similarity index 95% rename from public/js/lib/coursewares/coursewaresJSFramework.js rename to public/js/lib/coursewares/coursewaresJSFramework_0.0.1.js index a8cdc78bc2..c4124e4455 100644 --- a/public/js/lib/coursewares/coursewaresJSFramework.js +++ b/public/js/lib/coursewares/coursewaresJSFramework_0.0.1.js @@ -182,11 +182,11 @@ var createTestDisplay = function() { if (test.err != null) { console.log('Should be displaying bad tests'); $(testDoc) - .html("
        " + test.text + "
        " + test.err + "
        ") + .html("
        " + test.text + "
        " + test.err + "
        ") .prependTo($('#testSuite')) } else { $(testDoc) - .html("
        " + test.text + "
        ") + .html("
        " + test.text + "
        ") .appendTo($('#testSuite')); } }; @@ -218,7 +218,7 @@ var runTests = function(err, data) { } } catch(error) { allTestsPassed = false; - arr[ix].err = error.name + ":" + error.message; + arr[ix].err = error.message; } finally { if (!test) { createTestDisplay(); @@ -243,4 +243,4 @@ function showCompletion() { $('#next-courseware-button').click(); } }); -} \ No newline at end of file +} diff --git a/public/js/lib/coursewares/iFrameScripts.js b/public/js/lib/coursewares/iFrameScripts_0.0.1.js similarity index 85% rename from public/js/lib/coursewares/iFrameScripts.js rename to public/js/lib/coursewares/iFrameScripts_0.0.1.js index 86ac7cff28..efb149c325 100644 --- a/public/js/lib/coursewares/iFrameScripts.js +++ b/public/js/lib/coursewares/iFrameScripts_0.0.1.js @@ -9,11 +9,11 @@ } catch (err) { allTestsGood = false; thisTest = false; - parent.postError(JSON.stringify(tests[i])); + parent.postError(JSON.stringify(tests[i].message)); } finally { if (thisTest) { parent.postSuccess(JSON.stringify(tests[i])); } } } -})(); \ No newline at end of file +})(); diff --git a/views/bonfire/show.jade b/views/bonfire/show.jade index f2284d53a3..9a28e530c2 100644 --- a/views/bonfire/show.jade +++ b/views/bonfire/show.jade @@ -15,8 +15,6 @@ block content script(type='text/javascript', src='/js/lib/codemirror/mode/javascript/javascript.js') script(type='text/javascript', src='/js/lib/jailed/jailed.js') script(type='text/javascript', src='/js/lib/bonfire/bonfireInit.js') - script(type='text/javascript', src="//cdnjs.cloudflare.com/ajax/libs/ramda/0.13.0/ramda.min.js") - .row .col-xs-12.col-sm-12.col-md-4.bonfire-top @@ -106,7 +104,7 @@ block content form.code .form-group.codeMirrorView textarea#codeEditor(autofocus=true, style='display: none;') - script(src='/js/lib/bonfire/bonfireFramework_v0.1.2.js') + script(src='/js/lib/bonfire/bonfireFramework_v0.1.3.js') diff --git a/views/coursewares/showHTML.jade b/views/coursewares/showHTML.jade index 840056724d..6349650804 100644 --- a/views/coursewares/showHTML.jade +++ b/views/coursewares/showHTML.jade @@ -82,4 +82,4 @@ block content .animated.zoomInDown.delay-half span.completion-icon.ion-checkmark-circled.text-primary a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress - script(src="/js/lib/coursewares/coursewaresHCJQFramework_v0.1.1.js") + script(src="/js/lib/coursewares/coursewaresHCJQFramework_0.1.1.js") diff --git a/views/coursewares/showJS.jade b/views/coursewares/showJS.jade index 3e33ee4a4b..b55d8ad4d9 100644 --- a/views/coursewares/showJS.jade +++ b/views/coursewares/showJS.jade @@ -56,7 +56,7 @@ block content form.code .form-group.codeMirrorView textarea#codeEditor(autofocus=true, style='display: none;') - script(src='/js/lib/coursewares/coursewaresJSFramework.js') + script(src='/js/lib/coursewares/coursewaresJSFramework_0.0.1.js') #complete-courseware-dialog.modal(tabindex='-1') .modal-dialog.animated.zoomIn.fast-animation .modal-content diff --git a/views/partials/universal-head.jade b/views/partials/universal-head.jade index 673c6fe58a..cfc3fc7b81 100644 --- a/views/partials/universal-head.jade +++ b/views/partials/universal-head.jade @@ -25,7 +25,7 @@ script(src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/js/bootstra script. if (typeof($.fn.modal) === 'undefined') { document.write('"; +var otherTestsForNow = ""; var delay; // Initialize CodeMirror editor with a nice html5 canvas demo. @@ -92,7 +92,7 @@ var postSuccess = function(data) { var postError = function(data) { var testDoc = document.createElement("div"); $(testDoc) - .html("
        " + JSON.parse(data) + "
        ") + .html("
        " + JSON.parse(data) + "
        ") .prependTo($('#testSuite')) }; var goodTests = 0; diff --git a/public/js/lib/coursewares/coursewaresJSFramework_0.0.1.js b/public/js/lib/coursewares/coursewaresJSFramework_0.0.1.js index c4124e4455..d32e54428e 100644 --- a/public/js/lib/coursewares/coursewaresJSFramework_0.0.1.js +++ b/public/js/lib/coursewares/coursewaresJSFramework_0.0.1.js @@ -182,7 +182,7 @@ var createTestDisplay = function() { if (test.err != null) { console.log('Should be displaying bad tests'); $(testDoc) - .html("
        " + test.text + "
        " + test.err + "
        ") + .html("
        " + test.text + "
        " + test.err + "
        ") .prependTo($('#testSuite')) } else { $(testDoc) diff --git a/public/js/lib/coursewares/iFrameScripts_0.0.1.js b/public/js/lib/coursewares/iFrameScripts_0.0.1.js index efb149c325..5856d50b19 100644 --- a/public/js/lib/coursewares/iFrameScripts_0.0.1.js +++ b/public/js/lib/coursewares/iFrameScripts_0.0.1.js @@ -9,10 +9,10 @@ } catch (err) { allTestsGood = false; thisTest = false; - parent.postError(JSON.stringify(tests[i].message)); + parent.postError(JSON.stringify(err.message.split(':').shift())); } finally { if (thisTest) { - parent.postSuccess(JSON.stringify(tests[i])); + parent.postSuccess(JSON.stringify(tests[i].split(',').pop().replace(/\'/g, '').replace(/\)/, ''))); } } }