Skip to content
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

Lesson 3 Tommy Tran quiz #123

Merged
merged 13 commits into from
Oct 2, 2024
7 changes: 5 additions & 2 deletions lesson_03/quiz/quiz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ quiz:
- $2y$10$9D.oRC8h/PD/10NMSR6MMOzjVAJKm.vfw4te8Rxgw1M1.0Q9x8pjK
- $2y$10$ypLhtfxJikRhLaQdW0Y8GOEqO/X1uoBD8w.kSSSUPggBa9wHLkw0i
- $2y$10$cYuji5D0xOEFAV2fyMaJAuaODeWEwIYu.X3089qnojdx3nQljil5G
dasiaenglish:
dasiaenglish:
- $2y$10$ANtdDzA0GAqn/QeExPO/Du8LgHUwznRLxpv0W0ib2seYk23BZowOC
- $2y$10$6vAkOUmpPrUtWrh010f8e.A4M9kEzuzCrQ8ghWI9hQSEsZeGHpQ9W
- $2y$10$YYTJf2QW.BJST9EUB7NZneVpNkOywIfhsWRpxIsPBg/oTmgqoYWse
Expand Down Expand Up @@ -39,4 +39,7 @@ quiz:
- $2y$10$QsN9VkjWORsKgZRiBT46VOUgc5HVnswKAT4uDbs7JYbTF7DdKbsw.
- $2y$10$sqXEOL0L8o0kRyiAb.2s4u0RlBC2.LmOGDbGWXHj5IfBNwinkv2yq
- $2y$10$HaWueXgrIzd7z8yf39HfVeTjjyr.Kgx0GFBqwCRSzW3zRSreN19yi

tommytran:
- $2y$10$6Mf9m8JXRHUyCgRNPn4nceimRZVOhtmsZbOGoFnI4ZJp..RluHmwy
- $2y$10$Xr6W53IVq52orDvf6.TQQuXeMGaysQdgAu1cm5DYi1NyCskG2ByPe
- $2y$10$x8BG/EcIbVohTU1s/thyc.TIzlfc8f/aVZaD4/1yMpcks2OWzKKMe
62 changes: 62 additions & 0 deletions lesson_03/quiz/src/quizzes/Tommy_Tran_quiz.ts
txtran224 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class TommyTranQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'tommytran';
}

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

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'What is the capital city of Japan?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Seoul'],
[AnswerChoice.B, 'Tokyo'],
[AnswerChoice.C, 'Beijing'],
[AnswerChoice.D, 'Bangkok'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion1(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
1,
'Which planet is known as the "Red Planet?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Venus'],
[AnswerChoice.B, 'Jupiter'],
[AnswerChoice.C, 'Mars'],
[AnswerChoice.D, 'Saturn'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
'Who wrote the play "Romeo and Juliet?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Charles Dickens'],
[AnswerChoice.B, 'William Shakespeare'],
[AnswerChoice.C, 'Jane Austen'],
[AnswerChoice.D, 'Mark Twain'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
}
10 changes: 6 additions & 4 deletions lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { Module } from '@nestjs/common';
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';
import { AngelicaCQuiz } from './angelica_c_quiz.js';
import { AnotherQuiz } from './another_quiz.js';
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
import { XavierCruzQuiz } from './xavier_cruz_quiz.js';
import { DasiaEnglishQuiz } from './dasia_english_quiz.js';
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
import { DasiaEnglishQuiz } from './dasia_english_quiz.js';
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
import { TommyTranQuiz } from './Tommy_Tran_quiz.js';
txtran224 marked this conversation as resolved.
Show resolved Hide resolved
import { XavierCruzQuiz } from './xavier_cruz_quiz.js';
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';

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

Expand All @@ -23,7 +24,8 @@ const QUIZ_PROVIDERS = [
DasiaEnglishQuiz,
ChigazoGrahamsQuiz,
AmiyahJonesQuiz,
XavierCruzQuiz
txtran224 marked this conversation as resolved.
Show resolved Hide resolved
XavierCruzQuiz,
TommyTranQuiz,
];

@Module({
Expand Down