Skip to content

Feature/lesson 01 #119

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 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 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 @@ -18,3 +18,7 @@ quiz:
- $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql.
- $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC
- $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW
dwightblue:
- $2y$10$IpmwlGZO8Re1shIeAvYFnOK5tmzdsAWbTwUq3oTWQHVtUfloXOWeW
- $2y$10$PxOTKSNTANnX8395ipDW7el3KpnADsi/g0H39V4XKCo3TrCK1ib5S
- $2y$10$WYkaVdArZ7Wa5Tkw.F1tY.LY3r6t/twFYiMsCZMCwDrBtfDpROpWG
57 changes: 57 additions & 0 deletions lesson_03/quiz/src/quizzes/dwight_blue_quiz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class DwightBlueQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'dwightblue';
}

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

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'What is the largest state in the USA? ',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Texas'],
[AnswerChoice.B, 'California'],
[AnswerChoice.C, 'Alaska'],
[AnswerChoice.D, 'New York'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion1(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
1,
'What are you unable to write on? ',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Paper'],
[AnswerChoice.B, 'Notepad'],
[AnswerChoice.C, 'Sand'],
[AnswerChoice.D, 'Space'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion2(): QuizQuestion {
return new QuizQuestion(
2,
'What did BASIC programing lanuage use to sort coding',
'',
);
// Provide an answer.
}
}
4 changes: 3 additions & 1 deletion lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Module } from '@nestjs/common';
import { AnotherQuiz } from './another_quiz.js';
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
import { DwightBlueQuiz } from './dwight_blue_quiz.js';
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';

export const Quizzes = Symbol.for('Quizzes');
Expand All @@ -15,6 +16,7 @@ const QUIZ_PROVIDERS = [
AnotherQuiz,
JosephCaballeroQuiz,
OyeyemiJimohQuiz,
DwightBlueQuiz,
];

@Module({
Expand Down