Skip to content

Commit f1def88

Browse files
feat: adds Talia's custom quiz (#113)
* feat(quiz): create custom quiz in TypeScript and update quiz.yaml & quizzes.module.ts * fix: adds missing comma between BenjaminScottQuiz and TaliaCrockettQuiz in QUIZ_PROVIDERS --------- Co-authored-by: Anthony D. Mays <[email protected]>
1 parent 233ff97 commit f1def88

File tree

3 files changed

+76
-2
lines changed

3 files changed

+76
-2
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ quiz:
3030
brooklynharden:
3131
- $2y$10$FMRsdjEhIG0anbZOIcVvSOy4e4eFTZGIYYyATChwc.QRMpWuomR5C
3232
- $2y$10$0AQW/94c4pPxp8xIhJUIs.qoLnUuQg/Hwe1vd4975K96EKGEPz.H6
33-
- $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W
33+
- $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W
34+
taliacrockett:
35+
- $2y$10$Q/lb7miLQrsy9D5j/4FE/.DZAzQ4BkIWk8BUKjjaIg2OLRS9v1/cC
36+
- $2y$10$MWsUIECL5NP2p/8RbbDWv.Mi6shrjwRtHFMwd/zpmKuCNVSAZXd/e
37+
- $2y$10$VjopdAwacAcQ718VRrjNJOLHVQ1oTql58p.wfpo3P4jYOkHQAL88W
3438
dean_walston_25_2:
3539
- $2y$10$avH4Adz6z900VAKHK3p0bunDaJBPPckhVzdJ1XWbp/oK3myHl8LMC
3640
- $2y$10$YTgMZYzNVpbjywYu2DvyZOHjtIIjyFj1gyjI5sGLPxjl91s7FHRGO

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import { AnotherQuiz } from './another_quiz.js';
44
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
55
import { KerryFergusonQuiz } from './kerry_ferguson_quiz.js';
66
import { BenjaminScottQuiz } from './benjamin_scott_quiz.js';
7+
import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
8+
import { TaliaCrockettQuiz } from './talia_crockett_quiz.js';
79
import { TrinitieJacksonQuiz } from './trinitie_jackson_quiz.js';
810
import { TyranRicesQuiz } from './tyran_rices_quiz.js';
9-
import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
1011
import { DeanWalstonQuiz } from './dean_walston_quiz.js';
1112

1213
export const Quizzes = Symbol.for('Quizzes');
@@ -20,6 +21,7 @@ const QUIZ_PROVIDERS = [
2021
AnotherQuiz,
2122
BenjaminScottQuiz,
2223
DanielsonAdjocyQuiz,
24+
TaliaCrockettQuiz,
2325
DeanWalstonQuiz,
2426
KerryFergusonQuiz,
2527
];
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class TaliaCrockettQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'taliacrockett';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
TaliaCrockettQuiz.makeQuestion0(),
16+
TaliaCrockettQuiz.makeQuestion1(),
17+
TaliaCrockettQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is an HTML element?',
25+
new Map<AnswerChoice, string>([
26+
[
27+
AnswerChoice.A,
28+
'The smallest building block of a web page, defined by a start tag, content, and an end tag.',
29+
],
30+
[
31+
AnswerChoice.B,
32+
'A tool used to store images and videos on the internet.',
33+
],
34+
[AnswerChoice.C, 'A type of programming loop used in JavaScript.'],
35+
[AnswerChoice.D, 'A style rule written in CSS.'],
36+
]),
37+
AnswerChoice.UNANSWERED,
38+
); // Replace `UNANSWERED` with the correct answer.
39+
}
40+
41+
private static makeQuestion1(): QuizQuestion {
42+
return new MultipleChoiceQuizQuestion(
43+
1,
44+
'What does HTML stand for?',
45+
new Map<AnswerChoice, string>([
46+
[AnswerChoice.A, 'Hyper Text Markup Language'],
47+
[AnswerChoice.B, 'High Technology Modern Language'],
48+
[AnswerChoice.C, 'Home Tool Markup Language'],
49+
[AnswerChoice.D, 'Hyperlink and Text Management Language'],
50+
]),
51+
AnswerChoice.UNANSWERED,
52+
); // Replace `UNANSWERED` with the correct answer.
53+
}
54+
55+
private static makeQuestion2(): QuizQuestion {
56+
return new MultipleChoiceQuizQuestion(
57+
2,
58+
'What is the correct HTML element for inserting a line break?',
59+
new Map<AnswerChoice, string>([
60+
[AnswerChoice.A, '<break>'],
61+
[AnswerChoice.B, '<lb>'],
62+
[AnswerChoice.C, '<br>'],
63+
[AnswerChoice.D, '<b>'],
64+
]),
65+
AnswerChoice.UNANSWERED,
66+
); // Replace `UNANSWERED` with the correct answer.
67+
}
68+
}

0 commit comments

Comments
 (0)