Skip to content

Commit a27b921

Browse files
feat: adds Linda's custom quiz (#117)
Co-authored-by: Anthony D. Mays <[email protected]>
1 parent 75a75c2 commit a27b921

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
@@ -35,6 +35,10 @@ quiz:
3535
- $2y$10$FMRsdjEhIG0anbZOIcVvSOy4e4eFTZGIYYyATChwc.QRMpWuomR5C
3636
- $2y$10$0AQW/94c4pPxp8xIhJUIs.qoLnUuQg/Hwe1vd4975K96EKGEPz.H6
3737
- $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W
38+
lindaquinoa:
39+
- $2y$10$c.9r1fNSkCuBu6TBI53vfet82OkufPL4mkFZsocIFpz3dQQoYkL9K
40+
- $2y$10$5.x9AKn2gEhew5ek1Y7GguN/bvae2EktevTDpCBvuEjqqOy/MeuHK
41+
- $2y$10$sW6nyRbtgsBgwypTO4s/6.q4YxcHmTSOW62AzXxr5OWd0M6luF2C.
3842
taliacrockett:
3943
- $2y$10$Q/lb7miLQrsy9D5j/4FE/.DZAzQ4BkIWk8BUKjjaIg2OLRS9v1/cC
4044
- $2y$10$MWsUIECL5NP2p/8RbbDWv.Mi6shrjwRtHFMwd/zpmKuCNVSAZXd/e
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 LindaQuinoaQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'lindaquinoa';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
LindaQuinoaQuiz.makeQuestion0(),
16+
LindaQuinoaQuiz.makeQuestion1(),
17+
LindaQuinoaQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'Which HTML element is best suited for defining the mainheading of a page for both search engines and screen readers?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, '<title>'],
27+
[AnswerChoice.B, '<header'],
28+
[AnswerChoice.C, '<h1>'],
29+
[AnswerChoice.D, '<head>'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'When two CSS rules target the same element, which factor has the highest priority in determining which style is applied?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'The order the CSS files are linked in the HTML'],
41+
[AnswerChoice.B, 'Specificity of the selectors'],
42+
[AnswerChoice.C, 'The font-family value'],
43+
[AnswerChoice.D, 'The number of lines of CSS code in the stylesheet'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'What is the main purpose of creating a new branch in Git before starting a feature?',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, 'To automatically merge changes into the main branch'],
55+
[AnswerChoice.B, 'To experiment without affecting the main codebase'],
56+
[AnswerChoice.C, 'To delete the main branch safely'],
57+
[AnswerChoice.D, 'To reduce the size of the repository'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
); // Replace `UNANSWERED` with the correct answer.
61+
}
62+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
99
import { TaliaCrockettQuiz } from './talia_crockett_quiz.js';
1010
import { TrinitieJacksonQuiz } from './trinitie_jackson_quiz.js';
1111
import { TyranRicesQuiz } from './tyran_rices_quiz.js';
12+
import { LindaQuinoaQuiz } from './linda_quinoa_quiz.js';
1213
import { DeanWalstonQuiz } from './dean_walston_quiz.js';
1314

1415
export const Quizzes = Symbol.for('Quizzes');
@@ -23,6 +24,7 @@ const QUIZ_PROVIDERS = [
2324
MattieWeathersbyQuiz,
2425
BenjaminScottQuiz,
2526
DanielsonAdjocyQuiz,
27+
LindaQuinoaQuiz,
2628
TaliaCrockettQuiz,
2729
DeanWalstonQuiz,
2830
KerryFergusonQuiz,

0 commit comments

Comments
 (0)