Skip to content

Commit 37b9489

Browse files
feat(quiz): add Jaizel's quiz and update quiz configuration (#141)
* feat(quiz): add Jaizel's quiz and update quiz configuration - Created with quiz questions and answers - Updated to include new quiz - Modified to register the quiz * chore: update quiz.yaml configuration --------- Co-authored-by: Anthony D. Mays <[email protected]>
1 parent 36e3638 commit 37b9489

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ quiz:
6262
- $2y$10$FMRsdjEhIG0anbZOIcVvSOy4e4eFTZGIYYyATChwc.QRMpWuomR5C
6363
- $2y$10$0AQW/94c4pPxp8xIhJUIs.qoLnUuQg/Hwe1vd4975K96EKGEPz.H6
6464
- $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W
65+
jaizel_quiz:
66+
- $2y$10$l0gz8cPuUAV/fPCz1eZPLuceO/ea4VzwVY2e4VkjWjkjMh785XOaa
67+
- $2y$10$ESuiNYZk3LoPpwXWWI9HuOAW1UkMXvihaXb1FbOgMyUzmxD1EmcUe
68+
- $2y$10$pwNF2IjXoEXS7VnuiQI23O3/i4AmT7e5KUYTrtm3ewJdb.vFpNxTy
6569
evanderblue:
6670
- $2y$10$jrzJya6WaaYok/vLLHxkSuZR/DxlaKZwFfbLZ0ecoVLL2Xh6yjyDq
6771
- $2y$10$Z1ZuoK050bRTVDb3X/xkcuw1pGQvKGkhoLVqmVABTTOwcJPjsIOG6
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class JaizelQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'jaizel_quiz';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
JaizelQuiz.makeQuestion0(),
16+
JaizelQuiz.makeQuestion1(),
17+
JaizelQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is TypeScript?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'A superset of JavaScript that adds static typing'],
27+
[AnswerChoice.B, 'A completely different language from JavaScript'],
28+
[AnswerChoice.C, 'A JavaScript runtime environment'],
29+
[AnswerChoice.D, 'A JavaScript framework like React or Angular'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
);
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'Which of the following is NOT a valid way to declare a variable in JavaScript?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'var x = 10;'],
41+
[AnswerChoice.B, 'let x = 10;'],
42+
[AnswerChoice.C, 'const x = 10;'],
43+
[AnswerChoice.D, 'static x = 10;'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
);
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'What is an Interface in TypeScript?',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, 'A way to define a contract for object structure'],
55+
[AnswerChoice.B, 'A tool for bundling TypeScript code'],
56+
[AnswerChoice.C, 'A special type of JavaScript class'],
57+
[AnswerChoice.D, 'A method for importing external modules'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
);
61+
}
62+
}

lesson_03/quiz/src/quizzes/quizzes.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
1111
import { TaliaCrockettQuiz } from './talia_crockett_quiz.js';
1212
import { TrinitieJacksonQuiz } from './trinitie_jackson_quiz.js';
1313
import { TyranRicesQuiz } from './tyran_rices_quiz.js';
14+
import { JaizelQuiz } from './jaizel_quiz.js';
1415
import { DevynBensonQuiz } from './devyn_benson_quiz.js';
1516
import { MarthaOQuiz } from './martha_o_quiz.js';
1617
import { LindaQuinoaQuiz } from './linda_quinoa_quiz.js';
@@ -32,6 +33,7 @@ const QUIZ_PROVIDERS = [
3233
MattieWeathersbyQuiz,
3334
BenjaminScottQuiz,
3435
DanielsonAdjocyQuiz,
36+
JaizelQuiz,
3537
DanielBoyceQuiz,
3638
LindaQuinoaQuiz,
3739
TaliaCrockettQuiz,

0 commit comments

Comments
 (0)