Skip to content

Commit 1e08e9e

Browse files
feat: adds David's custom quiz (code-differently#139)
Co-authored-by: DavisD. <[email protected]> Co-authored-by: Anthony D. Mays <[email protected]>
1 parent a562f3e commit 1e08e9e

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ quiz:
5050
- $2y$10$FquR69q7W4E68TX/SNCB7u8Ri0DOFRDqsUPdGfuyIBjZJRVFkNI.6
5151
- $2y$10$FSWRA7hulVpyVxd8s67Nxuq/1cdmviW24qqoUbqihBf79cR.w9yly
5252
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
53+
davisdarius:
54+
- $2y$10$s9Dh1bJak9WjT3sziuq1KeloNnDCuhgjsT6HA.m/fxjJSrJMK0lOu
55+
- $2y$10$Q58g8gsWhL1Zhje9WoLHKuqF44I3NK16i..EQ2SYVAa.PEkowhgOK
56+
- $2y$10$U3eJ/7JtxbPlofL.3K08AeKmVTKWLvyhNCcS.cgF6gNn/cmm5Psia
5357
awatanana:
5458
- $2y$10$uFNj.ocmiXzuuNrZUoIL/OPDaNcu/39W9.BsAZ6zuN7QZLjHik8VG
5559
- $2y$10$TSqcVRhLIrH319zzXZJCMO9TY/Oz4IU96ZBEVk36y98DiwDSZun9G
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
55
import { DylanLaffertyQuiz } from './dylan_lafferty_quiz.js';
66
import { ChanelHuttQuiz } from './Chanel_Huttquiz.js';
77
import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js';
8+
import { DavisDQuiz } from './davisd_quiz.js';
89
import { EvanPhilakhongQuiz } from './evan_philakhong_quiz.js';
910
import { EzraQuiz } from './ezra_quiz.js';
1011
import { JasonWatsonQuiz } from './jason_watson_quiz.js';
@@ -38,6 +39,7 @@ const QUIZ_PROVIDERS = [
3839
KhaylaSaundersQuiz,
3940
DylanLaffertyQuiz,
4041
RasheedMillerQuiz,
42+
DavisDQuiz,
4143
AnanatawaQuiz,
4244
OliviaJamesQuiz,
4345
ChanelHuttQuiz,

0 commit comments

Comments
 (0)