Skip to content

feat: Olivia James'lesson_03 quiz #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lesson_03/quiz/quiz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ quiz:
- $2y$10$7/GS4n5j/5TXQc5zjDzlc.2xBKwRqrsksWzcl7VKRwa.fDxzdficS
- $2y$10$9mfdal67CXoVG2phPKe1s.BpAT6HQeyQIiDtStfFazkPMW2AaW6Zu
- $2y$10$LiCnvad23bwZWZbxXLhs3.r/YdwIX9eAFtjofaW1AH3Htnc9sEU1G
oliviajames:
- $2y$10$XNIaT3YK/NmvATnebmrOHuIoSqsGlfqlW82R2NfFxEJn1CWmmzgzm
- $2y$10$mdHWON2e8lS8HUQZkp5W0OoAd5xkdUCouXCeFPnoz3Ilpjv5Vb9uu
- $2y$10$hGQy6LkNRkXfT9Vk67c4meGH.99yLT73.HKfzWqsgTKHLHerzI7ey
62 changes: 62 additions & 0 deletions lesson_03/quiz/src/quizzes/olivia_james.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class OliviaJamesQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'oliviajames';
}

makeQuizQuestions(): QuizQuestion[] {
return [
OliviaJamesQuiz.makeQuestion0(),
OliviaJamesQuiz.makeQuestion1(),
OliviaJamesQuiz.makeQuestion2(),
];
}

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'Which CSS property is used to change the font size of an element?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'text-size'],
[AnswerChoice.B, 'font-size'],
[AnswerChoice.C, 'size'],
[AnswerChoice.D, 'font-weight'],
]),
AnswerChoice.UNANSWERED,
);
}

private static makeQuestion1(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
1,
'Which of the following is the correct syntax for a CSS comment??',
new Map<AnswerChoice, string>([
[AnswerChoice.A, '// This is a comment'],
[AnswerChoice.B, ' /* This is a comment */'],
[AnswerChoice.C, '# This is a comment'],
[AnswerChoice.D, '<!-- This is a comment -->'],
]),
AnswerChoice.UNANSWERED,
);
}

private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
'Which tag is used to create an unordered list in HTML?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, '<ol>'],
[AnswerChoice.B, '<ul>'],
[AnswerChoice.C, '<li>'],
[AnswerChoice.D, '<list>'],
]),
AnswerChoice.UNANSWERED,
);
}
}
2 changes: 2 additions & 0 deletions lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { KhaylaSaundersQuiz } from './khayla_quiz.js';
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
import { OliviaJamesQuiz } from './olivia_james.js';

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

Expand All @@ -33,6 +34,7 @@ const QUIZ_PROVIDERS = [
ChanelHuttQuiz,
JeremiahWingQuiz,
JasonWatsonQuiz,
OliviaJamesQuiz,
];

@Module({
Expand Down