diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index d54ebd19a..fb9dfd238 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 + danielsonadjocy: + - $2y$13$a2VPLkXi0XoTkCgytHabiuFX36ezOtQvSgG8Fjonlp.FYsgDnMQ1S + - $2y$10$z37Nf6Ay1CZrbb3OtmhaXuFGnOqiUgAEc6CThl3iUAVFE3kEYS/cq + - $2y$10$z37Nf6Ay1CZrbb3OtmhaXuFGnOqiUgAEc6CThl3iUAVFE3kEYS/cq benjaminscott: - $2y$10$0iAVwkn0xfqhPTeVqnmmyO7g7aXGKBi66auNd0FfIQOK0pdSxeU2u - $2y$10$HantnEd1PSiBewfIt45yMeM2knNgv7mmwBiE16JctO/mu35SVdR5. @@ -22,4 +26,4 @@ quiz: brooklynharden: - $2y$10$FMRsdjEhIG0anbZOIcVvSOy4e4eFTZGIYYyATChwc.QRMpWuomR5C - $2y$10$0AQW/94c4pPxp8xIhJUIs.qoLnUuQg/Hwe1vd4975K96EKGEPz.H6 - - $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W \ No newline at end of file + - $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W diff --git a/lesson_03/quiz/src/quizzes/danielson_adjocys_quiz.ts b/lesson_03/quiz/src/quizzes/danielson_adjocys_quiz.ts new file mode 100644 index 000000000..1b66610cb --- /dev/null +++ b/lesson_03/quiz/src/quizzes/danielson_adjocys_quiz.ts @@ -0,0 +1,63 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class DanielsonAdjocyQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'danielsonadjocy'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ + DanielsonAdjocyQuiz.makeQuestion0(), + DanielsonAdjocyQuiz.makeQuestion1(), + DanielsonAdjocyQuiz.makeQuestion2(), + ]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'What should go first in a pc frame?', + new Map([ + [AnswerChoice.A, 'CPU'], + [AnswerChoice.B, 'GPU'], + [ + AnswerChoice.C, + 'Motherboard', + ], + [AnswerChoice.D, 'Power supply'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'True or False: Data in a computer is represented by Binary, Decimal, and Hexadecimal', + new Map([ + [AnswerChoice.A, 'True'], + [AnswerChoice.B, 'False'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'What is the brain of the computer?', + new Map([ + [AnswerChoice.A, 'CPU'], + [AnswerChoice.B, 'GPU'], + [AnswerChoice.C, 'Motherboard'], + [AnswerChoice.D, 'Power supply'], + ]), + 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 f24914e6c..94ff792ef 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,4 +1,5 @@ import { Module } from '@nestjs/common'; +import { DanielsonAdjocyQuiz } from './danielson_adjocys_quiz.js'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; import { BenjaminScottQuiz } from './benjamin_scott_quiz.js'; @@ -9,15 +10,20 @@ export const Quizzes = Symbol.for('Quizzes'); // Add your quiz provider here. + + + const QUIZ_PROVIDERS = [ AnthonyMaysQuiz, TrinitieJacksonQuiz, BrooklynHardenQuiz, TyranRicesQuiz, AnotherQuiz, - BenjaminScottQuiz + BenjaminScottQuiz, + DanielsonAdjocyQuiz ]; + @Module({ providers: [ ...QUIZ_PROVIDERS,