Skip to content

Commit bf279ba

Browse files
feat: adds Olivia's custom quiz (code-differently#133)
* added all 3 files * fix: removed duplicate 02 question --------- Co-authored-by: Anthony D. Mays <[email protected]>
1 parent 045ea7c commit bf279ba

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ quiz:
5050
- $2y$10$FquR69q7W4E68TX/SNCB7u8Ri0DOFRDqsUPdGfuyIBjZJRVFkNI.6
5151
- $2y$10$FSWRA7hulVpyVxd8s67Nxuq/1cdmviW24qqoUbqihBf79cR.w9yly
5252
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
53+
oliviajames:
54+
- $2y$10$XNIaT3YK/NmvATnebmrOHuIoSqsGlfqlW82R2NfFxEJn1CWmmzgzm
55+
- $2y$10$mdHWON2e8lS8HUQZkp5W0OoAd5xkdUCouXCeFPnoz3Ilpjv5Vb9uu
56+
- $2y$10$hGQy6LkNRkXfT9Vk67c4meGH.99yLT73.HKfzWqsgTKHLHerzI7ey
5357
evanphilakhong:
5458
- $2y$10$3ERfjtWq6bYipHm0QGOuDe8oeXth3dnmfxT8g5P65sc8m4EivQNY.
5559
- $2y$10$cr3WSpMx9zljgMYCqz4uYOAMT2iOzDaRsnoQi6CfPu/761F.1EpwW
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 OliviaJamesQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'oliviajames';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
OliviaJamesQuiz.makeQuestion0(),
16+
OliviaJamesQuiz.makeQuestion1(),
17+
OliviaJamesQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'Which CSS property is used to change the font size of an element?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'text-size'],
27+
[AnswerChoice.B, 'font-size'],
28+
[AnswerChoice.C, 'size'],
29+
[AnswerChoice.D, 'font-weight'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
);
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'Which of the following is the correct syntax for a CSS comment??',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, '// This is a comment'],
41+
[AnswerChoice.B, ' /* This is a comment */'],
42+
[AnswerChoice.C, '# This is a comment'],
43+
[AnswerChoice.D, '<!-- This is a comment -->'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
);
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'Which tag is used to create an unordered list in HTML?',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, '<ol>'],
55+
[AnswerChoice.B, '<ul>'],
56+
[AnswerChoice.C, '<li>'],
57+
[AnswerChoice.D, '<list>'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
);
61+
}
62+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { JeremiahWingQuiz } from './jeremiah_wing_quiz.js';
1414
import { KhaylaSaundersQuiz } from './khayla_quiz.js';
1515
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
1616
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
17+
import { OliviaJamesQuiz } from './olivia_james_quiz.js';
1718
import { MontezBradleyQuiz } from './montez_quiz.js';
1819
import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
1920

@@ -36,6 +37,7 @@ const QUIZ_PROVIDERS = [
3637
KhaylaSaundersQuiz,
3738
DylanLaffertyQuiz,
3839
RasheedMillerQuiz,
40+
OliviaJamesQuiz,
3941
ChanelHuttQuiz,
4042
JeremiahWingQuiz,
4143
JasonWatsonQuiz,

0 commit comments

Comments
 (0)