Skip to content

Commit bb21eb8

Browse files
authored
feat: adds quiz questions for Shawn (#113)
* Created quiz questions * Registered My Quiz in the quizzes.modules.ts file * Fixed question errors.
1 parent 957d515 commit bb21eb8

File tree

3 files changed

+69
-1
lines changed

3 files changed

+69
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ quiz:
1515
- $2y$10$9D.oRC8h/PD/10NMSR6MMOzjVAJKm.vfw4te8Rxgw1M1.0Q9x8pjK
1616
- $2y$10$ypLhtfxJikRhLaQdW0Y8GOEqO/X1uoBD8w.kSSSUPggBa9wHLkw0i
1717
- $2y$10$cYuji5D0xOEFAV2fyMaJAuaODeWEwIYu.X3089qnojdx3nQljil5G
18-
dasiaenglish:
18+
dasiaenglish:
1919
- $2y$10$ANtdDzA0GAqn/QeExPO/Du8LgHUwznRLxpv0W0ib2seYk23BZowOC
2020
- $2y$10$6vAkOUmpPrUtWrh010f8e.A4M9kEzuzCrQ8ghWI9hQSEsZeGHpQ9W
2121
- $2y$10$YYTJf2QW.BJST9EUB7NZneVpNkOywIfhsWRpxIsPBg/oTmgqoYWse
@@ -44,3 +44,7 @@ quiz:
4444
- $2y$10$sqXEOL0L8o0kRyiAb.2s4u0RlBC2.LmOGDbGWXHj5IfBNwinkv2yq
4545
- $2y$10$HaWueXgrIzd7z8yf39HfVeTjjyr.Kgx0GFBqwCRSzW3zRSreN19yi
4646

47+
shawndunsmore:
48+
- $2y$10$Kpde4LAfDyEhgWezFoI5texc53Sge6QQs8y5hR8DA7zHfyK8It5LW
49+
- $2y$10$T061IZuccoHb2XGjaICB/Olchf62DqrSDVIE0TE9Q9qidfLAL7sHS
50+
- $2y$10$T061IZuccoHb2XGjaICB/Olchf62DqrSDVIE0TE9Q9qidfLAL7sHS

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { DasiaEnglishQuiz } from './dasia_english_quiz.js';
88
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
99
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
1010
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
11+
import { ShawnDunsmoreQuiz } from './shawn_dunsmore_quiz.js';
1112
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
1213
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';
1314

@@ -22,6 +23,7 @@ const QUIZ_PROVIDERS = [
2223
JosephCaballeroQuiz,
2324
AngelicaCQuiz,
2425
OyeyemiJimohQuiz,
26+
ShawnDunsmoreQuiz,
2527
DasiaEnglishQuiz,
2628
ChigazoGrahamsQuiz,
2729
AmiyahJonesQuiz,
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 ShawnDunsmoreQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'shawndunsmore';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
ShawnDunsmoreQuiz.makeQuestion0(),
16+
ShawnDunsmoreQuiz.makeQuestion1(),
17+
ShawnDunsmoreQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is Davids Favorite Color?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Idc'],
27+
[AnswerChoice.B, 'Blue'],
28+
[AnswerChoice.C, 'Black'],
29+
[AnswerChoice.D, 'Whatever you think it is.'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'What is Jordan famous for?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Photography'],
41+
[AnswerChoice.B, 'Being short'],
42+
[AnswerChoice.C, 'Pickleball'],
43+
[AnswerChoice.D, 'Trampoline Dunking.'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'How mnay states are there?',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, '50'],
55+
[AnswerChoice.B, '35'],
56+
[AnswerChoice.C, '20'],
57+
[AnswerChoice.D, '65'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
); // Replace `UNANSWERED` with the correct answer.
61+
}
62+
}

0 commit comments

Comments
 (0)