update copy of certificate flows

This commit is contained in:
Quincy Larson
2015-10-05 17:18:35 -07:00
parent fc17e266fb
commit 34efc43f6a
4 changed files with 49 additions and 15 deletions

View File

@ -9,21 +9,33 @@
{ {
"properties": ["isHonest", "isFrontEndCert"], "properties": ["isHonest", "isFrontEndCert"],
"apis": ["/certificate/honest", "/certificate/verify/front-end"], "apis": ["/certificate/honest", "/certificate/verify/front-end"],
"stepIndex": [0, 1] "stepIndex": [1, 2]
} }
], ],
"description": [ "description": [
[ [
"http://i.imgur.com/RlEk2IF.jpg", "http://i.imgur.com/luMkKst.jpg",
"a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", "An image of our Front End Development Certificate",
"Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", "This challenge will give you your verified Front End Development Certificate. Before we issue your certificate, we must verify that you have completed all of our basic and intermediate Bonfires, and all our basic and intermediate Ziplines. You must also accept our Academic Honesty Pledge. Click the button below to start this process.",
""
],
[
"http://i.imgur.com/HArFfMN.jpg",
"The definition of plagiarism: Plagiarism (noun) - copying someone elses work and presenting it as your own without crediting them",
"By clicking below, you pledge that all of your submitted code A) is code you or your pair personally wrote, or B) comes from open source libraries like jQuery, or C) has been clearly attributed to its original authors. You also give us permission to audit your challenge solutions and revoke your certificate if we discover evidence of plagiarism.",
"#" "#"
], ],
[ [
"http://i.imgur.com/RlEk2IF.jpg", "http://i.imgur.com/14F2Van.jpg",
"a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", "An image of the text \"Front End Development Certificate requirements\"",
"Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", "Let's confirm that you have completed all of our basic and intermediate Bonfires, and all our basic and intermediate Ziplines. Click the button below to verify this.",
"#" "#"
],
[
"http://i.imgur.com/16SIhHO.jpg",
"An image of the word \"Congratulations\"",
"Congratulations! We've added your Front End Development Certificate to your certificate to your portfolio page. Unless you choose to hide your solutions, this certificate will remain publicly visible and verifiable.",
""
] ]
], ],
"type": "Waypoint", "type": "Waypoint",

View File

@ -10,21 +10,33 @@
{ {
"properties": ["isHonest", "isFullStackCert"], "properties": ["isHonest", "isFullStackCert"],
"apis": ["/certificate/honest", "/certificate/verify/full-stack"], "apis": ["/certificate/honest", "/certificate/verify/full-stack"],
"stepIndex": [0, 1] "stepIndex": [1, 2]
} }
], ],
"description": [ "description": [
[ [
"http://i.imgur.com/RlEk2IF.jpg", "http://i.imgur.com/qXublEe.jpg",
"a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", "An image of our Full Stack Development Certificate",
"Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", "This challenge will give you your verified Full Stack Development Certificate. Before we issue your certificate, we must verify that you have completed all of Bonfires, Ziplines and Basejumps. You must also accept our Academic Honesty Pledge. Click the button below to start this process.",
""
],
[
"http://i.imgur.com/HArFfMN.jpg",
"The definition of plagiarism: Plagiarism (noun) - copying someone elses work and presenting it as your own without crediting them",
"By clicking below, you pledge that all of your submitted code A) is code you or your pair personally wrote, or B) comes from open source libraries like jQuery, or C) has been clearly attributed to its original authors. You also give us permission to audit your challenge solutions and revoke your certificate if we discover evidence of plagiarism.",
"#" "#"
], ],
[ [
"http://i.imgur.com/RlEk2IF.jpg", "http://i.imgur.com/2qn7tHp.jpg",
"a picture of Free Code Camp's 4 benefits: Get connected, Learn JavaScript, Build your Portfolio, Help nonprofits", "An image of the text \"Full Stack Development Certificate requirements\"",
"Welcome to Free Code Camp. We're an open source community of busy people who learn to code and help nonprofits.", "Let's confirm that you have completed all of our Bonfires, Ziplines and Basejumps. Click the button below to verify this.",
"#" "#"
],
[
"http://i.imgur.com/16SIhHO.jpg",
"An image of the word \"Congratulations\"",
"Congratulations! We've added your Full Stack Development Certificate to your certificate to your portfolio page. Unless you choose to hide your solutions, this certificate will remain publicly visible and verifiable.",
""
] ]
], ],
"type": "Waypoint", "type": "Waypoint",

View File

@ -91,8 +91,16 @@ export default function certificate(app) {
debug('certified'); debug('certified');
if (isFront) { if (isFront) {
user.isFrontEndCert = true; user.isFrontEndCert = true;
user.completedChallenges.push({
completedDate: new Date(),
id: frontEndChallangeId
})
} else { } else {
user.isFullStackCert = true; user.isFullStackCert = true;
user.completedChallenges.push({
completedDate: new Date(),
id: fullStackChallangeId
})
} }
return saveUser(user); return saveUser(user);
} }

View File

@ -275,7 +275,9 @@ module.exports = function(app) {
!showFront && user.isFullStackCert !showFront && user.isFullStackCert
) { ) {
var { completedDate } = _.find(user.completedChallenges, { var { completedDate } = _.find(user.completedChallenges, {
id: '561add10cb82ac38a17513be' id: showFront ?
'561add10cb82ac38a17513be' :
'660add10cb82ac38a17513be'
}); });
return res.render( return res.render(