feat: release rdbms on staging (#44576)
fix: unhide cert from settings page fix: add cert variables where missing fix: show token on settings page feat: add challenges to certified user data fix: stylize settings page a little bit fix: only show rdbms when upcomingChanges = true fix: relational databases -> relational database
This commit is contained in:
@ -200,6 +200,11 @@
|
||||
"description": "Camper is machine learning with Python certified",
|
||||
"default": false
|
||||
},
|
||||
"isRelationalDatabaseCertV8": {
|
||||
"type": "boolean",
|
||||
"description": "Camper is relational database certified",
|
||||
"default": false
|
||||
},
|
||||
"completedChallenges": {
|
||||
"type": [
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ const {
|
||||
sciCompPyV7Id,
|
||||
dataAnalysisPyV7Id,
|
||||
machineLearningPyV7Id,
|
||||
relationalDatabasesV8Id
|
||||
relationalDatabaseV8Id
|
||||
} = certIds;
|
||||
|
||||
const log = debug('fcc:certification');
|
||||
@ -128,8 +128,8 @@ function createCertTypeIds(allChallenges) {
|
||||
machineLearningPyV7Id,
|
||||
allChallenges
|
||||
),
|
||||
[certTypes.relationalDatabasesV8]: getCertById(
|
||||
relationalDatabasesV8Id,
|
||||
[certTypes.relationalDatabaseV8]: getCertById(
|
||||
relationalDatabaseV8Id,
|
||||
allChallenges
|
||||
)
|
||||
};
|
||||
@ -217,7 +217,8 @@ function getUserIsCertMap(user) {
|
||||
isFullStackCert = false,
|
||||
isSciCompPyCertV7 = false,
|
||||
isDataAnalysisPyCertV7 = false,
|
||||
isMachineLearningPyCertV7 = false
|
||||
isMachineLearningPyCertV7 = false,
|
||||
isRelationalDatabaseCertV8 = false
|
||||
} = user;
|
||||
|
||||
return {
|
||||
@ -235,7 +236,8 @@ function getUserIsCertMap(user) {
|
||||
isFullStackCert,
|
||||
isSciCompPyCertV7,
|
||||
isDataAnalysisPyCertV7,
|
||||
isMachineLearningPyCertV7
|
||||
isMachineLearningPyCertV7,
|
||||
isRelationalDatabaseCertV8
|
||||
};
|
||||
}
|
||||
|
||||
@ -378,6 +380,7 @@ function createShowCert(app) {
|
||||
isSciCompPyCertV7: true,
|
||||
isDataAnalysisPyCertV7: true,
|
||||
isMachineLearningPyCertV7: true,
|
||||
isRelationalDatabaseCertV8: true,
|
||||
isHonest: true,
|
||||
username: true,
|
||||
name: true,
|
||||
|
@ -394,10 +394,8 @@ function createCoderoadChallengeCompleted(app) {
|
||||
if (!userWebhookToken)
|
||||
return res.send(`'coderoad-user-token' not found in request headers`);
|
||||
|
||||
const tutorialRepoPath = tutorialId?.split(':')[0];
|
||||
const tutorialSplit = tutorialRepoPath?.split('/');
|
||||
const tutorialOrg = tutorialSplit?.[0];
|
||||
const tutorialRepoName = tutorialSplit?.[1];
|
||||
const tutorialRepo = tutorialId?.split(':')[0];
|
||||
const tutorialOrg = tutorialRepo?.split('/')?.[0];
|
||||
|
||||
// this allows any GH account to host the repo in development or staging
|
||||
// .org submissions should always be from repos hosted on the fCC GH org
|
||||
@ -408,7 +406,7 @@ function createCoderoadChallengeCompleted(app) {
|
||||
|
||||
// validate tutorial name is in codeRoadChallenges object
|
||||
const challenge = codeRoadChallenges.find(challenge =>
|
||||
challenge.url?.includes(tutorialRepoName)
|
||||
challenge.url?.endsWith(tutorialRepo)
|
||||
);
|
||||
|
||||
if (!challenge) return res.send('Tutorial name is not valid');
|
||||
|
@ -250,6 +250,7 @@ function postResetProgress(req, res, next) {
|
||||
isSciCompPyCertV7: false,
|
||||
isDataAnalysisPyCertV7: false,
|
||||
isMachineLearningPyCertV7: false,
|
||||
isRelationalDatabaseCertV8: false,
|
||||
completedChallenges: []
|
||||
},
|
||||
function (err) {
|
||||
|
@ -14,5 +14,5 @@
|
||||
"dataAnalysisPyV7": "isDataAnalysisPyCertV7",
|
||||
"machineLearningPyV7": "isMachineLearningPyCertV7",
|
||||
"fullStack": "isFullStackCert",
|
||||
"relationalDatabasesV8": "isRelationalDatabasesV8"
|
||||
"relationalDatabaseV8": "isRelationalDatabaseV8"
|
||||
}
|
||||
|
@ -9,7 +9,8 @@ function getCompletedCertCount(user) {
|
||||
'isRespWebDesignCert',
|
||||
'isSciCompPyCertV7',
|
||||
'isDataAnalysisPyCertV7',
|
||||
'isMachineLearningPyCertV7'
|
||||
'isMachineLearningPyCertV7',
|
||||
'isRelationalDatabaseCertV8'
|
||||
].reduce((sum, key) => (user[key] ? sum + 1 : sum), 0);
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@ export const publicUserProps = [
|
||||
'isQaCertV7',
|
||||
'isInfosecCertV7',
|
||||
'isJsAlgoDataStructCert',
|
||||
'isRelationalDatabaseCertV8',
|
||||
'isRespWebDesignCert',
|
||||
'isSciCompPyCertV7',
|
||||
'isDataAnalysisPyCertV7',
|
||||
|
@ -131,7 +131,8 @@ function getCompletedCertCount(user) {
|
||||
'isRespWebDesignCert',
|
||||
'isSciCompPyCertV7',
|
||||
'isDataAnalysisPyCertV7',
|
||||
'isMachineLearningPyCertV7'
|
||||
'isMachineLearningPyCertV7',
|
||||
'isRelationalDatabaseCertV8'
|
||||
].reduce((sum, key) => (user[key] ? sum + 1 : sum), 0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user