From 3ded8c6ab3216d92110348d0a67152e2e86d73f1 Mon Sep 17 00:00:00 2001 From: nia-source Date: Wed, 12 Mar 2025 16:31:25 +0000 Subject: [PATCH 1/5] completed quiz --- lesson_03/quiz/quiz.yaml | 5 ++ lesson_03/quiz/src/quizzes/nia_quiz.ts | 75 ++++++++++++++++++++ lesson_03/quiz/src/quizzes/quizzes.module.ts | 10 +-- 3 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 lesson_03/quiz/src/quizzes/nia_quiz.ts diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index 63da725d2..abb16ff59 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -26,3 +26,8 @@ quiz: - $2y$10$FquR69q7W4E68TX/SNCB7u8Ri0DOFRDqsUPdGfuyIBjZJRVFkNI.6 - $2y$10$FSWRA7hulVpyVxd8s67Nxuq/1cdmviW24qqoUbqihBf79cR.w9yly - $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6 + niapack: + - $2y$10$AHKmPPaTlafHO3T5q..kAuAhAy4n8Kn.wcY7ZAeYgokCjitwyjqE2 + - $2y$10$Z0g.9UO7qwkwoeNe8byn3.MVNIiIKBxa6ztLVHzDz.m5Ao5ozGqh6 + - $2y$10$QjpqUnI.C5UPmDuMPU.Eyu7k.T/qF0oAZDl0.osqlaJW.NC7Lvfya + diff --git a/lesson_03/quiz/src/quizzes/nia_quiz.ts b/lesson_03/quiz/src/quizzes/nia_quiz.ts new file mode 100644 index 000000000..07ccddfb5 --- /dev/null +++ b/lesson_03/quiz/src/quizzes/nia_quiz.ts @@ -0,0 +1,75 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class NiaPackquiz implements QuizQuestionProvider { + getProviderName(): string { + return 'niapack'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ + NiaPackquiz.makeQuestion0(), + NiaPackquiz.makeQuestion1(), + NiaPackquiz.makeQuestion2(), + ]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'What is branching? Why is it important?', + new Map([ + [ + AnswerChoice.A, + 'It is when a tree grows and is important to make the sky look beautiful', + ], + [ + AnswerChoice.B, + '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', + ], + [ + AnswerChoice.C, + 'It is when you delete all previous versions of your code and is important so you dont have to start from scratch', + ], + [ + AnswerChoice.D, + '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', + ], + ]), + AnswerChoice.B, + ); // Replace `UNANSWERED` with the correct answer. + } + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'Which programming languages can you use in VS code?', + new Map([ + [AnswerChoice.A, 'Only Python'], + [AnswerChoice.B, 'Only JavaScript'], + [AnswerChoice.C, 'Multiple languages like Python, JavaScript, and C++'], + [AnswerChoice.D, 'C++'], + ]), + AnswerChoice.C, + ); // Replace `UNANSWERED` with the correct answer. + } + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'What is a pull request request on GitHub?', + new Map([ + [ + AnswerChoice.A, + 'A way to merge changes from one branch into another after review', + ], + [AnswerChoice.B, 'A command to delete a branch permanently'], + [AnswerChoice.C, 'A method for creating a local copy of a repository'], + [AnswerChoice.D, 'A tool to schedule automatic repository backups'], + ]), + AnswerChoice.A, + ); // Replace `UNANSWERED` with the correct answer. + } +} diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index 6d64dbe6e..6651a05c7 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,10 +1,11 @@ import { Module } from '@nestjs/common'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; -import { MeikoStephensQuiz } from './meiko_stephens_quiz.js'; +import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js'; import { Jbeyquiz } from './jbeyquiz.js'; +import { MeikoStephensQuiz } from './meiko_stephens_quiz.js'; import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js'; -import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js'; +import { NiaPackquiz } from './nia_quiz.js'; import { RasheedMillerQuiz } from './rasheed_miller_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); @@ -12,12 +13,13 @@ export const Quizzes = Symbol.for('Quizzes'); // Add your quiz provider here. const QUIZ_PROVIDERS = [ AnthonyMaysQuiz, - AnotherQuiz, - MeikoStephensQuiz , + AnotherQuiz, + MeikoStephensQuiz, MercedesMathewsQuiz, Jbeyquiz, DavidAdenaikeQuiz, RasheedMillerQuiz, + NiaPackquiz, ]; @Module({ From 95f2caee72fa88b7e04ecb51ae176ce0f8e7d67f Mon Sep 17 00:00:00 2001 From: nia-source Date: Wed, 12 Mar 2025 16:47:59 +0000 Subject: [PATCH 2/5] fix: fix quiz answers --- lesson_03/quiz/src/quizzes/nia_quiz.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lesson_03/quiz/src/quizzes/nia_quiz.ts b/lesson_03/quiz/src/quizzes/nia_quiz.ts index 07ccddfb5..542ef14ef 100644 --- a/lesson_03/quiz/src/quizzes/nia_quiz.ts +++ b/lesson_03/quiz/src/quizzes/nia_quiz.ts @@ -40,7 +40,7 @@ export class NiaPackquiz implements QuizQuestionProvider { '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', ], ]), - AnswerChoice.B, + AnswerChoice.UNANSWERED, ); // Replace `UNANSWERED` with the correct answer. } private static makeQuestion1(): QuizQuestion { @@ -53,7 +53,7 @@ export class NiaPackquiz implements QuizQuestionProvider { [AnswerChoice.C, 'Multiple languages like Python, JavaScript, and C++'], [AnswerChoice.D, 'C++'], ]), - AnswerChoice.C, + AnswerChoice.UNANSWERED, ); // Replace `UNANSWERED` with the correct answer. } private static makeQuestion2(): QuizQuestion { @@ -69,7 +69,7 @@ export class NiaPackquiz implements QuizQuestionProvider { [AnswerChoice.C, 'A method for creating a local copy of a repository'], [AnswerChoice.D, 'A tool to schedule automatic repository backups'], ]), - AnswerChoice.A, + AnswerChoice.UNANSWERED, ); // Replace `UNANSWERED` with the correct answer. } } From e74434b715383247fefa50d4209ef3df9dfdb76e Mon Sep 17 00:00:00 2001 From: "Anthony D. Mays" Date: Thu, 13 Mar 2025 18:19:48 +0000 Subject: [PATCH 3/5] chore: fixes code formatting Signed-off-by: Anthony D. Mays --- lesson_03/quiz/quiz.yaml | 2 -- lesson_03/quiz/src/quizzes/nia_quiz.ts | 6 +++--- lesson_03/quiz/src/quizzes/quizzes.module.ts | 12 +++--------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index 15eb99999..f006047af 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -34,12 +34,10 @@ quiz: - $2y$10$FquR69q7W4E68TX/SNCB7u8Ri0DOFRDqsUPdGfuyIBjZJRVFkNI.6 - $2y$10$FSWRA7hulVpyVxd8s67Nxuq/1cdmviW24qqoUbqihBf79cR.w9yly - $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6 - niapack: - $2y$10$AHKmPPaTlafHO3T5q..kAuAhAy4n8Kn.wcY7ZAeYgokCjitwyjqE2 - $2y$10$Z0g.9UO7qwkwoeNe8byn3.MVNIiIKBxa6ztLVHzDz.m5Ao5ozGqh6 - $2y$10$QjpqUnI.C5UPmDuMPU.Eyu7k.T/qF0oAZDl0.osqlaJW.NC7Lvfya - jasonwatson: - $2y$10$AZtPKyQ.6Bzb.jreO/u.2O3C7XfvYAVpjHzLkuhLVdsX74wc4vXwS - $2y$10$QbKtEXqpeItigRLAHsn8Qe/06ZpXhKEP1bGPJSFXymsoFw9.04NHy diff --git a/lesson_03/quiz/src/quizzes/nia_quiz.ts b/lesson_03/quiz/src/quizzes/nia_quiz.ts index 542ef14ef..07ccddfb5 100644 --- a/lesson_03/quiz/src/quizzes/nia_quiz.ts +++ b/lesson_03/quiz/src/quizzes/nia_quiz.ts @@ -40,7 +40,7 @@ export class NiaPackquiz implements QuizQuestionProvider { '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', ], ]), - AnswerChoice.UNANSWERED, + AnswerChoice.B, ); // Replace `UNANSWERED` with the correct answer. } private static makeQuestion1(): QuizQuestion { @@ -53,7 +53,7 @@ export class NiaPackquiz implements QuizQuestionProvider { [AnswerChoice.C, 'Multiple languages like Python, JavaScript, and C++'], [AnswerChoice.D, 'C++'], ]), - AnswerChoice.UNANSWERED, + AnswerChoice.C, ); // Replace `UNANSWERED` with the correct answer. } private static makeQuestion2(): QuizQuestion { @@ -69,7 +69,7 @@ export class NiaPackquiz implements QuizQuestionProvider { [AnswerChoice.C, 'A method for creating a local copy of a repository'], [AnswerChoice.D, 'A tool to schedule automatic repository backups'], ]), - AnswerChoice.UNANSWERED, + AnswerChoice.A, ); // Replace `UNANSWERED` with the correct answer. } } diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index 02e42610e..ea066228a 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,20 +1,14 @@ import { Module } from '@nestjs/common'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; - - - - - -import { NiaPackquiz } from './nia_quiz.js'; - -import { JasonWatsonQuiz } from './jason_watson_quiz.js'; -import { MeikoStephensQuiz } from './meiko_stephens_quiz.js'; import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js'; import { EzraQuiz } from './ezra_quiz.js'; +import { JasonWatsonQuiz } from './jason_watson_quiz.js'; import { Jbeyquiz } from './jbeyquiz.js'; import { KhaylaSaundersQuiz } from './khayla_quiz.js'; +import { MeikoStephensQuiz } from './meiko_stephens_quiz.js'; import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js'; +import { NiaPackquiz } from './nia_quiz.js'; import { RasheedMillerQuiz } from './rasheed_miller_quiz.js'; From 4907e1b8f4306a32aeb93b871c0c83f5abd521b3 Mon Sep 17 00:00:00 2001 From: "Anthony D. Mays" Date: Thu, 13 Mar 2025 18:20:06 +0000 Subject: [PATCH 4/5] chore: removes answers Signed-off-by: Anthony D. Mays --- lesson_03/quiz/src/quizzes/nia_quiz.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lesson_03/quiz/src/quizzes/nia_quiz.ts b/lesson_03/quiz/src/quizzes/nia_quiz.ts index 07ccddfb5..542ef14ef 100644 --- a/lesson_03/quiz/src/quizzes/nia_quiz.ts +++ b/lesson_03/quiz/src/quizzes/nia_quiz.ts @@ -40,7 +40,7 @@ export class NiaPackquiz implements QuizQuestionProvider { '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', ], ]), - AnswerChoice.B, + AnswerChoice.UNANSWERED, ); // Replace `UNANSWERED` with the correct answer. } private static makeQuestion1(): QuizQuestion { @@ -53,7 +53,7 @@ export class NiaPackquiz implements QuizQuestionProvider { [AnswerChoice.C, 'Multiple languages like Python, JavaScript, and C++'], [AnswerChoice.D, 'C++'], ]), - AnswerChoice.C, + AnswerChoice.UNANSWERED, ); // Replace `UNANSWERED` with the correct answer. } private static makeQuestion2(): QuizQuestion { @@ -69,7 +69,7 @@ export class NiaPackquiz implements QuizQuestionProvider { [AnswerChoice.C, 'A method for creating a local copy of a repository'], [AnswerChoice.D, 'A tool to schedule automatic repository backups'], ]), - AnswerChoice.A, + AnswerChoice.UNANSWERED, ); // Replace `UNANSWERED` with the correct answer. } } From 76f5742516b4c6314c64ebddca10b73169819bc6 Mon Sep 17 00:00:00 2001 From: "Anthony D. Mays" Date: Thu, 13 Mar 2025 18:22:24 +0000 Subject: [PATCH 5/5] chore: fix bad character Signed-off-by: Anthony D. Mays --- lesson_03/quiz/src/quizzes/quizzes.module.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index 8c3343c95..765caf3ee 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,25 +1,25 @@ import { Module } from '@nestjs/common'; import { Bryanasingletonbarnhart } from './ bryana_singleton-barnhart_quiz.js'; +import { AnanatawaQuiz } from './ananatawa_quiz.js'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; -import { DylanLaffertyQuiz } from './dylan_lafferty_quiz.js'; import { ChanelHuttQuiz } from './Chanel_Huttquiz.js'; import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js'; import { DavisDQuiz } from './davisd_quiz.js'; +import { DylanLaffertyQuiz } from './dylan_lafferty_quiz.js'; import { EvanPhilakhongQuiz } from './evan_philakhong_quiz.js'; import { EzraQuiz } from './ezra_quiz.js'; import { JasonWatsonQuiz } from './jason_watson_quiz.js'; import { Jbeyquiz } from './jbeyquiz.js'; -import { KarensQuiz } from './karen_alabi_quiz.js'; import { JeremiahWingQuiz } from './jeremiah_wing_quiz.js'; +import { KarensQuiz } from './karen_alabi_quiz.js'; import { KhaylaSaundersQuiz } from './khayla_quiz.js'; import { MeikoStephensQuiz } from './meiko_stephens_quiz.js'; import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js'; +import { MontezBradleyQuiz } from './montez_quiz.js'; import { NiaPackquiz } from './nia_quiz.js'; import { OliviaJamesQuiz } from './olivia_james_quiz.js'; -import { MontezBradleyQuiz } from './montez_quiz.js'; = import { RasheedMillerQuiz } from './rasheed_miller_quiz.js'; -import { AnanatawaQuiz } from './ananatawa_quiz.js'; export const Quizzes = Symbol.for('Quizzes');