Merge branch 'master' of https://github.com/FreeCodeCamp/freecodecamp
commit
b84c514c29
2
app.js
2
app.js
|
@ -319,7 +319,7 @@ app.post('/completed-challenge', function (req, res) {
|
|||
var timestamp = req.user.challengesHash;
|
||||
var points = 0;
|
||||
for (var key in timestamp) {
|
||||
if (timestamp[key] > 0) {
|
||||
if (timestamp[key] > 0 && req.body.challengeNumber < 54) {
|
||||
points += 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,12 @@ var highestChallengeNumber = 53;
|
|||
|
||||
exports.returnChallenge = function(req, res, next) {
|
||||
var challengeNumber = parseInt(req.params.challengeNumber) || 0;
|
||||
if (challengeNumber > highestChallengeNumber) { challengeNumber = 0; }
|
||||
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."
|
||||
});
|
||||
return res.redirect('../challenges/0');
|
||||
}
|
||||
Challenge.find({}, null, { sort: { challengeNumber: 1 } }, function(err, c) {
|
||||
if (err) {
|
||||
debug('Challenge err: ', err);
|
||||
|
|
|
@ -16,7 +16,7 @@ exports.coursewareNames = function(req, res) {
|
|||
|
||||
exports.returnNextCourseware = function(req, res) {
|
||||
if (!req.user) {
|
||||
return res.redirect('coursewares/intro');
|
||||
return res.redirect('coursewares/start-our-challenges');
|
||||
}
|
||||
var completed = req.user.completedCoursewares.map(function (elem) {
|
||||
return elem._id;
|
||||
|
@ -41,7 +41,7 @@ exports.returnNextCourseware = function(req, res) {
|
|||
req.flash('errors', {
|
||||
msg: "It looks like you've completed all the courses we have available. Good job!"
|
||||
})
|
||||
return res.redirect('../coursewares/intro');
|
||||
return res.redirect('../coursewares/start-our-challenges');
|
||||
}
|
||||
nameString = courseware.name.toLowerCase().replace(/\s/g, '-');
|
||||
return res.redirect('../coursewares/' + nameString);
|
||||
|
|
|
@ -34,7 +34,6 @@ editor.setOption("extraKeys", {
|
|||
editor.setSize("100%", "auto");
|
||||
|
||||
var libraryIncludes = "<script src='//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>" +
|
||||
"<script>document.domain = 'localhost'</script>" +
|
||||
"<script src='/js/lib/chai/chai.js'></script>" +
|
||||
"<script src='/js/lib/chai/chai-jquery.js'></script>" +
|
||||
"<script src='//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js'></script>" +
|
|
@ -42,4 +42,4 @@ block content
|
|||
br
|
||||
ul#testSuite.list-group
|
||||
br
|
||||
script(src='/js/lib/bonfire/bonfireFramework.js')
|
||||
script(src='/js/lib/bonfire/bonfireFramework_v0.1.0.js')
|
|
@ -96,7 +96,7 @@ block content
|
|||
form.code
|
||||
.form-group.codeMirrorView
|
||||
textarea#codeEditor(autofocus=true)
|
||||
script(src='/js/lib/bonfire/bonfireFramework.js')
|
||||
script(src='/js/lib/bonfire/bonfireFramework_v0.1.0.js')
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -45,3 +45,5 @@ block content
|
|||
button.btn.btn-primary(type='submit', ng-disabled='nonprofitForm.$invalid')
|
||||
span.ion-paper-airplane
|
||||
| Submit
|
||||
script.
|
||||
var challengeName = 'Non-profit Interest'
|
|
@ -60,7 +60,7 @@ block content
|
|||
form.code
|
||||
.form-group.codeMirrorView
|
||||
textarea#codeEditor(autofocus=true)
|
||||
script(src='/js/lib/coursewares/coursewaresFramework.js')
|
||||
script(src='/js/lib/coursewares/coursewaresFramework_v0.1.0.js')
|
||||
.col-md-4.col-lg-3
|
||||
.hidden-xs.hidden-sm
|
||||
img.iphone-position(src="https://s3.amazonaws.com/freecodecamp/iphone6-frame.png")
|
||||
|
|
|
@ -85,3 +85,5 @@ block content
|
|||
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)
|
||||
script.
|
||||
challengeName = 'Home'
|
|
@ -1,5 +1,7 @@
|
|||
extends ../layout
|
||||
block content
|
||||
script.
|
||||
var challengeName = 'Learn to code'
|
||||
include ../partials/stats
|
||||
include ../partials/blog
|
||||
include ../partials/about
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue