|
| 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 of the following is the correct syntax for a CSS comment??', |
| 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 | +} |
0 commit comments