Skip to content

Commit b1a2159

Browse files
feat: adds Bryana's custom quiz (#101)
* finished creating test * Fixed Import on Quiz * changes to quiz * chore: removes extra space * chore: restores UNANSWERED responses Signed-off-by: Anthony D. Mays <[email protected]> --------- Signed-off-by: Anthony D. Mays <[email protected]> Co-authored-by: Anthony D. Mays <[email protected]> Co-authored-by: Anthony D. Mays <[email protected]>
1 parent b48e5b2 commit b1a2159

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

lesson_03/quiz/quiz.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ quiz:
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9+
bryanasingletonbarnhart:
10+
- $2y$10$1mLxFIqlwiKqivImNbEYE.khunzQLkqDL/40Yj39J6vJA0rLfwDuK
11+
- $2y$10$sIjoP0Jqf5apX3Uk2tdy0.yt..CIanJbbDIA7Y98KtUSNd4iq4oRO
12+
- $2y$10$rMn2M8gyKNbFmH4zTvGwrOlJJ4Jp.CtQBr1nYNTKuMYZ4wXK13bOq
913
ezraquiz:
1014
- $2y$10$fisFjMsmMwzlj3.PELyBNeupdruYROU00dwq296pg0VfHo05SSkta
1115
- $2y$10$.Z44VoTaxQSdPEx7RatO6OVCw1ff6ohS0kZnCrHEcFnElIgkfjP0u
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 Bryanasingletonbarnhart implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'bryanasingletonbarnhart';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
Bryanasingletonbarnhart.makeQuestion0(),
16+
Bryanasingletonbarnhart.makeQuestion1(),
17+
Bryanasingletonbarnhart.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'Which component is consider the brain?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Case'],
27+
[AnswerChoice.B, 'Power Supply'],
28+
[AnswerChoice.C, 'CPU'],
29+
[AnswerChoice.D, 'Motherboard'],
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 does SDD stand for?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Same Day Delivery'],
41+
[AnswerChoice.B, 'Solid State Drive'],
42+
[AnswerChoice.C, 'System Design Document'],
43+
[AnswerChoice.D, 'Software Development Document'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
private static makeQuestion2(): QuizQuestion {
49+
return new MultipleChoiceQuizQuestion(
50+
2,
51+
'How many bits is in a byte?',
52+
new Map<AnswerChoice, string>([
53+
[AnswerChoice.A, '2'],
54+
[AnswerChoice.B, '40'],
55+
[AnswerChoice.C, '1000'],
56+
[AnswerChoice.D, '8'],
57+
]),
58+
AnswerChoice.UNANSWERED,
59+
); // Replace `UNANSWERED` with the correct answer.
60+
}
61+
}

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

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Module } from '@nestjs/common';
2+
import { Bryanasingletonbarnhart } from './ bryana_singleton-barnhart_quiz.js';
23
import { AnotherQuiz } from './another_quiz.js';
34
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
45
import { DylanLaffertyQuiz } from './dylan_lafferty_quiz.js';
@@ -24,6 +25,7 @@ const QUIZ_PROVIDERS = [
2425
MeikoStephensQuiz,
2526
MercedesMathewsQuiz,
2627
Jbeyquiz,
28+
Bryanasingletonbarnhart,
2729
EzraQuiz,
2830
DavidAdenaikeQuiz,
2931
EvanPhilakhongQuiz,

0 commit comments

Comments
 (0)