feat: add framework for rwd cert projects (#44505)
* feat: add rwd cert projects feat: save projects with flag revert: not needed things revert: empty line revert: empty line fix: it fix: remove log * fix: snapshot tests * fix: show bread crumbs by default * revert: snapshot fix * Update curriculum/challenges/_meta/responsive-web-design-projects/meta.json Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> * fix: manuallyApproved -> isManuallyApproved * fix: add review suggestions Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ const invalid = 9;
|
||||
const pythonProject = 10;
|
||||
const video = 11;
|
||||
const codeally = 12;
|
||||
const multiFileCertProject = 14;
|
||||
|
||||
// individual exports
|
||||
exports.backend = backend;
|
||||
@@ -33,7 +34,8 @@ exports.challengeTypes = {
|
||||
quiz,
|
||||
invalid,
|
||||
video,
|
||||
codeally
|
||||
codeally,
|
||||
multiFileCertProject
|
||||
};
|
||||
|
||||
// (Oliver) I don't think we need this for codeally projects, so they're ignored
|
||||
@@ -67,7 +69,8 @@ exports.viewTypes = {
|
||||
[quiz]: 'quiz',
|
||||
[backend]: 'backend',
|
||||
[video]: 'video',
|
||||
[codeally]: 'codeally'
|
||||
[codeally]: 'codeally',
|
||||
[multiFileCertProject]: 'classic'
|
||||
};
|
||||
|
||||
// determine the type of submit function to use for the challenge on completion
|
||||
@@ -87,7 +90,8 @@ exports.submitTypes = {
|
||||
[quiz]: 'quiz',
|
||||
[backend]: 'backend',
|
||||
[modern]: 'tests',
|
||||
[video]: 'tests'
|
||||
[video]: 'tests',
|
||||
[multiFileCertProject]: 'tests'
|
||||
};
|
||||
|
||||
// determine which help forum questions should be posted to
|
||||
|
@@ -2,7 +2,7 @@ const path = require('path');
|
||||
const { createPoly } = require('../../../utils/polyvinyl');
|
||||
const { dasherize } = require('../../../utils/slugs');
|
||||
const { sortChallengeFiles } = require('../../../utils/sort-challengefiles');
|
||||
const { viewTypes } = require('../challenge-types');
|
||||
const { challengeTypes, viewTypes } = require('../challenge-types');
|
||||
|
||||
const backend = path.resolve(
|
||||
__dirname,
|
||||
@@ -102,7 +102,8 @@ exports.createChallengePages = function (createPage) {
|
||||
};
|
||||
|
||||
function getProjectPreviewConfig(challenge, allChallengeEdges) {
|
||||
const { block, challengeOrder, usesMultifileEditor } = challenge;
|
||||
const { block, challengeOrder, challengeType, usesMultifileEditor } =
|
||||
challenge;
|
||||
|
||||
const challengesInBlock = allChallengeEdges
|
||||
.filter(({ node: { challenge } }) => challenge.block === block)
|
||||
@@ -122,7 +123,10 @@ function getProjectPreviewConfig(challenge, allChallengeEdges) {
|
||||
);
|
||||
|
||||
return {
|
||||
showProjectPreview: challengeOrder === 0 && usesMultifileEditor,
|
||||
showProjectPreview:
|
||||
challengeOrder === 0 &&
|
||||
usesMultifileEditor &&
|
||||
challengeType !== challengeTypes.multiFileCertProject,
|
||||
challengeData: {
|
||||
challengeType: lastChallenge.challengeType,
|
||||
challengeFiles: projectPreviewChallengeFiles,
|
||||
|
Reference in New Issue
Block a user