Skip to content

Commit 3a9e4de

Browse files
committed
Chore: Get Quiz to compile
1 parent 04825a1 commit 3a9e4de

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
9+
getProviderName(): string {
10+
return 'dylanlafferty';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [DylanLaffertyQuiz.makeQuestion0(), DylanLaffertyQuiz.makeQuestion0()];
15+
}
16+
17+
private static makeQuestion0(): QuizQuestion {
18+
return new MultipleChoiceQuizQuestion(
19+
0,
20+
'What is the next upcoming holiday?',
21+
new Map<AnswerChoice, string>([
22+
[AnswerChoice.A, 'St. Patricks Day'],
23+
[AnswerChoice.B, 'Valentines Day'],
24+
[AnswerChoice.C, 'Halloween'],
25+
[AnswerChoice.D, '4th of July'],
26+
]),
27+
AnswerChoice.UNANSWERED,
28+
);
29+
30+
private static makeQuestion1(): QuizQuestion {
31+
return new MultipleChoiceQuizQuestion(
32+
1,
33+
'What food is traditionally eaten on St Patricks Day?',
34+
new Map<AnswerChoice, string>([
35+
[AnswerChoice.A, 'Tacos'],
36+
[AnswerChoice.B, 'Pizza'],
37+
[AnswerChoice.C, 'Corned Beef and Cabbage'],
38+
[AnswerChoice.D, 'Lasagna'],
39+
]),
40+
AnswerChoice.UNANSWERED,
41+
);
42+
}
43+
44+
private static makeQuestion2(): QuizQuestion {
45+
return new MultipleChoiceQuizQuestion(
46+
2,
47+
'What is the mascot of St Patricks Day?',
48+
new Map<AnswerChoice, string>([
49+
[AnswerChoice.A, 'Bunny'],
50+
[AnswerChoice.B, 'St. Nicholas'],
51+
[AnswerChoice.C, 'Turkey'],
52+
[AnswerChoice.D, 'Leprechaun'],
53+
]),
54+
AnswerChoice.UNANSWERED,
55+
);
56+
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4+
import { DylanLaffertyQuiz } from './Dylan_Lafferty_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, DylanLaffertyQuiz];
910

1011
@Module({
1112
providers: [

0 commit comments

Comments
 (0)