Skip to content

Commit 0330050

Browse files
committed
lesson03quiz
1 parent 8bbd2a9 commit 0330050

File tree

3 files changed

+75
-8
lines changed

3 files changed

+75
-8
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
quiz:
22
answers:
3-
anthonymays:
4-
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
5-
- $2y$10$55EXRjF26JIgebtoH800ZOJecfefvMgHicuxf/rwTENuxiUaFQcNe
6-
anotherone:
7-
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
8-
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
3+
khayla_quiz:
4+
- $2y$10$/3IMYMFNc9nwhdHmiSvRG.A15LpohUsJiRpHwMBWcprTsIfJtr3gW
5+
- $2y$10$0X79FrvMefVVg7/MwvZruOnHz.Xw.sp5WvF4RxOq/r.VmMllsL6W6
6+
- $2y$10$xNJ6JpfWNYdn8YXQ7YXq5ejJCYIBqFZCHU8hI/LCYIE7drzMDqGOS
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class khayla_quiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'khayla_quiz';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [khayla_saundersquiz.makeQuestion0(), khayla_quiz.makeQuestion1()];
15+
}
16+
17+
private static makeQuestion0(): QuizQuestion {
18+
return new MultipleChoiceQuizQuestion(
19+
0,
20+
'Your team is working on a shared Git repository. Which of the following is not the best practices to follow for smooth collaboration?',
21+
new Map<AnswerChoice, string>([
22+
[AnswerChoice.A, 'Always pull before pushing to avoid conflicts.'],
23+
[
24+
AnswerChoice.B,
25+
'Work directly on the main branch to keep the workflow simple.',
26+
],
27+
[AnswerChoice.C, 'Use branches for separate work streams.'],
28+
[
29+
AnswerChoice.D,
30+
'Use Git stash to temporarily save uncommitted changes. ',
31+
],
32+
]),
33+
AnswerChoice.UNANSWERED,
34+
); // Replace `UNANSWERED` with the correct answer.
35+
}
36+
37+
private static makeQuestion1(): QuizQuestion {
38+
return new MultipleChoiceQuizQuestion(
39+
1,
40+
'What is the capital of the United States?',
41+
new Map<AnswerChoice, string>([
42+
[
43+
AnswerChoice.A,
44+
' When you want to discard the conflicted commit during a rebase.',
45+
],
46+
[AnswerChoice.B, 'When resolving conflicts during a merge.'],
47+
[
48+
AnswerChoice.C,
49+
'When you want to keep the changes from the conflicted commit.',
50+
],
51+
[AnswerChoice.D, 'When you need to undo the last commit '],
52+
]),
53+
AnswerChoice.UNANSWERED,
54+
); // Replace `UNANSWERED` with the correct answer.
55+
}
56+
private static makeQuestion2(): QuizQuestion {
57+
return new MultipleChoiceQuizQuestion(
58+
2,
59+
'What languge is best to communiate with computers ',
60+
new Map<AnswerChoice, string>([
61+
[AnswerChoice.A, '0s & 1s '],
62+
[AnswerChoice.B, 'JavaScript'],
63+
[AnswerChoice.C, 'Supersets'],
64+
[AnswerChoice.D, 'Git'],
65+
]),
66+
AnswerChoice.UNANSWERED,
67+
); // Replace `UNANSWERED` with the correct answer.
68+
}
69+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4-
4+
import { khayla_quiz } from './khayla_quiz.js';
55
export const Quizzes = Symbol.for('Quizzes');
66

77
// Add your quiz provider here.
8-
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz];
8+
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, khayla_quiz];
99

1010
@Module({
1111
providers: [

0 commit comments

Comments
 (0)