From 218001f76181032ff5d7eee9b120be17a468474a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CA1-4U2T1NN=E2=80=9D?= <“a1.austinn19@gmail.com”> Date: Mon, 30 Sep 2024 18:11:05 +0000 Subject: [PATCH 1/3] feat: added my lesson 03 quiz; updated quiz.yaml; modified quizzes.module.ts; --- lesson_03/quiz/quiz.yaml | 4 ++ .../quiz/src/quizzes/chigazo_graham_quiz.ts | 60 +++++++++++++++++++ lesson_03/quiz/src/quizzes/quizzes.module.ts | 4 +- 3 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 lesson_03/quiz/src/quizzes/chigazo_graham_quiz.ts diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index c016c60e5..aea918df3 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -6,3 +6,7 @@ quiz: anotherone: - $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK - $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa + chigazograham: + - $2y$10$OTnSih9kHykUnsuM/YKufu3MXTpOZrif.dL13XwXt8rquJL4mV.m. + - $2y$10$je60MntrKRBd/1tz7hNUY.D/cyKOEM.hp6/1fVVVGJRIIitmUGI5e + - $2y$10$pPTmEp0acs8.NIAamLpmmuF7B72bXFZsikHywQI/JvfXuySkhHH5S \ No newline at end of file diff --git a/lesson_03/quiz/src/quizzes/chigazo_graham_quiz.ts b/lesson_03/quiz/src/quizzes/chigazo_graham_quiz.ts new file mode 100644 index 000000000..a4f5171b2 --- /dev/null +++ b/lesson_03/quiz/src/quizzes/chigazo_graham_quiz.ts @@ -0,0 +1,60 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class ChigazoGrahamsQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'chigazograham'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ChigazoGrahamsQuiz.makeQuestion1(), ChigazoGrahamsQuiz.makeQuestion2, ChigazoGrahamsQuiz.makeQuestion3()]; + } + + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'What is the sign for Modulo?', + new Map([ + [AnswerChoice.A, '^'], + [AnswerChoice.B, '*'], + [AnswerChoice.C,'%',], + [AnswerChoice.D, '//'], + ]), + AnswerChoice.UNANSWERED, + ); // Provide an answer. | AnswerChoice.C, '%' + } + + private static makeQuestion2(): QuizQuestion { + return new QuizQuestion( + 2, + 'Who is are big three in hip hop?', + 'A machine that automatically transforms input into output.', + new Map([ + [AnswerChoice.A, 'Kendrick Lamar, J. Cole, and Drake'], + [AnswerChoice.B, 'Tupac, Biggie, and Nas'], + [AnswerChoice.C, 'Kanye West, Eminem, and Lil Wayne',], + [AnswerChoice.D, 'K. Dot'], + ]), + AnswerChoice.UNANSWERED, + ); // Provide an answer. | AnswerChoice.D, 'K. Dot' + } + + private static makeQuestion3(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 3, + 'what is the answer to life, the universe, and everything else?', + new Map([ + [AnswerChoice.A, '42'], + [AnswerChoice.B, 'Jesus'], + [AnswerChoice.C,'N/A'], + [AnswerChoice.D, 'Whatever you want it to be!'], + ]), + AnswerChoice.UNANSWERED, + ); // Provide an answer. | AnswerChoice.A, '42' + } + +} \ No newline at end of file diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index ac82f4600..2f7af4256 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,11 +1,11 @@ -import { Module } from '@nestjs/common'; +import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); // Add your quiz provider here. -const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz]; +const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, ChigazoGrahamsQuiz]; @Module({ providers: [ From 7fb5542adf1d3c3b119d5be742c92ac401fbc793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CA1-4U2T1NN=E2=80=9D?= <“a1.austinn19@gmail.com”> Date: Tue, 1 Oct 2024 12:46:03 +0000 Subject: [PATCH 2/3] feat: added chigazo_graham_quiz; edited quizzes.module.ts and quiz.yaml; --- .../quiz/src/quizzes/chigazo_graham_quiz.ts | 34 ++++++++++--------- lesson_03/quiz/src/quizzes/quizzes.module.ts | 3 +- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/lesson_03/quiz/src/quizzes/chigazo_graham_quiz.ts b/lesson_03/quiz/src/quizzes/chigazo_graham_quiz.ts index a4f5171b2..711c1c9f5 100644 --- a/lesson_03/quiz/src/quizzes/chigazo_graham_quiz.ts +++ b/lesson_03/quiz/src/quizzes/chigazo_graham_quiz.ts @@ -11,50 +11,52 @@ export class ChigazoGrahamsQuiz implements QuizQuestionProvider { } makeQuizQuestions(): QuizQuestion[] { - return [ChigazoGrahamsQuiz.makeQuestion1(), ChigazoGrahamsQuiz.makeQuestion2, ChigazoGrahamsQuiz.makeQuestion3()]; + return [ + ChigazoGrahamsQuiz.makeQuestion0(), + ChigazoGrahamsQuiz.makeQuestion1(), + ChigazoGrahamsQuiz.makeQuestion2(), + ]; } - private static makeQuestion1(): QuizQuestion { + private static makeQuestion0(): QuizQuestion { return new MultipleChoiceQuizQuestion( - 1, - 'What is the sign for Modulo?', + 0, + 'What is the sign for modulo?', new Map([ [AnswerChoice.A, '^'], [AnswerChoice.B, '*'], - [AnswerChoice.C,'%',], + [AnswerChoice.C, '%'], [AnswerChoice.D, '//'], ]), AnswerChoice.UNANSWERED, ); // Provide an answer. | AnswerChoice.C, '%' } - private static makeQuestion2(): QuizQuestion { - return new QuizQuestion( - 2, - 'Who is are big three in hip hop?', - 'A machine that automatically transforms input into output.', + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'Who are hip hops big three', new Map([ [AnswerChoice.A, 'Kendrick Lamar, J. Cole, and Drake'], [AnswerChoice.B, 'Tupac, Biggie, and Nas'], - [AnswerChoice.C, 'Kanye West, Eminem, and Lil Wayne',], + [AnswerChoice.C, 'Kanye West, Eminem, and Lil Wayne'], [AnswerChoice.D, 'K. Dot'], ]), AnswerChoice.UNANSWERED, - ); // Provide an answer. | AnswerChoice.D, 'K. Dot' + ); // Provide an answer. | AnswerChoice.C, '%' } - private static makeQuestion3(): QuizQuestion { + private static makeQuestion2(): QuizQuestion { return new MultipleChoiceQuizQuestion( - 3, + 2, 'what is the answer to life, the universe, and everything else?', new Map([ [AnswerChoice.A, '42'], [AnswerChoice.B, 'Jesus'], - [AnswerChoice.C,'N/A'], + [AnswerChoice.C, 'N/A'], [AnswerChoice.D, 'Whatever you want it to be!'], ]), AnswerChoice.UNANSWERED, ); // Provide an answer. | AnswerChoice.A, '42' } - } \ No newline at end of file diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index 2f7af4256..2b3f142a7 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,6 +1,7 @@ -import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js'; +import { Module } from '@nestjs/common'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; +import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); From c6ccff73199803fcb1deeea1bfc70417c8564aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CA1-4U2T1NN=E2=80=9D?= <“a1.austinn19@gmail.com”> Date: Tue, 1 Oct 2024 13:04:21 +0000 Subject: [PATCH 3/3] fix: fixed merge conflicts; --- lesson_03/quiz/quiz.yaml | 3 --- lesson_03/quiz/src/quizzes/quizzes.module.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index 3b89709d3..e498ca944 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -6,12 +6,10 @@ quiz: anotherone: - $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK - $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa -<<<<<<< HEAD chigazograham: - $2y$10$OTnSih9kHykUnsuM/YKufu3MXTpOZrif.dL13XwXt8rquJL4mV.m. - $2y$10$je60MntrKRBd/1tz7hNUY.D/cyKOEM.hp6/1fVVVGJRIIitmUGI5e - $2y$10$pPTmEp0acs8.NIAamLpmmuF7B72bXFZsikHywQI/JvfXuySkhHH5S -======= oyeyemijimoh: - $2y$10$2LlSxAEM1HmR3Wl2fO6LQueu/77spr5SuWAh4b3MKesIWNy3CFjGe - $2y$10$csA90DFxK7.uq6dSfS06Yukk5fQPrzLvU2Lp43ArTs2za28LVvRGO @@ -24,4 +22,3 @@ quiz: - $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql. - $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC - $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW ->>>>>>> aa65ed15f6ebd5de0b1eea920d60a6b03179f545 diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index fdf3e7d7f..dcfe6a95e 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -16,7 +16,7 @@ const QUIZ_PROVIDERS = [ AnotherQuiz, JosephCaballeroQuiz, OyeyemiJimohQuiz, -, ChigazoGrahamsQuiz]; + ChigazoGrahamsQuiz]; @Module({ providers: [