Skip to content

Commit 354ffe9

Browse files
committed
Feat: davisd_quiz
1 parent d7940e1 commit 354ffe9

File tree

3 files changed

+71
-4
lines changed

3 files changed

+71
-4
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ quiz:
2626
- $2y$10$FquR69q7W4E68TX/SNCB7u8Ri0DOFRDqsUPdGfuyIBjZJRVFkNI.6
2727
- $2y$10$FSWRA7hulVpyVxd8s67Nxuq/1cdmviW24qqoUbqihBf79cR.w9yly
2828
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
29+
davisdarius:
30+
- $2y$10$s9Dh1bJak9WjT3sziuq1KeloNnDCuhgjsT6HA.m/fxjJSrJMK0lOu
31+
- $2y$10$Q58g8gsWhL1Zhje9WoLHKuqF44I3NK16i..EQ2SYVAa.PEkowhgOK
32+
- $2y$10$U3eJ/7JtxbPlofL.3K08AeKmVTKWLvyhNCcS.cgF6gNn/cmm5Psia
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class DavisDQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'davisdarius';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
DavisDQuiz.makeQuestion0(),
16+
DavisDQuiz.makeQuestion1(),
17+
DavisDQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What should you not be doing during a Tech Talk?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Talk Amongst Friends'],
27+
[AnswerChoice.B, 'Take Notes'],
28+
[AnswerChoice.C, 'Ask speaker questions'],
29+
[AnswerChoice.D, 'Be attentive'],
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+
'3 Levels of Tech Talk',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Push, Pull, Punch'],
41+
[AnswerChoice.B, 'Pay, Listen, Persuade'],
42+
[AnswerChoice.C, 'Purpose, Prep, Show-up'],
43+
]),
44+
AnswerChoice.UNANSWERED,
45+
); // Provide an answer.
46+
}
47+
48+
private static makeQuestion2(): QuizQuestion {
49+
return new MultipleChoiceQuizQuestion(
50+
2,
51+
'During Tech Talks should you be marketing yourself to secure a job?',
52+
new Map<AnswerChoice, string>([
53+
[AnswerChoice.A, 'No'],
54+
[AnswerChoice.B, 'Yes'],
55+
[AnswerChoice.C, 'Maybe'],
56+
[AnswerChoice.D, 'IDK'],
57+
]),
58+
AnswerChoice.UNANSWERED,
59+
); // Provide an answer.
60+
}
61+
}

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4-
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
4+
import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js';
5+
import { DavisDQuiz } from './davisd_quiz.js';
56
import { Jbeyquiz } from './jbeyquiz.js';
7+
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
68
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
7-
import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js';
89
import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
910

1011
export const Quizzes = Symbol.for('Quizzes');
1112

1213
// Add your quiz provider here.
1314
const QUIZ_PROVIDERS = [
1415
AnthonyMaysQuiz,
15-
AnotherQuiz,
16-
MeikoStephensQuiz ,
16+
AnotherQuiz,
17+
MeikoStephensQuiz,
1718
MercedesMathewsQuiz,
1819
Jbeyquiz,
1920
DavidAdenaikeQuiz,
2021
RasheedMillerQuiz,
22+
DavisDQuiz,
2123
];
2224

2325
@Module({

0 commit comments

Comments
 (0)