Skip to content

Commit 75a75c2

Browse files
feat:adds mattieweathersby lesson03 ts quiz (#116)
* feat:adds mattieweathe rsby lesson03 quiz * fix: corrects typo error on line 42 * fix/lesson03/fixs typo duplicate for question 0 --------- Co-authored-by: Anthony D. Mays <[email protected]>
1 parent f1def88 commit 75a75c2

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 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+
mattieweathersby:
10+
- $2y$10$WxUCKALSc8EWp1uj26U./exKFNnV5yUtnP04IK.dX/G0A5QB94qXS
11+
- $2y$10$WxUCKALSc8EWp1uj26U./exKFNnV5yUtnP04IK.dX/G0A5QB94qXS
12+
- $2y$10$pd30wieyG01lxyn/o/huU.XTdawk1nfKKPYE7mdX7aWS/CaOA1o1a
913
kerryferguson:
1014
- $2y$10$rQOC2ou8kj7O7haspQdoVOgn9nJnNeQqx.bl3JS8FugfT3.gr0cby
1115
- $2y$10$1rKN/68YNsCHyFbIYN5mAOKsmA2L.0IjmoSlHyYsLSabPBTEmQlua
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 MattieWeathersbyQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'mattieweathersby';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
MattieWeathersbyQuiz.makeQuestion0(),
16+
MattieWeathersbyQuiz.makeQuestion1(),
17+
MattieWeathersbyQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What command is used for doing a commit?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'git push'],
27+
[AnswerChoice.B, 'git merge'],
28+
[AnswerChoice.C, 'git clone'],
29+
[AnswerChoice.D, 'git commit -m'],
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 an IDE?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'editing and refactoring code'],
41+
[AnswerChoice.B, 'debugging'],
42+
[AnswerChoice.C, 'managing source control'],
43+
[AnswerChoice.D, 'all of the above'],
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 is the main purpose of a fork?',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, 'to make music'],
55+
[AnswerChoice.B, 'help other developers'],
56+
[AnswerChoice.C, 'make a copy of someone else project'],
57+
[AnswerChoice.D, 'to apply for jobs'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
); // Replace `UNANSWERED` with the correct answer.
61+
}
62+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Module } from '@nestjs/common';
22
import { DanielsonAdjocyQuiz } from './danielson_adjocys_quiz.js';
33
import { AnotherQuiz } from './another_quiz.js';
44
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
5+
import { MattieWeathersbyQuiz } from './mweathersby_quiz.js';
56
import { KerryFergusonQuiz } from './kerry_ferguson_quiz.js';
67
import { BenjaminScottQuiz } from './benjamin_scott_quiz.js';
78
import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
@@ -19,6 +20,7 @@ const QUIZ_PROVIDERS = [
1920
BrooklynHardenQuiz,
2021
TyranRicesQuiz,
2122
AnotherQuiz,
23+
MattieWeathersbyQuiz,
2224
BenjaminScottQuiz,
2325
DanielsonAdjocyQuiz,
2426
TaliaCrockettQuiz,

0 commit comments

Comments
 (0)