Skip to content

Commit cc87e4c

Browse files
jbey251DavisD251
authored andcommitted
feat: adds John's quiz implementation (code-differently#97)
1 parent ac18e0f commit cc87e4c

File tree

3 files changed

+81
-7
lines changed

3 files changed

+81
-7
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,4 @@ quiz:
55
- $2y$10$55EXRjF26JIgebtoH800ZOJecfefvMgHicuxf/rwTENuxiUaFQcNe
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
8-
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9-
DavisDarius:
10-
- $2y$10$yMJb1Jq0KavCZA6FlPzcbeTAcvnngH1dH.LwfvOHUIZxeiL8Y8B2C
11-
- $2y$10$wjDnHllQW16n/Pgr3nM2PeP5mlUeTjDWWCH5vOFtDEoJ7I2ltluQC
12-
- $2y$10$vNFRGJtBXdsZj7Uheaf5y.ck8UhScBkHbMAwVacrETF2WEYOfbPlK
8+
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
} from 'codedifferently-instructional';
5+
export class Jbeyquiz {
6+
getProviderName() {
7+
return 'computerparts';
8+
}
9+
makeQuizQuestions() {
10+
return [
11+
Jbeyquiz.makeQuestion0(),
12+
Jbeyquiz.makeQuestion1(),
13+
Jbeyquiz.makeQuestion2(),
14+
];
15+
}
16+
static makeQuestion0() {
17+
return new MultipleChoiceQuizQuestion(
18+
0,
19+
'What is RAM?',
20+
new Map([
21+
[AnswerChoice.A, 'Robotic Automated Mechanism'],
22+
[
23+
AnswerChoice.B,
24+
'A type of storage device that holds all of your files',
25+
],
26+
[
27+
AnswerChoice.C,
28+
'Special software that controls your computers internet connection',
29+
],
30+
[AnswerChoice.D, 'Random Access Memory'],
31+
]),
32+
AnswerChoice.UNANSWERED,
33+
); // Replace `UNANSWERED` with the correct answer.
34+
}
35+
static makeQuestion1() {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'What is a GPU?',
39+
new Map([
40+
[
41+
AnswerChoice.A,
42+
'A powerful cooling fan that keeps your computer from overheating',
43+
],
44+
[AnswerChoice.B, 'A special type of harddrive'],
45+
[
46+
AnswerChoice.C,
47+
'A special type of processor primarily designed to handleand accelerate the rendering of images, video, and animations.',
48+
],
49+
[
50+
AnswerChoice.D,
51+
'A keyboard that controls the movement of your mouse on screen',
52+
],
53+
]),
54+
AnswerChoice.UNANSWERED,
55+
); // Replace `UNANSWERED` with the correct answer.
56+
}
57+
static makeQuestion2() {
58+
return new MultipleChoiceQuizQuestion(
59+
2,
60+
'What is an SSD?',
61+
new Map([
62+
[AnswerChoice.A, 'A type of RAM that stores data permanently'],
63+
[
64+
AnswerChoice.B,
65+
'A storage device used in computers and other electronic devices',
66+
],
67+
[
68+
AnswerChoice.C,
69+
'A type of USB cable that connects your computer to the internet',
70+
],
71+
[
72+
AnswerChoice.D,
73+
'A type of screen that displays the contents of your computers memory',
74+
],
75+
]),
76+
AnswerChoice.UNANSWERED,
77+
); // Replace `UNANSWERED` with the correct answer.
78+
}
79+
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4-
import { DavisQuiz } from './Davis_D._quiz.js';
54

65
export const Quizzes = Symbol.for('Quizzes');
76

87
// Add your quiz provider here.
9-
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, DavisQuiz];
8+
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz];
109

1110
@Module({
1211
providers: [

0 commit comments

Comments
 (0)