fix(certs): add year to certs introduced in 2020 (#38912)
This commit is contained in:
committed by
GitHub
parent
32a443d1c9
commit
a02ff7b08e
@ -202,11 +202,11 @@ function sendCertifiedEmail(
|
||||
isJsAlgoDataStructCert,
|
||||
isDataVisCert,
|
||||
isApisMicroservicesCert,
|
||||
isQaCert,
|
||||
isInfosecCert,
|
||||
isSciCompPyCert,
|
||||
isDataAnalysisPyCert,
|
||||
isMachineLearningPyCert
|
||||
is2020QaCert,
|
||||
is2020InfosecCert,
|
||||
is2020SciCompPyCert,
|
||||
is2020DataAnalysisPyCert,
|
||||
is2020MachineLearningPyCert
|
||||
},
|
||||
send$
|
||||
) {
|
||||
@ -217,11 +217,11 @@ function sendCertifiedEmail(
|
||||
!isJsAlgoDataStructCert ||
|
||||
!isDataVisCert ||
|
||||
!isApisMicroservicesCert ||
|
||||
!isQaCert ||
|
||||
!isInfosecCert ||
|
||||
!isSciCompPyCert ||
|
||||
!isDataAnalysisPyCert ||
|
||||
!isMachineLearningPyCert
|
||||
!is2020QaCert ||
|
||||
!is2020InfosecCert ||
|
||||
!is2020SciCompPyCert ||
|
||||
!is2020DataAnalysisPyCert ||
|
||||
!is2020MachineLearningPyCert
|
||||
) {
|
||||
return Observable.just(false);
|
||||
}
|
||||
@ -249,15 +249,15 @@ function getUserIsCertMap(user) {
|
||||
is2018DataVisCert = false,
|
||||
isApisMicroservicesCert = false,
|
||||
isInfosecQaCert = false,
|
||||
isQaCert = false,
|
||||
isInfosecCert = false,
|
||||
is2020QaCert = false,
|
||||
is2020InfosecCert = false,
|
||||
isFrontEndCert = false,
|
||||
isBackEndCert = false,
|
||||
isDataVisCert = false,
|
||||
isFullStackCert = false,
|
||||
isSciCompPyCert = false,
|
||||
isDataAnalysisPyCert = false,
|
||||
isMachineLearningPyCert = false
|
||||
is2020SciCompPyCert = false,
|
||||
is2020DataAnalysisPyCert = false,
|
||||
is2020MachineLearningPyCert = false
|
||||
} = user;
|
||||
|
||||
return {
|
||||
@ -267,15 +267,15 @@ function getUserIsCertMap(user) {
|
||||
is2018DataVisCert,
|
||||
isApisMicroservicesCert,
|
||||
isInfosecQaCert,
|
||||
isQaCert,
|
||||
isInfosecCert,
|
||||
is2020QaCert,
|
||||
is2020InfosecCert,
|
||||
isFrontEndCert,
|
||||
isBackEndCert,
|
||||
isDataVisCert,
|
||||
isFullStackCert,
|
||||
isSciCompPyCert,
|
||||
isDataAnalysisPyCert,
|
||||
isMachineLearningPyCert
|
||||
is2020SciCompPyCert,
|
||||
is2020DataAnalysisPyCert,
|
||||
is2020MachineLearningPyCert
|
||||
};
|
||||
}
|
||||
|
||||
@ -396,11 +396,11 @@ function createShowCert(app) {
|
||||
is2018DataVisCert: true,
|
||||
isApisMicroservicesCert: true,
|
||||
isInfosecQaCert: true,
|
||||
isQaCert: true,
|
||||
isInfosecCert: true,
|
||||
isSciCompPyCert: true,
|
||||
isDataAnalysisPyCert: true,
|
||||
isMachineLearningPyCert: true,
|
||||
is2020QaCert: true,
|
||||
is2020InfosecCert: true,
|
||||
is2020SciCompPyCert: true,
|
||||
is2020DataAnalysisPyCert: true,
|
||||
is2020MachineLearningPyCert: true,
|
||||
isHonest: true,
|
||||
username: true,
|
||||
name: true,
|
||||
|
@ -162,16 +162,16 @@ function postResetProgress(req, res, next) {
|
||||
isJsAlgoDataStructCert: false,
|
||||
isApisMicroservicesCert: false,
|
||||
isInfosecQaCert: false,
|
||||
isQaCert: false,
|
||||
isInfosecCert: false,
|
||||
is2020QaCert: false,
|
||||
is2020InfosecCert: false,
|
||||
is2018FullStackCert: false,
|
||||
isFrontEndCert: false,
|
||||
isBackEndCert: false,
|
||||
isDataVisCert: false,
|
||||
isFullStackCert: false,
|
||||
isSciCompPyCert: false,
|
||||
isDataAnalysisPyCert: false,
|
||||
isMachineLearningPyCert: false,
|
||||
is2020SciCompPyCert: false,
|
||||
is2020DataAnalysisPyCert: false,
|
||||
is2020MachineLearningPyCert: false,
|
||||
completedChallenges: []
|
||||
},
|
||||
function(err) {
|
||||
|
@ -8,10 +8,10 @@
|
||||
"jsAlgoDataStruct": "isJsAlgoDataStructCert",
|
||||
"apisMicroservices": "isApisMicroservicesCert",
|
||||
"infosecQa": "isInfosecQaCert",
|
||||
"qa": "isQaCert",
|
||||
"infosec": "isInfosecCert",
|
||||
"qa": "is2020QaCert",
|
||||
"infosec": "is2020InfosecCert",
|
||||
"fullStack": "isFullStackCert",
|
||||
"sciCompPy": "isSciCompPyCert",
|
||||
"dataAnalysisPy": "isDataAnalysisPyCert",
|
||||
"machineLearningPy": "isMachineLearningPyCert"
|
||||
"sciCompPy": "is2020SciCompPyCert",
|
||||
"dataAnalysisPy": "is2020DataAnalysisPyCert",
|
||||
"machineLearningPy": "is2020MachineLearningPyCert"
|
||||
}
|
||||
|
@ -18,11 +18,11 @@ export function completeCommitment$(user) {
|
||||
isDataVisCert,
|
||||
isApisMicroservicesCert,
|
||||
isInfosecQaCert,
|
||||
isQaCert,
|
||||
isInfosecCert,
|
||||
isSciCompPyCert,
|
||||
isDataAnalysisPyCert,
|
||||
isMachineLearningPyCert
|
||||
is2020QaCert,
|
||||
is2020InfosecCert,
|
||||
is2020SciCompPyCert,
|
||||
is2020DataAnalysisPyCert,
|
||||
is2020MachineLearningPyCert
|
||||
} = user;
|
||||
|
||||
return Observable.fromNodeCallback(user.pledge, user)().flatMap(pledge => {
|
||||
@ -42,11 +42,12 @@ export function completeCommitment$(user) {
|
||||
(isDataVisCert && goal === commitGoals.dataVisCert) ||
|
||||
(isApisMicroservicesCert && goal === commitGoals.apisMicroservicesCert) ||
|
||||
(isInfosecQaCert && goal === commitGoals.infosecQaCert) ||
|
||||
(isQaCert && goal === commitGoals.QaCert) ||
|
||||
(isInfosecCert && goal === commitGoals.infosecCert) ||
|
||||
(isSciCompPyCert && goal === commitGoals.sciCompPyCert) ||
|
||||
(isDataAnalysisPyCert && goal === commitGoals.dataAnalysisPyCert) ||
|
||||
(isMachineLearningPyCert && goal === commitGoals.machineLearningPyCert)
|
||||
(is2020QaCert && goal === commitGoals.QaCert) ||
|
||||
(is2020InfosecCert && goal === commitGoals.infosecCert) ||
|
||||
(is2020SciCompPyCert && goal === commitGoals.sciCompPyCert) ||
|
||||
(is2020DataAnalysisPyCert && goal === commitGoals.dataAnalysisPyCert) ||
|
||||
(is2020MachineLearningPyCert &&
|
||||
goal === commitGoals.machineLearningPyCert)
|
||||
) {
|
||||
debug('marking goal complete');
|
||||
pledge.isCompleted = true;
|
||||
|
@ -3,13 +3,13 @@ function getCompletedCertCount(user) {
|
||||
'isApisMicroservicesCert',
|
||||
'is2018DataVisCert',
|
||||
'isFrontEndLibsCert',
|
||||
'isQaCert',
|
||||
'isInfosecCert',
|
||||
'is2020QaCert',
|
||||
'is2020InfosecCert',
|
||||
'isJsAlgoDataStructCert',
|
||||
'isRespWebDesignCert',
|
||||
'isSciCompPyCert',
|
||||
'isDataAnalysisPyCert',
|
||||
'isMachineLearningPyCert'
|
||||
'is2020SciCompPyCert',
|
||||
'is2020DataAnalysisPyCert',
|
||||
'is2020MachineLearningPyCert'
|
||||
].reduce((sum, key) => (user[key] ? sum + 1 : sum), 0);
|
||||
}
|
||||
|
||||
|
@ -23,13 +23,13 @@ export const publicUserProps = [
|
||||
'isFrontEndLibsCert',
|
||||
'isHonest',
|
||||
'isInfosecQaCert',
|
||||
'isQaCert',
|
||||
'isInfosecCert',
|
||||
'is2020QaCert',
|
||||
'is2020InfosecCert',
|
||||
'isJsAlgoDataStructCert',
|
||||
'isRespWebDesignCert',
|
||||
'isSciCompPyCert',
|
||||
'isDataAnalysisPyCert',
|
||||
'isMachineLearningPyCert',
|
||||
'is2020SciCompPyCert',
|
||||
'is2020DataAnalysisPyCert',
|
||||
'is2020MachineLearningPyCert',
|
||||
'linkedin',
|
||||
'location',
|
||||
'name',
|
||||
|
@ -142,13 +142,13 @@ function getCompletedCertCount(user) {
|
||||
'isApisMicroservicesCert',
|
||||
'is2018DataVisCert',
|
||||
'isFrontEndLibsCert',
|
||||
'isQaCert',
|
||||
'isInfosecCert',
|
||||
'is2020QaCert',
|
||||
'is2020InfosecCert',
|
||||
'isJsAlgoDataStructCert',
|
||||
'isRespWebDesignCert',
|
||||
'isSciCompPyCert',
|
||||
'isDataAnalysisPyCert',
|
||||
'isMachineLearningPyCert'
|
||||
'is2020SciCompPyCert',
|
||||
'is2020DataAnalysisPyCert',
|
||||
'is2020MachineLearningPyCert'
|
||||
].reduce((sum, key) => (user[key] ? sum + 1 : sum), 0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user