diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index 0515246b2..88af2f434 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 + trinitiejackson: + - $2y$10$rAjBDhSg9FX0aHDGy4cSlO76bdyy9p5P6ibEOO.AHbxPhUJ9xCcu. + - $2y$10$0nfjyM6HZyKq6To4sQ/Uvuv37qt0l6sI1hrS7EW3orVhzTwTZLLuq + - $2y$10$vtxCd52gGV0lAjsP0Ox3DexP2nNKZfaClM66aRU9f1FosxjZUMkUW + - $2y$10$5aphEGmaoeTKA0ojlYYYCuw8Wx9UTDAG3pVHNHYPMSwNqONcFKh/W tyranrices: - $2y$10$INlO9x6lp5oQ/tAeAwfh6e3rqn3n0sLsZNTDdZQAA16Z8QCvlfhYy - $2y$10$80z8O5yb/IFhHAc0zsJ/J.dwj/mOex0kXvPxIsSEyIh4d8EA/UyJ2 diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index a96f3669f..92e4f0efd 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,13 +1,21 @@ import { Module } from '@nestjs/common'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; +import { TrinitieJacksonQuiz } from './trinitie_jackson_quiz.js'; import { TyranRicesQuiz } from './tyran_rices_quiz.js'; import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); // Add your quiz provider here. -const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, TyranRicesQuiz, BrooklynHardenQuiz]; +const QUIZ_PROVIDERS = [ + AnthonyMaysQuiz, + TrinitieJacksonQuiz, + BrooklynHardenQuiz, + TyranRicesQuiz, + AnotherQuiz, + +]; @Module({ providers: [ diff --git a/lesson_03/quiz/src/quizzes/trinitie_jackson_quiz.ts b/lesson_03/quiz/src/quizzes/trinitie_jackson_quiz.ts new file mode 100644 index 000000000..d40ea59e7 --- /dev/null +++ b/lesson_03/quiz/src/quizzes/trinitie_jackson_quiz.ts @@ -0,0 +1,77 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class TrinitieJacksonQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'trinitiejackson'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ + TrinitieJacksonQuiz.makeQuestion0(), + TrinitieJacksonQuiz.makeQuestion1(), + TrinitieJacksonQuiz.makeQuestion2(), + TrinitieJacksonQuiz.makeQuestion3(), + ]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'Where was the term "fork" coined from?', + new Map([ + [AnswerChoice.A, 'GitHub'], + [AnswerChoice.B, 'Eclipse'], + [AnswerChoice.C, 'XCode'], + [AnswerChoice.D, 'NetBeans'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'In the desk analogy, what is the CPU?', + new Map([ + [AnswerChoice.A, 'motherboard'], + [AnswerChoice.B, 'power supply'], + [AnswerChoice.C, 'software'], + [AnswerChoice.D, 'calculator'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'What does the "cat" command do in a terminal?', + new Map([ + [AnswerChoice.A, 'copy a file or directory'], + [AnswerChoice.B, 'dumps contents of a file'], + [AnswerChoice.C, 'run any command'], + [AnswerChoice.D, 'view the last several lines of a file'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion3(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 3, + 'Which is NOT a void element in HTML?', + new Map([ + [AnswerChoice.A, 'img'], + [AnswerChoice.B, 'input'], + [AnswerChoice.C, 'br'], + [AnswerChoice.D, 'p'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } +}