mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(client): allow 10 question quizzes (#58432)
This commit is contained in:
@@ -176,7 +176,7 @@ const ShowQuiz = ({
|
||||
correct: t('learn.quiz.correct-answer'),
|
||||
incorrect: t('learn.quiz.incorrect-answer')
|
||||
},
|
||||
passingGrade: 85,
|
||||
passingGrade: 90,
|
||||
onSuccess: () => {
|
||||
openCompletionModal(), setIsPassed(true);
|
||||
},
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-advanced-react
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-asynchronous-javascript
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-bash-and-sql
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-bash-commands
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-bash-scripting
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-basic-css
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-basic-html
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-computer-basics
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-accessibility
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-animations
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-attribute-selectors
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-backgrounds-and-borders
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-colors
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-flexbox
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-grid
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-layout-and-effects
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-libraries-and-frameworks
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-positioning
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-pseudo-classes
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-relative-and-absolute-units
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-typography
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-css-variables
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-debugging-javascript
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-design-fundamentals
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-dom-manipulation-and-click-event-with-javascript
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-form-validation-with-javascript
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-git
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-html-accessibility
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-html-tables-and-forms
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-arrays
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-audio-and-video
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-classes
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-comparisons-and-conditionals
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-dates
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-events
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-functional-programming
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-functions
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-fundamentals
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-higher-order-functions
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-loops
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-maps-and-sets
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-math
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-objects
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-regular-expressions
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-strings
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-javascript-variables-and-data-types
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-local-storage-and-crud
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-nano
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-react-basics
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-react-state-and-hooks
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-recursion
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-relational-database
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-responsive-web-design
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-semantic-html
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-styling-forms
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-testing
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-typescript
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: quiz-web-performance
|
||||
|
||||
# --description--
|
||||
|
||||
To pass the quiz, you must correctly answer at least 17 of the 20 questions below.
|
||||
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
|
||||
|
||||
# --quizzes--
|
||||
|
||||
|
||||
@@ -112,7 +112,14 @@ const quizJoi = Joi.object().keys({
|
||||
answer: Joi.string().required()
|
||||
})
|
||||
)
|
||||
.length(20)
|
||||
.custom((value, helpers) => {
|
||||
return value.length === 10 || value.length === 20
|
||||
? value
|
||||
: helpers.error('array.invalidLength');
|
||||
})
|
||||
.messages({
|
||||
'array.invalidLength': 'Quiz must have exactly 10 or 20 questions.'
|
||||
})
|
||||
.required()
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user