Skip to content

Commit 556c514

Browse files
chore: adds Jason's custom quiz (#128)
* lesson03 * chore: removes extra space * Update quizzes.module.ts fix: merge problem --------- Co-authored-by: Anthony D. Mays <[email protected]>
1 parent 8cf96e4 commit 556c514

File tree

3 files changed

+69
-1
lines changed

3 files changed

+69
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ quiz:
3030
- $2y$10$FquR69q7W4E68TX/SNCB7u8Ri0DOFRDqsUPdGfuyIBjZJRVFkNI.6
3131
- $2y$10$FSWRA7hulVpyVxd8s67Nxuq/1cdmviW24qqoUbqihBf79cR.w9yly
3232
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
33+
jasonwatson:
34+
- $2y$10$AZtPKyQ.6Bzb.jreO/u.2O3C7XfvYAVpjHzLkuhLVdsX74wc4vXwS
35+
- $2y$10$QbKtEXqpeItigRLAHsn8Qe/06ZpXhKEP1bGPJSFXymsoFw9.04NHy
36+
- $2y$10$tJLScW1OZpOLpVllM65EI.W1QjkSIIBtz.KG8z/s.07RNb7ZWC0um
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class JasonWatsonQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'jasonwatson';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
JasonWatsonQuiz.makeQuestion0(),
16+
JasonWatsonQuiz.makeQuestion1(),
17+
JasonWatsonQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'How much MB of memory is equal to 1GB of RAM',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, '500MB'],
27+
[AnswerChoice.B, '1024MB'],
28+
[AnswerChoice.C, '2048MB'],
29+
[AnswerChoice.D, '1000MB'],
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 is Visual Studio Code primarily used for',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Graphic Design'],
41+
[AnswerChoice.B, 'Word Processing'],
42+
[AnswerChoice.C, 'Code Editing'],
43+
[AnswerChoice.D, 'Video Prodection'],
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+
'What file is commonly used to provide instructions or documenttation in a GitHub repository',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, 'README.md'],
55+
[AnswerChoice.B, 'INSTRUCTIONS.txt'],
56+
[AnswerChoice.C, 'GUIDE.pdf'],
57+
[AnswerChoice.D, 'DOCS.docx'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
); // Replace `UNANSWERED` with the correct answer.
61+
}
62+
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +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 { JasonWatsonQuiz } from './jason_watson_quiz.js';
5+
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
46
import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js';
57
import { Jbeyquiz } from './jbeyquiz.js';
68
import { KhaylaSaundersQuiz } from './khayla_quiz.js';
7-
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
89
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
910
import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
1011

@@ -20,6 +21,7 @@ const QUIZ_PROVIDERS = [
2021
DavidAdenaikeQuiz,
2122
KhaylaSaundersQuiz,
2223
RasheedMillerQuiz,
24+
JasonWatsonQuiz,
2325
];
2426

2527
@Module({

0 commit comments

Comments
 (0)