Skip to content

Commit c661e25

Browse files
Merge branch 'main' into feature/lesson_03/quiz
2 parents 56e7942 + bfaccb6 commit c661e25

File tree

3 files changed

+76
-2
lines changed

3 files changed

+76
-2
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@ quiz:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
99

10+
1011
kerryferguson:
1112
- $2y$10$rQOC2ou8kj7O7haspQdoVOgn9nJnNeQqx.bl3JS8FugfT3.gr0cby
1213
- $2y$10$1rKN/68YNsCHyFbIYN5mAOKsmA2L.0IjmoSlHyYsLSabPBTEmQlua
1314
- $2y$10$cesMJeZzsIIh1JqoLmwWh.PtMWXAgJjJuIX0LZJOVWIZxzEna3WzK
1415

16+
17+
danielsonadjocy:
18+
- $2y$13$a2VPLkXi0XoTkCgytHabiuFX36ezOtQvSgG8Fjonlp.FYsgDnMQ1S
19+
- $2y$10$z37Nf6Ay1CZrbb3OtmhaXuFGnOqiUgAEc6CThl3iUAVFE3kEYS/cq
20+
- $2y$10$z37Nf6Ay1CZrbb3OtmhaXuFGnOqiUgAEc6CThl3iUAVFE3kEYS/cq
21+
1522
benjaminscott:
1623
- $2y$10$0iAVwkn0xfqhPTeVqnmmyO7g7aXGKBi66auNd0FfIQOK0pdSxeU2u
1724
- $2y$10$HantnEd1PSiBewfIt45yMeM2knNgv7mmwBiE16JctO/mu35SVdR5.
@@ -29,4 +36,3 @@ quiz:
2936
- $2y$10$FMRsdjEhIG0anbZOIcVvSOy4e4eFTZGIYYyATChwc.QRMpWuomR5C
3037
- $2y$10$0AQW/94c4pPxp8xIhJUIs.qoLnUuQg/Hwe1vd4975K96EKGEPz.H6
3138
- $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W
32-
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 & 1 deletion
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

@@ -13,14 +14,18 @@ export const Quizzes = Symbol.for('Quizzes');
1314

1415
// Add your quiz provider here.
1516

17+
18+
19+
1620
const QUIZ_PROVIDERS = [
1721
AnthonyMaysQuiz,
1822
TrinitieJacksonQuiz,
1923
BrooklynHardenQuiz,
2024
TyranRicesQuiz,
2125
AnotherQuiz,
2226
BenjaminScottQuiz,
23-
KerryFergusonQuiz
27+
KerryFergusonQuiz,
28+
DanielsonAdjocyQuiz
2429
];
2530

2631

0 commit comments

Comments
 (0)