Fixing undefined challengeName on info pages

This commit is contained in:
Nathan Leniz
2015-02-08 14:24:42 -05:00
parent f572e4cb77
commit 9808db4f30
5 changed files with 11 additions and 2 deletions

View File

@ -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."

View File

@ -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
| Submit
script.
var challengeName = 'Non-profit Interest'

View File

@ -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)
a.btn.btn-cta.signup-btn(href="/login") Learn to code today (it's free)
script.
challengeName = 'Home'

View File

@ -1,5 +1,7 @@
extends ../layout
block content
script.
var challengeName = 'Learn to code'
include ../partials/stats
include ../partials/blog
include ../partials/about

View File

@ -36,3 +36,5 @@ block content
<h3>Acceptance of Privacy Policy Terms and Conditions</h3>
<p>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.</p>
<p>If you have any questions or concerns, please send an e-mail to <a href="mailto:team@freecodecamp.com" target="_blank">team@freecodecamp.com</a>.</p>
script.
var challengeName = 'Privacy';