From 3a9e4de6aa63dcb2d849642c719eb7dc19588747 Mon Sep 17 00:00:00 2001 From: Dylan Lafferty Date: Mon, 10 Mar 2025 20:18:07 +0000 Subject: [PATCH 1/3] Chore: Get Quiz to compile --- .../quiz/src/quizzes/Dylan_Lafferty_quiz.ts | 56 +++++++++++++++++++ lesson_03/quiz/src/quizzes/quizzes.module.ts | 3 +- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts diff --git a/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts b/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts new file mode 100644 index 000000000..80450341d --- /dev/null +++ b/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts @@ -0,0 +1,56 @@ + import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + + + getProviderName(): string { + return 'dylanlafferty'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [DylanLaffertyQuiz.makeQuestion0(), DylanLaffertyQuiz.makeQuestion0()]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'What is the next upcoming holiday?', + new Map([ + [AnswerChoice.A, 'St. Patricks Day'], + [AnswerChoice.B, 'Valentines Day'], + [AnswerChoice.C, 'Halloween'], + [AnswerChoice.D, '4th of July'], + ]), + AnswerChoice.UNANSWERED, + ); + + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'What food is traditionally eaten on St Patricks Day?', + new Map([ + [AnswerChoice.A, 'Tacos'], + [AnswerChoice.B, 'Pizza'], + [AnswerChoice.C, 'Corned Beef and Cabbage'], + [AnswerChoice.D, 'Lasagna'], + ]), + AnswerChoice.UNANSWERED, + ); + } + + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'What is the mascot of St Patricks Day?', + new Map([ + [AnswerChoice.A, 'Bunny'], + [AnswerChoice.B, 'St. Nicholas'], + [AnswerChoice.C, 'Turkey'], + [AnswerChoice.D, 'Leprechaun'], + ]), + AnswerChoice.UNANSWERED, + ); + } diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index ac82f4600..de3a0d6ba 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,11 +1,12 @@ import { Module } from '@nestjs/common'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; +import { DylanLaffertyQuiz } from './Dylan_Lafferty_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); // Add your quiz provider here. -const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz]; +const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, DylanLaffertyQuiz]; @Module({ providers: [ From 2d382f6b036737a153b9f842ed4960c0bec07048 Mon Sep 17 00:00:00 2001 From: Dylan Lafferty Date: Mon, 10 Mar 2025 20:45:58 +0000 Subject: [PATCH 2/3] Chore: SWait for review from Anthony --- lesson_03/quiz/quiz.yaml | 6 +++++- lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts | 15 ++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index f077fd998..bca3f429d 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -5,4 +5,8 @@ quiz: - $2y$10$55EXRjF26JIgebtoH800ZOJecfefvMgHicuxf/rwTENuxiUaFQcNe anotherone: - $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK - - $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa \ No newline at end of file + - $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa + dylanlafferty: + - $2y$10$JpiqIw6Ip/DUgaOkggURk.wP1OtxxAlmYJvVPJQ/6GfG3SslHNrBu + - $2y$10$mPlPI9IsKf8cCKyQj3gtTOY8ffwgwTddHHjVAVd1PcAzfatOHED06 + - $2y$10$Sr6Fu4QqmqX/oKYnypzQ9e4SxOiTuFAgnLVNd6rKz9AxZlcAjWwaK diff --git a/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts b/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts index 80450341d..5b6294ead 100644 --- a/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts +++ b/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts @@ -1,17 +1,21 @@ - import { +import { AnswerChoice, MultipleChoiceQuizQuestion, QuizQuestion, QuizQuestionProvider, } from 'codedifferently-instructional'; - - + +export class DylanLaffertyQuiz implements QuizQuestionProvider { getProviderName(): string { return 'dylanlafferty'; } makeQuizQuestions(): QuizQuestion[] { - return [DylanLaffertyQuiz.makeQuestion0(), DylanLaffertyQuiz.makeQuestion0()]; + return [ + DylanLaffertyQuiz.makeQuestion0(), + DylanLaffertyQuiz.makeQuestion1(), + DylanLaffertyQuiz.makeQuestion2(), + ]; } private static makeQuestion0(): QuizQuestion { @@ -26,7 +30,7 @@ ]), AnswerChoice.UNANSWERED, ); - + } private static makeQuestion1(): QuizQuestion { return new MultipleChoiceQuizQuestion( 1, @@ -54,3 +58,4 @@ AnswerChoice.UNANSWERED, ); } +} From 9ae6de723ec03d0ba0e17b7af45ec7af3e674390 Mon Sep 17 00:00:00 2001 From: Dylan Lafferty Date: Mon, 10 Mar 2025 22:37:34 +0000 Subject: [PATCH 3/3] Chore: Fixed the questions to make them related to computers --- .../quiz/src/quizzes/Dylan_Lafferty_quiz.ts | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts b/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts index 5b6294ead..84075734e 100644 --- a/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts +++ b/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts @@ -21,41 +21,41 @@ export class DylanLaffertyQuiz implements QuizQuestionProvider { private static makeQuestion0(): QuizQuestion { return new MultipleChoiceQuizQuestion( 0, - 'What is the next upcoming holiday?', + 'What is the Power supply unit most compared to when comparing it to a human body?', new Map([ - [AnswerChoice.A, 'St. Patricks Day'], - [AnswerChoice.B, 'Valentines Day'], - [AnswerChoice.C, 'Halloween'], - [AnswerChoice.D, '4th of July'], + [AnswerChoice.A, 'Heart'], + [AnswerChoice.B, 'Arm'], + [AnswerChoice.C, 'Leg'], + [AnswerChoice.D, 'Brain'], ]), - AnswerChoice.UNANSWERED, + AnswerChoice.A, ); } private static makeQuestion1(): QuizQuestion { return new MultipleChoiceQuizQuestion( 1, - 'What food is traditionally eaten on St Patricks Day?', + 'What is the full name of CPU?', new Map([ - [AnswerChoice.A, 'Tacos'], - [AnswerChoice.B, 'Pizza'], - [AnswerChoice.C, 'Corned Beef and Cabbage'], - [AnswerChoice.D, 'Lasagna'], + [AnswerChoice.A, 'Central Place Unit'], + [AnswerChoice.B, 'Certified Processing Unit'], + [AnswerChoice.C, 'Central Processing Unit'], + [AnswerChoice.D, 'Configured Procerdale Unicode'], ]), - AnswerChoice.UNANSWERED, + AnswerChoice.C, ); } private static makeQuestion2(): QuizQuestion { return new MultipleChoiceQuizQuestion( 2, - 'What is the mascot of St Patricks Day?', + 'What is used to keep Short term memory in a computer?', new Map([ - [AnswerChoice.A, 'Bunny'], - [AnswerChoice.B, 'St. Nicholas'], - [AnswerChoice.C, 'Turkey'], - [AnswerChoice.D, 'Leprechaun'], + [AnswerChoice.A, 'Hard Drive'], + [AnswerChoice.B, 'SSD'], + [AnswerChoice.C, 'GPU'], + [AnswerChoice.D, 'RAM'], ]), - AnswerChoice.UNANSWERED, + AnswerChoice.D, ); } }