|
| 1 | +import { |
| 2 | + AnswerChoice, |
| 3 | + MultipleChoiceQuizQuestion, |
| 4 | + MultipleQuestionnaireProvider, |
| 5 | + QuizQuestion, |
| 6 | +} from 'codedifferently-instructional'; |
| 7 | + |
| 8 | +export class ChanelHuttQuiz implements MultipleQuestionnaireProvider { |
| 9 | + getProviderName(): string { |
| 10 | + return 'multiplequestionnaire'; |
| 11 | + } |
| 12 | + |
| 13 | + makeQuizQuestions(): QuizQuestion[] { |
| 14 | + return [ChanelHuttQuiz.makeQuestion0(), ChanelHuttQuiz.makeQuestion1()]; |
| 15 | + } |
| 16 | + |
| 17 | + private static makeQuestion0(): MultipleQuestionnaire { |
| 18 | + return new MultipleChoiceQuizQuestion( |
| 19 | + 0, |
| 20 | + 'When do you commit your code?', |
| 21 | + new Map<AnswerChoice, string>([ |
| 22 | + [AnswerChoice.A, 'A question about agency'], |
| 23 | + [AnswerChoice.B, 'The hardest kind of quiz question there is'], |
| 24 | + [ |
| 25 | + AnswerChoice.C, |
| 26 | + 'A question that can be answered using one or more provided choices', |
| 27 | + ], |
| 28 | + [AnswerChoice.D, 'Whatever you want it to be!'], |
| 29 | + ]), |
| 30 | + AnswerChoice.UNANSWERED, |
| 31 | + ); // Replace `UNANSWERED` with the correct answer. |
| 32 | + } |
| 33 | + |
| 34 | + private static makeQuestion0(): MultipleQuestionnaire { |
| 35 | + return new MultipleChoiceQuizQuestion( |
| 36 | + 1, |
| 37 | + 'What is a multiple choice question?', |
| 38 | + new Map<AnswerChoice, string>([ |
| 39 | + [AnswerChoice.A, 'A question about agency'], |
| 40 | + [AnswerChoice.B, 'The hardest kind of quiz question there is'], |
| 41 | + [ |
| 42 | + AnswerChoice.C, |
| 43 | + 'A question that can be answered using one or more provided choices', |
| 44 | + ], |
| 45 | + [AnswerChoice.D, 'Whatever you want it to be!'], |
| 46 | + ]), |
| 47 | + AnswerChoice.UNANSWERED, |
| 48 | + ); // Replace `UNANSWERED` with the correct answer. |
| 49 | + } |
| 50 | + |
| 51 | + private static makeQuestion0(): MultipleQuestionnaire { |
| 52 | + return new MultipleChoiceQuizQuestion( |
| 53 | + 2, |
| 54 | + 'What is a multiple choice question?', |
| 55 | + new Map<AnswerChoice, string>([ |
| 56 | + [AnswerChoice.A, 'A question about agency'], |
| 57 | + [AnswerChoice.B, 'The hardest kind of quiz question there is'], |
| 58 | + [ |
| 59 | + AnswerChoice.C, |
| 60 | + 'A question that can be answered using one or more provided choices', |
| 61 | + ], |
| 62 | + [AnswerChoice.D, 'Whatever you want it to be!'], |
| 63 | + ]), |
| 64 | + AnswerChoice.UNANSWERED, |
| 65 | + ); // Replace `UNANSWERED` with the correct answer. |
| 66 | + } |
| 67 | +} |
0 commit comments