From 9808db4f305cb3b9ba8207d01b960e5f87dc656d Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Sun, 8 Feb 2015 14:24:42 -0500 Subject: [PATCH] Fixing undefined challengeName on info pages --- controllers/challenges.js | 1 + views/contact/nonprofits.jade | 4 +++- views/home.jade | 4 +++- views/resources/learn-to-code.jade | 2 ++ views/resources/privacy.jade | 2 ++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/controllers/challenges.js b/controllers/challenges.js index 9de4496a4c..b20ff6287b 100644 --- a/controllers/challenges.js +++ b/controllers/challenges.js @@ -11,6 +11,7 @@ var highestChallengeNumber = 53; exports.returnChallenge = function(req, res, next) { var challengeNumber = parseInt(req.params.challengeNumber) || 0; + debug(challengeNumber); if (challengeNumber > highestChallengeNumber) { req.flash('errors', { msg: "It looks like you've either completed all the challenges we have available or requested a challenge we don't have." diff --git a/views/contact/nonprofits.jade b/views/contact/nonprofits.jade index f52f36bec9..4d3115c15c 100644 --- a/views/contact/nonprofits.jade +++ b/views/contact/nonprofits.jade @@ -44,4 +44,6 @@ block content .col-sm-offset-2.col-sm-8 button.btn.btn-primary(type='submit', ng-disabled='nonprofitForm.$invalid') span.ion-paper-airplane - | Submit \ No newline at end of file + | Submit + script. + var challengeName = 'Non-profit Interest' \ No newline at end of file diff --git a/views/home.jade b/views/home.jade index 206cfd7811..69d0196c0a 100644 --- a/views/home.jade +++ b/views/home.jade @@ -84,4 +84,6 @@ block content li.ion-code   You can get help in real time from our community chat rooms and forum li.ion-code   We all share one common goal: to boost our careers with code .big-break - a.btn.btn-cta.signup-btn(href="/login") Learn to code today (it's free) \ No newline at end of file + a.btn.btn-cta.signup-btn(href="/login") Learn to code today (it's free) + script. + challengeName = 'Home' \ No newline at end of file diff --git a/views/resources/learn-to-code.jade b/views/resources/learn-to-code.jade index 6c82086509..12c1d64b61 100644 --- a/views/resources/learn-to-code.jade +++ b/views/resources/learn-to-code.jade @@ -1,5 +1,7 @@ extends ../layout block content + script. + var challengeName = 'Learn to code' include ../partials/stats include ../partials/blog include ../partials/about diff --git a/views/resources/privacy.jade b/views/resources/privacy.jade index 9ab932774e..896c2437b5 100644 --- a/views/resources/privacy.jade +++ b/views/resources/privacy.jade @@ -36,3 +36,5 @@ block content

Acceptance of Privacy Policy Terms and Conditions

By using this site, you signify your agreement to the terms and conditions of this FreeCodeCamp.com Privacy Policy. If you do not agree to these terms, please do not use this site. We reserve the right, at our sole discretion, to change, modify, add, or remove portions of this policy at any time. All amended terms automatically take effect 30 days after they are initially posted on the site. Please check this page periodically for any modifications. Your continued use of FreeCodeCamp.com following the posting of any changes to these terms shall mean that you have accepted those changes.

If you have any questions or concerns, please send an e-mail to team@freecodecamp.com.

+ script. + var challengeName = 'Privacy';