diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index 54633579f..819e27e30 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -6,7 +6,11 @@ quiz: anotherone: - $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK - $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa + josephcaballero: + - $2y$10$FmVJ1V9hSIUbi8DGx4cq5.wPOMq5en312H4zb5H2AJUDtDeWJg74e + - $2y$10$vI6tL8o2P23w/bh5tYvyf.iiH42BQHl5Rh1teG8mMaMfj1XNhO/.. + - $2y$10$BSPejBBqvmV7iEilAy7kOOaBCtIVDWxfvH53b/v106qadbhQeQXEW yafiahAbdullah: - - $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql. - - $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC - - $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW + - $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql. + - $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC + - $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW diff --git a/lesson_03/quiz/src/quizzes/joseph_caballero_quiz.ts b/lesson_03/quiz/src/quizzes/joseph_caballero_quiz.ts new file mode 100644 index 000000000..aa4d703d0 --- /dev/null +++ b/lesson_03/quiz/src/quizzes/joseph_caballero_quiz.ts @@ -0,0 +1,55 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class JosephCaballeroQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'josephcaballero'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ + JosephCaballeroQuiz.makeQuestion0(), + JosephCaballeroQuiz.makeQuestion1(), + JosephCaballeroQuiz.makeQuestion2(), + ]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'What is HTML?', + new Map([ + [AnswerChoice.A, 'A food branch'], + [ + AnswerChoice.B, + 'A hypertext markup language for frontend development', + ], + [AnswerChoice.C, 'An animal'], + [AnswerChoice.D, 'Whatever you want it to be!'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer . + } + + private static makeQuestion1(): QuizQuestion { + return new QuizQuestion(1, 'What is the styling language for HTML?', ''); + // Provide an answer. + } + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'What does CSS stand for ?', + new Map([ + [AnswerChoice.A, 'Computing Style Software'], + [AnswerChoice.B, 'Cascading Style Sheets'], + [AnswerChoice.C, 'Circle Stuff and Stuff'], + [AnswerChoice.D, 'Whatever you want it to be!'], + ]), + 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 44a7197a2..b2593cf4c 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,13 +1,18 @@ import { Module } from '@nestjs/common'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; +import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js'; import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js'; - export const Quizzes = Symbol.for('Quizzes'); // Add your quiz provider here. -const QUIZ_PROVIDERS = [AnthonyMaysQuiz,YafiahAbdullahQuiz, AnotherQuiz]; +const QUIZ_PROVIDERS = [ + AnthonyMaysQuiz, + YafiahAbdullahQuiz, + AnotherQuiz, + JosephCaballeroQuiz, +]; @Module({ providers: [