Skip to content

Commit 1b3c1d5

Browse files
authored
Merge branch 'code-differently:main' into main
2 parents a496bc2 + 3c9857e commit 1b3c1d5

File tree

3 files changed

+86
-7
lines changed

3 files changed

+86
-7
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@ quiz:
4343
- $2y$10$QsN9VkjWORsKgZRiBT46VOUgc5HVnswKAT4uDbs7JYbTF7DdKbsw.
4444
- $2y$10$sqXEOL0L8o0kRyiAb.2s4u0RlBC2.LmOGDbGWXHj5IfBNwinkv2yq
4545
- $2y$10$HaWueXgrIzd7z8yf39HfVeTjjyr.Kgx0GFBqwCRSzW3zRSreN19yi
46-
46+
zionbuchanan:
47+
- $2y$10$ufNCdP1efvioBYIih6K92uye33p5ckN/IrxfCvw4n7agHjN8aNfhe
48+
- $2y$10$Mb7LA1kqlDRWlN9jdBYvF.u1B8cmJqXWkrxQeMr/3ETRVOAzFlflG
49+
- $2y$10$9bTVOlLmkj4y5f9u1b3sgeTQ9hIrVFrGiz71B0HTxiIidqq0VXHGS
4750
shawndunsmore:
4851
- $2y$10$Kpde4LAfDyEhgWezFoI5texc53Sge6QQs8y5hR8DA7zHfyK8It5LW
4952
- $2y$10$T061IZuccoHb2XGjaICB/Olchf62DqrSDVIE0TE9Q9qidfLAL7sHS
50-
- $2y$10$T061IZuccoHb2XGjaICB/Olchf62DqrSDVIE0TE9Q9qidfLAL7sHS
53+
- $2y$10$T061IZuccoHb2XGjaICB/Olchf62DqrSDVIE0TE9Q9qidfLAL7sHS

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import { Module } from '@nestjs/common';
2+
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';
23
import { AngelicaCQuiz } from './angelica_c_quiz.js';
34
import { AnotherQuiz } from './another_quiz.js';
45
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
5-
import { JamesCapparellQuiz } from './james_capparell_quiz.js';
6-
import { XavierCruzQuiz } from './xavier_cruz_quiz.js';
7-
import { DasiaEnglishQuiz } from './dasia_english_quiz.js';
86
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
7+
import { DasiaEnglishQuiz } from './dasia_english_quiz.js';
8+
import { JamesCapparellQuiz } from './james_capparell_quiz.js';
99
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
1010
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
1111
import { ShawnDunsmoreQuiz } from './shawn_dunsmore_quiz.js';
12+
import { XavierCruzQuiz } from './xavier_cruz_quiz.js';
1213
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
13-
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';
14+
import { ZionBuchananQuiz } from './zion_buchanan_quiz.js';
1415

1516
export const Quizzes = Symbol.for('Quizzes');
1617

@@ -27,7 +28,8 @@ const QUIZ_PROVIDERS = [
2728
DasiaEnglishQuiz,
2829
ChigazoGrahamsQuiz,
2930
AmiyahJonesQuiz,
30-
XavierCruzQuiz
31+
XavierCruzQuiz,
32+
ZionBuchananQuiz,
3133
];
3234

3335
@Module({
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class ZionBuchananQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'zionbuchanan';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
ZionBuchananQuiz.makeQuestion0(),
16+
ZionBuchananQuiz.makeQuestion1(),
17+
ZionBuchananQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is a computer?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'A machine that transforms input data to output'],
27+
[AnswerChoice.B, 'A device that only stores information'],
28+
[AnswerChoice.C, 'A system that requires no user input to function'],
29+
[
30+
AnswerChoice.D,
31+
'A machine that operates only when connected to the internet.',
32+
],
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+
'Why do we use IDEs?',
42+
new Map<AnswerChoice, string>([
43+
[AnswerChoice.A, 'to issue tracking and debugging'],
44+
[AnswerChoice.B, 'Managing source control'],
45+
[AnswerChoice.C, 'Refactoring code'],
46+
[AnswerChoice.D, 'All of the above'],
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 is a branch?',
56+
new Map<AnswerChoice, string>([
57+
[
58+
AnswerChoice.A,
59+
'A kind of software program that runs on every computer automatically.',
60+
],
61+
[AnswerChoice.B, 'Both Choices A and D'],
62+
[
63+
AnswerChoice.C,
64+
'A specialized type of car engine designed for off-road vehicles.',
65+
],
66+
[
67+
AnswerChoice.D,
68+
'A copy of the repository that allows you to make changes and merge them back later.',
69+
],
70+
]),
71+
AnswerChoice.UNANSWERED,
72+
); // Replace `UNANSWERED` with the correct answer.
73+
}
74+
}

0 commit comments

Comments
 (0)