Skip to content

Commit 0b9b989

Browse files
author
jjcapparell
committed
Added james_capparellquiz.ts, updated quizzes.module.ts, edited the quiz.yaml files
1 parent 7659ee8 commit 0b9b989

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
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+
jamescapparell:
10+
- $2y$10$iLvL/AaFPzcGZrcna7umMuHqkZe1f9at/ix77NUI6uakDGNuVKQCy
11+
- $2y$10$FLxmGXJLm5EziyhA5D33ju0kUjXhiDbuUdImciLQz8lBRu5ou0hee
12+
- $2y$10$9bIwC0Or.LhwAZrNL5Dvn.vjyhDF79Iw5ukm3h/oKauRCYOGSIlSK
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class JamesCapparellQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'jamescapparell';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
JamesCapparellQuiz.makeQuestion0(),
16+
JamesCapparellQuiz.makeQuestion1(),
17+
JamesCapparellQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What county in Delaware is Code differently offices in?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Sussex County'],
27+
[AnswerChoice.B, 'Kent County'],
28+
[AnswerChoice.C, 'New Castle County'],
29+
[AnswerChoice.D, 'Lancaster County'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
private static makeQuestion1(): QuizQuestion {
35+
return new MultipleChoiceQuizQuestion(
36+
1,
37+
'Which video game charcter has the most games in their series?',
38+
new Map<AnswerChoice, string>([
39+
[AnswerChoice.A, 'Mario'],
40+
[AnswerChoice.B, 'Sonic'],
41+
[AnswerChoice.C, 'Mega Man'],
42+
[AnswerChoice.D, 'Pikachu'],
43+
]),
44+
AnswerChoice.UNANSWERED,
45+
); // Replace `UNANSWERED` with the correct answer.
46+
}
47+
48+
private static makeQuestion2(): QuizQuestion {
49+
return new QuizQuestion(
50+
2,
51+
'Type the full answer while filling in the blanks! A _____ that transforms ____ data into ____ data using automatically executed, pre-programmed ____.',
52+
'A _____ that transforms ____ data into ____ data using automatically executed, pre-programmed ____.',
53+
); // Provide an answer.
54+
}
55+
}

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 { JamesCapparellQuiz } from './james_capparell_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, JamesCapparellQuiz];
910

1011
@Module({
1112
providers: [

0 commit comments

Comments
 (0)