Skip to content

Commit ad7e866

Browse files
committed
added in lesson 3 quiz work
1 parent 52ba282 commit ad7e866

File tree

3 files changed

+68
-2
lines changed

3 files changed

+68
-2
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ quiz:
1717
rmill:
1818
- $2y$10$FquR69q7W4E68TX/SNCB7u8Ri0DOFRDqsUPdGfuyIBjZJRVFkNI.6
1919
- $2y$10$FSWRA7hulVpyVxd8s67Nxuq/1cdmviW24qqoUbqihBf79cR.w9yly
20-
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
20+
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
21+
Justin:
22+
- $2y$10$oLpmVAdqLqak5GfBAzXOluiPY1mVWjGz04DJSvvTKxYXxEcUCTOEW
23+
- $2y$10$Qn8i04ef5sviCn0RvkUeOOPlhrMb4A6QOjY4dbh/kBKhq7tIMmpqO
24+
- $2y$10$N7ggPSg7MJFmiLKwZA.Zqe2iEGxmo7uJtxAmM3Mj30hhCw6pDWEky
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class JustinsQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'Justin';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
JustinsQuiz.makeQuestion0(),
16+
JustinsQuiz.makeQuestion1(),
17+
JustinsQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'How many planets are in our solar system?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, '8'],
27+
[AnswerChoice.B, '9'],
28+
[AnswerChoice.C, '12'],
29+
[AnswerChoice.D, '10'],
30+
]),
31+
AnswerChoice.A,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'How man states are there in the United States?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, '53'],
41+
[AnswerChoice.B, '52'],
42+
[AnswerChoice.C, '48'],
43+
[AnswerChoice.D, '50'],
44+
]),
45+
AnswerChoice.D,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
private static makeQuestion2(): QuizQuestion {
49+
return new MultipleChoiceQuizQuestion(
50+
2,
51+
'What date does Christmas fall on?',
52+
new Map<AnswerChoice, string>([
53+
[AnswerChoice.A, 'December 25th'],
54+
[AnswerChoice.B, 'December 24th'],
55+
[AnswerChoice.C, 'December 26th'],
56+
[AnswerChoice.D, 'December 23rd'],
57+
]),
58+
AnswerChoice.A,
59+
); // Replace `UNANSWERED` with the correct answer.
60+
}
61+
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
44
import { Jbeyquiz } from './jbeyquiz.js';
55
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
66
import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
7-
7+
import { JustinsQuiz } from './justin_eklund_quiz.js';
88
export const Quizzes = Symbol.for('Quizzes');
99

1010
// Add your quiz provider here.
@@ -14,6 +14,7 @@ const QUIZ_PROVIDERS = [
1414
MercedesMathewsQuiz,
1515
Jbeyquiz,
1616
RasheedMillerQuiz,
17+
JustinsQuiz,
1718
];
1819

1920
@Module({

0 commit comments

Comments
 (0)