add verified flag to challenges so we can tell which ziplines and basejumps have been verified
This commit is contained in:
@ -253,7 +253,8 @@ exports.completedCourseware = function (req, res, next) {
|
||||
completedDate: isCompletedDate,
|
||||
name: req.body.coursewareInfo.coursewareName,
|
||||
solution: null,
|
||||
githubLink: null
|
||||
githubLink: null,
|
||||
verified: true
|
||||
});
|
||||
var index = req.user.completedCoursewares.indexOf(coursewareHash);
|
||||
|
||||
@ -307,7 +308,8 @@ exports.completedZiplineOrBasejump = function (req, res, next) {
|
||||
completedWith: pairedWith._id,
|
||||
completedDate: isCompletedDate,
|
||||
solution: solutionLink,
|
||||
githubLink: githubLink
|
||||
githubLink: githubLink,
|
||||
verified: false
|
||||
});
|
||||
|
||||
req.user.save(function (err, user) {
|
||||
@ -333,7 +335,8 @@ exports.completedZiplineOrBasejump = function (req, res, next) {
|
||||
completedWith: req.user._id,
|
||||
completedDate: isCompletedDate,
|
||||
solution: solutionLink,
|
||||
githubLink: githubLink
|
||||
githubLink: githubLink,
|
||||
verified: false
|
||||
});
|
||||
pairedWith.save(function (err, paired) {
|
||||
if (err) {
|
||||
@ -353,7 +356,8 @@ exports.completedZiplineOrBasejump = function (req, res, next) {
|
||||
completedWith: null,
|
||||
completedDate: isCompletedDate,
|
||||
solution: solutionLink,
|
||||
githubLink: githubLink
|
||||
githubLink: githubLink,
|
||||
verified: false
|
||||
});
|
||||
|
||||
var index = req.user.uncompletedCoursewares.indexOf(coursewareHash);
|
||||
|
@ -118,8 +118,7 @@ $(document).ready(function() {
|
||||
{
|
||||
coursewareInfo: {
|
||||
coursewareHash: passedCoursewareHash,
|
||||
coursewareName: passedCoursewareName,
|
||||
verified: true
|
||||
coursewareName: passedCoursewareName
|
||||
}
|
||||
}).success(
|
||||
function(res) {
|
||||
@ -140,8 +139,7 @@ $(document).ready(function() {
|
||||
coursewareName: passedCoursewareName,
|
||||
completedWith: didCompleteWith,
|
||||
publicURL: publicURL,
|
||||
challengeType: challengeType,
|
||||
verified: false
|
||||
challengeType: challengeType
|
||||
}
|
||||
}).success(
|
||||
function() {
|
||||
|
@ -97,7 +97,7 @@ block content
|
||||
| Try it out
|
||||
|
||||
.hidden-xs.col-sm-12
|
||||
#cal-heatmap.img-center.hidden
|
||||
#cal-heatmap.img-center
|
||||
script(src="//d3js.org/d3.v3.min.js")
|
||||
script(src="//cdn.jsdelivr.net/cal-heatmap/3.3.10/cal-heatmap.min.js")
|
||||
link(rel="stylesheet", href="//cdn.jsdelivr.net/cal-heatmap/3.3.10/cal-heatmap.css")
|
||||
@ -119,16 +119,8 @@ block content
|
||||
legendColors: ["#cccccc", "#215f1e"],
|
||||
legend: [1, 2, 3]
|
||||
});
|
||||
.row
|
||||
.hidden-xs.col-sm-12.text-center
|
||||
.row
|
||||
h3.col-sm-6.text-center
|
||||
.center-block.
|
||||
#{longestStreak}
|
||||
.center-block.
|
||||
Longest Streak
|
||||
h3.col-sm-6.text-center
|
||||
.center-block.
|
||||
#{currentStreak}
|
||||
.center-block.
|
||||
Current Streak
|
||||
.row
|
||||
.hidden-xs.col-sm-12.text-center
|
||||
.row
|
||||
h3.col-sm-6.text-right Longest Streak: #{longestStreak}
|
||||
h3.col-sm-6.text-left Current Streak #{currentStreak}
|
||||
|
@ -1,6 +1,8 @@
|
||||
script(src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js")
|
||||
script(src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.11/angular.min.js")
|
||||
script(src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.0/ui-bootstrap-tpls.min.js")
|
||||
script(src="//d3js.org/d3.v3.min.js")
|
||||
script(src="//cdn.jsdelivr.net/cal-heatmap/3.3.10/cal-heatmap.min.js")
|
||||
include meta
|
||||
title #{title} | Free Code Camp
|
||||
meta(charset='utf-8')
|
||||
@ -14,4 +16,4 @@ script.
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', 'UA-55446531-1', 'auto');
|
||||
ga('require', 'displayfeatures');
|
||||
ga('send', 'pageview');
|
||||
ga('send', 'pageview');
|
||||
|
Reference in New Issue
Block a user