diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index 203b424ce..266f1a7e7 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -10,3 +10,7 @@ quiz: - $2y$10$7TUXmYaJlWnRZTzYR..CsefgVcOZJMGt7ctxyAf.G3obBBFEAB342 - $2y$10$0ghuTDegle177q8VjCgQ2OhManKjotYXrcDT3SLyUF8KvI152Wd0. - $2y$10$JXoeInFy4UzHhi2Lskxzeu7CQ9RprnJgBw9pjAlV.t6zQyJTyy8OK + mercedesmathews: + - $2y$10$hRwUbEYSqz761B.cG79T2uYsYPiEtKu.JgD3Aj7.Mofx27TtX5YHa + - $2y$10$qE/gXxpq62FEGJOJd9MDA.vpDYLTNSsZbqZLpD/0368CKkcNBzW1y + - $2y$10$yI/2BgOyqQfLdHM3ixPE5uLu89su/sHRJB2c5szDFIAYXDhRakS.C diff --git a/lesson_03/quiz/src/quizzes/mercedes_mathews_quiz.ts b/lesson_03/quiz/src/quizzes/mercedes_mathews_quiz.ts new file mode 100644 index 000000000..084bbbb8e --- /dev/null +++ b/lesson_03/quiz/src/quizzes/mercedes_mathews_quiz.ts @@ -0,0 +1,62 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class MercedesMathewsQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'mercedesmathews'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ + MercedesMathewsQuiz.makeQuestion0(), + MercedesMathewsQuiz.makeQuestion1(), + MercedesMathewsQuiz.makeQuestion2(), + ]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'Which HTML tag is used for a secondary header?', + new Map([ + [AnswerChoice.A, '

'], + [AnswerChoice.B, '

'], + [AnswerChoice.C, '

'], + [AnswerChoice.D, '

'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'Which HTML tag makes text bold?', + new Map([ + [AnswerChoice.A, ''], + [AnswerChoice.B, ''], + [AnswerChoice.C, 'Both of the above'], + [AnswerChoice.D, 'Neither of the above'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'Which HTML tag is not a void element and needs a closing tag?', + new Map([ + [AnswerChoice.A, ''], + [AnswerChoice.B, '
'], + [AnswerChoice.C, ''], + [AnswerChoice.D, ''], + ]), + 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 61b17227e..090417429 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -2,11 +2,17 @@ import { Module } from '@nestjs/common'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_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, Jbeyquiz]; +const QUIZ_PROVIDERS = [ + AnthonyMaysQuiz, + AnotherQuiz, + MercedesMathewsQuiz, + Jbeyquiz, +]; @Module({ providers: [