Skip to content

feat: added quiz file - Oyeyemi Jimoh #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lesson_03/quiz/quiz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/..
Expand Down
62 changes: 62 additions & 0 deletions lesson_03/quiz/src/quizzes/oyeyemi_jimoh_quiz.ts
Original file line number Diff line number Diff line change
@@ -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, string>([
[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, string>([
[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, string>([
[AnswerChoice.A, 'Keyboard'],
[AnswerChoice.B, 'Mouse'],
[AnswerChoice.C, 'Table'],
[AnswerChoice.D, 'Headphone'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
}
3 changes: 3 additions & 0 deletions lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
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';

export const Quizzes = Symbol.for('Quizzes');

// Add your quiz provider here.

const QUIZ_PROVIDERS = [
AnthonyMaysQuiz,
YafiahAbdullahQuiz,
AnotherQuiz,
JosephCaballeroQuiz,
OyeyemiJimohQuiz,
];

@Module({
Expand Down