Skip to content

Commit ebda4d0

Browse files
enyabutiEzra Nyabuti
andauthored
feat: adds Ezra's custom quiz (#116)
* Fixed question numbering * Fixed question numbering * Fixed question numbering * Added back the deleted content. * chore: removes dupe files * chore: rename TravelQuiz to ezraquiz in quiz configuration and provider name --------- Co-authored-by: Ezra Nyabuti <[email protected]>
1 parent 556c514 commit ebda4d0

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ quiz:
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9+
ezraquiz:
10+
- $2y$10$fisFjMsmMwzlj3.PELyBNeupdruYROU00dwq296pg0VfHo05SSkta
11+
- $2y$10$.Z44VoTaxQSdPEx7RatO6OVCw1ff6ohS0kZnCrHEcFnElIgkfjP0u
12+
- $2y$10$nCm/E52FKO7DRo4XbpR2vu.HTyAzsDNNZr2dDfYJyblY1oLuGpnPO
913
meikostephens:
1014
- $2y$10$AD1YHmrZZivus7DoM91UMuErNnpi63ueluFs7DcSQSrZbXwDycAOi
1115
- $2y$10$KvnxAYKh3A151RyOOFtOv.wfImRzZMgbBgKy3gyLd1uUSSjHaN.4u
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
} from 'codedifferently-instructional';
5+
6+
export class EzraQuiz {
7+
getProviderName() {
8+
return 'ezraquiz';
9+
}
10+
11+
makeQuizQuestions() {
12+
return [
13+
EzraQuiz.makeQuestion0(),
14+
EzraQuiz.makeQuestion1(),
15+
EzraQuiz.makeQuestion2(),
16+
];
17+
}
18+
19+
static makeQuestion0() {
20+
return new MultipleChoiceQuizQuestion(
21+
0,
22+
'What is the most played video game in the world?',
23+
new Map([
24+
[AnswerChoice.A, 'GTA V'],
25+
[AnswerChoice.B, 'Call of Duty'],
26+
[AnswerChoice.C, 'World of Warcraft'],
27+
[AnswerChoice.D, 'MineCraft'],
28+
]),
29+
AnswerChoice.UNANSWERED,
30+
); // Replace `UNANSWERED` with the correct answer.
31+
}
32+
33+
static makeQuestion1() {
34+
return new MultipleChoiceQuizQuestion(
35+
1,
36+
'What is the top tourist destination in the world?',
37+
new Map([
38+
[AnswerChoice.A, 'China'],
39+
[AnswerChoice.B, 'France'],
40+
[AnswerChoice.C, 'Italy'],
41+
[AnswerChoice.D, 'Brazil'],
42+
]),
43+
AnswerChoice.UNANSWERED,
44+
); // Replace `UNANSWERED` with the correct answer.
45+
}
46+
47+
static makeQuestion2() {
48+
return new MultipleChoiceQuizQuestion(
49+
2,
50+
'What country has the largest number of ocean borders?',
51+
new Map([
52+
[AnswerChoice.A, 'Canada'],
53+
[AnswerChoice.B, 'India'],
54+
[AnswerChoice.C, 'Australia'],
55+
[AnswerChoice.D, 'United Kingdom'],
56+
]),
57+
AnswerChoice.UNANSWERED,
58+
); // Replace `UNANSWERED` with the correct answer.
59+
}
60+
}

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
44
import { JasonWatsonQuiz } from './jason_watson_quiz.js';
55
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
66
import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js';
7+
import { EzraQuiz } from './ezra_quiz.js';
78
import { Jbeyquiz } from './jbeyquiz.js';
89
import { KhaylaSaundersQuiz } from './khayla_quiz.js';
910
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
@@ -12,12 +13,14 @@ import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
1213
export const Quizzes = Symbol.for('Quizzes');
1314

1415
// Add your quiz provider here.
16+
1517
const QUIZ_PROVIDERS = [
1618
AnthonyMaysQuiz,
17-
AnotherQuiz,
18-
MeikoStephensQuiz ,
19+
AnotherQuiz,
20+
MeikoStephensQuiz,
1921
MercedesMathewsQuiz,
2022
Jbeyquiz,
23+
EzraQuiz,
2124
DavidAdenaikeQuiz,
2225
KhaylaSaundersQuiz,
2326
RasheedMillerQuiz,

0 commit comments

Comments
 (0)