Skip to content

Commit ff6d756

Browse files
committed
chore(quizzes): resolves conflict files, adds Danielson's Quiz.
2 parents ecd75d3 + bfaccb6 commit ff6d756

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 0 deletions
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+
danielsonadjocy:
10+
- $2y$13$a2VPLkXi0XoTkCgytHabiuFX36ezOtQvSgG8Fjonlp.FYsgDnMQ1S
11+
- $2y$10$z37Nf6Ay1CZrbb3OtmhaXuFGnOqiUgAEc6CThl3iUAVFE3kEYS/cq
12+
- $2y$10$z37Nf6Ay1CZrbb3OtmhaXuFGnOqiUgAEc6CThl3iUAVFE3kEYS/cq
913
benjaminscott:
1014
- $2y$10$0iAVwkn0xfqhPTeVqnmmyO7g7aXGKBi66auNd0FfIQOK0pdSxeU2u
1115
- $2y$10$HantnEd1PSiBewfIt45yMeM2knNgv7mmwBiE16JctO/mu35SVdR5.
@@ -27,3 +31,4 @@ quiz:
2731
- $2y$10$Q/lb7miLQrsy9D5j/4FE/.DZAzQ4BkIWk8BUKjjaIg2OLRS9v1/cC
2832
- $2y$10$MWsUIECL5NP2p/8RbbDWv.Mi6shrjwRtHFMwd/zpmKuCNVSAZXd/e
2933
- $2y$10$VjopdAwacAcQ718VRrjNJOLHVQ1oTql58p.wfpo3P4jYOkHQAL88W
34+
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class DanielsonAdjocyQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'danielsonadjocy';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
DanielsonAdjocyQuiz.makeQuestion0(),
16+
DanielsonAdjocyQuiz.makeQuestion1(),
17+
DanielsonAdjocyQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What should go first in a pc frame?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'CPU'],
27+
[AnswerChoice.B, 'GPU'],
28+
[
29+
AnswerChoice.C,
30+
'Motherboard',
31+
],
32+
[AnswerChoice.D, 'Power supply'],
33+
]),
34+
AnswerChoice.UNANSWERED,
35+
); // Replace `UNANSWERED` with the correct answer.
36+
}
37+
38+
private static makeQuestion1(): QuizQuestion {
39+
return new MultipleChoiceQuizQuestion(
40+
1,
41+
'True or False: Data in a computer is represented by Binary, Decimal, and Hexadecimal',
42+
new Map<AnswerChoice, string>([
43+
[AnswerChoice.A, 'True'],
44+
[AnswerChoice.B, 'False'],
45+
]),
46+
AnswerChoice.UNANSWERED,
47+
); // Replace `UNANSWERED` with the correct answer.
48+
}
49+
50+
private static makeQuestion2(): QuizQuestion {
51+
return new MultipleChoiceQuizQuestion(
52+
2,
53+
'What is the brain of the computer?',
54+
new Map<AnswerChoice, string>([
55+
[AnswerChoice.A, 'CPU'],
56+
[AnswerChoice.B, 'GPU'],
57+
[AnswerChoice.C, 'Motherboard'],
58+
[AnswerChoice.D, 'Power supply'],
59+
]),
60+
AnswerChoice.UNANSWERED,
61+
); // Replace `UNANSWERED` with the correct answer.
62+
}
63+
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Module } from '@nestjs/common';
2+
import { DanielsonAdjocyQuiz } from './danielson_adjocys_quiz.js';
23
import { AnotherQuiz } from './another_quiz.js';
34
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
45
import { BenjaminScottQuiz } from './benjamin_scott_quiz.js';
@@ -10,16 +11,21 @@ export const Quizzes = Symbol.for('Quizzes');
1011

1112
// Add your quiz provider here.
1213

14+
15+
16+
1317
const QUIZ_PROVIDERS = [
1418
AnthonyMaysQuiz,
1519
TrinitieJacksonQuiz,
1620
BrooklynHardenQuiz,
1721
TyranRicesQuiz,
1822
AnotherQuiz,
1923
BenjaminScottQuiz,
24+
DanielsonAdjocyQuiz,
2025
TaliaCrockettQuiz,
2126
];
2227

28+
2329
@Module({
2430
providers: [
2531
...QUIZ_PROVIDERS,

0 commit comments

Comments
 (0)