chore(curriculum) : add temp lab challenge type (#57441)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Anna
2024-12-12 08:40:08 +01:00
committed by GitHub
co-authored by Oliver Eyton-Williams
parent a2f3fadacc
commit 31ab782280
52 changed files with 64 additions and 61 deletions
@@ -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 (
<div className='desktop-layout' data-playwright-test-label='desktop-layout'>
{(projectBasedChallenge || isMultifileCertProject) && (
{(projectBasedChallenge || isMultifileProject) && (
<ActionRow
hasPreview={hasPreview}
hasNotes={!!notes}
@@ -1,7 +1,7 @@
---
id: 66b36358ed4f261d64840c24
title: Build an Availability Table
challengeType: 14
challengeType: 25
dashedName: build-an-availability-table
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 6718d2d59337c822ecb697ff
title: Build a Bank Account Management Program
challengeType: 14
challengeType: 25
dashedName: build-a-bank-account-management-program
---
@@ -1,7 +1,7 @@
---
id: 66eaddd04a9e533fba689001
title: Design a Blog Post Card
challengeType: 14
challengeType: 25
dashedName: lab-blog-post-card
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66ec4c8e9878d8441956516f
title: Build a Book Catalog Table
challengeType: 14
challengeType: 25
dashedName: build-a-book-catalog-table
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66a207974c806a19d6607073
title: Build a Book Inventory App
challengeType: 14
challengeType: 25
dashedName: build-a-book-inventory-app
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 67172b43f84bcd2dec238a3d
title: Build a Book Organizer
challengeType: 14
challengeType: 25
dashedName: build-a-book-organizer
---
@@ -1,7 +1,7 @@
---
id: 66def5467aee701733aaf8cc
title: Build a Bookmark Manager App
challengeType: 14
challengeType: 25
dashedName: build-a-bookmark-manager-app
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 6690e10ebe2181212abc9652
title: Design a Business Card
challengeType: 14
challengeType: 25
dashedName: design-a-business-card
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66da326c02141df538f29ba5
title: Build a Checkout Page
challengeType: 14
challengeType: 25
dashedName: build-a-checkout-page
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66bba6fff611169359d9d36a
title: Build a Confidential Email Page
challengeType: 14
challengeType: 25
dashedName: build-a-confidential-email-page
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66f26c32ec6f90df01a44f60
title: Design a Contact Form
challengeType: 14
challengeType: 25
dashedName: design-a-contact-form
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66f686b8ebdb982fa8e14330
title: Build a Date Conversion Program
challengeType: 14
challengeType: 25
dashedName: lab-date-conversion
---
@@ -1,7 +1,7 @@
---
id: 66b205e6eacba4c4e54ea434
title: Build an Email Masker
challengeType: 14
challengeType: 25
dashedName: build-an-email-masker
---
@@ -1,7 +1,7 @@
---
id: 66e45c8140f9fda5c105ae26
title: Build an Event Flyer Page
challengeType: 14
challengeType: 25
dashedName: build-an-event-flyer-page
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66ebd4ae2812430bb883c787
title: Build an Event Hub
challengeType: 14
challengeType: 25
dashedName: lab-event-hub
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66c07238b01053abaf812065
title: Build a Factorial Calculator
challengeType: 14
challengeType: 25
dashedName: build-a-factorial-calculator
---
@@ -1,7 +1,7 @@
---
id: 66bf6bacf178eac7b96d4f5e
title: Build a Favorite Icon Toggler
challengeType: 14
challengeType: 25
dashedName: build-a-favorite-icon-toggler
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66e7ee20b79186306fc12da5
title: Build a Set of Football Team Cards
challengeType: 14
challengeType: 25
dashedName: lab-football-team-cards
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66c06d618d075c7f7f1b890a
title: Build a Fortune Teller
challengeType: 14
challengeType: 25
dashedName: build-a-fortune-teller
---
@@ -1,7 +1,7 @@
---
id: 66bb6a9c2dd58b73cd759034
title: Build a Gradebook App
challengeType: 14
challengeType: 25
dashedName: build-a-gradebook-app
---
@@ -1,7 +1,7 @@
---
id: 66d6a7a3e1aa411e94bf2346
title: Build a House Painting
challengeType: 14
challengeType: 25
dashedName: build-a-house-painting
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66d75dd0aa65a71600dc669b
title: Build an Inventory Management Program
challengeType: 14
challengeType: 25
dashedName: build-an-inventory-management-program
---
@@ -1,7 +1,7 @@
---
id: 66ed41f912d0bb1dc62da5dd
title: Build a JavaScript Trivia Bot
challengeType: 14
challengeType: 25
dashedName: lab-javascript-trivia-bot
---
@@ -1,7 +1,7 @@
---
id: 66faac4139dbbd5dd632c860
title: Build a Job Application Form
challengeType: 14
challengeType: 25
dashedName: lab-job-application-form
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66c06fad3475cd92421b9ac2
title: Build a Leap Year Calculator
challengeType: 14
challengeType: 25
dashedName: build-a-leap-year-calculator
---
@@ -1,7 +1,7 @@
---
id: 66db57ad34c7089b9b41bfd6
title: Build a Lightbox Viewer
challengeType: 14
challengeType: 25
dashedName: build-a-lightbox-viewer
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66db529d37ad966480ebb633
title: Build a Lunch Picker Program
challengeType: 14
challengeType: 25
dashedName: build-a-lunch-picker-program
---
@@ -1,7 +1,7 @@
---
id: 66f55eac933ff64ce654ca74
title: Build a Markdown to HTML Converter
challengeType: 14
challengeType: 25
dashedName: build-a-markdown-to-html-converter
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66a37f37ef5823a313de8c26
title: Build a Moon Orbit
challengeType: 14
challengeType: 25
dashedName: build-a-moon-orbit
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66ba762af611169359d9d369
title: Build a Newspaper Article
challengeType: 14
challengeType: 25
dashedName: build-a-newspaper-article
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66be24cb4144f955b6bcc550
title: Build a Page of Playing Cards
challengeType: 14
challengeType: 25
dashedName: build-a-page-of-playing-cards
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 657bdc55a322aae1eac3838f
title: Build a Palindrome Checker
challengeType: 14
challengeType: 25
dashedName: build-a-palindrome-checker
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66fe4f33a2cc9b33f4d5cd9b
title: Build a Permutation Generator
challengeType: 14
challengeType: 25
dashedName: build-a-permutation-generator
---
@@ -1,7 +1,7 @@
---
id: bd7158d8c242eddfaeb5bd13
title: Build a Personal Portfolio
challengeType: 14
challengeType: 25
dashedName: build-a-personal-portfolio
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 587d78af367417b2b2512b04
title: Build a Product Landing Page
challengeType: 14
challengeType: 25
dashedName: build-a-product-landing-page
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 67051431a73f1ca25d9a6f25
title: Build a Project Idea Board
challengeType: 14
challengeType: 25
dashedName: build-a-project-idea-board
---
@@ -1,7 +1,7 @@
---
id: 66f2836c459cfb16ae76f24f
title: Build a Pyramid Generator
challengeType: 14
challengeType: 25
dashedName: lab-pyramid-generator
---
@@ -1,7 +1,7 @@
---
id: 66f17db06803d11a1bd19a20
title: Build a Quiz Game
challengeType: 14
challengeType: 25
dashedName: lab-quiz-game
---
@@ -1,7 +1,7 @@
---
id: 66b62d0ad68488dd76228d6c
title: Debug a Random Background Color Changer
challengeType: 14
challengeType: 25
dashedName: debug-a-random-background-color-changer
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66bb3e20d3dc5b6d0a21f5dd
title: Build a Real Time Counter
challengeType: 14
challengeType: 25
dashedName: build-a-real-time-counter
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 668f08ea07b99b1f4a91acab
title: Build a Recipe Page
challengeType: 14
challengeType: 25
dashedName: build-a-recipe-page
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66e028680eca7d21db7e1aee
title: Build a RegEx Sandbox
challengeType: 14
challengeType: 25
dashedName: lab-regex-sandbox
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 66c057041df6394ca796bf33
title: Build a Sentence Maker
challengeType: 14
challengeType: 25
dashedName: build-a-sentence-maker
---
@@ -1,7 +1,7 @@
---
id: 66c051d13a6a20255a963695
title: Build a Stylized To-Do list
challengeType: 14
challengeType: 25
dashedName: build-a-stylized-to-do-list
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 587d78af367417b2b2512b03
title: Build a Survey Form
challengeType: 14
challengeType: 25
dashedName: build-a-survey-form
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: 587d78b0367417b2b2512b05
title: Build a Technical Documentation Page
challengeType: 14
challengeType: 25
demoType: onClick
dashedName: build-a-technical-documentation-page
---
@@ -1,7 +1,7 @@
---
id: 669e2f60e83c011754f711f9
title: Build a Travel Agency Page
challengeType: 14
challengeType: 25
dashedName: build-a-travel-agency-page
demoType: onClick
---
@@ -1,7 +1,7 @@
---
id: bd7158d8c442eddfaeb5bd18
title: Build a Tribute Page
challengeType: 14
challengeType: 25
demoType: onClick
dashedName: build-a-tribute-page
---
@@ -1,7 +1,7 @@
---
id: 669e81368e52b3a5c35a2dc5
title: Build a Video Compilation Page
challengeType: 14
challengeType: 25
dashedName: build-a-video-compilation-page
demoType: onClick
---
+1 -1
View File
@@ -145,7 +145,7 @@ const schema = Joi.object()
otherwise: Joi.optional()
}),
certification: Joi.string().regex(slugWithSlashRE),
challengeType: Joi.number().min(0).max(24).required(),
challengeType: Joi.number().min(0).max(25).required(),
checksum: Joi.number(),
// TODO: require this only for normal challenges, not certs
dashedName: Joi.string().regex(slugRE),
+7 -3
View File
@@ -24,6 +24,7 @@ const dialogue = 21;
const fillInTheBlank = 22;
const multifilePythonCertProject = 23;
const generic = 24;
const lab = 25;
export const challengeTypes = {
html,
@@ -51,7 +52,8 @@ export const challengeTypes = {
dialogue,
fillInTheBlank,
multifilePythonCertProject,
generic
generic,
lab
};
export const hasNoSolution = (challengeType: number): boolean => {
@@ -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'
};