From 31ab782280f2f6e98da971cde5154629c2a8eb5a Mon Sep 17 00:00:00 2001 From: Anna Date: Thu, 12 Dec 2024 02:40:08 -0500 Subject: [PATCH] chore(curriculum) : add temp lab challenge type (#57441) Co-authored-by: Oliver Eyton-Williams --- .../Challenges/classic/desktop-layout.tsx | 15 +++++++-------- .../66b36358ed4f261d64840c24.md | 2 +- .../6718d2d59337c822ecb697ff.md | 2 +- .../66eaddd04a9e533fba689001.md | 2 +- .../66ec4c8e9878d8441956516f.md | 2 +- .../66a207974c806a19d6607073.md | 2 +- .../67172b43f84bcd2dec238a3d.md | 2 +- .../66def5467aee701733aaf8cc.md | 2 +- .../lab-business-card/6690e10ebe2181212abc9652.md | 2 +- .../lab-checkout-page/66da326c02141df538f29ba5.md | 2 +- .../66bba6fff611169359d9d36a.md | 2 +- .../lab-contact-form/66f26c32ec6f90df01a44f60.md | 2 +- .../66f686b8ebdb982fa8e14330.md | 2 +- .../lab-email-masker/66b205e6eacba4c4e54ea434.md | 2 +- .../66e45c8140f9fda5c105ae26.md | 2 +- .../lab-event-hub/66ebd4ae2812430bb883c787.md | 2 +- .../66c07238b01053abaf812065.md | 2 +- .../66bf6bacf178eac7b96d4f5e.md | 2 +- .../66e7ee20b79186306fc12da5.md | 2 +- .../66c06d618d075c7f7f1b890a.md | 2 +- .../lab-gradebook-app/66bb6a9c2dd58b73cd759034.md | 2 +- .../66d6a7a3e1aa411e94bf2346.md | 2 +- .../66d75dd0aa65a71600dc669b.md | 2 +- .../66ed41f912d0bb1dc62da5dd.md | 2 +- .../66faac4139dbbd5dd632c860.md | 2 +- .../66c06fad3475cd92421b9ac2.md | 2 +- .../66db57ad34c7089b9b41bfd6.md | 2 +- .../66db529d37ad966480ebb633.md | 2 +- .../66f55eac933ff64ce654ca74.md | 2 +- .../lab-moon-orbit/66a37f37ef5823a313de8c26.md | 2 +- .../66ba762af611169359d9d369.md | 2 +- .../66be24cb4144f955b6bcc550.md | 2 +- .../657bdc55a322aae1eac3838f.md | 2 +- .../66fe4f33a2cc9b33f4d5cd9b.md | 2 +- .../bd7158d8c242eddfaeb5bd13.md | 2 +- .../587d78af367417b2b2512b04.md | 2 +- .../67051431a73f1ca25d9a6f25.md | 2 +- .../66f2836c459cfb16ae76f24f.md | 2 +- .../lab-quiz-game/66f17db06803d11a1bd19a20.md | 2 +- .../66b62d0ad68488dd76228d6c.md | 2 +- .../66bb3e20d3dc5b6d0a21f5dd.md | 2 +- .../lab-recipe-page/668f08ea07b99b1f4a91acab.md | 2 +- .../lab-regex-sandbox/66e028680eca7d21db7e1aee.md | 2 +- .../66c057041df6394ca796bf33.md | 2 +- .../66c051d13a6a20255a963695.md | 2 +- .../lab-survey-form/587d78af367417b2b2512b03.md | 2 +- .../587d78b0367417b2b2512b05.md | 2 +- .../669e2f60e83c011754f711f9.md | 2 +- .../lab-tribute-page/bd7158d8c442eddfaeb5bd18.md | 2 +- .../669e81368e52b3a5c35a2dc5.md | 2 +- curriculum/schema/challenge-schema.js | 2 +- shared/config/challenge-types.ts | 10 +++++++--- 52 files changed, 64 insertions(+), 61 deletions(-) diff --git a/client/src/templates/Challenges/classic/desktop-layout.tsx b/client/src/templates/Challenges/classic/desktop-layout.tsx index f9fb294b0ba..0353a51f9e9 100644 --- a/client/src/templates/Challenges/classic/desktop-layout.tsx +++ b/client/src/templates/Challenges/classic/desktop-layout.tsx @@ -169,21 +169,20 @@ const DesktopLayout = (props: DesktopLayoutProps): JSX.Element => { const challengeFile = getChallengeFile(); const projectBasedChallenge = hasEditableBoundaries; - const isMultifileCertProject = + const isMultifileProject = challengeType === challengeTypes.multifileCertProject || - challengeType === challengeTypes.multifilePythonCertProject; + challengeType === challengeTypes.multifilePythonCertProject || + challengeType == challengeTypes.lab; const displayPreviewPane = hasPreview && showPreviewPane; const displayPreviewPortal = hasPreview && showPreviewPortal; const displayNotes = projectBasedChallenge ? showNotes && !!notes : false; - const displayEditorConsole = !( - projectBasedChallenge || isMultifileCertProject - ) + const displayEditorConsole = !(projectBasedChallenge || isMultifileProject) ? true : false; const displayPreviewConsole = - (projectBasedChallenge || isMultifileCertProject) && showConsole; + (projectBasedChallenge || isMultifileProject) && showConsole; const hasVerticalResizableCodePane = - !isMultifileCertProject && !projectBasedChallenge; + !isMultifileProject && !projectBasedChallenge; const { codePane, editorPane, @@ -198,7 +197,7 @@ const DesktopLayout = (props: DesktopLayoutProps): JSX.Element => { return (
- {(projectBasedChallenge || isMultifileCertProject) && ( + {(projectBasedChallenge || isMultifileProject) && ( { @@ -105,7 +107,8 @@ export const viewTypes = { [dialogue]: 'generic', [fillInTheBlank]: 'fillInTheBlank', [multifilePythonCertProject]: 'classic', - [generic]: 'generic' + [generic]: 'generic', + [lab]: 'classic' }; // determine the type of submit function to use for the challenge on completion @@ -137,5 +140,6 @@ export const submitTypes = { [dialogue]: 'tests', [fillInTheBlank]: 'tests', [multifilePythonCertProject]: 'tests', - [generic]: 'tests' + [generic]: 'tests', + [lab]: 'tests' };