fix(learn): versioning for new certificate slugs (#39087)
This commit is contained in:
committed by
GitHub
parent
b3d5cde75e
commit
6e5988da4e
@ -21,11 +21,11 @@ import {
|
||||
jsAlgoDataStructId,
|
||||
dataVis2018Id,
|
||||
apisMicroservicesId,
|
||||
qa2020Id,
|
||||
infosec2020Id,
|
||||
sciCompPy2020Id,
|
||||
dataAnalysisPy2020Id,
|
||||
machineLearningPy2020Id
|
||||
qaV7Id,
|
||||
infosecV7Id,
|
||||
sciCompPyV7Id,
|
||||
dataAnalysisPyV7Id,
|
||||
machineLearningPyV7Id
|
||||
} from '../utils/constantStrings.json';
|
||||
import { oldDataVizId } from '../../../config/misc';
|
||||
import certTypes from '../utils/certTypes.json';
|
||||
@ -117,15 +117,12 @@ function createCertTypeIds(app) {
|
||||
apisMicroservicesId,
|
||||
Challenge
|
||||
),
|
||||
[certTypes.qa2020]: getIdsForCert$(qa2020Id, Challenge),
|
||||
[certTypes.infosec2020]: getIdsForCert$(infosec2020Id, Challenge),
|
||||
[certTypes.sciCompPy2020]: getIdsForCert$(sciCompPy2020Id, Challenge),
|
||||
[certTypes.dataAnalysisPy2020]: getIdsForCert$(
|
||||
dataAnalysisPy2020Id,
|
||||
Challenge
|
||||
),
|
||||
[certTypes.machineLearningPy2020]: getIdsForCert$(
|
||||
machineLearningPy2020Id,
|
||||
[certTypes.qaV7]: getIdsForCert$(qaV7Id, Challenge),
|
||||
[certTypes.infosecV7]: getIdsForCert$(infosecV7Id, Challenge),
|
||||
[certTypes.sciCompPyV7]: getIdsForCert$(sciCompPyV7Id, Challenge),
|
||||
[certTypes.dataAnalysisPyV7]: getIdsForCert$(dataAnalysisPyV7Id, Challenge),
|
||||
[certTypes.machineLearningPyV7]: getIdsForCert$(
|
||||
machineLearningPyV7Id,
|
||||
Challenge
|
||||
)
|
||||
};
|
||||
@ -148,11 +145,11 @@ const certIds = {
|
||||
[certTypes.jsAlgoDataStruct]: jsAlgoDataStructId,
|
||||
[certTypes.dataVis2018]: dataVis2018Id,
|
||||
[certTypes.apisMicroservices]: apisMicroservicesId,
|
||||
[certTypes.qa2020]: qa2020Id,
|
||||
[certTypes.infosec2020]: infosec2020Id,
|
||||
[certTypes.sciCompPy2020]: sciCompPy2020Id,
|
||||
[certTypes.dataAnalysisPy2020]: dataAnalysisPy2020Id,
|
||||
[certTypes.machineLearningPy2020]: machineLearningPy2020Id
|
||||
[certTypes.qaV7]: qaV7Id,
|
||||
[certTypes.infosecV7]: infosecV7Id,
|
||||
[certTypes.sciCompPyV7]: sciCompPyV7Id,
|
||||
[certTypes.dataAnalysisPyV7]: dataAnalysisPyV7Id,
|
||||
[certTypes.machineLearningPyV7]: machineLearningPyV7Id
|
||||
};
|
||||
|
||||
const certText = {
|
||||
@ -166,11 +163,11 @@ const certText = {
|
||||
[certTypes.jsAlgoDataStruct]: 'JavaScript Algorithms and Data Structures',
|
||||
[certTypes.dataVis2018]: 'Data Visualization',
|
||||
[certTypes.apisMicroservices]: 'APIs and Microservices',
|
||||
[certTypes.qa2020]: 'Quality Assurance',
|
||||
[certTypes.infosec2020]: 'Information Security',
|
||||
[certTypes.sciCompPy2020]: 'Scientific Computing with Python',
|
||||
[certTypes.dataAnalysisPy2020]: 'Data Analysis with Python',
|
||||
[certTypes.machineLearningPy2020]: 'Machine Learning with Python'
|
||||
[certTypes.qaV7]: 'Quality Assurance',
|
||||
[certTypes.infosecV7]: 'Information Security',
|
||||
[certTypes.sciCompPyV7]: 'Scientific Computing with Python',
|
||||
[certTypes.dataAnalysisPyV7]: 'Data Analysis with Python',
|
||||
[certTypes.machineLearningPyV7]: 'Machine Learning with Python'
|
||||
};
|
||||
|
||||
const completionHours = {
|
||||
@ -184,11 +181,11 @@ const completionHours = {
|
||||
[certTypes.jsAlgoDataStruct]: 300,
|
||||
[certTypes.dataVis2018]: 300,
|
||||
[certTypes.apisMicroservices]: 300,
|
||||
[certTypes.qa2020]: 300,
|
||||
[certTypes.infosec2020]: 300,
|
||||
[certTypes.sciCompPy2020]: 400,
|
||||
[certTypes.dataAnalysisPy2020]: 400,
|
||||
[certTypes.machineLearningPy2020]: 400
|
||||
[certTypes.qaV7]: 300,
|
||||
[certTypes.infosecV7]: 300,
|
||||
[certTypes.sciCompPyV7]: 400,
|
||||
[certTypes.dataAnalysisPyV7]: 400,
|
||||
[certTypes.machineLearningPyV7]: 400
|
||||
};
|
||||
|
||||
function getIdsForCert$(id, Challenge) {
|
||||
@ -212,11 +209,11 @@ function sendCertifiedEmail(
|
||||
isJsAlgoDataStructCert,
|
||||
isDataVisCert,
|
||||
isApisMicroservicesCert,
|
||||
is2020QaCert,
|
||||
is2020InfosecCert,
|
||||
is2020SciCompPyCert,
|
||||
is2020DataAnalysisPyCert,
|
||||
is2020MachineLearningPyCert
|
||||
isQaCertV7,
|
||||
isInfosecCertV7,
|
||||
isSciCompPyCertV7,
|
||||
isDataAnalysisPyCertV7,
|
||||
isMachineLearningPyCertV7
|
||||
},
|
||||
send$
|
||||
) {
|
||||
@ -227,11 +224,11 @@ function sendCertifiedEmail(
|
||||
!isJsAlgoDataStructCert ||
|
||||
!isDataVisCert ||
|
||||
!isApisMicroservicesCert ||
|
||||
!is2020QaCert ||
|
||||
!is2020InfosecCert ||
|
||||
!is2020SciCompPyCert ||
|
||||
!is2020DataAnalysisPyCert ||
|
||||
!is2020MachineLearningPyCert
|
||||
!isQaCertV7 ||
|
||||
!isInfosecCertV7 ||
|
||||
!isSciCompPyCertV7 ||
|
||||
!isDataAnalysisPyCertV7 ||
|
||||
!isMachineLearningPyCertV7
|
||||
) {
|
||||
return Observable.just(false);
|
||||
}
|
||||
@ -259,15 +256,15 @@ function getUserIsCertMap(user) {
|
||||
is2018DataVisCert = false,
|
||||
isApisMicroservicesCert = false,
|
||||
isInfosecQaCert = false,
|
||||
is2020QaCert = false,
|
||||
is2020InfosecCert = false,
|
||||
isQaCertV7 = false,
|
||||
isInfosecCertV7 = false,
|
||||
isFrontEndCert = false,
|
||||
isBackEndCert = false,
|
||||
isDataVisCert = false,
|
||||
isFullStackCert = false,
|
||||
is2020SciCompPyCert = false,
|
||||
is2020DataAnalysisPyCert = false,
|
||||
is2020MachineLearningPyCert = false
|
||||
isSciCompPyCertV7 = false,
|
||||
isDataAnalysisPyCertV7 = false,
|
||||
isMachineLearningPyCertV7 = false
|
||||
} = user;
|
||||
|
||||
return {
|
||||
@ -277,15 +274,15 @@ function getUserIsCertMap(user) {
|
||||
is2018DataVisCert,
|
||||
isApisMicroservicesCert,
|
||||
isInfosecQaCert,
|
||||
is2020QaCert,
|
||||
is2020InfosecCert,
|
||||
isQaCertV7,
|
||||
isInfosecCertV7,
|
||||
isFrontEndCert,
|
||||
isBackEndCert,
|
||||
isDataVisCert,
|
||||
isFullStackCert,
|
||||
is2020SciCompPyCert,
|
||||
is2020DataAnalysisPyCert,
|
||||
is2020MachineLearningPyCert
|
||||
isSciCompPyCertV7,
|
||||
isDataAnalysisPyCertV7,
|
||||
isMachineLearningPyCertV7
|
||||
};
|
||||
}
|
||||
|
||||
@ -412,11 +409,11 @@ function createShowCert(app) {
|
||||
is2018DataVisCert: true,
|
||||
isApisMicroservicesCert: true,
|
||||
isInfosecQaCert: true,
|
||||
is2020QaCert: true,
|
||||
is2020InfosecCert: true,
|
||||
is2020SciCompPyCert: true,
|
||||
is2020DataAnalysisPyCert: true,
|
||||
is2020MachineLearningPyCert: true,
|
||||
isQaCertV7: true,
|
||||
isInfosecCertV7: true,
|
||||
isSciCompPyCertV7: true,
|
||||
isDataAnalysisPyCertV7: true,
|
||||
isMachineLearningPyCertV7: true,
|
||||
isHonest: true,
|
||||
username: true,
|
||||
name: true,
|
||||
|
@ -162,16 +162,16 @@ function postResetProgress(req, res, next) {
|
||||
isJsAlgoDataStructCert: false,
|
||||
isApisMicroservicesCert: false,
|
||||
isInfosecQaCert: false,
|
||||
is2020QaCert: false,
|
||||
is2020InfosecCert: false,
|
||||
isQaCertV7: false,
|
||||
isInfosecCertV7: false,
|
||||
is2018FullStackCert: false,
|
||||
isFrontEndCert: false,
|
||||
isBackEndCert: false,
|
||||
isDataVisCert: false,
|
||||
isFullStackCert: false,
|
||||
is2020SciCompPyCert: false,
|
||||
is2020DataAnalysisPyCert: false,
|
||||
is2020MachineLearningPyCert: false,
|
||||
isSciCompPyCertV7: false,
|
||||
isDataAnalysisPyCertV7: false,
|
||||
isMachineLearningPyCertV7: false,
|
||||
completedChallenges: []
|
||||
},
|
||||
function(err) {
|
||||
|
@ -8,10 +8,10 @@
|
||||
"jsAlgoDataStruct": "isJsAlgoDataStructCert",
|
||||
"apisMicroservices": "isApisMicroservicesCert",
|
||||
"infosecQa": "isInfosecQaCert",
|
||||
"qa2020": "is2020QaCert",
|
||||
"infosec2020": "is2020InfosecCert",
|
||||
"sciCompPy2020": "is2020SciCompPyCert",
|
||||
"dataAnalysisPy2020": "is2020DataAnalysisPyCert",
|
||||
"machineLearningPy2020": "is2020MachineLearningPyCert",
|
||||
"qaV7": "isQaCertV7",
|
||||
"infosecV7": "isInfosecCertV7",
|
||||
"sciCompPyV7": "isSciCompPyCertV7",
|
||||
"dataAnalysisPyV7": "isDataAnalysisPyCertV7",
|
||||
"machineLearningPyV7": "isMachineLearningPyCertV7",
|
||||
"fullStack": "isFullStackCert"
|
||||
}
|
||||
|
@ -18,11 +18,11 @@ export function completeCommitment$(user) {
|
||||
isDataVisCert,
|
||||
isApisMicroservicesCert,
|
||||
isInfosecQaCert,
|
||||
is2020QaCert,
|
||||
is2020InfosecCert,
|
||||
is2020SciCompPyCert,
|
||||
is2020DataAnalysisPyCert,
|
||||
is2020MachineLearningPyCert
|
||||
isQaCertV7,
|
||||
isInfosecCertV7,
|
||||
isSciCompPyCertV7,
|
||||
isDataAnalysisPyCertV7,
|
||||
isMachineLearningPyCertV7
|
||||
} = user;
|
||||
|
||||
return Observable.fromNodeCallback(user.pledge, user)().flatMap(pledge => {
|
||||
@ -42,12 +42,11 @@ export function completeCommitment$(user) {
|
||||
(isDataVisCert && goal === commitGoals.dataVisCert) ||
|
||||
(isApisMicroservicesCert && goal === commitGoals.apisMicroservicesCert) ||
|
||||
(isInfosecQaCert && goal === commitGoals.infosecQaCert) ||
|
||||
(is2020QaCert && goal === commitGoals.QaCert) ||
|
||||
(is2020InfosecCert && goal === commitGoals.infosecCert) ||
|
||||
(is2020SciCompPyCert && goal === commitGoals.sciCompPyCert) ||
|
||||
(is2020DataAnalysisPyCert && goal === commitGoals.dataAnalysisPyCert) ||
|
||||
(is2020MachineLearningPyCert &&
|
||||
goal === commitGoals.machineLearningPyCert)
|
||||
(isQaCertV7 && goal === commitGoals.QaCert) ||
|
||||
(isInfosecCertV7 && goal === commitGoals.infosecCert) ||
|
||||
(isSciCompPyCertV7 && goal === commitGoals.sciCompPyCert) ||
|
||||
(isDataAnalysisPyCertV7 && goal === commitGoals.dataAnalysisPyCert) ||
|
||||
(isMachineLearningPyCertV7 && goal === commitGoals.machineLearningPyCert)
|
||||
) {
|
||||
debug('marking goal complete');
|
||||
pledge.isCompleted = true;
|
||||
|
@ -12,9 +12,9 @@
|
||||
"dataVis2018Id": "5a553ca864b52e1d8bceea14",
|
||||
"jsAlgoDataStructId": "561abd10cb81ac38a17513bc",
|
||||
"apisMicroservicesId": "561add10cb82ac38a17523bc",
|
||||
"qa2020Id": "5e611829481575a52dc59c0e",
|
||||
"infosec2020Id": "5e6021435ac9d0ecd8b94b00",
|
||||
"sciCompPy2020Id": "5e44431b903586ffb414c951",
|
||||
"dataAnalysisPy2020Id": "5e46fc95ac417301a38fb934",
|
||||
"machineLearningPy2020Id": "5e46fc95ac417301a38fb935"
|
||||
"qaV7Id": "5e611829481575a52dc59c0e",
|
||||
"infosecV7Id": "5e6021435ac9d0ecd8b94b00",
|
||||
"sciCompPyV7Id": "5e44431b903586ffb414c951",
|
||||
"dataAnalysisPyV7Id": "5e46fc95ac417301a38fb934",
|
||||
"machineLearningPyV7Id": "5e46fc95ac417301a38fb935"
|
||||
}
|
||||
|
@ -3,13 +3,13 @@ function getCompletedCertCount(user) {
|
||||
'isApisMicroservicesCert',
|
||||
'is2018DataVisCert',
|
||||
'isFrontEndLibsCert',
|
||||
'is2020QaCert',
|
||||
'is2020InfosecCert',
|
||||
'isQaCertV7',
|
||||
'isInfosecCertV7',
|
||||
'isJsAlgoDataStructCert',
|
||||
'isRespWebDesignCert',
|
||||
'is2020SciCompPyCert',
|
||||
'is2020DataAnalysisPyCert',
|
||||
'is2020MachineLearningPyCert'
|
||||
'isSciCompPyCertV7',
|
||||
'isDataAnalysisPyCertV7',
|
||||
'isMachineLearningPyCertV7'
|
||||
].reduce((sum, key) => (user[key] ? sum + 1 : sum), 0);
|
||||
}
|
||||
|
||||
|
@ -23,13 +23,13 @@ export const publicUserProps = [
|
||||
'isFrontEndLibsCert',
|
||||
'isHonest',
|
||||
'isInfosecQaCert',
|
||||
'is2020QaCert',
|
||||
'is2020InfosecCert',
|
||||
'isQaCertV7',
|
||||
'isInfosecCertV7',
|
||||
'isJsAlgoDataStructCert',
|
||||
'isRespWebDesignCert',
|
||||
'is2020SciCompPyCert',
|
||||
'is2020DataAnalysisPyCert',
|
||||
'is2020MachineLearningPyCert',
|
||||
'isSciCompPyCertV7',
|
||||
'isDataAnalysisPyCertV7',
|
||||
'isMachineLearningPyCertV7',
|
||||
'linkedin',
|
||||
'location',
|
||||
'name',
|
||||
|
@ -16,11 +16,11 @@ const superBlockCertTypeMap = {
|
||||
'front-end-libraries': certTypes.frontEndLibs,
|
||||
'data-visualization': certTypes.dataVis2018,
|
||||
'apis-and-microservices': certTypes.apisMicroservices,
|
||||
'2020-quality-assurance': certTypes.qa2020,
|
||||
'2020-information-security': certTypes.infosec2020,
|
||||
'2020-scientific-computing-with-python': certTypes.sciCompPy2020,
|
||||
'2020-data-analysis-with-python': certTypes.dataAnalysisPy2020,
|
||||
'2020-machine-learning-with-python': certTypes.machineLearningPy2020
|
||||
'quality-assurance-v7': certTypes.qaV7,
|
||||
'information-security-v7': certTypes.infosecV7,
|
||||
'scientific-computing-with-python-v7': certTypes.sciCompPyV7,
|
||||
'data-analysis-with-python-v7': certTypes.dataAnalysisPyV7,
|
||||
'machine-learning-with-python-v7': certTypes.machineLearningPyV7
|
||||
};
|
||||
|
||||
export default superBlockCertTypeMap;
|
||||
|
@ -142,13 +142,13 @@ function getCompletedCertCount(user) {
|
||||
'isApisMicroservicesCert',
|
||||
'is2018DataVisCert',
|
||||
'isFrontEndLibsCert',
|
||||
'is2020QaCert',
|
||||
'is2020InfosecCert',
|
||||
'isQaCertV7',
|
||||
'isInfosecCertV7',
|
||||
'isJsAlgoDataStructCert',
|
||||
'isRespWebDesignCert',
|
||||
'is2020SciCompPyCert',
|
||||
'is2020DataAnalysisPyCert',
|
||||
'is2020MachineLearningPyCert'
|
||||
'isSciCompPyCertV7',
|
||||
'isDataAnalysisPyCertV7',
|
||||
'isMachineLearningPyCertV7'
|
||||
].reduce((sum, key) => (user[key] ? sum + 1 : sum), 0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user