diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index 266f1a7e7..f19edeb67 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -6,6 +6,11 @@ quiz: anotherone: - $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK - $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa + dylanlafferty: + - $2y$10$JpiqIw6Ip/DUgaOkggURk.wP1OtxxAlmYJvVPJQ/6GfG3SslHNrBu + - $2y$10$mPlPI9IsKf8cCKyQj3gtTOY8ffwgwTddHHjVAVd1PcAzfatOHED06 + - $2y$10$Sr6Fu4QqmqX/oKYnypzQ9e4SxOiTuFAgnLVNd6rKz9AxZlcAjWwaK + computerparts: - $2y$10$7TUXmYaJlWnRZTzYR..CsefgVcOZJMGt7ctxyAf.G3obBBFEAB342 - $2y$10$0ghuTDegle177q8VjCgQ2OhManKjotYXrcDT3SLyUF8KvI152Wd0. 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..8ea8cf96a --- /dev/null +++ b/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts @@ -0,0 +1,66 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class DylanLaffertyQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'dylanlafferty'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ + DylanLaffertyQuiz.makeQuestion0(), + DylanLaffertyQuiz.makeQuestion1(), + DylanLaffertyQuiz.makeQuestion2(), + ]; + + return [ + DylanLaffertyQuiz.makeQuestion0(), + DylanLaffertyQuiz.makeQuestion0(), + ]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'What is the Power supply unit most compared to when comparing it to a human body?', + new Map([ + [AnswerChoice.A, 'Heart'], + [AnswerChoice.B, 'Arm'], + [AnswerChoice.C, 'Leg'], + [AnswerChoice.D, 'Brain'], + ]), + AnswerChoice.UNANSWERED, + ); + } + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'What is the full name of CPU?', + new Map([ + [AnswerChoice.A, 'Central Place Unit'], + [AnswerChoice.B, 'Certified Processing Unit'], + [AnswerChoice.C, 'Central Processing Unit'], + [AnswerChoice.D, 'Configured Procerdale Unicode'], + ]), + AnswerChoice.UNANSWERED, + ); + } + + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'What is used to keep Short term memory in a computer?', + new Map([ + [AnswerChoice.A, 'Hard Drive'], + [AnswerChoice.B, 'SSD'], + [AnswerChoice.C, 'GPU'], + [AnswerChoice.D, 'RAM'], + ]), + AnswerChoice.UNANSWERED, + ); + } +} diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index 090417429..6a36c05b5 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,12 +1,23 @@ 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'; + import { Jbeyquiz } from './jbeyquiz.js'; import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); // Add your quiz provider here. + +const QUIZ_PROVIDERS = [ + AnthonyMaysQuiz, + AnotherQuiz, + DylanLaffertyQuiz, + Jbeyquiz, +]; +const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, Jbeyquiz]; + const QUIZ_PROVIDERS = [ AnthonyMaysQuiz, AnotherQuiz,