diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index 819e27e30..b5827ea59 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 + oyeyemijimoh: + - $2y$10$2LlSxAEM1HmR3Wl2fO6LQueu/77spr5SuWAh4b3MKesIWNy3CFjGe + - $2y$10$csA90DFxK7.uq6dSfS06Yukk5fQPrzLvU2Lp43ArTs2za28LVvRGO + - $2y$10$UWT..AxwIEUX1CKzOX8G1.wqmRpnEPGCXFfkB7HaZd2x2xHmjCbQG josephcaballero: - $2y$10$FmVJ1V9hSIUbi8DGx4cq5.wPOMq5en312H4zb5H2AJUDtDeWJg74e - $2y$10$vI6tL8o2P23w/bh5tYvyf.iiH42BQHl5Rh1teG8mMaMfj1XNhO/.. diff --git a/lesson_03/quiz/src/quizzes/oyeyemi_jimoh_quiz.ts b/lesson_03/quiz/src/quizzes/oyeyemi_jimoh_quiz.ts new file mode 100644 index 000000000..36b7bfb0c --- /dev/null +++ b/lesson_03/quiz/src/quizzes/oyeyemi_jimoh_quiz.ts @@ -0,0 +1,62 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class OyeyemiJimohQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'oyeyemijimoh'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ + OyeyemiJimohQuiz.makeQuestion0(), + OyeyemiJimohQuiz.makeQuestion1(), + OyeyemiJimohQuiz.makeQuestion2(), + ]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'Who is the master soccer dribbler in the list below?', + new Map([ + [AnswerChoice.A, 'Jay Jay Okocha'], + [AnswerChoice.B, 'Christiana Ronaldo'], + [AnswerChoice.C, 'Sarr'], + [AnswerChoice.D, 'Sadio Mane'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'Which of the below tech company is not a cloud provider ?', + new Map([ + [AnswerChoice.A, 'Oracle'], + [AnswerChoice.B, 'Meta'], + [AnswerChoice.C, 'Microsoft'], + [AnswerChoice.D, 'Amazon'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'Which one does not belong to the group?', + new Map([ + [AnswerChoice.A, 'Keyboard'], + [AnswerChoice.B, 'Mouse'], + [AnswerChoice.C, 'Table'], + [AnswerChoice.D, 'Headphone'], + ]), + 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 b2593cf4c..0d6a58322 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,5 +1,6 @@ import { Module } from '@nestjs/common'; import { AnotherQuiz } from './another_quiz.js'; +import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js'; import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js'; @@ -7,11 +8,13 @@ import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); // Add your quiz provider here. + const QUIZ_PROVIDERS = [ AnthonyMaysQuiz, YafiahAbdullahQuiz, AnotherQuiz, JosephCaballeroQuiz, + OyeyemiJimohQuiz, ]; @Module({