Skip to content

Commit 6005448

Browse files
author
AmiyahJo
committed
it works!!!! FINALLY
1 parent 9583918 commit 6005448

File tree

4 files changed

+69
-2
lines changed

4 files changed

+69
-2
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ quiz:
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9-
9+
amiyahjones:
10+
- $2y$10$lvxxWSKsb1H0woUoTBvOPelLijeKjhcgwvV./VlGE0k9LHXQ8l.fe
11+
- $2y$10$kGiwUW52LBOxPI0MvdyM1eXjjdsBm.fTJP6.oq7oIr.4hHqXDmGge
12+
- $2y$10$HIH1BcDUw4in9zAl/23PVepugtadZn/9Ty5YQKziDb4eSuy8QjmPm
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 AmiyahJonesQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'amiyahjones';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
AmiyahJonesQuiz.makeQuestion0(),
16+
AmiyahJonesQuiz.makeQuestion1(),
17+
AmiyahJonesQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What two computer parts get mixed up often?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Power supply and mother board'],
27+
[AnswerChoice.B, 'Graphics card and ram'],
28+
[AnswerChoice.C, 'Ram and hard drive'],
29+
[AnswerChoice.D, 'None of them get mixed up'],
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+
'Which computer part figures out how everything is supposed to look on your screen?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Graphics card'],
41+
[AnswerChoice.B, 'CPU'],
42+
[AnswerChoice.C, 'Mother board'],
43+
[AnswerChoice.D, 'Ram'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'Which computer part houses everything?',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, 'Hard drive'],
55+
[AnswerChoice.B, 'Case'],
56+
[AnswerChoice.C, 'CPU'],
57+
[AnswerChoice.D, 'Power supply'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
); // Replace `UNANSWERED` with the correct answer.
61+
}
62+
}
63+

lesson_03/quiz/src/quizzes/npm

Whitespace-only changes.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4+
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js'
45

56
export const Quizzes = Symbol.for('Quizzes');
67

78
// Add your quiz provider here.
8-
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz];
9+
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, AmiyahJonesQuiz];
910

1011
@Module({
1112
providers: [

0 commit comments

Comments
 (0)