Skip to content

Commit df581c9

Browse files
nia-sourceanthonydmays
authored andcommitted
feat: adds Nia's custom quiz (#141)
* completed quiz * fix: fix quiz answers * chore: fixes code formatting Signed-off-by: Anthony D. Mays <[email protected]> * chore: removes answers Signed-off-by: Anthony D. Mays <[email protected]> * chore: fix bad character Signed-off-by: Anthony D. Mays <[email protected]> --------- Signed-off-by: Anthony D. Mays <[email protected]> Co-authored-by: Anthony D. Mays <[email protected]> Co-authored-by: Anthony D. Mays <[email protected]>
1 parent 3f20e4c commit df581c9

File tree

3 files changed

+85
-4
lines changed

3 files changed

+85
-4
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ quiz:
5050
- $2y$10$FquR69q7W4E68TX/SNCB7u8Ri0DOFRDqsUPdGfuyIBjZJRVFkNI.6
5151
- $2y$10$FSWRA7hulVpyVxd8s67Nxuq/1cdmviW24qqoUbqihBf79cR.w9yly
5252
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
53+
niapack:
54+
- $2y$10$AHKmPPaTlafHO3T5q..kAuAhAy4n8Kn.wcY7ZAeYgokCjitwyjqE2
55+
- $2y$10$Z0g.9UO7qwkwoeNe8byn3.MVNIiIKBxa6ztLVHzDz.m5Ao5ozGqh6
56+
- $2y$10$QjpqUnI.C5UPmDuMPU.Eyu7k.T/qF0oAZDl0.osqlaJW.NC7Lvfya
5357
davisdarius:
5458
- $2y$10$s9Dh1bJak9WjT3sziuq1KeloNnDCuhgjsT6HA.m/fxjJSrJMK0lOu
5559
- $2y$10$Q58g8gsWhL1Zhje9WoLHKuqF44I3NK16i..EQ2SYVAa.PEkowhgOK
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class NiaPackquiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'niapack';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
NiaPackquiz.makeQuestion0(),
16+
NiaPackquiz.makeQuestion1(),
17+
NiaPackquiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is branching? Why is it important?',
25+
new Map<AnswerChoice, string>([
26+
[
27+
AnswerChoice.A,
28+
'It is when a tree grows and is important to make the sky look beautiful',
29+
],
30+
[
31+
AnswerChoice.B,
32+
'It is when you create a seperate copy of a code and is important because it doesnt affect the main version and makes it easier to work with a team',
33+
],
34+
[
35+
AnswerChoice.C,
36+
'It is when you delete all previous versions of your code and is important so you dont have to start from scratch',
37+
],
38+
[
39+
AnswerChoice.D,
40+
'It is merging all changes directly into the main code and is important because it speeds up develpoment by avoiding unnecessary review or debugging steps',
41+
],
42+
]),
43+
AnswerChoice.UNANSWERED,
44+
); // Replace `UNANSWERED` with the correct answer.
45+
}
46+
private static makeQuestion1(): QuizQuestion {
47+
return new MultipleChoiceQuizQuestion(
48+
1,
49+
'Which programming languages can you use in VS code?',
50+
new Map<AnswerChoice, string>([
51+
[AnswerChoice.A, 'Only Python'],
52+
[AnswerChoice.B, 'Only JavaScript'],
53+
[AnswerChoice.C, 'Multiple languages like Python, JavaScript, and C++'],
54+
[AnswerChoice.D, 'C++'],
55+
]),
56+
AnswerChoice.UNANSWERED,
57+
); // Replace `UNANSWERED` with the correct answer.
58+
}
59+
private static makeQuestion2(): QuizQuestion {
60+
return new MultipleChoiceQuizQuestion(
61+
2,
62+
'What is a pull request request on GitHub?',
63+
new Map<AnswerChoice, string>([
64+
[
65+
AnswerChoice.A,
66+
'A way to merge changes from one branch into another after review',
67+
],
68+
[AnswerChoice.B, 'A command to delete a branch permanently'],
69+
[AnswerChoice.C, 'A method for creating a local copy of a repository'],
70+
[AnswerChoice.D, 'A tool to schedule automatic repository backups'],
71+
]),
72+
AnswerChoice.UNANSWERED,
73+
); // Replace `UNANSWERED` with the correct answer.
74+
}
75+
}

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
import { Module } from '@nestjs/common';
22
import { Bryanasingletonbarnhart } from './ bryana_singleton-barnhart_quiz.js';
3+
import { AnanatawaQuiz } from './ananatawa_quiz.js';
34
import { AnotherQuiz } from './another_quiz.js';
45
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
5-
import { DylanLaffertyQuiz } from './dylan_lafferty_quiz.js';
66
import { ChanelHuttQuiz } from './Chanel_Huttquiz.js';
77
import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js';
88
import { DavisDQuiz } from './davisd_quiz.js';
9+
import { DylanLaffertyQuiz } from './dylan_lafferty_quiz.js';
910
import { EvanPhilakhongQuiz } from './evan_philakhong_quiz.js';
1011
import { EzraQuiz } from './ezra_quiz.js';
1112
import { JasonWatsonQuiz } from './jason_watson_quiz.js';
1213
import { Jbeyquiz } from './jbeyquiz.js';
13-
import { KarensQuiz } from './karen_alabi_quiz.js';
1414
import { JeremiahWingQuiz } from './jeremiah_wing_quiz.js';
15+
import { KarensQuiz } from './karen_alabi_quiz.js';
1516
import { KhaylaSaundersQuiz } from './khayla_quiz.js';
1617
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
1718
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
19+
import { MontezBradleyQuiz } from './montez_quiz.js';
20+
import { NiaPackquiz } from './nia_quiz.js';
1821
import { OliviaJamesQuiz } from './olivia_james_quiz.js';
19-
import { MontezBradleyQuiz } from './montez_quiz.js';
2022
import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
21-
import { AnanatawaQuiz } from './ananatawa_quiz.js';
2223

2324
export const Quizzes = Symbol.for('Quizzes');
2425

@@ -39,6 +40,7 @@ const QUIZ_PROVIDERS = [
3940
KhaylaSaundersQuiz,
4041
DylanLaffertyQuiz,
4142
RasheedMillerQuiz,
43+
NiaPackquiz,
4244
DavisDQuiz,
4345
AnanatawaQuiz,
4446
OliviaJamesQuiz,

0 commit comments

Comments
 (0)