diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index 5729c2809..1cbc377f7 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -6,6 +6,10 @@ quiz: anotherone: - $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK - $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa + ezraquiz: + - $2y$10$fisFjMsmMwzlj3.PELyBNeupdruYROU00dwq296pg0VfHo05SSkta + - $2y$10$.Z44VoTaxQSdPEx7RatO6OVCw1ff6ohS0kZnCrHEcFnElIgkfjP0u + - $2y$10$nCm/E52FKO7DRo4XbpR2vu.HTyAzsDNNZr2dDfYJyblY1oLuGpnPO meikostephens: - $2y$10$AD1YHmrZZivus7DoM91UMuErNnpi63ueluFs7DcSQSrZbXwDycAOi - $2y$10$KvnxAYKh3A151RyOOFtOv.wfImRzZMgbBgKy3gyLd1uUSSjHaN.4u diff --git a/lesson_03/quiz/src/quizzes/ezra_quiz.ts b/lesson_03/quiz/src/quizzes/ezra_quiz.ts new file mode 100644 index 000000000..0e35695b6 --- /dev/null +++ b/lesson_03/quiz/src/quizzes/ezra_quiz.ts @@ -0,0 +1,60 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, +} from 'codedifferently-instructional'; + +export class EzraQuiz { + getProviderName() { + return 'ezraquiz'; + } + + makeQuizQuestions() { + return [ + EzraQuiz.makeQuestion0(), + EzraQuiz.makeQuestion1(), + EzraQuiz.makeQuestion2(), + ]; + } + + static makeQuestion0() { + return new MultipleChoiceQuizQuestion( + 0, + 'What is the most played video game in the world?', + new Map([ + [AnswerChoice.A, 'GTA V'], + [AnswerChoice.B, 'Call of Duty'], + [AnswerChoice.C, 'World of Warcraft'], + [AnswerChoice.D, 'MineCraft'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + static makeQuestion1() { + return new MultipleChoiceQuizQuestion( + 1, + 'What is the top tourist destination in the world?', + new Map([ + [AnswerChoice.A, 'China'], + [AnswerChoice.B, 'France'], + [AnswerChoice.C, 'Italy'], + [AnswerChoice.D, 'Brazil'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + static makeQuestion2() { + return new MultipleChoiceQuizQuestion( + 2, + 'What country has the largest number of ocean borders?', + new Map([ + [AnswerChoice.A, 'Canada'], + [AnswerChoice.B, 'India'], + [AnswerChoice.C, 'Australia'], + [AnswerChoice.D, 'United Kingdom'], + ]), + AnswerChoice.UNANSWERED, + ); // 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 a6d1ade79..4040445e8 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -2,6 +2,7 @@ import { Module } from '@nestjs/common'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js'; +import { EzraQuiz } from './ezra_quiz.js'; import { Jbeyquiz } from './jbeyquiz.js'; import { KhaylaSaundersQuiz } from './khayla_quiz.js'; import { MeikoStephensQuiz } from './meiko_stephens_quiz.js'; @@ -11,12 +12,14 @@ import { RasheedMillerQuiz } from './rasheed_miller_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); // Add your quiz provider here. + const QUIZ_PROVIDERS = [ AnthonyMaysQuiz, - AnotherQuiz, - MeikoStephensQuiz , + AnotherQuiz, + MeikoStephensQuiz, MercedesMathewsQuiz, Jbeyquiz, + EzraQuiz, DavidAdenaikeQuiz, KhaylaSaundersQuiz, RasheedMillerQuiz,