Skip to content

Commit a31409e

Browse files
committed
my quiz completed
1 parent d17d2d1 commit a31409e

File tree

3 files changed

+72
-2
lines changed

3 files changed

+72
-2
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ quiz:
55
- $2y$10$55EXRjF26JIgebtoH800ZOJecfefvMgHicuxf/rwTENuxiUaFQcNe
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
8-
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
8+
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9+
meikostephens:
10+
- $2y$10$AD1YHmrZZivus7DoM91UMuErNnpi63ueluFs7DcSQSrZbXwDycAOi
11+
- $2y$10$KvnxAYKh3A151RyOOFtOv.wfImRzZMgbBgKy3gyLd1uUSSjHaN.4u
12+
- $2y$10$qJDpo1X1kFXRD1M6Kpi8WeKg.a8dgzd8RawXX/3RuMqM82biBc6iK
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class meiko_stephens_quiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'meikostephens';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
meiko_stephens_quiz.makeQuestion0(),
16+
meiko_stephens_quiz.makeQuestion1(),
17+
meiko_stephens_quiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is a branch?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'A new line of code'],
27+
[
28+
AnswerChoice.B,
29+
'A copy of a repository that allows you make changes and merge them later',
30+
],
31+
[AnswerChoice.C, 'A way to delete a respository and start over'],
32+
[AnswerChoice.D, 'A way to run code'],
33+
]),
34+
AnswerChoice.UNANSWERED,
35+
); // Replace `UNANSWERED` with the correct answer.
36+
}
37+
38+
private static makeQuestion1(): QuizQuestion {
39+
return new MultipleChoiceQuizQuestion(
40+
1,
41+
'What does a syncfork do?',
42+
new Map<AnswerChoice, string>([
43+
[AnswerChoice.A, 'Updates changes from the original repository'],
44+
[AnswerChoice.B, 'Deletes the repositiory'],
45+
[AnswerChoice.C, 'Transforms the repository into a branch'],
46+
[AnswerChoice.D, 'Runs the code more efficiently'],
47+
]),
48+
AnswerChoice.UNANSWERED,
49+
); // Replace `UNANSWERED` with the correct answer.
50+
}
51+
52+
private static makeQuestion2(): QuizQuestion {
53+
return new MultipleChoiceQuizQuestion(
54+
2,
55+
'What brings the modify changes to merge into the main repositiory?',
56+
new Map<AnswerChoice, string>([
57+
[AnswerChoice.A, 'A terminal'],
58+
[AnswerChoice.B, 'A branch'],
59+
[AnswerChoice.C, 'A syncfork'],
60+
[AnswerChoice.D, 'A pull request'],
61+
]),
62+
AnswerChoice.UNANSWERED,
63+
); // Replace `UNANSWERED` with the correct answer.
64+
}
65+
}

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 { meiko_stephens_quiz } from './meiko_stephens_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, meiko_stephens_quiz ];
910

1011
@Module({
1112
providers: [

0 commit comments

Comments
 (0)