Skip to content

feat: Ran test and got 3/4 then 4/4 using command #93

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

Merged
merged 7 commits into from
Sep 30, 2024
Merged
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
10 changes: 7 additions & 3 deletions lesson_03/quiz/quiz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ quiz:
anotherone:
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
josephcaballero:
- $2y$10$FmVJ1V9hSIUbi8DGx4cq5.wPOMq5en312H4zb5H2AJUDtDeWJg74e
- $2y$10$vI6tL8o2P23w/bh5tYvyf.iiH42BQHl5Rh1teG8mMaMfj1XNhO/..
- $2y$10$BSPejBBqvmV7iEilAy7kOOaBCtIVDWxfvH53b/v106qadbhQeQXEW
yafiahAbdullah:
- $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql.
- $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC
- $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW
- $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql.
- $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC
- $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW
55 changes: 55 additions & 0 deletions lesson_03/quiz/src/quizzes/joseph_caballero_quiz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class JosephCaballeroQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'josephcaballero';
}

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

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'What is HTML?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'A food branch'],
[
AnswerChoice.B,
'A hypertext markup language for frontend development',
],
[AnswerChoice.C, 'An animal'],
[AnswerChoice.D, 'Whatever you want it to be!'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer .
}

private static makeQuestion1(): QuizQuestion {
return new QuizQuestion(1, 'What is the styling language for HTML?', '');
// Provide an answer.
}
private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
'What does CSS stand for ?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Computing Style Software'],
[AnswerChoice.B, 'Cascading Style Sheets'],
[AnswerChoice.C, 'Circle Stuff and Stuff'],
[AnswerChoice.D, 'Whatever you want it to be!'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
}
9 changes: 7 additions & 2 deletions lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { Module } from '@nestjs/common';
import { AnotherQuiz } from './another_quiz.js';
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';


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

// Add your quiz provider here.
const QUIZ_PROVIDERS = [AnthonyMaysQuiz,YafiahAbdullahQuiz, AnotherQuiz];
const QUIZ_PROVIDERS = [
AnthonyMaysQuiz,
YafiahAbdullahQuiz,
AnotherQuiz,
JosephCaballeroQuiz,
];

@Module({
providers: [
Expand Down