Skip to content

Commit ef21d35

Browse files
committed
feat: Olivia James'lesson_03 quiz
1 parent 4bb35ec commit ef21d35

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
@@ -55,3 +55,7 @@ quiz:
5555
- $2y$10$7/GS4n5j/5TXQc5zjDzlc.2xBKwRqrsksWzcl7VKRwa.fDxzdficS
5656
- $2y$10$9mfdal67CXoVG2phPKe1s.BpAT6HQeyQIiDtStfFazkPMW2AaW6Zu
5757
- $2y$10$LiCnvad23bwZWZbxXLhs3.r/YdwIX9eAFtjofaW1AH3Htnc9sEU1G
58+
oliviajames:
59+
- $2y$10$XNIaT3YK/NmvATnebmrOHuIoSqsGlfqlW82R2NfFxEJn1CWmmzgzm
60+
- $2y$10$mdHWON2e8lS8HUQZkp5W0OoAd5xkdUCouXCeFPnoz3Ilpjv5Vb9uu
61+
- $2y$10$hGQy6LkNRkXfT9Vk67c4meGH.99yLT73.HKfzWqsgTKHLHerzI7ey
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
@@ -13,6 +13,7 @@ import { KhaylaSaundersQuiz } from './khayla_quiz.js';
1313
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
1414
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
1515
import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
16+
import { OliviaJamesQuiz } from './olivia_james.js';
1617

1718
export const Quizzes = Symbol.for('Quizzes');
1819

@@ -33,6 +34,7 @@ const QUIZ_PROVIDERS = [
3334
ChanelHuttQuiz,
3435
JeremiahWingQuiz,
3536
JasonWatsonQuiz,
37+
OliviaJamesQuiz,
3638
];
3739

3840
@Module({

0 commit comments

Comments
 (0)