Skip to content

Commit 6d36cd0

Browse files
committed
feat: added quiz file
1 parent 7659ee8 commit 6d36cd0

File tree

3 files changed

+70
-2
lines changed

3 files changed

+70
-2
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ quiz:
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9+
oyeyemijimoh:
10+
- $2y$10$2LlSxAEM1HmR3Wl2fO6LQueu/77spr5SuWAh4b3MKesIWNy3CFjGe
11+
- $2y$10$csA90DFxK7.uq6dSfS06Yukk5fQPrzLvU2Lp43ArTs2za28LVvRGO
12+
- $2y$10$UWT..AxwIEUX1CKzOX8G1.wqmRpnEPGCXFfkB7HaZd2x2xHmjCbQG
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class OyeyemiJimohQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'oyeyemijimoh';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
OyeyemiJimohQuiz.makeQuestion0(),
16+
OyeyemiJimohQuiz.makeQuestion1(),
17+
OyeyemiJimohQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'Who is the master soccer dribbler in the list below?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Jay Jay Okocha'],
27+
[AnswerChoice.B, 'Christiana Ronaldo'],
28+
[AnswerChoice.C, 'Sarr'],
29+
[AnswerChoice.D, 'Sadio Mane'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'Which of the below tech company is not a cloud provider ?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Oracle'],
41+
[AnswerChoice.B, 'Meta'],
42+
[AnswerChoice.C, 'Microsoft'],
43+
[AnswerChoice.D, 'Amazon'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'Which one does not belong to the group?',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, 'Keyboard'],
55+
[AnswerChoice.B, 'Mouse'],
56+
[AnswerChoice.C, 'Table'],
57+
[AnswerChoice.D, 'Headphone'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
); // Replace `UNANSWERED` with the correct answer.
61+
}
62+
}

lesson_03/quiz/src/quizzes/quizzes.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
3-
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
3+
//import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4+
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
45

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

78
// Add your quiz provider here.
8-
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz];
9+
//const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, OyeyemiJimohQuiz];
10+
const QUIZ_PROVIDERS = [AnotherQuiz, OyeyemiJimohQuiz];
911

1012
@Module({
1113
providers: [

0 commit comments

Comments
 (0)