Skip to content

Commit 5d1a93c

Browse files
authored
feat: adds Jeremiah's custom quiz (#131)
* all the tests passed * // JWING-HW03 Update src/quizzes/quizzes.module.ts * JWing-HW:003-removed spaces from quizzes.module.ts * JWING003 added commma finish test
1 parent 904cb45 commit 5d1a93c

File tree

3 files changed

+91
-1
lines changed

3 files changed

+91
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ quiz:
3434
- $2y$10$FquR69q7W4E68TX/SNCB7u8Ri0DOFRDqsUPdGfuyIBjZJRVFkNI.6
3535
- $2y$10$FSWRA7hulVpyVxd8s67Nxuq/1cdmviW24qqoUbqihBf79cR.w9yly
3636
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
37+
jeremiahwing:
38+
- $2y$10$YLN9gvb8/fBf3ByHNIdb9.UZ8ilcuCdPgZN9QIYd2rwD23vzt2lvy
39+
- $2y$10$AEUmg5pH8c2VLZ871//G4eKjwx5cnKH5c2HGTNXdnAPF.3/ZmNap2
40+
- $2y$10$bcTYSI0R/3x0pPHcGPAjautopYx2MD8mJPqf2nXKMJeteoIwJQrQm
41+
- $2y$10$V8pMtwgtZe725nPssrr8kejs4Evh/Vi3ia8RulylOQ8x2YV4tJ4LO
3742
jasonwatson:
3843
- $2y$10$AZtPKyQ.6Bzb.jreO/u.2O3C7XfvYAVpjHzLkuhLVdsX74wc4vXwS
3944
- $2y$10$QbKtEXqpeItigRLAHsn8Qe/06ZpXhKEP1bGPJSFXymsoFw9.04NHy
40-
- $2y$10$tJLScW1OZpOLpVllM65EI.W1QjkSIIBtz.KG8z/s.07RNb7ZWC0um
45+
- $2y$10$tJLScW1OZpOLpVllM65EI.W1QjkSIIBtz.KG8z/s.07RNb7ZWC0um
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class JeremiahWingQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'jeremiahwing';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
JeremiahWingQuiz.makeQuestion0(),
16+
JeremiahWingQuiz.makeQuestion1(),
17+
JeremiahWingQuiz.makeQuestion2(),
18+
JeremiahWingQuiz.makeQuestion3(),
19+
];
20+
}
21+
22+
private static makeQuestion0(): QuizQuestion {
23+
return new MultipleChoiceQuizQuestion(
24+
0,
25+
'What does the SRC element stand for?',
26+
new Map<AnswerChoice, string>([
27+
[AnswerChoice.A, 'Source'],
28+
[AnswerChoice.B, 'Script'],
29+
[AnswerChoice.C, 'Style'],
30+
[AnswerChoice.D, 'Section'],
31+
]),
32+
AnswerChoice.UNANSWERED,
33+
);
34+
}
35+
36+
private static makeQuestion1(): QuizQuestion {
37+
return new MultipleChoiceQuizQuestion(
38+
1,
39+
'What does the git fetch command do?',
40+
new Map<AnswerChoice, string>([
41+
[AnswerChoice.A, 'Downloads objects and refs from another repository'],
42+
[AnswerChoice.B, 'Merges changes from another branch'],
43+
[AnswerChoice.C, 'Commits changes to the local repository'],
44+
[AnswerChoice.D, 'Deletes a branch from the repository'],
45+
]),
46+
AnswerChoice.UNANSWERED,
47+
);
48+
}
49+
50+
private static makeQuestion2(): QuizQuestion {
51+
return new MultipleChoiceQuizQuestion(
52+
2,
53+
'What does the git pull command do?',
54+
new Map<AnswerChoice, string>([
55+
[
56+
AnswerChoice.A,
57+
'Fetches from and integrates with another repository or a local branch',
58+
],
59+
[AnswerChoice.B, 'Merges changes from another branch'],
60+
[AnswerChoice.C, 'Commits changes to the local repository'],
61+
[AnswerChoice.D, 'Deletes a branch from the repository'],
62+
]),
63+
AnswerChoice.UNANSWERED,
64+
);
65+
}
66+
67+
private static makeQuestion3(): QuizQuestion {
68+
return new MultipleChoiceQuizQuestion(
69+
3,
70+
'What does the git push command do?',
71+
new Map<AnswerChoice, string>([
72+
[
73+
AnswerChoice.A,
74+
'Uploads local repository content to a remote repository',
75+
],
76+
[AnswerChoice.B, 'Merges changes from another branch'],
77+
[AnswerChoice.C, 'Commits changes to the local repository'],
78+
[AnswerChoice.D, 'Downloads objects and refs from another repository'],
79+
]),
80+
AnswerChoice.UNANSWERED,
81+
);
82+
}
83+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Jbeyquiz } from './jbeyquiz.js';
99
import { KhaylaSaundersQuiz } from './khayla_quiz.js';
1010
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
1111
import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
12+
import { JeremiahWingQuiz } from './jeremiah_wing_quiz.js';
1213

1314
export const Quizzes = Symbol.for('Quizzes');
1415

@@ -24,6 +25,7 @@ const QUIZ_PROVIDERS = [
2425
DavidAdenaikeQuiz,
2526
KhaylaSaundersQuiz,
2627
RasheedMillerQuiz,
28+
JeremiahWingQuiz,
2729
JasonWatsonQuiz,
2830
];
2931

0 commit comments

Comments
 (0)